VirtualBox

Ignore:
Timestamp:
Apr 18, 2023 7:18:34 AM (20 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10407. Renaming DBus related functions.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.cpp

    r99434 r99435  
    217217}
    218218
    219 bool NativeWindowSubsystem::X11CheckDBusScreenSaverServices()
     219bool NativeWindowSubsystem::checkDBusScreenSaverServices()
    220220{
    221221    QDBusConnection connection = QDBusConnection::sessionBus();
     
    263263}
    264264
    265 void X11IntrospectServices(const QDBusConnection &connection,
     265void introspectDBusServices(const QDBusConnection &connection,
    266266                           const QString &strService,
    267267                           const QString &strPath,
     
    285285        {
    286286            QString subPath = strPath + QLatin1Char('/') + child.attribute(QLatin1String("name"));
    287             X11IntrospectServices(connection, strService, subPath, methods);
     287            introspectDBusServices(connection, strService, subPath, methods);
    288288        }
    289289        else if (child.tagName() == QLatin1String("interface"))
     
    293293}
    294294
    295 QVector<X11ScreenSaverInhibitMethod*> NativeWindowSubsystem::X11FindDBusScrenSaverInhibitMethods()
     295QVector<X11ScreenSaverInhibitMethod*> NativeWindowSubsystem::findDBusScrenSaverInhibitMethods()
    296296{
    297297    QVector<X11ScreenSaverInhibitMethod*> methods;
     
    303303    QStringList services = X11FindDBusScreenSaverServices(connection);
    304304    foreach(const QString &strServiceName, services)
    305         X11IntrospectServices(connection, strServiceName, "", methods);
     305        introspectDBusServices(connection, strServiceName, "", methods);
    306306
    307307    return methods;
    308308}
    309309
    310 void NativeWindowSubsystem::X11InhibitUninhibitScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutInhibitMethods)
     310void NativeWindowSubsystem::toggleHostScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutInhibitMethods)
    311311{
    312312    QDBusConnection connection = QDBusConnection::sessionBus();
  • trunk/src/VBox/Frontends/VirtualBox/src/platform/x11/VBoxUtils-x11.h

    r99434 r99435  
    120120    /** Wrapper for X11CheckExtension and WaylandCheckExtension functions. */
    121121    bool checkExtension(bool fIsXServerAvailable, const char *extensionName);
    122     /** X11: Returns true if XLib extension with name @p extensionName is avaible, false otherwise. */
     122    /** X11: Returns true if XLib extension with name @p extensionName is available, false otherwise. */
    123123    bool X11CheckExtension(const char *pExtensionName);
    124124    bool WaylandCheckExtension(const char *pExtensionName);
    125125
    126126
    127     /** X11: Returns whether there are any DBus services whose name contains the substring 'screensaver'. */
    128     bool X11CheckDBusScreenSaverServices();
    129     /** X11: Returns the list of Inhibit methods found by introspecting DBus services. */
    130     SHARED_LIBRARY_STUFF QVector<X11ScreenSaverInhibitMethod*> X11FindDBusScrenSaverInhibitMethods();
    131     /** X11: Disables/enables Screen Saver through QDBus. */
    132     SHARED_LIBRARY_STUFF void X11InhibitUninhibitScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutInhibitMethods);
     127    /** DBus: Returns whether there are any DBus services whose name contains the substring 'screensaver'. */
     128    bool checkDBusScreenSaverServices();
     129    /** DBus: Returns the list of Inhibit methods found by introspecting DBus services. */
     130    SHARED_LIBRARY_STUFF QVector<X11ScreenSaverInhibitMethod*> findDBusScrenSaverInhibitMethods();
     131    /** DBus: Disables/enables Screen Saver through QDBus. */
     132    SHARED_LIBRARY_STUFF void toggleHostScrenSaver(bool fInhibit, QVector<X11ScreenSaverInhibitMethod*> &inOutInhibitMethods);
    133133
    134134    /** Wrapper function for X11ActivateWindow or WaylandActivateWindow. */
     
    170170    /** Detects and returns display server type. */
    171171    SHARED_LIBRARY_STUFF DisplayServerType detectDisplayServerType();
    172     /** Returns true if @a enmDisplayServerType is either xorg or xwayland. */
     172    /** Returns true if @a enmDisplayServerType is either XOrg or XWayland. */
    173173    SHARED_LIBRARY_STUFF bool X11XServerAvailable(DisplayServerType enmDisplayServerType);
    174174}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r99134 r99435  
    579579    /* Find the methods once and cache them: */
    580580    if (m_methods.isEmpty())
    581         m_methods = NativeWindowSubsystem::X11FindDBusScrenSaverInhibitMethods();
    582     NativeWindowSubsystem::X11InhibitUninhibitScrenSaver(fDisabled, m_methods);
     581        m_methods = NativeWindowSubsystem::findDBusScrenSaverInhibitMethods();
     582    NativeWindowSubsystem::toggleHostScrenSaver(fDisabled, m_methods);
    583583#elif defined(VBOX_WS_WIN)
    584584    NativeWindowSubsystem::setScreenSaverActive(fDisabled);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDisplayFeaturesEditor.cpp

    r98103 r99435  
    142142        m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this);
    143143#elif defined(VBOX_WS_X11)
    144         if (NativeWindowSubsystem::X11CheckDBusScreenSaverServices())
     144        if (NativeWindowSubsystem::checkDBusScreenSaverServices())
    145145            m_pCheckBoxDisableHostScreenSaver = new QCheckBox(this);
    146146#endif /* VBOX_WS_X11 */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette