mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Bump minimum Qt version to 5.9.0
Also remove remaining Qt4 code.
This commit is contained in:
parent
c90e0fefd7
commit
22c88c4261
|
@ -41,7 +41,7 @@ set(FALKON_PLUGIN_PATH "${PLUGIN_PATH}" CACHE PATH "Default plugin search path")
|
|||
add_definitions(-DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER -DQT_NO_CAST_TO_ASCII)
|
||||
|
||||
# Mandatory: Qt5
|
||||
set(QT_MIN_VERSION "5.8.0")
|
||||
set(QT_MIN_VERSION "5.9.0")
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core Widgets Network Sql QuickWidgets PrintSupport WebEngineWidgets WebChannel)
|
||||
if (BUILD_TESTING)
|
||||
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Test)
|
||||
|
|
|
@ -66,24 +66,14 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
|
|||
|
||||
Qt::HANDLE mutex;
|
||||
if (doCreate) {
|
||||
#if (QT_VERSION < 0x050000)
|
||||
QT_WA( { mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16()); },
|
||||
{ mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); });
|
||||
#else // QT_WA removed from Qt5: http://qt-project.org/forums/viewthread/22994/#107379
|
||||
mutex = CreateMutexW(NULL, FALSE, (TCHAR*)mname.utf16());
|
||||
#endif
|
||||
if (!mutex) {
|
||||
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if (QT_VERSION < 0x050000)
|
||||
QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16()); },
|
||||
{ mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); });
|
||||
#else // QT_WA removed from Qt5: http://qt-project.org/forums/viewthread/22994/#107379
|
||||
mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (TCHAR*)mname.utf16());
|
||||
#endif
|
||||
if (!mutex) {
|
||||
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
|
||||
qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");
|
||||
|
|
Loading…
Reference in New Issue
Block a user