diff --git a/connd/connd.pro b/connd/connd.pro index f993148..b041a5e 100644 --- a/connd/connd.pro +++ b/connd/connd.pro @@ -1,24 +1,14 @@ -QT += core network dbus gui -QT -= gui +QT = core network dbus gui -equals(QT_MAJOR_VERSION, 4): { - TARGET = connectionagent - PKGCONFIG += connman-qt4 qofono-qt - -} -equals(QT_MAJOR_VERSION, 5): { - TARGET = connectionagent - PKGCONFIG += connman-qt5 qofono-qt5 -} +TARGET = connectionagent +PKGCONFIG += connman-qt5 qofono-qt5 CONFIG += console link_pkgconfig CONFIG -= app_bundle TEMPLATE = app -QT += core network dbus - OTHER_FILES += com.jolla.Connectiond.xml # create adaptor diff --git a/connd/qconnectionmanager.cpp b/connd/qconnectionmanager.cpp index ac1430f..ed96b6e 100644 --- a/connd/qconnectionmanager.cpp +++ b/connd/qconnectionmanager.cpp @@ -18,7 +18,6 @@ #include "connadaptor.h" #include "wakeupwatcher.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #include #include @@ -29,17 +28,6 @@ #include #include -#else -#include -#include -#include -#include -#include -#include -#include -#include -#endif - #include #include diff --git a/connectionagent.pro b/connectionagent.pro index c26477b..2ee2f99 100644 --- a/connectionagent.pro +++ b/connectionagent.pro @@ -1,20 +1,12 @@ TEMPLATE = subdirs -SUBDIRS += connectionagentplugin -SUBDIRS += test - -equals(QT_MAJOR_VERSION, 4): { - SUBDIRS += test/testqml - OTHER_FILES += rpm/connectionagent.spec \ - rpm/connectionagent.yaml -} - -equals(QT_MAJOR_VERSION, 5): { - SUBDIRS += config - SUBDIRS += connd - - OTHER_FILES += rpm/connectionagent-qt5.spec \ - rpm/connectionagent-qt5.yaml \ - rpm/connectionagent.tracing -} +SUBDIRS = \ + connectionagentplugin \ + test \ + config \ + connd + +OTHER_FILES += rpm/connectionagent-qt5.spec \ + rpm/connectionagent-qt5.yaml \ + rpm/connectionagent.tracing diff --git a/connectionagentplugin/connectionagentplugin.cpp b/connectionagentplugin/connectionagentplugin.cpp index e887e07..8929189 100644 --- a/connectionagentplugin/connectionagentplugin.cpp +++ b/connectionagentplugin/connectionagentplugin.cpp @@ -17,15 +17,9 @@ #include "connectionagentplugin.h" #include "connectionamanagerinterface.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #include #include -#else -#include -#include -#include -#endif #include diff --git a/connectionagentplugin/connectionagentplugin.pro b/connectionagentplugin/connectionagentplugin.pro index 5e1a66b..a87c051 100644 --- a/connectionagentplugin/connectionagentplugin.pro +++ b/connectionagentplugin/connectionagentplugin.pro @@ -1,19 +1,13 @@ TEMPLATE = lib TARGET = connectionagentplugin -QT += dbus +QT = dbus qml CONFIG += qt plugin uri = com.jolla.connection #create client #system(qdbusxml2cpp ../connd/com.jollamobile.Connectiond.xml -c ConnectionManagerInterface -p connectionamanagerinterface) -equals(QT_MAJOR_VERSION, 4): { - QT += declarative -} -equals(QT_MAJOR_VERSION, 5): { - QT += qml - QT -=gui -} + SOURCES += \ connectionagentplugin_plugin.cpp \ connectionagentplugin.cpp \ @@ -27,8 +21,7 @@ HEADERS += \ OTHER_FILES = qmldir MODULENAME = com/jolla/connection -equals(QT_MAJOR_VERSION, 4): TARGETPATH = $$[QT_INSTALL_IMPORTS]/$$MODULENAME -equals(QT_MAJOR_VERSION, 5): TARGETPATH = $$[QT_INSTALL_QML]/$$MODULENAME +TARGETPATH = $$[QT_INSTALL_QML]/$$MODULENAME target.path = $$TARGETPATH qmldir.files += qmldir diff --git a/rpm/connectionagent.spec b/rpm/connectionagent.spec deleted file mode 100644 index 37837ac..0000000 --- a/rpm/connectionagent.spec +++ /dev/null @@ -1,86 +0,0 @@ -# -# Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.27 -# - -Name: connectionagent - -# >> macros -# << macros - -Summary: User Agent daemon -Version: 0.9.29 -Release: 0 -Group: Communications/Connectivity Adaptation -License: LGPLv2 -URL: http://github.com/lpotter/connectionagent -Source0: %{name}-%{version}.tar.bz2 -Source100: connectionagent.yaml -BuildRequires: pkgconfig(QtCore) -BuildRequires: pkgconfig(QtDBus) -BuildRequires: pkgconfig(connman-qt4) -BuildRequires: pkgconfig(qofono-qt) -BuildRequires: pkgconfig(QtNetwork) - -%description -Connection Agent provides multi user access to connman's User Agent. -It also provides autoconnecting features. - - -%package declarative -Summary: Declarative plugin for connection agent. -Group: Development/Tools -Requires: connectionagent-qt5 - -%description declarative -This package contains the declarative plugin for connection agent. - -%package test -Summary: Tests for connection agent. -Group: Development/Tools -Requires: connectionagent-qt5 - -%description test -This package contains the tests for connection agent. - -%prep -%setup -q -n %{name}-%{version} - -# >> setup -# << setup - -%build -# >> build pre -# << build pre - -%qmake - -make %{?_smp_mflags} - -# >> build post -# << build post - -%install -rm -rf %{buildroot} -# >> install pre -# << install pre -%qmake_install - -# >> install post -# << install post - - -%files declarative -%defattr(-,root,root,-) -%{_libdir}/qt4/imports/com/jolla/connection/* -# >> files declarative -# << files declarative - -%files test -%defattr(-,root,root,-) -/opt/sdk/bin/testqml -/opt/sdk/share/applications/testqml.desktop -/opt/sdk/share/testqml/* -%{_prefix}/opt/tests/libqofono/* -# >> files test -# << files test diff --git a/rpm/connectionagent.yaml b/rpm/connectionagent.yaml deleted file mode 100644 index a21edee..0000000 --- a/rpm/connectionagent.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Name: connectionagent -Summary: User Agent daemon -Version: 0.9.29 -Release: 0 -Group: "Communications/Connectivity Adaptation" -License: LGPLv2 -URL: http://github.com/lpotter/connectionagent -Description: | - Connection Agent provides multi user access to connman's User Agent. - It also provides autoconnecting features. - -Sources: - - "%{name}-%{version}.tar.bz2" -PkgConfigBR: - - QtCore - - QtDBus - - connman-qt4 - - qofono-qt - - QtNetwork -Configure: none -Builder: qmake -NoFiles: true -SubPackages: - - Name: declarative - Summary: Declarative plugin for connection agent. - Group: Development/Tools - Description: This package contains the declarative plugin for connection agent. - Requires: - - connectionagent-qt5 - Files: - - "%{_libdir}/qt4/imports/com/jolla/connection/*" - - - Name: test - Summary: Tests for connection agent. - Group: Development/Tools - Description: This package contains the tests for connection agent. - Requires: - - connectionagent-qt5 - Files: - - "/opt/sdk/bin/testqml" - - "/opt/sdk/share/applications/testqml.desktop" - - "/opt/sdk/share/testqml/*" - - "%{_prefix}/opt/tests/libqofono/*" - diff --git a/test/auto/tst_connectionagent/tst_connectionagent.pro b/test/auto/tst_connectionagent/tst_connectionagent.pro index abe400d..6704c0e 100644 --- a/test/auto/tst_connectionagent/tst_connectionagent.pro +++ b/test/auto/tst_connectionagent/tst_connectionagent.pro @@ -21,15 +21,6 @@ HEADERS += \ INCLUDEPATH += ../../../connd -equals(QT_MAJOR_VERSION, 4): { - PKGCONFIG += connman-qt4 - LIBS += -lconnman-qt4 -lqofono-qt - INCLUDEPATH += /usr/include/connman-qt -} - -equals(QT_MAJOR_VERSION, 5): { - PKGCONFIG += connman-qt5 - LIBS += -lconnman-qt5 -lqofono-qt5 - INCLUDEPATH += /usr/include/connman-qt5 -} +CONFIG += link_pkgconfig +PKGCONFIG += connman-qt5 qofono-qt5 diff --git a/test/auto/tst_connectionagent_plugin/tst_connectionagent_plugin.pro b/test/auto/tst_connectionagent_plugin/tst_connectionagent_plugin.pro index 5d6ff69..35923fb 100644 --- a/test/auto/tst_connectionagent_plugin/tst_connectionagent_plugin.pro +++ b/test/auto/tst_connectionagent_plugin/tst_connectionagent_plugin.pro @@ -27,17 +27,8 @@ DEFINES += SRCDIR=\\\"$$PWD/\\\" INCLUDEPATH += ../../../connectiongentplugin -equals(QT_MAJOR_VERSION, 4): { - PKGCONFIG += connman-qt4 - LIBS += -lconnman-qt4 - INCLUDEPATH += /usr/include/connman-qt -} - -equals(QT_MAJOR_VERSION, 5): { - PKGCONFIG += connman-qt5 - LIBS += -lconnman-qt5 - INCLUDEPATH += /usr/include/connman-qt5 -} +CONFIG += link_pkgconfig +PKGCONFIG += connman-qt5 target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libqofono/ INSTALLS += target