Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[connectionagent] Remove Qt 4 support. It is no longer used or necess…
…ary.
  • Loading branch information
rburchell committed Mar 18, 2014
1 parent 00cfb49 commit 467b92e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 203 deletions.
12 changes: 1 addition & 11 deletions 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
}

CONFIG += console link_pkgconfig
CONFIG -= app_bundle

TEMPLATE = app

QT += core network dbus

OTHER_FILES += com.jolla.Connectiond.xml

# create adaptor
Expand Down
12 changes: 0 additions & 12 deletions connd/qconnectionmanager.cpp
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
18 changes: 5 additions & 13 deletions 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
SUBDIRS = \
connectionagentplugin \
test \
config \
connd

OTHER_FILES += rpm/connectionagent-qt5.spec \
rpm/connectionagent-qt5.yaml \
rpm/connectionagent.tracing
}

6 changes: 0 additions & 6 deletions connectionagentplugin/connectionagentplugin.cpp
Expand Up @@ -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>

Expand Down
13 changes: 3 additions & 10 deletions 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 \
Expand All @@ -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
Expand Down
86 changes: 0 additions & 86 deletions rpm/connectionagent.spec

This file was deleted.

44 changes: 0 additions & 44 deletions rpm/connectionagent.yaml

This file was deleted.

13 changes: 2 additions & 11 deletions test/auto/tst_connectionagent/tst_connectionagent.pro
Expand Up @@ -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

Expand Up @@ -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): {
CONFIG += link_pkgconfig
PKGCONFIG += connman-qt5
LIBS += -lconnman-qt5
INCLUDEPATH += /usr/include/connman-qt5
}

target.path = $$[QT_INSTALL_PREFIX]/opt/tests/libqofono/
INSTALLS += target

0 comments on commit 467b92e

Please sign in to comment.