Skip to content

Commit

Permalink
Qt Extras modules have been removed from Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Aug 28, 2022
1 parent 5393b8b commit cb612aa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
5 changes: 1 addition & 4 deletions CMakeLists.txt
Expand Up @@ -481,9 +481,6 @@ if(WITH_CORE)
find_package(${QT_VERSION_BASE} COMPONENTS 3DCore 3DRender 3DInput 3DLogic 3DExtras REQUIRED)
set(HAVE_3D TRUE) # used in qgsconfig.h
endif()
if (APPLE)
find_package(${QT_VERSION_BASE} COMPONENTS MacExtras REQUIRED)
endif()

# get the Qt plugins directory
get_target_property(QMAKE_EXECUTABLE ${QT_VERSION_BASE}::qmake LOCATION)
Expand All @@ -498,7 +495,7 @@ if(WITH_CORE)
endif()
if (WITH_QUICK)
find_package(${QT_VERSION_BASE} COMPONENTS Qml Quick REQUIRED)
if(${CMAKE_SYSTEM_NAME} MATCHES "Android")
if(${CMAKE_SYSTEM_NAME} MATCHES "Android" AND NOT BUILD_WITH_QT6)
find_package(${QT_VERSION_BASE} COMPONENTS AndroidExtras)
endif()

Expand Down
4 changes: 2 additions & 2 deletions mac/cmake/1qt.cmake.in
Expand Up @@ -16,8 +16,8 @@ SET (QT_FWVER "5")
# build list of Qt frameworks to bundle

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

# QtQuickWidgets appears to be implied direct dep, it needs Quick and Qml,
# whether or not WITH_QUICK specified
Expand Down
6 changes: 0 additions & 6 deletions src/native/CMakeLists.txt
Expand Up @@ -144,12 +144,6 @@ if (UNIX AND NOT APPLE AND NOT ANDROID)
target_link_libraries(qgis_native ${QT_VERSION_BASE}::DBus)
endif()

if (APPLE)
find_package(${QT_VERSION_BASE}MacExtras)

target_link_libraries(qgis_native ${QT_VERSION_BASE}::MacExtras)
endif()

if (MSVC)
find_package(${QT_VERSION_BASE}WinExtras)

Expand Down
5 changes: 2 additions & 3 deletions src/native/mac/qgsmacnative.mm
Expand Up @@ -18,7 +18,6 @@
#include "qgsmacnative.h"

#include <Cocoa/Cocoa.h>
#include <QtMacExtras/QtMac>

#include <QString>
#include <QPixmap>
Expand Down Expand Up @@ -60,7 +59,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres

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

const char *QgsMacNative::currentAppLocalizedName()
Expand Down Expand Up @@ -105,7 +104,7 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres
}
else
{
image = QtMac::toNSImage( px );
image = [[NSImage alloc] initWithCGImage:px.toImage().toCGImage()];
}
notification.contentImage = image;

Expand Down

0 comments on commit cb612aa

Please sign in to comment.