From 8796c69480a6e5e331d19edf24d4dabb180bc4d2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 10 Oct 2016 03:55:35 +0200 Subject: QNetworkSession: make sure that "interface" isn't #defined Depending on #include order isn't a good idea. Change-Id: Ief935e1fcc5d40ecb510fffd147c08dffe6cba2d Reviewed-by: Edward Welbourne --- src/network/bearer/qnetworksession.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 6f83fd25ca..1b939bab01 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -42,6 +42,11 @@ #include "qnetworkconfigmanager_p.h" +// for QNetworkSession::interface +#ifdef interface +# undef interface +#endif + #ifndef QT_NO_BEARERMANAGEMENT QT_BEGIN_NAMESPACE -- cgit v1.2.3 From d023b300b26a9db3cf4dbbe31c1cc5726fe277d7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 1 Sep 2016 13:29:46 +0200 Subject: Document that am/pm in QDateTime::toString are locale-specific Change-Id: I28382b25ac94cbfbad4acff1308ddd8baf5ca693 Task-number: QTBUG-55632 Reviewed-by: Edward Welbourne --- src/corelib/tools/qdatetime.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 6b09b4107c..3e29b55666 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1623,9 +1623,11 @@ QString QTime::toString(Qt::DateFormat format) const \row \li z \li the milliseconds without leading zeroes (0 to 999) \row \li zzz \li the milliseconds with leading zeroes (000 to 999) \row \li AP or A - \li use AM/PM display. \e A/AP will be replaced by either "AM" or "PM". + \li use AM/PM display. \e A/AP will be replaced by either + QLocale::amText() or QLocale::pmText(). \row \li ap or a - \li use am/pm display. \e a/ap will be replaced by either "am" or "pm". + \li use am/pm display. \e a/ap will be replaced by a lower-case version of + QLocale::amText() or QLocale::pmText(). \row \li t \li the timezone (for example "CEST") \endtable @@ -1634,7 +1636,8 @@ QString QTime::toString(Qt::DateFormat format) const expression. Two consecutive single quotes ("''") are replaced by a singlequote in the output. Formats without separators (e.g. "HHmm") are currently not supported. - Example format strings (assuming that the QTime is 14:13:09.042) + Example format strings (assuming that the QTime is 14:13:09.042 and the system + locale is \c{en_US}) \table \header \li Format \li Result -- cgit v1.2.3 From 51767affb380eea5961637f07a2e881b93b6fea5 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 11 Feb 2016 16:28:57 +0100 Subject: Show warning when setting new default QSurfaceFormat If a global shared context is created, and afterwards a new default QSurfaceFormat with a different version or profile is set, it can lead to issues with context sharing. The documentation for QSurfaceFormat::setDefaultFormat mentions this. It would be helpful to actually show a warning in case it happens. Change-Id: I71f7ce95496e1ecbfc6a0c7d7bed146ef8dc351e Reviewed-by: Laszlo Agocs --- src/gui/kernel/qsurfaceformat.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index d078336d73..18fde5716b 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -35,6 +35,7 @@ #include #include +#include #ifdef major #undef major @@ -758,6 +759,11 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format) */ void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format) { + QOpenGLContext *globalContext = QOpenGLContext::globalShareContext(); + if (globalContext && globalContext->isValid()) { + qWarning("Warning: Setting a new default format with a different version or profile after " + "the global shared context is created may cause issues with context sharing."); + } *qt_default_surface_format() = format; } -- cgit v1.2.3 From cd1d11414021288729cd85a32a7a1160756aeeab Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 30 Sep 2016 18:36:15 +0200 Subject: Unset qgl_current_fbo when the default FBO is bound Previously when a new QOpenGLFramebufferObject was bound, the QOpenGLContextPrivate::qgl_current_fbo member was also updated to point to this new object. But if a user called QOpenGLFramebufferObject::bindDefault(), qgl_current_fbo was not unset, meaning that if the FBO object would be deleted at some point, qgl_current_fbo would be a dangling pointer. This patch makes sure to clear the value of qgl_current_fbo when bindDefault() is called. It is cleared, and not set to point to another object because the default platform OpenGL FBO is not backed by a QOpenGLFramebufferObject. Task-number: QTBUG-56296 Change-Id: I68b53d8b446660accdf5841df3d168ee2f133a90 Reviewed-by: Simon Hausmann Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglframebufferobject.cpp | 1 + tests/auto/gui/qopengl/tst_qopengl.cpp | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 56e04c09d8..b1b580f85b 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1490,6 +1490,7 @@ bool QOpenGLFramebufferObject::bindDefault() if (ctx) { ctx->functions()->glBindFramebuffer(GL_FRAMEBUFFER, ctx->defaultFramebufferObject()); QOpenGLContextPrivate::get(ctx)->qgl_current_fbo_invalid = true; + QOpenGLContextPrivate::get(ctx)->qgl_current_fbo = Q_NULLPTR; } #ifdef QT_DEBUG else diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index e2ad502a52..00b5da92a8 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -114,6 +114,7 @@ private slots: void vaoCreate(); void bufferCreate(); void bufferMapRange(); + void defaultQGLCurrentBuffer(); }; struct SharedResourceTracker @@ -1525,6 +1526,33 @@ void tst_QOpenGL::bufferMapRange() ctx->doneCurrent(); } +void tst_QOpenGL::defaultQGLCurrentBuffer() +{ + QScopedPointer surface(createSurface(QSurface::Window)); + QScopedPointer ctx(new QOpenGLContext); + ctx->create(); + ctx->makeCurrent(surface.data()); + + // Bind default FBO on the current context, and record what's the current QGL FBO. It should + // be Q_NULLPTR because the default platform OpenGL FBO is not backed by a + // QOpenGLFramebufferObject. + QOpenGLFramebufferObject::bindDefault(); + QOpenGLFramebufferObject *defaultQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo; + + // Create new FBO, bind it, and see that the QGL FBO points to the newly created FBO. + QScopedPointer obj(new QOpenGLFramebufferObject(128, 128)); + obj->bind(); + QOpenGLFramebufferObject *customQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo; + QVERIFY(defaultQFBO != customQFBO); + + // Bind the default FBO, and check that the QGL FBO points to the original FBO object. + QOpenGLFramebufferObject::bindDefault(); + QOpenGLFramebufferObject *finalQFBO = QOpenGLContextPrivate::get(ctx.data())->qgl_current_fbo; + QCOMPARE(defaultQFBO, finalQFBO); + + ctx->doneCurrent(); +} + void tst_QOpenGL::nullTextureInitializtion() { QScopedPointer surface(createSurface(QSurface::Window)); -- cgit v1.2.3 From 23c7816f44cfe02e1e056ab4bb40e618992a0e2b Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 5 Oct 2016 14:27:16 +0200 Subject: Doc: add notes about validator and completer in QComboBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When setting the editable property to false, we delete the internal QLineEdit used by QComboBox. Add comments that this results in the loss of validator and completer. Task-number: QTBUG-56035 Change-Id: Ife04ac2b9bb3f32fae5328f1ec73b1d5d769d52c Reviewed-by: Topi Reiniƶ Reviewed-by: Nico Vertriest --- src/widgets/widgets/qcombobox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 450c27d573..0ef76b95f0 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1678,6 +1678,9 @@ void QComboBox::setIconSize(const QSize &size) By default, this property is \c false. The effect of editing depends on the insert policy. + \note When disabling the \a editable state, the validator and + completer are removed. + \sa InsertPolicy */ bool QComboBox::isEditable() const @@ -1829,6 +1832,8 @@ QLineEdit *QComboBox::lineEdit() const \fn void QComboBox::setValidator(const QValidator *validator) Sets the \a validator to use instead of the current validator. + + \note The validator is removed when the editable property becomes \c false. */ void QComboBox::setValidator(const QValidator *v) @@ -1862,6 +1867,8 @@ const QValidator *QComboBox::validator() const By default, for an editable combo box, a QCompleter that performs case insensitive inline completion is automatically created. + + \note The completer is removed when the \a editable property becomes \c false. */ void QComboBox::setCompleter(QCompleter *c) { -- cgit v1.2.3 From 7740f5e98b2f3ab5d9c1f512d1a89e9e1b64434d Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 13 Oct 2016 13:04:33 +0200 Subject: QMimeXMLProvider: add missing out-of-line destructor Fixes build with the latest GCC 7. Change-Id: I4900a256ed1c6cb177d7f94d54e5b07c06ddad08 Task-number: QTBUG-56514 Reviewed-by: Marc Mutz --- src/corelib/mimetypes/qmimeprovider.cpp | 4 ++++ src/corelib/mimetypes/qmimeprovider_p.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp index fbd14e2d5d..aa8d8c9b08 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -706,6 +706,10 @@ QMimeXMLProvider::QMimeXMLProvider(QMimeDatabasePrivate *db) initResources(); } +QMimeXMLProvider::~QMimeXMLProvider() +{ +} + bool QMimeXMLProvider::isValid() { return true; diff --git a/src/corelib/mimetypes/qmimeprovider_p.h b/src/corelib/mimetypes/qmimeprovider_p.h index c0517d69a4..8eba71eddd 100644 --- a/src/corelib/mimetypes/qmimeprovider_p.h +++ b/src/corelib/mimetypes/qmimeprovider_p.h @@ -132,6 +132,7 @@ class QMimeXMLProvider : public QMimeProviderBase { public: QMimeXMLProvider(QMimeDatabasePrivate *db); + ~QMimeXMLProvider(); virtual bool isValid() Q_DECL_OVERRIDE; virtual QMimeType mimeTypeForName(const QString &name) Q_DECL_OVERRIDE; -- cgit v1.2.3 From adbafab4ef921b2336511a21cb4300eafa1f4cad Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 8 Sep 2016 12:33:41 +0200 Subject: Specify timeout is in milliseconds Change-Id: I465b343b6fe64c8d1ce17e34be5f864e8556d374 Reviewed-by: Edward Welbourne --- src/testlib/qtestcase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 876c573196..80aeff7bd1 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -244,7 +244,7 @@ static void stackTrace() \relates QTest The QTRY_VERIFY_WITH_TIMEOUT() macro is similar to QVERIFY(), but checks the \a condition - repeatedly, until either the condition becomes true or the \a timeout is + repeatedly, until either the condition becomes true or the \a timeout (in milliseconds) is reached. Between each evaluation, events will be processed. If the timeout is reached, a failure is recorded in the test log and the test won't be executed further. @@ -276,7 +276,7 @@ static void stackTrace() The QTRY_VERIFY2_WITH_TIMEOUT macro is similar to QTRY_VERIFY_WITH_TIMEOUT() except that it outputs a verbose \a message when \a condition is still false - after the specified \a timeout. The \a message is a plain C string. + after the specified \a timeout (in milliseconds). The \a message is a plain C string. Example: \code @@ -316,7 +316,7 @@ static void stackTrace() The QTRY_COMPARE_WITH_TIMEOUT() macro is similar to QCOMPARE(), but performs the comparison of the \a actual and \a expected values repeatedly, until either the two values - are equal or the \a timeout is reached. Between each comparison, events + are equal or the \a timeout (in milliseconds) is reached. Between each comparison, events will be processed. If the timeout is reached, a failure is recorded in the test log and the test won't be executed further. -- cgit v1.2.3 From b884fc00f4cb4b1ebe307374433b90448d413cf4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 10 Oct 2016 13:57:33 +0200 Subject: configure.exe: Detect MSVC version with environment variable CL cleared The variable may contain the option /nologo, suppressing the output. Change-Id: I63eedde10aa7264cf56807a0844cadf6293a1d8c Task-number: QTBUG-56388 Reviewed-by: Laszlo Agocs Reviewed-by: Oswald Buddenhagen --- tools/configure/environment.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 10cf5ace2a..562c5db7a7 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -176,6 +176,7 @@ QString Environment::msvcVersion() const QString command = QFile::decodeName(qgetenv("ComSpec")) + QLatin1String(" /c ") + QLatin1String(compilerInfo(CC_MSVC2015)->executable) + QLatin1String(" /? 2>&1"); + SetEnvironmentVariable(L"CL", NULL); // May contain /nologo, which suppresses the version. QString version = execute(command, &returnValue); if (returnValue != 0) { cout << "Could not get cl version" << returnValue << qPrintable(version) << '\n';; -- cgit v1.2.3 From 3189313f226f550892a8bd4993ed52b44abea13a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 11 Oct 2016 09:59:03 +0200 Subject: Doc: Fix typo in QtStyledItemDelegate::paint() docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-56399 Change-Id: Iaace0ed05098ab6d880b06a40d8e13aa9288c5ec Reviewed-by: Topi Reiniƶ Reviewed-by: Frederik Gladhorn --- src/widgets/itemviews/qstyleditemdelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/itemviews/qstyleditemdelegate.cpp b/src/widgets/itemviews/qstyleditemdelegate.cpp index 483cfbdc36..7de3ca4b0c 100644 --- a/src/widgets/itemviews/qstyleditemdelegate.cpp +++ b/src/widgets/itemviews/qstyleditemdelegate.cpp @@ -360,7 +360,7 @@ void QStyledItemDelegate::initStyleOption(QStyleOptionViewItem *option, if it is enabled or selected. After painting, you should ensure that the painter is returned to - its the state it was supplied in when this function was called. + the state it was supplied in when this function was called. For example, it may be useful to call QPainter::save() before painting and QPainter::restore() afterwards. -- cgit v1.2.3 From 6851cf52afe188e94344ce22074af97e054f5896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 5 Oct 2016 16:34:38 +0200 Subject: Match MSVC version strings in other languages than English 5971b88ecd08a81720c3556029cecd35b0cf2cb5 introduced a regular expression to parse the Visual C++ compiler version that failed to match non-English output (e.g. German), which is produced by default on many systems. Task-number: QTBUG-56388 Change-Id: Id0408ce31e827e7aa087d8e3dd83024cf09dac23 Reviewed-by: Qt CI Bot Reviewed-by: Oswald Buddenhagen --- tools/configure/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index 562c5db7a7..60616f35e7 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -182,7 +182,7 @@ QString Environment::msvcVersion() cout << "Could not get cl version" << returnValue << qPrintable(version) << '\n';; version.clear(); } else { - QRegExp versionRegexp(QStringLiteral("^.*Compiler Version ([0-9.]+) for.*$")); + QRegExp versionRegexp(QStringLiteral("^.*\\b(\\d{2,2}\\.\\d{2,2}\\.\\d{5,5})\\b.*$")); Q_ASSERT(versionRegexp.isValid()); if (versionRegexp.exactMatch(version)) { version = versionRegexp.cap(1); -- cgit v1.2.3 From 59985b3c291f769cfc24cf361367757fce229397 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 7 Oct 2016 20:16:58 +0200 Subject: fix xcodebuilds without -sdk iphonesimulator the order of the arguments passed to addExclusiveBuilds() determines the name of the CONFIG flag which actually enables the mode. that is historically fixed to iphonesimulator_and_iphoneos and we cannot just change the order. to get around this, add a new "overload" of the function which allows specifying the flag independently from the order of the builds, and make use of it in ios' resolve_config.prf. amends d2b4a789c. Change-Id: Ia3fabea0c0c30beae680b57e75bdcdf35ef6503d Reviewed-by: Jake Petroules --- mkspecs/features/exclusive_builds.prf | 18 +++++++++++------- mkspecs/macx-ios-clang/features/resolve_config.prf | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf index 5d06198ae4..f40cc99172 100644 --- a/mkspecs/features/exclusive_builds.prf +++ b/mkspecs/features/exclusive_builds.prf @@ -1,12 +1,9 @@ -defineTest(addExclusiveBuilds) { - lessThan(ARGC, 2): \ - error("addExclusiveBuilds() requires at least two arguments") - - !$$join(ARGS, _and_):!fix_output_dirs: \ +defineTest(addExclusiveBuildsProper) { + !$$1:!fix_output_dirs: \ return(true) - for(build, ARGS) { + for(build, 2) { isEmpty($${build}.name) { $${build}.name = $$title($$build) export($${build}.name) @@ -20,7 +17,7 @@ defineTest(addExclusiveBuilds) { export($${build}.dir_affix) } - $${build}.exclusive = $$ARGS + $${build}.exclusive = $$2 export($${build}.exclusive) QMAKE_EXCLUSIVE_BUILDS += $$build @@ -33,6 +30,13 @@ defineTest(addExclusiveBuilds) { return(true) } +defineTest(addExclusiveBuilds) { + lessThan(ARGC, 2): \ + error("addExclusiveBuilds() requires at least two arguments") + + addExclusiveBuildsProper($$join(ARGS, _and_), $$ARGS) +} + # Default directories to process QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR QMAKE_DIR_REPLACE_SANE += QGLTF_DIR diff --git a/mkspecs/macx-ios-clang/features/resolve_config.prf b/mkspecs/macx-ios-clang/features/resolve_config.prf index 64db2252cb..904296aea6 100644 --- a/mkspecs/macx-ios-clang/features/resolve_config.prf +++ b/mkspecs/macx-ios-clang/features/resolve_config.prf @@ -29,9 +29,9 @@ macx-xcode { # Switch the order to make sure that the first Makefile target is the right one !contains(QT_CONFIG, simulator_and_device):contains(QMAKE_MAC_SDK, ^iphonesimulator.*): \ - addExclusiveBuilds(iphonesimulator, iphoneos) + addExclusiveBuildsProper(iphonesimulator_and_iphoneos, iphonesimulator iphoneos) else: \ - addExclusiveBuilds(iphoneos, iphonesimulator) + addExclusiveBuildsProper(iphonesimulator_and_iphoneos, iphoneos iphonesimulator) } equals(TEMPLATE, subdirs) { -- cgit v1.2.3 From e9110b162cad1c07341fa3ed424484a58f9c642a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 14 Oct 2016 16:44:47 +0200 Subject: iOS: Report correct physical DPI for iPhone 7 Plus Task-number: QTBUG-56509 Change-Id: Ibae94262c2a4c917aeca00cb1a1c28e5ae60f0c4 Reviewed-by: Jake Petroules --- src/plugins/platforms/ios/qiosscreen.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 4018a02f8d..7d1c01f36b 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -201,8 +201,8 @@ QIOSScreen::QIOSScreen(UIScreen *screen) else m_depth = 24; - if (deviceIdentifier.contains(QRegularExpression("^iPhone(7,1|8,2)$"))) { - // iPhone 6 Plus or iPhone 6S Plus + if (deviceIdentifier.contains(QRegularExpression("^iPhone(7,1|8,2|9,2|9,4)$"))) { + // iPhone Plus models m_physicalDpi = 401; } else if (deviceIdentifier.contains(QRegularExpression("^iPad(1,1|2,[1-4]|3,[1-6]|4,[1-3]|5,[3-4]|6,[7-8])$"))) { // All iPads except the iPad Mini series -- cgit v1.2.3 From d71bb504a635b51a85f3ccd919e0d77f869e50a8 Mon Sep 17 00:00:00 2001 From: hjk Date: Sun, 16 Oct 2016 13:26:30 +0200 Subject: Fix QtGui compilation without OpenGL Change-Id: I2a9f8bde7d2ba672e4e664ff731a3272a6def516 Reviewed-by: Laszlo Agocs --- src/gui/kernel/qsurfaceformat.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 18fde5716b..109ba8e610 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -759,11 +759,13 @@ Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format) */ void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format) { +#ifndef QT_NO_OPENGL QOpenGLContext *globalContext = QOpenGLContext::globalShareContext(); if (globalContext && globalContext->isValid()) { qWarning("Warning: Setting a new default format with a different version or profile after " "the global shared context is created may cause issues with context sharing."); } +#endif *qt_default_surface_format() = format; } -- cgit v1.2.3