From 44602224bfae7bea08e5883768cfeef6629ac503 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 20 Jun 2019 12:04:31 +0200 Subject: CMake: Put the static dependencies into the relevant configuration When adding the static dependencies for a module, they should be added to the debug|release configuration as appropriate, otherwise it ends up adding the debug version of the libraries to the release configuration as well as the release version of the libraries. Implementation wise, that means we have to use generator expressions of the form $<$:${dependencies}>, because INTERFACE_LINK_LIBRARIES does not have a INTERFACE_LINK_LIBRARIES_ equivalent that can be set per configuration. Note that the condition part of the generator expression can not explicitly check for Debug or for Release, because a user can configure their application without specifying CMAKE_BUILD_TYPE, which means that both Debug and Relase conditions would fail. So the actual condition has to be isDebug or isNotDebug. The same approach is used for INTERFACE_LINK_OPTIONS. For debug_and_release builds we use the isDebug and isNotDebug conditions for the generator expressions. For singular builds (only release or only debug), we set the generator expression condition to "1" aka always true. This means that the Qt libraries and link options will always be used regardless of the configuration with which the CMake application is configured with. Fixes: QTBUG-76337 Task-number: QTBUG-38913 Change-Id: I5369d8ba083359a4a92253dbd1dabe9d1efa34db Reviewed-by: Andy Shaw --- mkspecs/features/create_cmake.prf | 18 ++++++++ .../features/data/cmake/Qt5BasicConfig.cmake.in | 53 ++++++++++++++++------ 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 00da9bd33f..68e6b6d265 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -133,6 +133,24 @@ equals(QMAKE_HOST.os, Windows): CMAKE_BIN_SUFFIX = ".exe" if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release +# CMAKE_DEBUG_AND_RELEASE is used to tell the _populate_$${CMAKE_MODULE_NAME}_target_properties +# functions whether a Configuration specific generator expression needs to be added to the values +# of INTERFACE_LINK_LIBRARIES and INTERFACE_LINK_OPTIONS. For debug_and_release builds, we do need +# configuration specific values. For singular builds (only release or only debug), we want the +# values to be applied regardless of the configuration. +# This would allow on Linux and macOS (and with a recent enough version of CMake on Windows) to +# build a Debug configuration of an application, even if Qt was built in a Release configuration. +# +# All IMPORTED_LOCATION_ paths are automatically considered by CMake if there is no +# equivalent to the value specified by CMAKE_BUILD_TYPE. +# This means that when Qt was built in a Release configuration, and the application in a Debug +# configuration, IMPORTED_LOCATION_RELEASE will be used for the Qt libraries. +debug_and_release { + CMAKE_DEBUG_AND_RELEASE = TRUE +} else { + CMAKE_DEBUG_AND_RELEASE = FALSE +} + contains(CONFIG, plugin) { !isEmpty(PLUGIN_EXTENDS):!equals(PLUGIN_EXTENDS, -) { count(PLUGIN_EXTENDS, 1, greaterThan): \ diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index ba7d9575c0..daebbd6554 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -119,7 +119,8 @@ endfunction() !!ENDIF !!IF !equals(TEMPLATE, aux) -macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION) +macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION + IsDebugAndRelease) set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) @@ -130,24 +131,48 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location}) set(_deps ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES} + ) + set(_static_deps !!IF !isEmpty(CMAKE_STATIC_TYPE) ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES} !!ENDIF ) + set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES - \"INTERFACE_LINK_LIBRARIES\" \"${_deps}\" \"IMPORTED_LOCATION_${Configuration}\" ${imported_location} !!IF !isEmpty(CMAKE_LIB_SONAME) \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\" !!ENDIF # For backward compatibility with CMake < 2.8.12 - \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps}\" + \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps};${_static_deps}\" + ) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_deps}\" ) + !!IF !isEmpty(CMAKE_STATIC_TYPE) + if(NOT "${IsDebugAndRelease}") + set(_genex_condition \"1\") + else() + if("${Configuration}" STREQUAL "DEBUG") + set(_genex_condition \"$\") + else() + set(_genex_condition \"$>\") + endif() + endif() - if(NOT CMAKE_VERSION VERSION_LESS \"3.13\") - set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES - \"INTERFACE_LINK_OPTIONS\" \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\" + if(_static_deps) + set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_static_deps_genex}\" + ) + endif() + + set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\") + if(NOT CMAKE_VERSION VERSION_LESS \"3.13\" AND _static_link_flags) + set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\") + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS + \"${_static_link_flags_genex}\" ) endif() !!ENDIF @@ -382,9 +407,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!IF !equals(TEMPLATE, aux) !!IF !isEmpty(CMAKE_RELEASE_TYPE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) !!ELSE - _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) @@ -395,7 +420,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) !!ELSE // CMAKE_STATIC_WINDOWS_BUILD if (EXISTS !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) @@ -409,7 +434,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!ELSE \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) !!ENDIF - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD endif() !!ENDIF // CMAKE_DEBUG_TYPE @@ -419,9 +444,9 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!IF !isEmpty(CMAKE_DEBUG_TYPE) !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) !!ELSE - _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD !!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD) @@ -432,7 +457,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE - _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE}) !!ELSE // CMAKE_STATIC_WINDOWS_BUILD if (EXISTS !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) @@ -446,7 +471,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) !!ELSE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) !!ENDIF - _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" ) + _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) !!ENDIF // CMAKE_STATIC_WINDOWS_BUILD endif() !!ENDIF // CMAKE_RELEASE_TYPE -- cgit v1.2.3 From b55fac3f3763ffae3bf99f2afea7e5d5f8b7c2a8 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 5 Jul 2019 14:15:29 +0200 Subject: xcb: reduce focus-in delay This patch amends fe63900dc9891dd355ca1f10d6c7e5fd1516f5d5 The previous value of 400ms was a random and seemingly harmless choice. It turns out that 400ms is a bit too long and interferes with x11 async behavior tweaks in the VirtualBox source code. The original aim of specifying a concrete delay was to fix the nondeterministic behavior of the pre-existing code and to avoid flickering on KWin caused by waiting too little. This patch changes 400ms -> 100ms, which seems to work better in practice. Fixes: QTBUG-76742 Change-Id: Ia8168216819ac41d0124622c9472a98a1877262f Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 ++ src/plugins/platforms/xcb/qxcbwindow.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 06d1000993..f98b2dfe3a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -132,7 +132,9 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra if (!m_startupId.isNull()) qunsetenv("DESKTOP_STARTUP_ID"); + const int focusInDelay = 100; m_focusInTimer.setSingleShot(true); + m_focusInTimer.setInterval(focusInDelay); m_focusInTimer.callOnTimeout([]() { // No FocusIn events for us, proceed with FocusOut normally. QWindowSystemInterface::handleWindowActivated(nullptr, Qt::ActiveWindowFocusReason); diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 9382488b74..610eca06a5 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -848,7 +848,7 @@ void QXcbWindow::doFocusOut() connection()->setFocusWindow(nullptr); relayFocusToModalWindow(); // Do not set the active window to nullptr if there is a FocusIn coming. - connection()->focusInTimer().start(400); + connection()->focusInTimer().start(); } struct QtMotifWmHints { -- cgit v1.2.3 From 0a37378e7a4aac9b4343f0d257ae05450673e7de Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 5 Jul 2019 15:09:37 +0200 Subject: doc: Remove erroneous double left brace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A double left brace in a link command was causing qdoc to fail for the remainder of the qdoc comment. This update just removes one of the left braces. Change-Id: Ie4fc0122e0799955b7804c2b6f61393af01747c7 Reviewed-by: Topi Reiniƶ --- src/corelib/tools/qdatetime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index a156970ac6..3c23d54565 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -3024,7 +3024,7 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT QDateTime can describe datetimes with respect to \l{Qt::LocalTime}{local time}, to \l{Qt::UTC}{UTC}, to a specified \l{Qt::OffsetFromUTC}{offset - from UTC} or to a specified \l{{Qt::TimeZone}{time zone}, in conjunction + from UTC} or to a specified \l{Qt::TimeZone}{time zone}, in conjunction with the QTimeZone class. For example, a time zone of "Europe/Berlin" will apply the daylight-saving rules as used in Germany since 1970. In contrast, an offset from UTC of +3600 seconds is one hour ahead of UTC (usually -- cgit v1.2.3 From 298f750cdba2bd15e735a47ba8d3b9c093367ba3 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 4 Jul 2019 18:48:26 +0200 Subject: QComboBox: revert deprecation of currentIndexChanged(QString) QComboBox::currentIndexChanged(QString) was deprecated due to the fact that there is a currentTextChanged(QString) signal but this signal is not equivalent to the other since it's also emitted when the lineedit text changes. Therefore revert the deprecation of this signal. Fixes: QTBUG-76890 Change-Id: Ia314116a5ac4e43e60383da9e729e24ffb3e8b30 Reviewed-by: Albert Astals Cid Reviewed-by: Giuseppe D'Angelo --- src/widgets/widgets/qcombobox.cpp | 5 ----- src/widgets/widgets/qcombobox.h | 3 --- 2 files changed, 8 deletions(-) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index a93c72a933..a143b2e799 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -896,11 +896,6 @@ QStyleOptionComboBox QComboBoxPrivateContainer::comboStyleOption() const \fn void QComboBox::currentIndexChanged(const QString &text) \since 4.1 - \obsolete - - Use currentTextChanged(const QString &) or currentIndexChanged(int) - instead. - This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically. The item's \a text is passed. diff --git a/src/widgets/widgets/qcombobox.h b/src/widgets/widgets/qcombobox.h index 33686e547d..b2fe921bd8 100644 --- a/src/widgets/widgets/qcombobox.h +++ b/src/widgets/widgets/qcombobox.h @@ -227,10 +227,7 @@ Q_SIGNALS: void highlighted(int index); void highlighted(const QString &); void currentIndexChanged(int index); -#if QT_DEPRECATED_SINCE(5, 13) - QT_DEPRECATED_X("Use currentTextChanged() instead") void currentIndexChanged(const QString &); -#endif void currentTextChanged(const QString &); protected: -- cgit v1.2.3 From 5ca2b081fe8089990dd87c5d9081d90ed170283a Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 17 Jun 2019 21:59:13 +0200 Subject: [androidcontentfileengine] Catch SecurityException during file opening resolver.openFileDescriptor throws a SecurityException when the caller doesn't have sufficient permissions to access the URL. This will make an application crash. We should handle this case gracefully and report it to the user. I'm unsure if there is a better way to do this than simply logging the exception. Change-Id: I36bfbd3e398c8176e57042a27740aa15bce63a7c Reviewed-by: BogDan Vatra --- src/android/jar/src/org/qtproject/qt5/android/QtNative.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java index 9679fd40f4..c33d5016ce 100644 --- a/src/android/jar/src/org/qtproject/qt5/android/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt5/android/QtNative.java @@ -178,6 +178,9 @@ public class QtNative return fdDesc.detachFd(); } catch (FileNotFoundException e) { return -1; + } catch (SecurityException e) { + Log.e(QtTAG, "Exception when opening file", e); + return -1; } } -- cgit v1.2.3 From 9c7ebd191b9862c28e9c96a511ec2878b7a3591d Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 20 Jun 2019 15:26:39 +0200 Subject: CMake: Create Config.cmake files for internal modules in static builds This change will create Config.cmake files for internal modules like AccessibilitySupport when doing static builds. They need to be find_package()'ed and linked in when linking in certain qt plugins. Task-number: QTBUG-38913 Task-number: QTBUG-76562 Change-Id: Ia2e446025c87df48f20bb65cfd9da6c6a4354bb1 Reviewed-by: Simon Hausmann --- mkspecs/features/create_cmake.prf | 8 ++++++++ mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in | 4 ++++ mkspecs/features/qt_module.prf | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 68e6b6d265..fe9149b1c1 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -26,6 +26,10 @@ contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_USR_MOVE_WORKAROUND CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake +internal_module { + MODULE = "$${MODULE}_private" +} + # Core, Network, an external module named Foo CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE}) @@ -112,6 +116,10 @@ win32:!static:!staticlib { static|staticlib:CMAKE_STATIC_TYPE = true +internal_module { + CMAKE_INTERNAL_MODULE = true +} + CMAKE_DEBUG_TYPE = CMAKE_RELEASE_TYPE = diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in index daebbd6554..8a3f202c53 100644 --- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in @@ -484,6 +484,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) ) !!ENDIF // TEMPLATE != aux +!!IF isEmpty(CMAKE_INTERNAL_MODULE) + file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\") macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION) @@ -506,6 +508,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) endforeach() endif() +!!ENDIF // isEmpty(CMAKE_INTERNAL_MODULE) + !!IF !isEmpty(CMAKE_MODULE_EXTRAS) include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\") diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index ee7de22059..46687f262e 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -117,7 +117,7 @@ unset(QT_FOR_PRIVATE) QMAKE_USE_PRIVATE += $$QMAKE_USE_FOR_PRIVATE unset(QMAKE_USE_FOR_PRIVATE) -!internal_module:CONFIG += create_cmake +CONFIG += create_cmake contains(TARGET, QtAddOn.*): \ DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB -- cgit v1.2.3 From e96cea51da99629b33036e4b06738316a7ca4682 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Fri, 5 Jul 2019 17:12:18 +0200 Subject: Fix compilation with disabled deprecated APIs The QImageIOHandler::name() has been deprecated since 5.13, but its overrides weren't. Enabled compilation of the overrides only when the QImageIOHandler::name() is compiled. Task-number: QTBUG-76491 Change-Id: I8fea0032427d25bb0de01be8920c723fc21f6b7a Reviewed-by: Volker Hilsheimer Reviewed-by: Alex Blasche --- src/plugins/imageformats/gif/qgifhandler.cpp | 2 ++ src/plugins/imageformats/gif/qgifhandler_p.h | 2 ++ src/plugins/imageformats/ico/qicohandler.cpp | 3 ++- src/plugins/imageformats/ico/qicohandler.h | 2 ++ src/plugins/imageformats/jpeg/qjpeghandler.cpp | 2 ++ src/plugins/imageformats/jpeg/qjpeghandler_p.h | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 1aef1a24d2..a6029b691c 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1215,9 +1215,11 @@ int QGifHandler::currentImageNumber() const return frameNumber; } +#if QT_DEPRECATED_SINCE(5, 13) QByteArray QGifHandler::name() const { return "gif"; } +#endif QT_END_NAMESPACE diff --git a/src/plugins/imageformats/gif/qgifhandler_p.h b/src/plugins/imageformats/gif/qgifhandler_p.h index b004ee610d..c6592043ce 100644 --- a/src/plugins/imageformats/gif/qgifhandler_p.h +++ b/src/plugins/imageformats/gif/qgifhandler_p.h @@ -73,7 +73,9 @@ public: bool read(QImage *image) override; bool write(const QImage &image) override; +#if QT_DEPRECATED_SINCE(5, 13) QByteArray name() const override; +#endif static bool canRead(QIODevice *device); diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index 4908850cc5..c8e31dceac 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -818,6 +818,7 @@ bool QtIcoHandler::write(const QImage &image) return ICOReader::write(device, imgs); } +#if QT_DEPRECATED_SINCE(5, 13) /*! * Return the common identifier of the format. * For ICO format this will return "ico". @@ -826,7 +827,7 @@ QByteArray QtIcoHandler::name() const { return "ico"; } - +#endif /*! \reimp diff --git a/src/plugins/imageformats/ico/qicohandler.h b/src/plugins/imageformats/ico/qicohandler.h index 435f036113..328dfce47e 100644 --- a/src/plugins/imageformats/ico/qicohandler.h +++ b/src/plugins/imageformats/ico/qicohandler.h @@ -54,7 +54,9 @@ public: bool read(QImage *image) override; bool write(const QImage &image) override; +#if QT_DEPRECATED_SINCE(5, 13) QByteArray name() const override; +#endif int imageCount() const override; bool jumpToImage(int imageNumber) override; diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index 54fe857908..aed2900356 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -1124,9 +1124,11 @@ void QJpegHandler::setOption(ImageOption option, const QVariant &value) } } +#if QT_DEPRECATED_SINCE(5, 13) QByteArray QJpegHandler::name() const { return "jpeg"; } +#endif QT_END_NAMESPACE diff --git a/src/plugins/imageformats/jpeg/qjpeghandler_p.h b/src/plugins/imageformats/jpeg/qjpeghandler_p.h index d832bf82f3..fafa930c11 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler_p.h +++ b/src/plugins/imageformats/jpeg/qjpeghandler_p.h @@ -68,7 +68,9 @@ public: bool read(QImage *image) override; bool write(const QImage &image) override; +#if QT_DEPRECATED_SINCE(5, 13) QByteArray name() const override; +#endif static bool canRead(QIODevice *device); -- cgit v1.2.3 From a776d6ec5bd209ece087c446afb6b31eb2c40b26 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 7 Jul 2019 12:43:38 +0200 Subject: QTextObject: One more 0 to nullptr conversion Change-Id: I61446afa882304400d3ae8045e4f17bb7a020600 Reviewed-by: Marc Mutz Reviewed-by: Christian Ehrlicher --- src/gui/text/qtextobject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 547b21c02e..40960c910e 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1322,7 +1322,7 @@ QTextList *QTextBlock::textList() const QTextBlockUserData *QTextBlock::userData() const { if (!p || !n) - return 0; + return nullptr; const QTextBlockData *b = p->blockMap().fragment(n); return b->userData; -- cgit v1.2.3 From 4bb975717b0ba2c7b41e1a44192c2d54c919cfee Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 9 Jul 2019 12:11:03 +0200 Subject: doc: Add missing class qualifier A glass qualifier was missing in a \fn command. This caused clang to report an error. The class qualifier is added by this ubdate. Change-Id: I1c4928183f4c8eb1b28f0fde2ce659a1feb24175 Reviewed-by: Marc Mutz --- src/corelib/io/qurlquery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qurlquery.cpp b/src/corelib/io/qurlquery.cpp index 10c3f836c8..73a94cd5d5 100644 --- a/src/corelib/io/qurlquery.cpp +++ b/src/corelib/io/qurlquery.cpp @@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE */ /*! - \fn QUrlQuery(std::initializer_list> list) + \fn QUrlQuery::QUrlQuery(std::initializer_list> list) \since 5.13 -- cgit v1.2.3