mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Enable access to shutdown functions when configured with --disable-gui
option
This commit is contained in:
parent
0770fe8b09
commit
c7b15b9cc5
4 changed files with 8 additions and 9 deletions
|
@ -91,7 +91,6 @@ static struct { const char *source; const char *comment; } units[] = {
|
|||
QT_TRANSLATE_NOOP3("misc", "EiB", "exbibytes (1024 pebibytes)")
|
||||
};
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void Utils::Misc::shutdownComputer(const ShutdownDialogAction &action)
|
||||
{
|
||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
|
||||
|
@ -216,7 +215,6 @@ void Utils::Misc::shutdownComputer(const ShutdownDialogAction &action)
|
|||
(PTOKEN_PRIVILEGES) NULL, 0);
|
||||
#endif
|
||||
}
|
||||
#endif // DISABLE_GUI
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
// Get screen center
|
||||
|
|
|
@ -67,8 +67,9 @@ namespace Utils
|
|||
QString parseHtmlLinks(const QString &raw_text);
|
||||
bool isUrl(const QString &s);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void shutdownComputer(const ShutdownDialogAction &action);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
// Get screen center
|
||||
QPoint screenCenter(QWidget *win);
|
||||
QSize smallIconSize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue