From 11c30f9705e796ebabcdd868bce3ad3664cc06eb Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 19 Jun 2014 12:30:32 -0700 Subject: Remove QT_STATIC_CONST This macro is no longer used. It was introduced probably by mistake, due to MSVC not following the strict string requirement of the C and C++ standards by default (you can assign a string literal to a non-const char*). Change-Id: I4b221dd435191b0eea689dbed35915cf3206648b Reviewed-by: Martin Smith Reviewed-by: Friedemann Kleint --- src/corelib/global/qcompilerdetection.h | 12 ------------ src/tools/qdoc/config.cpp | 2 +- src/tools/qdoc/config.h | 2 +- src/tools/qdoc/location.cpp | 2 +- src/tools/qdoc/location.h | 2 +- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 7498c778a8..0f9a821e40 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -1015,18 +1015,6 @@ # define Q_DECL_CONST_FUNCTION Q_DECL_PURE_FUNCTION #endif -/* - Workaround for static const members on MSVC++. -*/ - -#if defined(Q_CC_MSVC) -# define QT_STATIC_CONST static -# define QT_STATIC_CONST_IMPL -#else -# define QT_STATIC_CONST static const -# define QT_STATIC_CONST_IMPL const -#endif - /* Proper for-scoping in MIPSpro CC */ diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index 172ed8015d..74a571fa3c 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -242,7 +242,7 @@ QStringList MetaStack::getExpanded(const Location& location) return top().accum; } -QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String("."); +const QString Config::dot = QLatin1String("."); bool Config::debug_ = false; bool Config::generateExamples = true; QString Config::overrideOutputDir; diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h index 622573dac2..5e21e069b5 100644 --- a/src/tools/qdoc/config.h +++ b/src/tools/qdoc/config.h @@ -141,7 +141,7 @@ public: static void pushWorkingDir(const QString& dir); static QString popWorkingDir(); - QT_STATIC_CONST QString dot; + static const QString dot; static bool generateExamples; static QString installDir; diff --git a/src/tools/qdoc/location.cpp b/src/tools/qdoc/location.cpp index cdecb59626..073b1cb174 100644 --- a/src/tools/qdoc/location.cpp +++ b/src/tools/qdoc/location.cpp @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE -QT_STATIC_CONST_IMPL Location Location::null; +const Location Location::null; int Location::tabSize; QString Location::programName; diff --git a/src/tools/qdoc/location.h b/src/tools/qdoc/location.h index 0c113bcbeb..d5ea5a6af0 100644 --- a/src/tools/qdoc/location.h +++ b/src/tools/qdoc/location.h @@ -90,7 +90,7 @@ public: void fatal(const QString& message, const QString& details = QString()) const; - QT_STATIC_CONST Location null; + static const Location null; static void initialize(const Config& config); static void terminate(); -- cgit v1.2.3