diff --git a/CMakeLists.txt b/CMakeLists.txt index b83836d..cdcacdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,16 +15,13 @@ include(GenerateExportHeader) include(GNUInstallDirs) include(CMakePackageConfigHelpers) -set(QT Core Gui Quick QuickControls2 Widgets DBus Xml Concurrent) -find_package(Qt5 REQUIRED ${QT}) +set(QT Core Gui Quick QuickControls2 Widgets DBus Xml Concurrent Qml) +find_package(Qt6 REQUIRED ${QT}) -# Get the installation directory from qmake -get_target_property(QT_QMAKE_EXECUTABLE ${Qt5Core_QMAKE_EXECUTABLE} IMPORTED_LOCATION) -if(NOT QT_QMAKE_EXECUTABLE) - message(FATAL_ERROR "qmake is not found.") -endif() +# Get the installation directory from Qt 6 +find_program(QT_PATHS_EXECUTABLE NAMES qtpaths6 REQUIRED) -execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_QML +execute_process(COMMAND ${QT_PATHS_EXECUTABLE} -query QT_INSTALL_QML OUTPUT_VARIABLE INSTALL_QMLDIR OUTPUT_STRIP_TRAILING_WHITESPACE ) diff --git a/accounts/CMakeLists.txt b/accounts/CMakeLists.txt index ffa504b..7521b30 100644 --- a/accounts/CMakeLists.txt +++ b/accounts/CMakeLists.txt @@ -11,10 +11,10 @@ set(ACCOUNTS_SRCS qmlplugins.cpp ) -qt5_add_dbus_interface(ACCOUNTS_SRCS +qt6_add_dbus_interface(ACCOUNTS_SRCS org.freedesktop.Accounts.User.xml user_interface) -qt5_add_dbus_interface(ACCOUNTS_SRCS +qt6_add_dbus_interface(ACCOUNTS_SRCS org.freedesktop.Accounts.xml accounts_interface) @@ -23,11 +23,11 @@ qt5_add_dbus_interface(ACCOUNTS_SRCS add_library(cutefishaccounts_qmlplugins SHARED ${ACCOUNTS_SRCS}) target_link_libraries (cutefishaccounts_qmlplugins - Qt5::Core - Qt5::DBus - Qt5::Quick - Qt5::Gui + Qt6::Core + Qt6::DBus + Qt6::Quick + Qt6::Gui ) install(TARGETS cutefishaccounts_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/Accounts) -install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/Accounts) \ No newline at end of file +install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/Accounts) diff --git a/audio/CMakeLists.txt b/audio/CMakeLists.txt index 1b02188..960343b 100644 --- a/audio/CMakeLists.txt +++ b/audio/CMakeLists.txt @@ -68,16 +68,16 @@ pkg_check_modules(LIBPULSE_MAINLOOP libpulse-mainloop-glib REQUIRED IMPORTED_TAR add_library(cutefishaudio_qmlplugins SHARED ${audio_SRCS}) target_link_libraries(cutefishaudio_qmlplugins - Qt5::Core - Qt5::Qml - Qt5::Gui - Qt5::Widgets - Qt5::DBus - Qt5::Quick + Qt6::Core + Qt6::Qml + Qt6::Gui + Qt6::Widgets + Qt6::DBus + Qt6::Quick Canberra::Canberra PkgConfig::LIBPULSE PkgConfig::LIBPULSE_MAINLOOP ) install(TARGETS cutefishaudio_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/Audio) -install(FILES ${qml_SRCS} DESTINATION ${INSTALL_QMLDIR}/Cutefish/Audio) \ No newline at end of file +install(FILES ${qml_SRCS} DESTINATION ${INSTALL_QMLDIR}/Cutefish/Audio) diff --git a/audio/gconfitem.cpp b/audio/gconfitem.cpp index c51f0b8..d1abe1c 100644 --- a/audio/gconfitem.cpp +++ b/audio/gconfitem.cpp @@ -50,7 +50,7 @@ static QVariant convertValue(GConfValue *src) } else { switch (src->type) { case GCONF_VALUE_INVALID: - return QVariant(QVariant::Invalid); + return QVariant(); case GCONF_VALUE_BOOL: return QVariant((bool)gconf_value_get_bool(src)); case GCONF_VALUE_INT: @@ -90,14 +90,14 @@ static GConfValue *convertString(const QString &str) static GConfValueType primitiveType(const QVariant &elt) { - switch (elt.type()) { - case QVariant::String: + switch (elt.typeId()) { + case QMetaType::QString: return GCONF_VALUE_STRING; - case QVariant::Int: + case QMetaType::Int: return GCONF_VALUE_INT; - case QVariant::Double: + case QMetaType::Double: return GCONF_VALUE_FLOAT; - case QVariant::Bool: + case QMetaType::Bool: return GCONF_VALUE_BOOL; default: return GCONF_VALUE_INVALID; @@ -130,26 +130,26 @@ static int convertValue(const QVariant &src, GConfValue **valp) { GConfValue *v; - switch (src.type()) { - case QVariant::Invalid: + switch (src.typeId()) { + case QMetaType::UnknownType: v = nullptr; break; - case QVariant::Bool: + case QMetaType::Bool: v = gconf_value_new(GCONF_VALUE_BOOL); gconf_value_set_bool(v, src.toBool()); break; - case QVariant::Int: + case QMetaType::Int: v = gconf_value_new(GCONF_VALUE_INT); gconf_value_set_int(v, src.toInt()); break; - case QVariant::Double: + case QMetaType::Double: v = gconf_value_new(GCONF_VALUE_FLOAT); gconf_value_set_float(v, src.toDouble()); break; - case QVariant::String: + case QMetaType::QString: v = convertString(src.toString()); break; - case QVariant::StringList: { + case QMetaType::QStringList: { GSList *elts = nullptr; v = gconf_value_new(GCONF_VALUE_LIST); gconf_value_set_list_type(v, GCONF_VALUE_STRING); diff --git a/audio/model/sortfiltermodel.cpp b/audio/model/sortfiltermodel.cpp index ebf14fc..0f8fef0 100644 --- a/audio/model/sortfiltermodel.cpp +++ b/audio/model/sortfiltermodel.cpp @@ -89,13 +89,13 @@ void SortFilterModel::setFilterRegExp(const QString &exp) if (exp == filterRegExp()) { return; } - QSortFilterProxyModel::setFilterRegExp(QRegExp(exp, Qt::CaseInsensitive)); + QSortFilterProxyModel::setFilterRegularExpression(QRegularExpression(exp, QRegularExpression::CaseInsensitiveOption)); Q_EMIT filterRegExpChanged(exp); } QString SortFilterModel::filterRegExp() const { - return QSortFilterProxyModel::filterRegExp().pattern(); + return QSortFilterProxyModel::filterRegularExpression().pattern(); } void SortFilterModel::setFilterString(const QString &filterString) @@ -205,4 +205,4 @@ int SortFilterModel::mapRowFromSource(int row) const } QModelIndex idx = sourceModel()->index(row, 0); return mapFromSource(idx).row(); -} \ No newline at end of file +} diff --git a/audio/model/sortfiltermodel.h b/audio/model/sortfiltermodel.h index 5da4ab7..5b069cd 100644 --- a/audio/model/sortfiltermodel.h +++ b/audio/model/sortfiltermodel.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include @@ -129,4 +129,4 @@ private: QHash m_roleIds; }; -#endif \ No newline at end of file +#endif diff --git a/audio/pulseaudio.h b/audio/pulseaudio.h index 1322f7b..7850e06 100644 --- a/audio/pulseaudio.h +++ b/audio/pulseaudio.h @@ -11,6 +11,8 @@ #include #include "maps.h" +#include "sink.h" +#include "source.h" namespace QPulseAudio { diff --git a/audio/pulseobject.h b/audio/pulseobject.h index 851b20f..29e5cf6 100644 --- a/audio/pulseobject.h +++ b/audio/pulseobject.h @@ -9,6 +9,7 @@ #include "debug.h" #include +#include #include diff --git a/audio/qml/listitemmenu.cpp b/audio/qml/listitemmenu.cpp index 355a183..3a2dc22 100644 --- a/audio/qml/listitemmenu.cpp +++ b/audio/qml/listitemmenu.cpp @@ -7,6 +7,7 @@ #include "listitemmenu.h" #include +#include #include #include #include diff --git a/audio/qml/listitemmenu.h b/audio/qml/listitemmenu.h index a6abb4c..f957d08 100644 --- a/audio/qml/listitemmenu.h +++ b/audio/qml/listitemmenu.h @@ -8,17 +8,14 @@ #include #include +#include +#include #include -class QAbstractItemModel; -class QMenu; -class QQuickItem; +#include "../pulseobject.h" +#include "../pulseaudio.h" -namespace QPulseAudio -{ -class CardModel; -class PulseObject; -} +class QMenu; class ListItemMenu : public QObject, public QQmlParserStatus { diff --git a/audio/volumemonitor.h b/audio/volumemonitor.h index 29fd5a6..c538c76 100644 --- a/audio/volumemonitor.h +++ b/audio/volumemonitor.h @@ -10,6 +10,8 @@ #include #include +#include "volumeobject.h" + struct pa_stream; namespace QPulseAudio diff --git a/bluez/CMakeLists.txt b/bluez/CMakeLists.txt index c9054c4..cb09765 100644 --- a/bluez/CMakeLists.txt +++ b/bluez/CMakeLists.txt @@ -14,13 +14,13 @@ set(bluezqtextensionplugin_SRCS add_library(cutefishbluez_qmlplugins SHARED ${bluezqtextensionplugin_SRCS}) -find_package(KF5BluezQt REQUIRED) +find_package(KF6BluezQt REQUIRED) target_link_libraries(cutefishbluez_qmlplugins - Qt5::Core - Qt5::Qml - Qt5::DBus - KF5::BluezQt + Qt6::Core + Qt6::Qml + Qt6::DBus + KF6::BluezQt ) install(TARGETS cutefishbluez_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/Bluez) diff --git a/bluez/applet/bluetoothagent.cpp b/bluez/applet/bluetoothagent.cpp index e40181f..f317412 100644 --- a/bluez/applet/bluetoothagent.cpp +++ b/bluez/applet/bluetoothagent.cpp @@ -9,41 +9,16 @@ #include #include +#include #include #include #include #include -#include -#include - -#include - static int cRandom() { - static QThreadStorage initialized_threads; - if (!initialized_threads.localData()) { - unsigned int seed; - initialized_threads.setLocalData(true); - QFile urandom(QStringLiteral("/dev/urandom")); - bool opened = urandom.open(QIODevice::ReadOnly | QIODevice::Unbuffered); - if (!opened || urandom.read(reinterpret_cast(&seed), sizeof(seed)) != sizeof(seed)) { - // silence warnings about use of deprecated qsrand()/qrand() - // Porting to QRandomGenerator::global() instead might result in no new seed set for the generator behind qrand() - // which then might affect other places indirectly relying on this. - // So just keeping the old calls here, as this method is also deprecated and will disappear together with qsrand/qrand. - QT_WARNING_PUSH - QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations") - QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations") - // No /dev/urandom... try something else. - qsrand(getpid()); - seed = qrand() ^ time(nullptr) ^ reinterpret_cast(QThread::currentThread()); - } - qsrand(seed); - } - return qrand(); - QT_WARNING_POP + return static_cast(QRandomGenerator::system()->generate()); } BluetoothAgent::BluetoothAgent(QObject *parent) @@ -122,7 +97,7 @@ QString BluetoothAgent::getPin(BluezQt::DevicePtr device) m_fromDatabase = true; if (m_pin.startsWith(QLatin1String("max:"))) { m_fromDatabase = false; - int num = m_pin.rightRef(m_pin.length() - 4).toInt(); + int num = m_pin.right(m_pin.length() - 4).toInt(); m_pin = QString::number(cRandom()).left(num); } diff --git a/bluez/declarativeadapter.cpp b/bluez/declarativeadapter.cpp index b18f0e7..2f7ce72 100644 --- a/bluez/declarativeadapter.cpp +++ b/bluez/declarativeadapter.cpp @@ -9,7 +9,7 @@ #include "declarativeadapter.h" #include "declarativedevice.h" -static int devicesCountDeclarativeAdapterFunction(QQmlListProperty *property) +static qsizetype devicesCountDeclarativeAdapterFunction(QQmlListProperty *property) { Q_ASSERT(qobject_cast(property->object)); DeclarativeAdapter *adapter = static_cast(property->object); @@ -17,7 +17,7 @@ static int devicesCountDeclarativeAdapterFunction(QQmlListPropertym_devices.count(); } -static DeclarativeDevice *devicesAtDeclarativeAdapterFunction(QQmlListProperty *property, int index) +static DeclarativeDevice *devicesAtDeclarativeAdapterFunction(QQmlListProperty *property, qsizetype index) { Q_ASSERT(qobject_cast(property->object)); DeclarativeAdapter *adapter = static_cast(property->object); diff --git a/bluez/declarativemanager.cpp b/bluez/declarativemanager.cpp index 9e69e08..f06bcfc 100644 --- a/bluez/declarativemanager.cpp +++ b/bluez/declarativemanager.cpp @@ -14,7 +14,7 @@ #include #include -static int adaptersCountFunction(QQmlListProperty *property) +static qsizetype adaptersCountFunction(QQmlListProperty *property) { Q_ASSERT(qobject_cast(property->object)); DeclarativeManager *manager = static_cast(property->object); @@ -22,7 +22,7 @@ static int adaptersCountFunction(QQmlListProperty *property) return manager->m_adapters.count(); } -static DeclarativeAdapter *adaptersAtFunction(QQmlListProperty *property, int index) +static DeclarativeAdapter *adaptersAtFunction(QQmlListProperty *property, qsizetype index) { Q_ASSERT(qobject_cast(property->object)); DeclarativeManager *manager = static_cast(property->object); @@ -30,7 +30,7 @@ static DeclarativeAdapter *adaptersAtFunction(QQmlListPropertym_adapters.values().at(index); } -static int devicesCountFunction(QQmlListProperty *property) +static qsizetype devicesCountFunction(QQmlListProperty *property) { Q_ASSERT(qobject_cast(property->object)); DeclarativeManager *manager = static_cast(property->object); @@ -38,7 +38,7 @@ static int devicesCountFunction(QQmlListProperty *property) return manager->m_devices.count(); } -static DeclarativeDevice *devicesAtFunction(QQmlListProperty *property, int index) +static DeclarativeDevice *devicesAtFunction(QQmlListProperty *property, qsizetype index) { Q_ASSERT(qobject_cast(property->object)); DeclarativeManager *manager = static_cast(property->object); diff --git a/mpris/CMakeLists.txt b/mpris/CMakeLists.txt index 272f4e9..e9bea71 100644 --- a/mpris/CMakeLists.txt +++ b/mpris/CMakeLists.txt @@ -25,11 +25,11 @@ set(NETWORKMGR_SRCS add_library(cutefishmpris_qmlplugins SHARED ${NETWORKMGR_SRCS}) target_link_libraries (cutefishmpris_qmlplugins - Qt5::Core - Qt5::Quick - Qt5::Gui - Qt5::DBus + Qt6::Core + Qt6::Quick + Qt6::Gui + Qt6::DBus ) install(TARGETS cutefishmpris_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/Mpris) -install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/Mpris) \ No newline at end of file +install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/Mpris) diff --git a/mpris/mprismanager.cpp b/mpris/mprismanager.cpp index c734157..49509c9 100644 --- a/mpris/mprismanager.cpp +++ b/mpris/mprismanager.cpp @@ -34,12 +34,17 @@ #include -static const QString mprisNameSpace = QStringLiteral("org.mpris.MediaPlayer2.*"); +static const QString mprisNameSpace = QStringLiteral("org.mpris.MediaPlayer2."); static const QString dBusService = QStringLiteral("org.freedesktop.DBus"); static const QString dBusObjectPath = QStringLiteral("/org/freedesktop/DBus"); static const QString dBusInterface = QStringLiteral("org.freedesktop.DBus"); static const QString dBusNameOwnerChangedSignal = QStringLiteral("NameOwnerChanged"); +static inline bool isMprisService(const QString &service) +{ + return service.startsWith(mprisNameSpace); +} + static inline QDBusConnection getDBusConnection() { #ifdef USE_SYSTEM_DBUS @@ -69,9 +74,7 @@ MprisManager::MprisManager(QObject *parent) QStringList serviceNames = connection.interface()->registeredServiceNames(); QStringList::const_iterator i = serviceNames.constBegin(); while (i != serviceNames.constEnd()) { - QRegExp rx(mprisNameSpace); - rx.setPatternSyntax(QRegExp::Wildcard); - if (rx.exactMatch(*i)) { + if (isMprisService(*i)) { onServiceAppeared(*i); } @@ -174,9 +177,7 @@ void MprisManager::setCurrentService(const QString &service) return; } - QRegExp rx(mprisNameSpace); - rx.setPatternSyntax(QRegExp::Wildcard); - if (!rx.exactMatch(service)) { + if (!isMprisService(service)) { qmlInfo(this) << service << "is not a proper Mpris2 service"; return; } @@ -381,9 +382,7 @@ void MprisManager::onNameOwnerChanged(const QString &service, const QString &old // bus, not just the ones for our name space of interest, and we // will have to filter on our own :( - QRegExp rx(mprisNameSpace); - rx.setPatternSyntax(QRegExp::Wildcard); - if (!rx.exactMatch(service)) { + if (!isMprisService(service)) { return; } diff --git a/mpris/mprisplayer_p.h b/mpris/mprisplayer_p.h index 163be7e..ed327b0 100644 --- a/mpris/mprisplayer_p.h +++ b/mpris/mprisplayer_p.h @@ -40,13 +40,13 @@ #define MPRISPLAYER_P_H #include +#include #include QT_BEGIN_NAMESPACE class QByteArray; template class QList; template class QMap; class QString; -class QStringList; class QVariant; QT_END_NAMESPACE diff --git a/mpris/mprisplayerinterface.cpp b/mpris/mprisplayerinterface.cpp index a640f14..8a1b29d 100644 --- a/mpris/mprisplayerinterface.cpp +++ b/mpris/mprisplayerinterface.cpp @@ -42,10 +42,10 @@ MprisPlayerInterface::MprisPlayerInterface(const QString &service, const QString , m_canPause(false) , m_canPlay(false) , m_canSeek(false) - , m_loopStatus(Mpris::None) + , m_loopStatus(QStringLiteral("None")) , m_maximumRate(1) , m_minimumRate(1) - , m_playbackStatus(Mpris::Stopped) + , m_playbackStatus(QStringLiteral("Stopped")) , m_position(0) , m_rate(1) , m_shuffle(false) @@ -156,4 +156,3 @@ void MprisPlayerInterface::onPropertyChanged(const QString &propertyName, const << propertyName; } } - diff --git a/mpris/qtdbusextended/dbusextendedabstractinterface.cpp b/mpris/qtdbusextended/dbusextendedabstractinterface.cpp index 591343a..147837f 100644 --- a/mpris/qtdbusextended/dbusextendedabstractinterface.cpp +++ b/mpris/qtdbusextended/dbusextendedabstractinterface.cpp @@ -153,7 +153,7 @@ QVariant DBusExtendedAbstractInterface::internalPropGet(const char *propname, vo if (m_useCache) { int propertyIndex = metaObject()->indexOfProperty(propname); QMetaProperty metaProperty = metaObject()->property(propertyIndex); - return QVariant(metaProperty.type(), propertyPtr); + return QVariant(metaProperty.metaType(), propertyPtr); } if (m_sync) { @@ -188,8 +188,8 @@ QVariant DBusExtendedAbstractInterface::internalPropGet(const char *propname, vo // is this metatype registered? const char *expectedSignature = ""; - if (int(metaProperty.type()) != QMetaType::QVariant) { - expectedSignature = QDBusMetaType::typeToSignature(metaProperty.userType()); + if (metaProperty.metaType().id() != QMetaType::QVariant) { + expectedSignature = QDBusMetaType::typeToSignature(metaProperty.metaType()); if (0 == expectedSignature) { QString errorMessage = QStringLiteral("Type %1 must be registered with Qt D-Bus " @@ -205,7 +205,7 @@ QVariant DBusExtendedAbstractInterface::internalPropGet(const char *propname, vo } asyncProperty(propname); - return QVariant(metaProperty.type(), propertyPtr); + return QVariant(metaProperty.metaType(), propertyPtr); } } @@ -243,7 +243,7 @@ void DBusExtendedAbstractInterface::internalPropSet(const char *propname, const return; } - asyncSetProperty(propname, QVariant(metaProperty.type(), propertyPtr)); + asyncSetProperty(propname, QVariant(metaProperty.metaType(), propertyPtr)); } } @@ -379,22 +379,22 @@ QVariant DBusExtendedAbstractInterface::demarshall(const QString &interface, con Q_ASSERT(metaProperty.isValid()); Q_ASSERT(error != 0); - if (value.userType() == metaProperty.userType()) { + if (value.metaType() == metaProperty.metaType()) { // No need demarshalling. Passing back straight away ... *error = QDBusError(); return value; } - QVariant result = QVariant(metaProperty.userType(), (void*)0); + QVariant result = QVariant(metaProperty.metaType(), nullptr); QString errorMessage; - const char *expectedSignature = QDBusMetaType::typeToSignature(metaProperty.userType()); + const char *expectedSignature = QDBusMetaType::typeToSignature(metaProperty.metaType()); - if (value.userType() == qMetaTypeId()) { + if (value.metaType().id() == qMetaTypeId()) { // demarshalling a DBus argument ... QDBusArgument dbusArg = value.value(); if (expectedSignature == dbusArg.currentSignature().toLatin1()) { - QDBusMetaType::demarshall(dbusArg, metaProperty.userType(), result.data()); + QDBusMetaType::demarshall(dbusArg, metaProperty.metaType(), result.data()); if (!result.isValid()) { errorMessage = QStringLiteral("Unexpected failure demarshalling " "upon PropertiesChanged signal arrival " @@ -415,7 +415,7 @@ QVariant DBusExtendedAbstractInterface::demarshall(const QString &interface, con QString::fromLatin1(expectedSignature)); } } else { - const char *actualSignature = QDBusMetaType::typeToSignature(value.userType()); + const char *actualSignature = QDBusMetaType::typeToSignature(value.metaType()); errorMessage = QStringLiteral("Unexpected `%1' (%2) " "upon PropertiesChanged signal arrival " diff --git a/networkmanagement/CMakeLists.txt b/networkmanagement/CMakeLists.txt index e72ba11..13193dc 100644 --- a/networkmanagement/CMakeLists.txt +++ b/networkmanagement/CMakeLists.txt @@ -42,20 +42,20 @@ set(NETWORKMGR_SRCS qmlplugins.h ) -find_package(KF5NetworkManagerQt REQUIRED) -find_package(KF5ModemManagerQt REQUIRED) +find_package(KF6NetworkManagerQt REQUIRED) +find_package(KF6ModemManagerQt REQUIRED) add_library(cutefishnm_qmlplugins SHARED ${NETWORKMGR_SRCS}) generate_export_header(cutefishnm_qmlplugins EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/networkmanager_export.h BASE_NAME NetworkManager) target_link_libraries (cutefishnm_qmlplugins - Qt5::Core - Qt5::Quick - Qt5::Gui - Qt5::DBus + Qt6::Core + Qt6::Quick + Qt6::Gui + Qt6::DBus - KF5::NetworkManagerQt - KF5::ModemManagerQt + KF6::NetworkManagerQt + KF6::ModemManagerQt ) install(TARGETS cutefishnm_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/NetworkManagement) diff --git a/networkmanagement/appletproxymodel.cpp b/networkmanagement/appletproxymodel.cpp index cc7d6a9..9e5c28b 100644 --- a/networkmanagement/appletproxymodel.cpp +++ b/networkmanagement/appletproxymodel.cpp @@ -75,7 +75,7 @@ bool AppletProxyModel::filterAcceptsRow(int source_row, const QModelIndex &sourc // slaves are filtered-out when not searching for a connection (makes the state of search results clear) const bool isSlave = sourceModel()->data(index, NetworkModel::SlaveRole).toBool(); - if (isSlave && filterRegExp().isEmpty()) { + if (isSlave && filterRegularExpression().pattern().isEmpty()) { return false; } @@ -95,11 +95,11 @@ bool AppletProxyModel::filterAcceptsRow(int source_row, const QModelIndex &sourc return false; } - if (filterRegExp().isEmpty()) { + if (filterRegularExpression().pattern().isEmpty()) { return true; } - return sourceModel()->data(index, NetworkModel::ItemUniqueNameRole).toString().contains(filterRegExp()); + return sourceModel()->data(index, NetworkModel::ItemUniqueNameRole).toString().contains(filterRegularExpression().pattern()); } bool AppletProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const diff --git a/screen/CMakeLists.txt b/screen/CMakeLists.txt index 341dcb9..d262830 100644 --- a/screen/CMakeLists.txt +++ b/screen/CMakeLists.txt @@ -12,14 +12,14 @@ set(SCREEN_SRCS qt5/screen.cpp ) -find_package(Qt5 REQUIRED COMPONENTS Core Gui Quick) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick) add_library(cutefishscreen_qmlplugins SHARED ${SCREEN_SRCS}) target_link_libraries (cutefishscreen_qmlplugins - Qt5::Core - Qt5::Quick - Qt5::Gui + Qt6::Core + Qt6::Quick + Qt6::Gui ) install(TARGETS cutefishscreen_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/Screen) diff --git a/system/CMakeLists.txt b/system/CMakeLists.txt index 2b4f284..0e89815 100644 --- a/system/CMakeLists.txt +++ b/system/CMakeLists.txt @@ -4,16 +4,16 @@ set(SCREEN_SRCS plugin.cpp ) -find_package(Qt5 REQUIRED COMPONENTS DBus) +find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick DBus) add_library(cutefishsystem_qmlplugins SHARED ${SCREEN_SRCS}) target_link_libraries (cutefishsystem_qmlplugins - Qt5::Core - Qt5::Quick - Qt5::Gui - Qt5::DBus + Qt6::Core + Qt6::Quick + Qt6::Gui + Qt6::DBus ) install(TARGETS cutefishsystem_qmlplugins DESTINATION ${INSTALL_QMLDIR}/Cutefish/System) -install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/System) \ No newline at end of file +install(FILES qmldir DESTINATION ${INSTALL_QMLDIR}/Cutefish/System)