mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Really get rid of DBus dependency in nox mode
This commit is contained in:
parent
64615adc23
commit
76ea7525e3
@ -70,10 +70,12 @@ const int UNLEN = 256;
|
|||||||
#include <winbase.h>
|
#include <winbase.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_GUI
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
#include <QDBusInterface>
|
#include <QDBusInterface>
|
||||||
#include <QDBusMessage>
|
#include <QDBusMessage>
|
||||||
#endif
|
#endif
|
||||||
|
#endif // DISABLE_GUI
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
@ -208,6 +210,7 @@ void suspendComputer() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_GUI
|
||||||
void misc::shutdownComputer(bool sleep) {
|
void misc::shutdownComputer(bool sleep) {
|
||||||
#ifdef Q_WS_X11
|
#ifdef Q_WS_X11
|
||||||
// Use dbus to power off the system
|
// Use dbus to power off the system
|
||||||
@ -325,6 +328,7 @@ QString misc::truncateRootFolder(boost::intrusive_ptr<torrent_info> t) {
|
|||||||
}
|
}
|
||||||
return root_folder;
|
return root_folder;
|
||||||
}
|
}
|
||||||
|
#endif // DISABLE_GUI
|
||||||
|
|
||||||
QString misc::truncateRootFolder(libtorrent::torrent_handle h) {
|
QString misc::truncateRootFolder(libtorrent::torrent_handle h) {
|
||||||
torrent_info t = h.get_torrent_info();
|
torrent_info t = h.get_torrent_info();
|
||||||
|
@ -110,7 +110,9 @@ public:
|
|||||||
return extension;
|
return extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_GUI
|
||||||
static void shutdownComputer(bool sleep=false);
|
static void shutdownComputer(bool sleep=false);
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool safeRemove(QString file_path) {
|
static bool safeRemove(QString file_path) {
|
||||||
QFile MyFile(file_path);
|
QFile MyFile(file_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user