diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp index 5232d3a240ecb707397494d697177c867ea63ad6..a328b7af13313b04613f1a0c572655b2e81b8d5f 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 38fa8b550d01d031e06c85ffe175e22c4ade0cfe..e3b431aa9dbf13877a9102c0e246a9714b11072c 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 \