diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-22 00:19:34 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-22 00:23:46 (GMT) |
commit | 5be62fbd822206c625cab4892ab485923dc79a00 (patch) | |
tree | d8374a09f4b5e4627af2a2bfddb721e2661905ad /src | |
parent | b9b6258729585803e00b71280e175618b6bd50c2 (diff) | |
download | Qt-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')
-rw-r--r-- | src/gui/kernel/qapplication.cpp | 10 | ||||
-rw-r--r-- | src/opengl/qpixmapdata_gl.cpp | 3 |
2 files changed, 8 insertions, 5 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(); } diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index f0c7e20..fe3bb0c 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -303,6 +303,8 @@ QImage QGLPixmapData::fillImage(const QColor &color) const return img; } +extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha); + QImage QGLPixmapData::toImage() const { if (!isValid()) @@ -319,7 +321,6 @@ QImage QGLPixmapData::toImage() const } QGLShareContextScope ctx(qt_gl_share_widget()->context()); - extern QImage qt_gl_read_texture(const QSize &size, bool alpha_format, bool include_alpha); glBindTexture(GL_TEXTURE_2D, m_textureId); return qt_gl_read_texture(QSize(w, h), true, true); } |