From 3d5a00d2d722dbf27f79f7ddfe0ea4173721aaa9 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 23 Oct 2021 22:50:58 +0200 Subject: [PATCH] Rename solidextras plugin to prevent name clashes when also using itinerary --- src/qml/ConnectionCheckAction.qml | 2 +- src/qml/main.qml | 2 +- src/solidextras/CMakeLists.txt | 4 +--- src/solidextras/qml/CMakeLists.txt | 12 ++++++------ src/solidextras/qml/qmldir | 4 ++-- src/solidextras/qml/solidextrasqmlplugin.cpp | 2 +- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/qml/ConnectionCheckAction.qml b/src/qml/ConnectionCheckAction.qml index cb3cd6e0..8efc099b 100644 --- a/src/qml/ConnectionCheckAction.qml +++ b/src/qml/ConnectionCheckAction.qml @@ -9,7 +9,7 @@ import QtQuick.Controls 2.14 as Controls import QtQuick.Layouts 1.14 import org.kde.kirigami 2.14 as Kirigami -import org.kde.solidextras 1.0 +import org.kde.kasts.solidextras 1.0 import org.kde.kasts 1.0 diff --git a/src/qml/main.qml b/src/qml/main.qml index d623097a..fa2d2e8f 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -10,7 +10,7 @@ import QtQuick.Controls 2.14 as Controls import QtQuick.Layouts 1.14 import org.kde.kirigami 2.14 as Kirigami -import org.kde.solidextras 1.0 +import org.kde.kasts.solidextras 1.0 import org.kde.kasts 1.0 diff --git a/src/solidextras/CMakeLists.txt b/src/solidextras/CMakeLists.txt index 3c27bd40..da72fc41 100644 --- a/src/solidextras/CMakeLists.txt +++ b/src/solidextras/CMakeLists.txt @@ -19,7 +19,7 @@ else() qt_add_dbus_interface(solidextras_srcs org.freedesktop.portal.NetworkMonitor.xml portalnetworkmonitor) endif() -add_library(SolidExtras ${solidextras_srcs}) +add_library(SolidExtras STATIC ${solidextras_srcs}) generate_export_header(SolidExtras BASE_NAME SolidExtras) if (TARGET KF5::NetworkManagerQt) @@ -38,5 +38,3 @@ else () target_link_libraries(SolidExtras PRIVATE KF5::NetworkManagerQt) endif() endif() - -install(TARGETS SolidExtras ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/src/solidextras/qml/CMakeLists.txt b/src/solidextras/qml/CMakeLists.txt index 1e64f56d..6318d842 100644 --- a/src/solidextras/qml/CMakeLists.txt +++ b/src/solidextras/qml/CMakeLists.txt @@ -1,19 +1,19 @@ # SPDX-FileCopyrightText: 2020 Volker Krause # SPDX-License-Identifier: BSD-3-Clause -add_library(solidextrasqmlplugin solidextrasqmlplugin.cpp) -target_link_libraries(solidextrasqmlplugin +add_library(kasts-solidextrasqmlplugin solidextrasqmlplugin.cpp) +target_link_libraries(kasts-solidextrasqmlplugin Qt::Qml SolidExtras ) # make examples work without installation if (NOT CMAKE_VERSION VERSION_LESS 3.14) - set_property(TARGET solidextrasqmlplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/org/kde/solidextras) - file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/org/kde/solidextras/qmldir COPY_ON_ERROR SYMBOLIC) + set_property(TARGET kasts-solidextrasqmlplugin PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/org/kde/kasts/solidextras) + file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/qmldir ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/org/kde/kasts/solidextras/qmldir COPY_ON_ERROR SYMBOLIC) else() message(WARNING "CMake is too old, cannot setup QML plugins to work without installation") endif() -install(TARGETS solidextrasqmlplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/solidextras) -install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/solidextras) +install(TARGETS kasts-solidextrasqmlplugin DESTINATION ${QML_INSTALL_DIR}/org/kde/kasts/solidextras) +install(FILES qmldir DESTINATION ${QML_INSTALL_DIR}/org/kde/kasts/solidextras) diff --git a/src/solidextras/qml/qmldir b/src/solidextras/qml/qmldir index db033281..fb6514d1 100644 --- a/src/solidextras/qml/qmldir +++ b/src/solidextras/qml/qmldir @@ -1,3 +1,3 @@ -module org.kde.solidextras -plugin solidextrasqmlplugin +module org.kde.kasts.solidextras +plugin kasts-solidextrasqmlplugin classname SolidExtrasQmlPlugin diff --git a/src/solidextras/qml/solidextrasqmlplugin.cpp b/src/solidextras/qml/solidextrasqmlplugin.cpp index ce83f0b7..9e378589 100644 --- a/src/solidextras/qml/solidextrasqmlplugin.cpp +++ b/src/solidextras/qml/solidextrasqmlplugin.cpp @@ -21,7 +21,7 @@ using namespace SolidExtras; void SolidExtrasQmlPlugin::registerTypes(const char*) { - qmlRegisterSingletonType("org.kde.solidextras", 1, 0, "NetworkStatus", [](QQmlEngine*, QJSEngine*) -> QObject* { + qmlRegisterSingletonType("org.kde.kasts.solidextras", 1, 0, "NetworkStatus", [](QQmlEngine *, QJSEngine *) -> QObject * { return new NetworkStatus; }); }