Use ConsoleKit to shutdown the system instead of HAL (deprecated)

use UPower to suspend the system instead of HAL (deprecated)
Rewrote computer shutdown/suspend code to avoid data loss
This commit is contained in:
Christophe Dumez
2011-04-05 16:22:16 +00:00
parent eaac9180e5
commit c63503aaa6
3 changed files with 21 additions and 11 deletions

View File

@@ -69,6 +69,7 @@ public:
private:
explicit QBtSession();
static QBtSession* m_instance;
enum shutDownAction { NO_SHUTDOWN, SHUTDOWN_COMPUTER, SUSPEND_COMPUTER };
public:
static QBtSession* instance();
@@ -267,6 +268,7 @@ private:
// Tracker
QPointer<QTracker> m_tracker;
TorrentSpeedMonitor *m_speedMonitor;
shutDownAction m_shutdownAct;
};