aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control7
-rw-r--r--debian/qmenumodel-qml.install2
-rwxr-xr-xexamples/exportactiongroup.py15
-rwxr-xr-xexamples/exportmenu.py15
-rw-r--r--libqmenumodel/QMenuModel/CMakeLists.txt8
-rw-r--r--libqmenumodel/src/qmenumodel.pc.in2
-rwxr-xr-xtests/client/script_actiongrouptest.py13
-rwxr-xr-xtests/client/script_menuchangestest.py13
-rwxr-xr-xtests/client/script_modeltest.py15
-rwxr-xr-xtests/client/script_qmltest.py14
-rwxr-xr-xtests/client/script_servicetest.py14
-rw-r--r--tests/script/menuscript.py15
12 files changed, 125 insertions, 8 deletions
diff --git a/debian/control b/debian/control
index 4a85338..1ad9f37 100644
--- a/debian/control
+++ b/debian/control
@@ -5,8 +5,10 @@ Maintainer: Renato Araujo Oliveira Filho <renato@canonical.com>
Build-Depends: debhelper (>= 9.0.0),
cmake (>= 2.8.9),
libglib2.0-dev,
- qtbase (>= 5.0),
- qtdeclarative (>= 5.0),
+ qt5-default,
+ qt5-qmake,
+ qtbase5-dev (>= 5.0),
+ qtdeclarative5-dev (>= 5.0),
python3,
python3-dbus,
python3-gi,
@@ -32,7 +34,6 @@ Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
libqmenumodel0 (= ${binary:Version}),
- qtbase (>= 5.0),
Description: Qt binding for GMenuModel - development files
Qt binding for GMenuModel that allows connecting to a menu model exposed on
D-Bus and presents it as a list model.
diff --git a/debian/qmenumodel-qml.install b/debian/qmenumodel-qml.install
index 58ec19a..8a1c4a9 100644
--- a/debian/qmenumodel-qml.install
+++ b/debian/qmenumodel-qml.install
@@ -1,2 +1,2 @@
-opt/qt5/imports/QMenuModel/*
+usr/lib/*/qt5/qml/QMenuModel/*
diff --git a/examples/exportactiongroup.py b/examples/exportactiongroup.py
index 0f2d675..b1237a8 100755
--- a/examples/exportactiongroup.py
+++ b/examples/exportactiongroup.py
@@ -1,5 +1,20 @@
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
+#
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
"""
This example script exports an action group on the session bus under the name
diff --git a/examples/exportmenu.py b/examples/exportmenu.py
index 70cc6f3..4be3deb 100755
--- a/examples/exportmenu.py
+++ b/examples/exportmenu.py
@@ -1,5 +1,20 @@
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
+#
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
"""
This example script exports a menu model on the session bus under the name
diff --git a/libqmenumodel/QMenuModel/CMakeLists.txt b/libqmenumodel/QMenuModel/CMakeLists.txt
index 8a7702f..7367e18 100644
--- a/libqmenumodel/QMenuModel/CMakeLists.txt
+++ b/libqmenumodel/QMenuModel/CMakeLists.txt
@@ -24,9 +24,11 @@ qt5_use_modules(qmenumodel-qml Qml Widgets)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/qmldir"
"${CMAKE_CURRENT_BINARY_DIR}/qmldir")
-# Apparently, QT_IMPORTS_DIR didn’t make it to Qt5.
-# In want of a better solution, let’s hardcode it…
-set(QT_IMPORTS_DIR /opt/qt5/imports)
+execute_process(
+ COMMAND qmake -query QT_INSTALL_QML
+ OUTPUT_VARIABLE QT_IMPORTS_DIR
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+)
set(QMLPLUGIN_INSTALL_PREFIX "${QT_IMPORTS_DIR}/QMenuModel")
install(TARGETS qmenumodel-qml DESTINATION ${QMLPLUGIN_INSTALL_PREFIX})
install(FILES qmldir DESTINATION ${QMLPLUGIN_INSTALL_PREFIX})
diff --git a/libqmenumodel/src/qmenumodel.pc.in b/libqmenumodel/src/qmenumodel.pc.in
index 1c410bc..56f149a 100644
--- a/libqmenumodel/src/qmenumodel.pc.in
+++ b/libqmenumodel/src/qmenumodel.pc.in
@@ -7,7 +7,7 @@ Name: qmenumodel
Description: Qt binding for GMenuModel.
Version: 0.1
-Requires.private: QtCore QtWidgets gio-2.0
+Requires.private: Qt5Core Qt5Widgets gio-2.0
Libs: -L${libdir} -l@SHAREDLIBNAME@
Cflags: -I${includedir}/@INCLUDEDIR@
diff --git a/tests/client/script_actiongrouptest.py b/tests/client/script_actiongrouptest.py
index bb54dae..c11a4cc 100755
--- a/tests/client/script_actiongrouptest.py
+++ b/tests/client/script_actiongrouptest.py
@@ -1,4 +1,17 @@
#!/usr/bin/env python3
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import time
from gi.repository import GLib
diff --git a/tests/client/script_menuchangestest.py b/tests/client/script_menuchangestest.py
index 47e37bb..886303a 100755
--- a/tests/client/script_menuchangestest.py
+++ b/tests/client/script_menuchangestest.py
@@ -1,4 +1,17 @@
#!/usr/bin/env python3
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
import time
from menuscript import Script, ActionList, MENU_OBJECT_PATH
diff --git a/tests/client/script_modeltest.py b/tests/client/script_modeltest.py
index 9f5df9c..3a319b5 100755
--- a/tests/client/script_modeltest.py
+++ b/tests/client/script_modeltest.py
@@ -1,5 +1,20 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
import time
from gi.repository import GLib
diff --git a/tests/client/script_qmltest.py b/tests/client/script_qmltest.py
index c93e221..ad21762 100755
--- a/tests/client/script_qmltest.py
+++ b/tests/client/script_qmltest.py
@@ -1,4 +1,18 @@
#!/usr/bin/env python3
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
import time
from menuscript import Script, ActionList, MENU_OBJECT_PATH
diff --git a/tests/client/script_servicetest.py b/tests/client/script_servicetest.py
index c93e221..ad21762 100755
--- a/tests/client/script_servicetest.py
+++ b/tests/client/script_servicetest.py
@@ -1,4 +1,18 @@
#!/usr/bin/env python3
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
import time
from menuscript import Script, ActionList, MENU_OBJECT_PATH
diff --git a/tests/script/menuscript.py b/tests/script/menuscript.py
index 542308a..db71c08 100644
--- a/tests/script/menuscript.py
+++ b/tests/script/menuscript.py
@@ -1,3 +1,18 @@
+# Copyright 2013 Canonical Ltd.
+#
+# 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
+# the Free Software Foundation; version 3.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
import dbus
import dbus.service
from dbus import glib