Commit 467b92e3 authored by Robin Burchell's avatar Robin Burchell

[connectionagent] Remove Qt 4 support. It is no longer used or necessary.

parent 00cfb490
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
......
......@@ -18,7 +18,6 @@
#include "connadaptor.h"
#include "wakeupwatcher.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <connman-qt5/useragent.h>
#include <connman-qt5/networkmanager.h>
#include <connman-qt5/networktechnology.h>
......@@ -29,17 +28,6 @@
#include <qofono-qt5/qofononetworkregistration.h>
#include <qofono-qt5/qofonomanager.h>
#else
#include <connman-qt/useragent.h>
#include <connman-qt/networkmanager.h>
#include <connman-qt/networktechnology.h>
#include <connman-qt/networkservice.h>
#include <connman-qt/sessionagent.h>
#include <qofono-qt/qofonoconnectioncontext.h>
#include <qofono-qt/qofonoconnectionmanager.h>
#include <qofono-qt/qofonomanager.h>
#endif
#include <QtDBus/QDBusConnection>
#include <QObject>
......
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
......@@ -17,15 +17,9 @@
#include "connectionagentplugin.h"
#include "connectionamanagerinterface.h"
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <connman-qt5/networkmanager.h>
#include <connman-qt5/networktechnology.h>
#include <connman-qt5/networkservice.h>
#else
#include <connman-qt/networkmanager.h>
#include <connman-qt/networktechnology.h>
#include <connman-qt/networkservice.h>
#endif
#include <qobject.h>
......
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
......
#
# 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
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/*"
......@@ -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
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment