VirtualBox

Ignore:
Timestamp:
Feb 12, 2024 5:11:53 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161622
Message:

FE/Qt: UIDesktopWidgetWatchdog: Get rid of UIDefs.h dependency; Moving SynthTest stuff to appropriate place.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r103320 r103321  
    3939#include "UISettingsDefs.h"
    4040#include "UITranslator.h"
     41#if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
     42# include "UIDesktopWidgetWatchdog.h"
     43#endif
    4144
    4245/* COM includes: */
     
    401404}
    402405
     406#if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
    403407/* DesktopWatchdogPolicy_SynthTest <= QString: */
    404408template<> SHARED_LIBRARY_STUFF DesktopWatchdogPolicy_SynthTest UIConverter::fromInternalString<DesktopWatchdogPolicy_SynthTest>(const QString &strPolicyType) const
     
    414418    return DesktopWatchdogPolicy_SynthTest_Both;
    415419}
     420#endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */
    416421
    417422/* QString <= UIExtraDataMetaDefs::DialogType: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp

    r98999 r103321  
    3838QStringList UIDefs::VBoxExtPackFileExts = QStringList() << "vbox-extpack";
    3939QStringList UIDefs::OVFFileExts = QStringList() << "ovf" << "ova";
    40 
    41 /** Environment variable names: */
    42 const char *UIDefs::VBox_DesktopWatchdogPolicy_SynthTest = "VBOX_DESKTOPWATCHDOGPOLICY_SYNTHTEST";
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r103320 r103321  
    8686    /** Allowed OVF file extensions. */
    8787    SHARED_LIBRARY_STUFF extern QStringList OVFFileExts;
    88 
    89     /** Holds environment variable name for Desktop Watchdog / Synthetic Test policy type. */
    90     SHARED_LIBRARY_STUFF extern const char *VBox_DesktopWatchdogPolicy_SynthTest;
    9188}
    9289using namespace UIDefs /* if header included */;
     
    162159
    163160
    164 /** Desktop Watchdog / Synthetic Test policy type. */
    165 enum DesktopWatchdogPolicy_SynthTest
    166 {
    167     DesktopWatchdogPolicy_SynthTest_Disabled,
    168     DesktopWatchdogPolicy_SynthTest_ManagerOnly,
    169     DesktopWatchdogPolicy_SynthTest_MachineOnly,
    170     DesktopWatchdogPolicy_SynthTest_Both
    171 };
    172 Q_DECLARE_METATYPE(DesktopWatchdogPolicy_SynthTest);
    173 
    174 
    175161#endif /* !FEQT_INCLUDED_SRC_globals_UIDefs_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.cpp

    r102786 r103321  
    123123
    124124#if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
     125
     126/* static */
     127const QString
     128UIDesktopWidgetWatchdog::s_strVBoxDesktopWatchdogPolicySynthTest = "VBOX_DESKTOPWATCHDOGPOLICY_SYNTHTEST";
    125129
    126130/** QWidget extension used as
     
    10031007#if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
    10041008    /* Load Synthetic Test policy: */
    1005     const QString strSynthTestPolicy = QString::fromLocal8Bit(qgetenv(VBox_DesktopWatchdogPolicy_SynthTest));
     1009    const QString strSynthTestPolicy =
     1010        QString::fromLocal8Bit(qgetenv(s_strVBoxDesktopWatchdogPolicySynthTest.toLatin1().constData()));
    10061011    m_enmSynthTestPolicy = gpConverter->fromInternalString<DesktopWatchdogPolicy_SynthTest>(strSynthTestPolicy);
    10071012
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDesktopWidgetWatchdog.h

    r100064 r103321  
    4242/* GUI includes: */
    4343#include "UILibraryDefs.h"
    44 #if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
    45 # include "UIDefs.h"
    46 #endif
    4744
    4845/* Forward declarations: */
    4946class QScreen;
     47
     48#if defined(VBOX_WS_NIX) && !defined(VBOX_GUI_WITH_CUSTOMIZATIONS1)
     49/** Desktop Watchdog / Synthetic Test policy type. */
     50enum DesktopWatchdogPolicy_SynthTest
     51{
     52    DesktopWatchdogPolicy_SynthTest_Disabled,
     53    DesktopWatchdogPolicy_SynthTest_ManagerOnly,
     54    DesktopWatchdogPolicy_SynthTest_MachineOnly,
     55    DesktopWatchdogPolicy_SynthTest_Both
     56};
     57Q_DECLARE_METATYPE(DesktopWatchdogPolicy_SynthTest);
     58#endif /* VBOX_WS_NIX && !VBOX_GUI_WITH_CUSTOMIZATIONS1 */
    5059
    5160/** Singleton QObject extension used as desktop-widget
     
    210219    void cleanupExistingWorkers();
    211220
     221    /** Holds environment variable name for Desktop Watchdog / Synthetic Test policy type. */
     222    static const QString s_strVBoxDesktopWatchdogPolicySynthTest;
     223
    212224    /** Holds the cached Synthetic Test policy. */
    213225    DesktopWatchdogPolicy_SynthTest  m_enmSynthTestPolicy;
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