summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2009-07-22 00:19:34 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2009-07-22 00:23:46 (GMT)
commit5be62fbd822206c625cab4892ab485923dc79a00 (patch)
treed8374a09f4b5e4627af2a2bfddb721e2661905ad /src/gui/kernel/qapplication.cpp
parentb9b6258729585803e00b71280e175618b6bd50c2 (diff)
downloadQt-5be62fbd822206c625cab4892ab485923dc79a00.zip
Qt-5be62fbd822206c625cab4892ab485923dc79a00.tar.gz
Qt-5be62fbd822206c625cab4892ab485923dc79a00.tar.bz2
Fixed compile with -qtnamespace and MSVC.
When an extern function is declared in the scope of another function, MSVC sometimes ignores the enclosing namespace {}.
Diffstat (limited to 'src/gui/kernel/qapplication.cpp')
-rw-r--r--src/gui/kernel/qapplication.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index b168188..3453408 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -819,6 +819,12 @@ QApplication::QApplication(Display *dpy, int &argc, char **argv,
#endif // Q_WS_X11
extern void qInitDrawhelperAsm();
+extern int qRegisterGuiVariant();
+extern int qUnregisterGuiVariant();
+#ifndef QT_NO_STATEMACHINE
+extern int qRegisterGuiStateMachine();
+extern int qUnregisterGuiStateMachine();
+#endif
/*!
\fn void QApplicationPrivate::initialize()
@@ -832,11 +838,9 @@ void QApplicationPrivate::initialize()
if (qt_appType != QApplication::Tty)
(void) QApplication::style(); // trigger creation of application style
// trigger registering of QVariant's GUI types
- extern int qRegisterGuiVariant();
qRegisterGuiVariant();
#ifndef QT_NO_STATEMACHINE
// trigger registering of QStateMachine's GUI types
- extern int qRegisterGuiStateMachine();
qRegisterGuiStateMachine();
#endif
@@ -1060,11 +1064,9 @@ QApplication::~QApplication()
#ifndef QT_NO_STATEMACHINE
// trigger unregistering of QStateMachine's GUI types
- extern int qUnregisterGuiStateMachine();
qUnregisterGuiStateMachine();
#endif
// trigger unregistering of QVariant's GUI types
- extern int qUnregisterGuiVariant();
qUnregisterGuiVariant();
}