Merge remote-tracking branch 'origin/5.13' into dev

Conflicts:
	src/corelib/time/qdatetime.cpp
	src/widgets/widgets/qcombobox.h

Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
This commit is contained in:
Qt Forward Merge Bot 2019-07-10 01:00:41 +02:00 committed by Edward Welbourne
commit 6fd20defb9
17 changed files with 95 additions and 33 deletions

View File

@ -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 =
@ -133,6 +141,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_<CONFIG> paths are automatically considered by CMake if there is no
# <CONFIG> 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): \

View File

@ -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 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 !isEmpty(CMAKE_STATIC_TYPE)
if(NOT "${IsDebugAndRelease}")
set(_genex_condition \"1\")
else()
if("${Configuration}" STREQUAL "DEBUG")
set(_genex_condition \"$<CONFIG:Debug>\")
else()
set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
endif()
endif()
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
@ -459,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)
@ -481,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\")

View File

@ -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

View File

@ -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;
}
}

View File

@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn QUrlQuery(std::initializer_list<QPair<QString, QString>> list)
\fn QUrlQuery::QUrlQuery(std::initializer_list<QPair<QString, QString>> list)
\since 5.13

View File

@ -3272,10 +3272,9 @@ inline qint64 QDateTimePrivate::zoneMSecsToEpochMSecs(qint64 zoneMSecs, const QT
provides functions for comparing datetimes and for manipulating a
datetime by adding a number of seconds, days, months, or years.
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
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
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

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -1136,9 +1136,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

View File

@ -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);

View File

@ -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);

View File

@ -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 {

View File

@ -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.

View File

@ -227,11 +227,8 @@ Q_SIGNALS:
void highlighted(int index);
void textHighlighted(const QString &);
void currentIndexChanged(int index);
void currentTextChanged(const QString &);
#if QT_DEPRECATED_SINCE(5, 13)
QT_DEPRECATED_VERSION_X(5, 13, "Use currentTextChanged() instead")
void currentIndexChanged(const QString &);
#endif
void currentTextChanged(const QString &);
#if QT_DEPRECATED_SINCE(5, 15)
QT_DEPRECATED_VERSION_X(5, 15, "Use textActivated() instead")
void activated(const QString &);