Skip to content
This repository has been archived by the owner on Sep 4, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
[libcontacts] Only defer display-off processing in GUI apps. Contribu…
…tes to MER#1249
  • Loading branch information
matthewvogt committed Aug 19, 2015
1 parent 342ee5e commit c8f7016
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/seasidecache.cpp
Expand Up @@ -575,10 +575,14 @@ SeasideCache::SeasideCache()
connect(config, SIGNAL(sortPropertyChanged(QString)), this, SLOT(sortPropertyChanged(QString)));
connect(config, SIGNAL(groupPropertyChanged(QString)), this, SLOT(groupPropertyChanged(QString)));

// Is this a GUI application? If so, we want to defer some processing when the display is off
if (qApp && qApp->property("applicationDisplayName").isValid()) {
// Only QGuiApplication has this property
if (!QDBusConnection::systemBus().connect(MCE_SERVICE, MCE_SIGNAL_PATH, MCE_SIGNAL_IF,
MCE_DISPLAY_SIG, this, SLOT(displayStatusChanged(QString)))) {
qWarning() << "Unable to connect to MCE displayStatusChanged signal";
}
}

QContactManager *mgr(manager());

Expand Down

0 comments on commit c8f7016

Please sign in to comment.