diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-12-14 21:37:00 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-12-14 21:37:00 +0100 |
commit | 0924c28704013d45532fe3a0689b5634fee0e1fb (patch) | |
tree | 35e8c1c5572b3c73e74709b639630fea4fe11595 | |
parent | 66af7423e1a3df332f9c62992f92639cead987b0 (diff) | |
parent | efb9beda243ac342304e6f09ba9f0deff1e77a2b (diff) | |
download | qmenumodel-0924c28704013d45532fe3a0689b5634fee0e1fb.tar.gz qmenumodel-0924c28704013d45532fe3a0689b5634fee0e1fb.tar.bz2 qmenumodel-0924c28704013d45532fe3a0689b5634fee0e1fb.zip |
Merge branch 'tari01-pr/qml-1-0'
Attributes GH PR #12: https://github.com/AyatanaIndicators/qmenumodel/pull/12
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | debian/control | 3 | ||||
-rw-r--r-- | debian/qmenumodel-qml.install | 2 | ||||
-rw-r--r-- | debian/qml-module-qmenumodel1.install | 2 | ||||
-rw-r--r-- | libqmenumodel/QMenuModel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | libqmenumodel/QMenuModel/plugin.cpp | 16 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 5 |
7 files changed, 19 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 62b7e94..e2d0be9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(qmenumodel) set (PROJECT_VERSION "0.8.1") -cmake_minimum_required(VERSION 2.8.9) +cmake_minimum_required(VERSION 3.13) # Standard install paths include(GNUInstallDirs) diff --git a/debian/control b/debian/control index 92a0f8c..fac5162 100644 --- a/debian/control +++ b/debian/control @@ -50,7 +50,7 @@ Description: Qt binding for GMenuModel - development files . This package contains the development headers for libqmenumodel. -Package: qmenumodel-qml +Package: qml-module-qmenumodel1 Section: libs Architecture: any Depends: ${shlibs:Depends}, @@ -63,4 +63,3 @@ Description: Qt binding for GMenuModel - QML module . This package contains the QML module for building applications using the QMenuModel library. - diff --git a/debian/qmenumodel-qml.install b/debian/qmenumodel-qml.install deleted file mode 100644 index 8a1c4a9..0000000 --- a/debian/qmenumodel-qml.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/*/qt5/qml/QMenuModel/* - diff --git a/debian/qml-module-qmenumodel1.install b/debian/qml-module-qmenumodel1.install new file mode 100644 index 0000000..d2958af --- /dev/null +++ b/debian/qml-module-qmenumodel1.install @@ -0,0 +1,2 @@ +usr/lib/*/qt5/qml/QMenuModel.1/* + diff --git a/libqmenumodel/QMenuModel/CMakeLists.txt b/libqmenumodel/QMenuModel/CMakeLists.txt index 7f0f74d..86ccd11 100644 --- a/libqmenumodel/QMenuModel/CMakeLists.txt +++ b/libqmenumodel/QMenuModel/CMakeLists.txt @@ -26,7 +26,7 @@ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_S "${CMAKE_CURRENT_BINARY_DIR}/qmldir") set(QT_IMPORTS_DIR "${CMAKE_INSTALL_LIBDIR}/qt5/qml") -set(QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/QMenuModel") +set(QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/QMenuModel.1") install(TARGETS qmenumodel-qml DESTINATION ${QMLPLUGIN_INSTALL_PREFIX}) install(FILES qmldir DESTINATION ${QMLPLUGIN_INSTALL_PREFIX}) diff --git a/libqmenumodel/QMenuModel/plugin.cpp b/libqmenumodel/QMenuModel/plugin.cpp index 9060f86..503827a 100644 --- a/libqmenumodel/QMenuModel/plugin.cpp +++ b/libqmenumodel/QMenuModel/plugin.cpp @@ -1,5 +1,6 @@ /* * Copyright 2012 Canonical Ltd. + * Copyright 2021 Robert Tari * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -15,6 +16,7 @@ * * Authors: * Renato Araujo Oliveira Filho <renato@canonical.com> + * Robert Tari <robert@tari.in> */ #include "plugin.h" @@ -33,15 +35,15 @@ void QMenuModelQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri) void QMenuModelQmlPlugin::registerTypes(const char *uri) { - qmlRegisterUncreatableType<QMenuModel>(uri, 0, 1, "QMenuModel", + qmlRegisterUncreatableType<QMenuModel>(uri, 1, 0, "QMenuModel", "QMenuModel is a interface"); - qmlRegisterUncreatableType<QStateAction>(uri, 0, 1, "QStateAction", + qmlRegisterUncreatableType<QStateAction>(uri, 1, 0, "QStateAction", "QStateAction must be created by QDBusActionGroup::action"); - qmlRegisterUncreatableType<DBusEnums>(uri, 0, 1, "DBus", + qmlRegisterUncreatableType<DBusEnums>(uri, 1, 0, "DBus", "DBus is only a namespace"); - qmlRegisterType<QDBusMenuModel>(uri, 0, 1, "QDBusMenuModel"); - qmlRegisterType<QDBusActionGroup>(uri, 0, 1, "QDBusActionGroup"); - qmlRegisterType<AyatanaMenuModel>(uri, 0, 1, "AyatanaMenuAction"); - qmlRegisterType<AyatanaMenuAction>(uri, 0, 1, "AyatanaMenuAction"); + qmlRegisterType<QDBusMenuModel>(uri, 1, 0, "QDBusMenuModel"); + qmlRegisterType<QDBusActionGroup>(uri, 1, 0, "QDBusActionGroup"); + qmlRegisterType<AyatanaMenuModel>(uri, 1, 0, "AyatanaMenuAction"); + qmlRegisterType<AyatanaMenuAction>(uri, 1, 0, "AyatanaMenuAction"); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 96c4bad..0e94a94 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,2 +1,7 @@ +find_package(Qt5Quick REQUIRED)
+find_package(Qt5Test REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+find_package(Qt5DBus REQUIRED)
+
add_subdirectory(script)
add_subdirectory(client)
|