From 8fda779736894ae028cb4f819061e8e5da2ff469 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 2 Dec 2021 08:57:40 +0100 Subject: Bump QMenuModel to 1.0 --- libqmenumodel/QMenuModel/CMakeLists.txt | 2 +- libqmenumodel/QMenuModel/plugin.cpp | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) 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 + * Robert Tari */ #include "plugin.h" @@ -33,15 +35,15 @@ void QMenuModelQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri) void QMenuModelQmlPlugin::registerTypes(const char *uri) { - qmlRegisterUncreatableType(uri, 0, 1, "QMenuModel", + qmlRegisterUncreatableType(uri, 1, 0, "QMenuModel", "QMenuModel is a interface"); - qmlRegisterUncreatableType(uri, 0, 1, "QStateAction", + qmlRegisterUncreatableType(uri, 1, 0, "QStateAction", "QStateAction must be created by QDBusActionGroup::action"); - qmlRegisterUncreatableType(uri, 0, 1, "DBus", + qmlRegisterUncreatableType(uri, 1, 0, "DBus", "DBus is only a namespace"); - qmlRegisterType(uri, 0, 1, "QDBusMenuModel"); - qmlRegisterType(uri, 0, 1, "QDBusActionGroup"); - qmlRegisterType(uri, 0, 1, "AyatanaMenuAction"); - qmlRegisterType(uri, 0, 1, "AyatanaMenuAction"); + qmlRegisterType(uri, 1, 0, "QDBusMenuModel"); + qmlRegisterType(uri, 1, 0, "QDBusActionGroup"); + qmlRegisterType(uri, 1, 0, "AyatanaMenuAction"); + qmlRegisterType(uri, 1, 0, "AyatanaMenuAction"); } -- cgit v1.2.3