summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qlocale.cpp15
-rw-r--r--src/corelib/tools/qlocale_p.h2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 086ca7bd38..e40917c5d8 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -46,13 +46,6 @@
#include "qglobal.h"
-#ifndef QT_NO_SYSTEMLOCALE
-QT_BEGIN_NAMESPACE
-class QSystemLocale;
-static QSystemLocale *QSystemLocale_globalSystemLocale();
-QT_END_NAMESPACE
-#endif
-
#include "qplatformdefs.h"
#include "qdatastream.h"
@@ -78,7 +71,13 @@ QT_BEGIN_NAMESPACE
#ifndef QT_NO_SYSTEMLOCALE
static QSystemLocale *_systemLocale = 0;
-Q_GLOBAL_STATIC_WITH_ARGS(QSystemLocale, QSystemLocale_globalSystemLocale, (true))
+class QSystemLocaleSingleton: public QSystemLocale
+{
+public:
+ QSystemLocaleSingleton() : QSystemLocale(true) {}
+};
+
+Q_GLOBAL_STATIC(QSystemLocaleSingleton, QSystemLocale_globalSystemLocale)
static QLocalePrivate *system_lp = 0;
Q_GLOBAL_STATIC(QLocalePrivate, globalLocalePrivate)
#endif
diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h
index ad7c9706c4..377a60881f 100644
--- a/src/corelib/tools/qlocale_p.h
+++ b/src/corelib/tools/qlocale_p.h
@@ -122,7 +122,7 @@ public:
private:
QSystemLocale(bool);
- friend QSystemLocale *QSystemLocale_globalSystemLocale();
+ friend class QSystemLocaleSingleton;
};
#endif