Changeset 89702 in vbox
- Timestamp:
- Jun 15, 2021 12:23:18 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r89324 r89702 1556 1556 UICommon_QT_MODULES = Core Gui Widgets 1557 1557 UICommon_QT_MODULES.linux += X11Extras 1558 UICommon_QT_MODULES.linux += DBus 1558 1559 UICommon_QT_MODULES.solaris += X11Extras 1559 1560 UICommon_QT_MODULES.freebsd += X11Extras -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.cpp
r82968 r89702 19 19 #include <QString> 20 20 #include <QX11Info> 21 #include <QtDBus/QDBusConnection> 22 #include <QtDBus/QDBusReply> 23 #include <QtDBus/QDBusInterface> 24 #include <QtDBus/QDBusConnectionInterface> 21 25 22 26 /* GUI includes: */ … … 156 160 return XQueryExtension(pDisplay, extensionName, &major_opcode, &first_event, &first_error); 157 161 } 162 163 QStringList X11ScrenSaverServices() 164 { 165 QStringList serviceNames; 166 QDBusConnection bus = QDBusConnection::sessionBus(); 167 QDBusReply<QStringList> replyr = bus.interface()->registeredServiceNames(); 168 if (!replyr.isValid()) 169 return serviceNames; 170 for (int i = 0; i < replyr.value().size(); ++i) 171 { 172 const QString strServiceName = replyr.value()[i]; 173 if (strServiceName.contains("screensaver", Qt::CaseInsensitive)) 174 { 175 printf("%s\n", qPrintable(strServiceName)); 176 serviceNames << strServiceName; 177 } 178 } 179 return serviceNames; 180 } 181 182 183 #ifdef VBOX_WS_X11 184 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxX11Helper.h
r82968 r89702 54 54 SHARED_LIBRARY_STUFF bool X11CheckExtension(const char *extensionName); 55 55 56 /* Returns the list of DBus screensaver services.*/ 57 SHARED_LIBRARY_STUFF QStringList X11ScrenSaverServices(); 58 56 59 #endif /* !FEQT_INCLUDED_SRC_platform_x11_VBoxX11Helper_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r89700 r89702 712 712 void UIMachineLogic::sltDisableHostScreenSaverStateChanged(bool fDisabled) 713 713 { 714 #if defined(VBOX_WS_X11) 715 QStringList services = X11ScrenSaverServices(); 716 Q_UNUSED(services); 714 717 Q_UNUSED(fDisabled); 718 719 #else 720 Q_UNUSED(fDisabled); 721 #endif 715 722 } 716 723 … … 1496 1503 connect(gEDataManager, &UIExtraDataManager::sigDisableHostScreenSaverStateChange, 1497 1504 this, &UIMachineLogic::sltDisableHostScreenSaverStateChanged); 1505 sltDisableHostScreenSaverStateChanged(gEDataManager->disableHostScreenSaver()); 1498 1506 #endif 1499 1507 }
Note:
See TracChangeset
for help on using the changeset viewer.