mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 08:16:16 -07:00
Really get rid of nox dependency in nox mode
This commit is contained in:
parent
76ea7525e3
commit
ab8e35b6b4
2 changed files with 7 additions and 13 deletions
14
src/misc.cpp
14
src/misc.cpp
|
@ -198,18 +198,6 @@ long long misc::freeDiskSpaceOnPath(QString path) {
|
|||
#endif
|
||||
}
|
||||
|
||||
void suspendComputer() {
|
||||
#ifdef Q_WS_X11
|
||||
// Use dbus to power off the system
|
||||
// dbus-send --print-reply --system --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Shutdown
|
||||
QDBusInterface computer("org.freedesktop.Hal", "/org/freedesktop/Hal/devices/computer", "org.freedesktop.Hal.Device.SystemPowerManagement", QDBusConnection::systemBus());
|
||||
computer.call("Suspend", 5);
|
||||
#endif
|
||||
#ifdef Q_WS_MAC
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void misc::shutdownComputer(bool sleep) {
|
||||
#ifdef Q_WS_X11
|
||||
|
@ -295,6 +283,7 @@ void misc::shutdownComputer(bool sleep) {
|
|||
(PTOKEN_PRIVILEGES) NULL, 0);
|
||||
#endif
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
QString misc::truncateRootFolder(boost::intrusive_ptr<torrent_info> t) {
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16
|
||||
|
@ -328,7 +317,6 @@ QString misc::truncateRootFolder(boost::intrusive_ptr<torrent_info> t) {
|
|||
}
|
||||
return root_folder;
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
QString misc::truncateRootFolder(libtorrent::torrent_handle h) {
|
||||
torrent_info t = h.get_torrent_info();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue