summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@metalstrolche.de>2015-11-25 15:44:40 +0100
committerStefan Wildemann <gta04@metalstrolche.de>2017-02-23 19:40:26 +0100
commita37818166644d9b1c76b0021f984b01c81a0bfcc (patch)
tree76c3cb9b97f3c75c69e82468914aa4b5e27838bc
parent2ef6a502c3afb86faf014cf32f94dc00b9ae581d (diff)
downloadnavit-a37818166644d9b1c76b0021f984b01c81a0bfcc.tar.gz
Add screen blanking for Sailfish OS.
-rwxr-xr-xCMakeLists.txt4
-rw-r--r--navit/graphics/qt5/graphics_qt5.cpp10
2 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 168275814..819e7d450 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,6 +159,7 @@ libfind_pkg_check_modules(FONTCONFIG fontconfig)
if (NOT DISABLE_QT)
find_package(Qt5Widgets)
find_package(Qt5Svg)
+ find_package(Qt5DBus)
find_package(Qt5Positioning)
find_package(Qt5Sensors)
#find_package(Qt5Declarative)
@@ -315,7 +316,8 @@ endif(QT_FOUND)
if (Qt5Widgets_FOUND)
set_with_reason(graphics/qt5 "Qt5 found" TRUE ${Qt5Widgets_LIBRARIES}
${Qt5Declarative_LIBRARIES}
- ${Qt5Svg_LIBRARIES})
+ ${Qt5Svg_LIBRARIES}
+ ${Qt5DBus_LIBRARIES})
endif ()
if (Qt5Positioning_FOUND)
set_with_reason(vehicle/qt5 "Qt5 Positioning found" TRUE
diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp
index 77bde3253..e8793c2f9 100644
--- a/navit/graphics/qt5/graphics_qt5.cpp
+++ b/navit/graphics/qt5/graphics_qt5.cpp
@@ -44,7 +44,8 @@
#include <QFont>
#include <QSvgRenderer>
#include <QPixmapCache>
-
+#include <QDBusConnection>
+#include <QDBusInterface>
struct callback_list* callbacks;
@@ -467,7 +468,12 @@ graphics_qt5_fullscreen(struct window *w, int on)
static void
graphics_qt5_disable_suspend(struct window *w)
{
-// dbg(lvl_debug,"enter\n");
+ dbg(lvl_debug,"enter\n");
+ QDBusConnection system = QDBusConnection::connectToBus(QDBusConnection::SystemBus, "system");
+ QDBusInterface interface("com.nokia.mce", "/com/nokia/mce/request", "com.nokia.mce.request", system);
+
+ interface.call(QLatin1String("req_display_blanking_pause"));
+// interface.call(QLatin1String("req_display_cancel_blanking_pause"));
}
static void *