summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2018-03-02 17:46:26 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2018-03-07 11:58:21 +0000
commit863178beafc1ab903f1425d56a3e591f4c29cb4e (patch)
tree853e3c8dd1f16b630523b878e39fb3c4a9739021
parentdc10d71b180a4ac55dcf62a03f627183ce611c31 (diff)
Revert the heinous sysinc hack qdoc needed for clang 3.9v5.11.0-beta2
This reverts commits c95cba39a68bea4dc4c3c003e768412f0640e24f and 65d817345faf34cf9e5cc4f203b276de906fd84a. Apparently clang is now smart enough to handle its system include paths itself; and trying to "help" was causing problems. It was, in any case, a heinous hack. Task-number: QTBUG-66746 Change-Id: I485c6acddfd89f91a4b719f2e2e049ff76a61ce9 Reviewed-by: Martin Smith <martin.smith@qt.io> Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r--src/qdoc/main.cpp32
-rw-r--r--src/qdoc/qdoc.pro3
2 files changed, 1 insertions, 34 deletions
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp
index 5232d3a24..a328b7af1 100644
--- a/src/qdoc/main.cpp
+++ b/src/qdoc/main.cpp
@@ -26,16 +26,6 @@
**
****************************************************************************/
-#ifdef HEINOUS_SYSINC_HACK // There must be no #include before this !
-#define setlocale locale_file_name_for_clang_qdoc() { \
- static char data[] = __FILE__; \
- return data; \
- } \
- extern char *setlocale
-#include <locale.h>
-#undef setlocale
-#endif // HEINOUS_SYSINC_HACK
-
#include <qglobal.h>
#include <qhashfunctions.h>
#include <stdlib.h>
@@ -665,22 +655,6 @@ QDocCommandLineParser::QDocCommandLineParser()
addOption(frameworkOption);
}
-#ifdef HEINOUS_SYSINC_HACK
-/*!
- Return the system include directory used when compiling this file.
- */
-static QByteArray getSystemIncludePath()
-{
- const char *raw = locale_file_name_for_clang_qdoc();
- const char *slash = strrchr(raw, '/');
- if (slash == NULL)
- slash = strrchr(raw, '\\');
- if (slash == NULL)
- return QByteArray();
- return QByteArray(raw, slash - raw);
-}
-#endif // HEINOUS_SYSINC_HACK
-
void QDocCommandLineParser::process(const QCoreApplication &app)
{
QCommandLineParser::process(app);
@@ -730,11 +704,7 @@ void QDocCommandLineParser::process(const QCoreApplication &app)
const auto paths = values(includePathOption);
for (const auto &i : paths)
includesPaths << "-I" << currentDir.absoluteFilePath(i);
- auto paths2 = values(includePathSystemOption);
-#ifdef HEINOUS_SYSINC_HACK
- if (paths2.isEmpty())
- paths2 << QString(getSystemIncludePath());
-#endif // HEINOUS_SYSINC_HACK
+ const auto paths2 = values(includePathSystemOption);
for (const auto &i : paths2)
includesPaths << "-isystem" << currentDir.absoluteFilePath(i);
const auto paths3 = values(frameworkOption);
diff --git a/src/qdoc/qdoc.pro b/src/qdoc/qdoc.pro
index 38fa8b550..e3b431aa9 100644
--- a/src/qdoc/qdoc.pro
+++ b/src/qdoc/qdoc.pro
@@ -26,9 +26,6 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
# Increase the stack size on MSVC to 4M to avoid a stack overflow
win32-icc*|win32-msvc*:{
QMAKE_LFLAGS += /STACK:4194304
-} else {
- # (MSVC objects to defining a function in the locale.h dllimport context)
- DEFINES += HEINOUS_SYSINC_HACK
}
HEADERS += atom.h \