Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[cleanup] Remove Qt 4 support
  • Loading branch information
Thomas Perl committed Mar 25, 2014
1 parent 424d7d2 commit a68f3d7
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 305 deletions.
9 changes: 2 additions & 7 deletions common.pri
@@ -1,8 +1,3 @@
CONTENTACTION_DATADIR = /usr/share/contentaction
equals(QT_MAJOR_VERSION, 4) {
CONTENTACTION_TESTDIR = /opt/tests/libcontentaction
CONTENTACTION_INCLUDEDIR = /usr/include/contentaction
} else: equals(QT_MAJOR_VERSION, 5) {
CONTENTACTION_TESTDIR = /opt/tests/libcontentaction5
CONTENTACTION_INCLUDEDIR = /usr/include/contentaction5
}
CONTENTACTION_TESTDIR = /opt/tests/libcontentaction5
CONTENTACTION_INCLUDEDIR = /usr/include/contentaction5
4 changes: 2 additions & 2 deletions data/data.pro
Expand Up @@ -6,7 +6,7 @@ actions.path = $$CONTENTACTION_DATADIR
actions.files = \
tracker1.xml \
highlight1.xml
equals(QT_MAJOR_VERSION, 5): INSTALLS += actions
INSTALLS += actions

testdata.path = $$CONTENTACTION_TESTDIR/data
testdata.files = \
Expand All @@ -31,4 +31,4 @@ QMAKE_EXTRA_COMPILERS += genreg
highlight1.path = $$CONTENTACTION_DATADIR
highlight1.files = highlight1.xml
highlight1.CONFIG += no_check_exist
equals(QT_MAJOR_VERSION, 5): INSTALLS += highlight1
INSTALLS += highlight1
5 changes: 2 additions & 3 deletions libcontentaction.pro
@@ -1,9 +1,8 @@
TEMPLATE = subdirs
SUBDIRS += src \
data \
tests

equals(QT_MAJOR_VERSION, 5): SUBDIRS += tools
tests \
tools

tests.depends = src
tools.depends = src
Expand Down
86 changes: 0 additions & 86 deletions rpm/libcontentaction.changes

This file was deleted.

111 changes: 0 additions & 111 deletions rpm/libcontentaction.spec

This file was deleted.

58 changes: 0 additions & 58 deletions rpm/libcontentaction.yaml

This file was deleted.

10 changes: 2 additions & 8 deletions src/config.cpp
Expand Up @@ -27,13 +27,7 @@
#include <QDir>
#include <QStringList>
#include <QMultiHash>
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
# include <QSystemDeviceInfo>
QTM_USE_NAMESPACE
#else
# include <QDeviceInfo>
# define QSystemDeviceInfo QDeviceInfo
#endif
#include <QDeviceInfo>

const QString ContentAction::HighlighterMimeClass("x-maemo-highlight/");

Expand Down Expand Up @@ -260,7 +254,7 @@ QString ContentAction::Internal::bindParams(const QString &str)
static QString model;

if (!initialized) {
QSystemDeviceInfo sid;
QDeviceInfo sid;
manufacturer = sid.manufacturer();
model = sid.model();
initialized = true;
Expand Down
11 changes: 0 additions & 11 deletions src/contentaction-0.1.pc.in

This file was deleted.

15 changes: 3 additions & 12 deletions src/src.pro
@@ -1,6 +1,5 @@
TEMPLATE = lib
equals(QT_MAJOR_VERSION, 4): TARGET = contentaction
equals(QT_MAJOR_VERSION, 5): TARGET = contentaction5
TARGET = contentaction5

include(../common.pri)

Expand All @@ -13,14 +12,7 @@ QT = core xml dbus
CONFIG += link_pkgconfig hide_symbols
CONFIG -= link_prl
PKGCONFIG += gio-2.0 gio-unix-2.0

equals(QT_MAJOR_VERSION, 4) {
PKGCONFIG += mlite
CONFIG += mobility
MOBILITY += systeminfo
} else {
PKGCONFIG += mlite5 Qt5SystemInfo
}
PKGCONFIG += mlite5 Qt5SystemInfo

target.path = $$[QT_INSTALL_LIBS]
INSTALLS += target
Expand Down Expand Up @@ -52,8 +44,7 @@ include.files = contentaction.h \
contentinfo.h
INSTALLS += include

equals(QT_MAJOR_VERSION, 4): PCFILE=contentaction-0.1.pc
equals(QT_MAJOR_VERSION, 5): PCFILE=contentaction5.pc
PCFILE=contentaction5.pc

# handle .pc file
system(cp $${PCFILE}.in $$PCFILE)
Expand Down
3 changes: 0 additions & 3 deletions tests/test-mimedefaults.cpp
Expand Up @@ -83,9 +83,6 @@ void TestMimeDefaults::setMimeDefault()
QCOMPARE(a.name(), QString("ubermeego"));
}

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
struct QThread : public ::QThread { using ::QThread::sleep; };
#endif
QThread::sleep(1); // time resolution (not only) on ext3 is 1s (see readChangedKeyValueFiles())

// Do it again for another app, just in case ubermeego was already the
Expand Down
3 changes: 1 addition & 2 deletions tests/testcase.pri
@@ -1,8 +1,7 @@
QT += testlib
INCLUDEPATH += ../src
LIBS += -L../src
equals(QT_MAJOR_VERSION, 4): LIBS += -lcontentaction
equals(QT_MAJOR_VERSION, 5): LIBS += -lcontentaction5
LIBS += -lcontentaction5

include(../common.pri)

Expand Down
3 changes: 1 addition & 2 deletions tools/tools.pro
Expand Up @@ -8,6 +8,5 @@ PKGCONFIG += gio-2.0 gio-unix-2.0
DEFINES += QT_NO_KEYWORDS # make glib happy

LIBS += -L../src
equals(QT_MAJOR_VERSION, 4): LIBS += -lcontentaction
equals(QT_MAJOR_VERSION, 5): LIBS += -lcontentaction5
LIBS += -lcontentaction5
INCLUDEPATH += ../src

0 comments on commit a68f3d7

Please sign in to comment.