Skip to content

Commit cb612aa

Browse files
m-kuhnnyalldawson
authored andcommittedAug 28, 2022
Qt Extras modules have been removed from Qt6
https://www.qt.io/blog/qt-extras-modules-in-qt-6
1 parent 5393b8b commit cb612aa

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed
 

‎CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,6 @@ if(WITH_CORE)
481481
find_package(${QT_VERSION_BASE} COMPONENTS 3DCore 3DRender 3DInput 3DLogic 3DExtras REQUIRED)
482482
set(HAVE_3D TRUE) # used in qgsconfig.h
483483
endif()
484-
if (APPLE)
485-
find_package(${QT_VERSION_BASE} COMPONENTS MacExtras REQUIRED)
486-
endif()
487484

488485
# get the Qt plugins directory
489486
get_target_property(QMAKE_EXECUTABLE ${QT_VERSION_BASE}::qmake LOCATION)
@@ -498,7 +495,7 @@ if(WITH_CORE)
498495
endif()
499496
if (WITH_QUICK)
500497
find_package(${QT_VERSION_BASE} COMPONENTS Qml Quick REQUIRED)
501-
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
498+
if(${CMAKE_SYSTEM_NAME} MATCHES "Android" AND NOT BUILD_WITH_QT6)
502499
find_package(${QT_VERSION_BASE} COMPONENTS AndroidExtras)
503500
endif()
504501

‎mac/cmake/1qt.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ SET (QT_FWVER "5")
1616
# build list of Qt frameworks to bundle
1717

1818
# core list, includes dependencies and used by extra plugins
19-
SET (QTLISTQG QtCore QtGui QtWidgets QtNetwork QtXml QtSvg QtConcurrent QtPrintSupport QtSerialPort QtPositioning QtTest QtSql QtMacExtras QtDBus)
20-
SET (PYQTLIST Qt QtCore QtGui QtWidgets QtNetwork QtXml QtSvg QtPrintSupport QtPositioning QtSerialPort QtTest QtSql QtMacExtras QtDBus)
19+
SET (QTLISTQG QtCore QtGui QtWidgets QtNetwork QtXml QtSvg QtConcurrent QtPrintSupport QtSerialPort QtPositioning QtTest QtSql QtDBus)
20+
SET (PYQTLIST Qt QtCore QtGui QtWidgets QtNetwork QtXml QtSvg QtPrintSupport QtPositioning QtSerialPort QtTest QtSql QtDBus)
2121

2222
# QtQuickWidgets appears to be implied direct dep, it needs Quick and Qml,
2323
# whether or not WITH_QUICK specified

‎src/native/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,6 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
144144
target_link_libraries(qgis_native ${QT_VERSION_BASE}::DBus)
145145
endif()
146146

147-
if (APPLE)
148-
find_package(${QT_VERSION_BASE}MacExtras)
149-
150-
target_link_libraries(qgis_native ${QT_VERSION_BASE}::MacExtras)
151-
endif()
152-
153147
if (MSVC)
154148
find_package(${QT_VERSION_BASE}WinExtras)
155149

‎src/native/mac/qgsmacnative.mm

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "qgsmacnative.h"
1919

2020
#include <Cocoa/Cocoa.h>
21-
#include <QtMacExtras/QtMac>
2221

2322
#include <QString>
2423
#include <QPixmap>
@@ -60,7 +59,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
6059

6160
void QgsMacNative::setIconPath( const QString &iconPath )
6261
{
63-
mQgsUserNotificationCenter->_qgisIcon = QtMac::toNSImage( QPixmap( iconPath ) );
62+
mQgsUserNotificationCenter->_qgisIcon = [[NSImage alloc] initWithCGImage:QPixmap( iconPath ).toImage().toCGImage()];
6463
}
6564

6665
const char *QgsMacNative::currentAppLocalizedName()
@@ -105,7 +104,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
105104
}
106105
else
107106
{
108-
image = QtMac::toNSImage( px );
107+
image = [[NSImage alloc] initWithCGImage:px.toImage().toCGImage()];
109108
}
110109
notification.contentImage = image;
111110

0 commit comments

Comments
 (0)
Please sign in to comment.