summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXizhi Zhu <xizhi.zhu@gmail.com>2012-08-16 18:22:56 +0300
committerQt by Nokia <qt-info@nokia.com>2012-08-17 01:33:29 +0200
commit98483f9bc4862618634d73dbf99da2178cf64c5e (patch)
tree38b2f7c20bc3b89c537963d6738298d48e28c059
parentc6b3a78e0b64fc979028bd982fc2e22fac901581 (diff)
Removed mtlib backend from SystemInfo.
Change-Id: I444fb0d255651b1a94f1eb1ff9bf1e61f92344ee Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
-rw-r--r--src/systeminfo/qscreensaver_linux.cpp49
-rw-r--r--src/systeminfo/qscreensaver_linux_p.h26
-rw-r--r--src/systeminfo/systeminfo.pro18
3 files changed, 4 insertions, 89 deletions
diff --git a/src/systeminfo/qscreensaver_linux.cpp b/src/systeminfo/qscreensaver_linux.cpp
index 712b1a6f..3eb57228 100644
--- a/src/systeminfo/qscreensaver_linux.cpp
+++ b/src/systeminfo/qscreensaver_linux.cpp
@@ -41,36 +41,20 @@
#include "qscreensaver_linux_p.h"
-#if !defined(QT_NO_MTLIB)
-#include <mt-client/notionclient.h>
-#include <QtCore/qtimer.h>
-#endif // QT_NO_MTLIB
-
#if !defined(QT_NO_X11)
#include <X11/Xlib.h>
#endif // QT_NO_X11
QT_BEGIN_NAMESPACE
-#if !defined(QT_NO_MTLIB)
-const int QScreenSaverPrivate::notionDuration(25);
-#endif // QT_NO_MTLIB
-
QScreenSaverPrivate::QScreenSaverPrivate(QScreenSaver *parent)
: q_ptr(parent)
-#if !defined(QT_NO_MTLIB)
- , notionClient(0)
- , timer(0)
- , isScreenSaverEnabled(true)
-#endif // QT_NO_MTLIB
{
}
bool QScreenSaverPrivate::screenSaverEnabled()
{
-#if !defined(QT_NO_MTLIB)
- return isScreenSaverEnabled;
-#elif !defined(QT_NO_X11)
+#if !defined(QT_NO_X11)
int timeout = 0;
int interval = 0;
int preferBlanking = 0;
@@ -86,29 +70,7 @@ bool QScreenSaverPrivate::screenSaverEnabled()
void QScreenSaverPrivate::setScreenSaverEnabled(bool enabled)
{
-#if !defined(QT_NO_MTLIB)
- if (enabled != isScreenSaverEnabled) {
- if (enabled) {
- if (notionClient && timer) {
- notionClient->mediaPlaying(false);
- timer->stop();
- }
- isScreenSaverEnabled = true;
- } else {
- if (!notionClient)
- notionClient = new NotionClient(this);
- if (!timer) {
- timer = new QTimer(this);
- timer->setInterval((notionDuration - 2) * 1000);
- connect(timer, SIGNAL(timeout()), this, SLOT(onTimeout()));
- }
- if (!timer->isActive())
- timer->start();
- onTimeout();
- isScreenSaverEnabled = false;
- }
- }
-#elif !defined(QT_NO_X11)
+#if !defined(QT_NO_X11)
int timeout = 0;
int interval = 0;
int preferBlanking = 0;
@@ -127,11 +89,4 @@ void QScreenSaverPrivate::setScreenSaverEnabled(bool enabled)
#endif
}
-#if !defined(QT_NO_MTLIB)
-void QScreenSaverPrivate::onTimeout()
-{
- notionClient->mediaPlaying(true, notionDuration);
-}
-#endif // QT_NO_MTLIB
-
QT_END_NAMESPACE
diff --git a/src/systeminfo/qscreensaver_linux_p.h b/src/systeminfo/qscreensaver_linux_p.h
index 2985a532..422b1067 100644
--- a/src/systeminfo/qscreensaver_linux_p.h
+++ b/src/systeminfo/qscreensaver_linux_p.h
@@ -55,45 +55,19 @@
#include <qscreensaver.h>
-#if !defined(QT_NO_MTLIB)
-class NotionClient;
-
-QT_BEGIN_NAMESPACE
-class QTimer;
-QT_END_NAMESPACE
-#endif // QT_NO_MTLIB
-
QT_BEGIN_NAMESPACE
class QScreenSaverPrivate
-#if !defined(QT_NO_MTLIB)
- : public QObject
-#endif // QT_NO_MTLIB
{
-#if !defined(QT_NO_MTLIB)
- Q_OBJECT
-#endif // QT_NO_MTLIB
public:
QScreenSaverPrivate(QScreenSaver *parent);
bool screenSaverEnabled();
void setScreenSaverEnabled(bool enabled);
-#if !defined(QT_NO_MTLIB)
-private Q_SLOTS:
- void onTimeout();
-#endif // QT_NO_MTLIB
-
private:
QScreenSaver * const q_ptr;
Q_DECLARE_PUBLIC(QScreenSaver)
-
-#if !defined(QT_NO_MTLIB)
- NotionClient *notionClient;
- QTimer *timer;
- bool isScreenSaverEnabled;
- static const int notionDuration;
-#endif // QT_NO_MTLIB
};
QT_END_NAMESPACE
diff --git a/src/systeminfo/systeminfo.pro b/src/systeminfo/systeminfo.pro
index 151c6781..421a152c 100644
--- a/src/systeminfo/systeminfo.pro
+++ b/src/systeminfo/systeminfo.pro
@@ -87,14 +87,7 @@ linux-*: !simulator: {
PRIVATE_HEADERS += qjsondbwrapper_p.h
SOURCES += qjsondbwrapper.cpp
} else: {
- DEFINES += QT_NO_JSONDB QT_NO_MTLIB
- }
-
- mtlib|config_mtlib {
- CONFIG += link_pkgconfig
- PKGCONFIG += mt-client
- } else: {
- DEFINES += QT_NO_MTLIB
+ DEFINES += QT_NO_JSONDB
}
config_bluez {
@@ -190,14 +183,7 @@ simulator {
SOURCES += qjsondbwrapper.cpp \
qdeviceinfo_linux.cpp
} else: {
- DEFINES += QT_NO_JSONDB QT_NO_MTLIB
- }
-
- mtlib|config_mtlib {
- CONFIG += link_pkgconfig
- PKGCONFIG += mt-client
- } else: {
- DEFINES += QT_NO_MTLIB
+ DEFINES += QT_NO_JSONDB
}
config_bluez {