QCAD Bugtracker

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category QCAD (main)
  • Assigned To
    Andrew
  • Operating System macOS (All)
  • Severity Low
  • Priority Very Low
  • Reported Version 3.2.0
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: QCAD Bugtracker
Opened by Tamas TEVESZ - 14.08.2013
Last edited by Andrew - 14.08.2013

FS#885 - Xcode Clang wrongly reported as GCC

src/core/RSettings.cpp:RSettings::getCompilerVersion() doesn’t account for Clang, used in Xcode. Instead of reporting the appropriate Clang version number, it reports the GCC compatibility level. The following patch addresses the issue.

diff --git a/src/core/RSettings.cpp b/src/core/RSettings.cpp
index 46dc6df..d6fbe63 100644
--- a/src/core/RSettings.cpp
+++ b/src/core/RSettings.cpp
@@ -363,7 +363,9 @@ QString RSettings::getQtVersion() {
 }
 
 QString RSettings::getCompilerVersion() {
-#if defined(Q_CC_GNU)
+#if defined(Q_CC_CLANG)
+    return QString("Clang %1.%2.%3").arg(__clang_major__).arg(__clang_minor__).arg(__clang_patchlevel__);
+#elif defined(Q_CC_GNU)
     return QString("gcc %1.%2.%3").arg(__GNUC__).arg(__GNUC_MINOR__).arg(__GNUC_PATCHLEVEL__);
 #elif defined(Q_CC_MSVC)
 #   if _MSC_VER==1310
Closed by  Andrew
14.08.2013 23:59
Reason for closing:  Fixed
Additional comments about closing:  

https://github.com/qcad/qcad/commit /328feb6eb3c6ee165d027c73d5f6a422644649c 8

Admin
Andrew commented on 14.08.2013 23:58

Excellent, thanks for the patch!

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing