VirtualBox

Changeset 103793 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 11, 2024 7:17:31 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt: UICommon: Move versioning related functionality to UIVersion / UIVersionInfo; Rework user cases accordingly.

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

Legend:

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

    r101560 r103793  
    3636/* GUI includes: */
    3737#include "QIDialogButtonBox.h"
    38 #include "UICommon.h"
    3938#include "UIIconPool.h"
     39#include "UIVersion.h"
    4040#include "VBoxAboutDlg.h"
    4141#ifdef VBOX_WS_MAC
     
    138138
    139139    /* Branding: Use a custom about splash picture if set: */
    140     const QString strSplash = uiCommon().brandingGetKey("UI/AboutSplash");
    141     if (uiCommon().brandingIsActive() && !strSplash.isEmpty())
     140    const QString strSplash = UIVersionInfo::brandingGetKey("UI/AboutSplash");
     141    if (UIVersionInfo::brandingIsActive() && !strSplash.isEmpty())
    142142    {
    143143        char szExecPath[1024];
     
    184184        /* Branding: Set a different text color (because splash also could be white),
    185185         * otherwise use white as default color: */
    186         const QString strColor = uiCommon().brandingGetKey("UI/AboutTextColor");
     186        const QString strColor = UIVersionInfo::brandingGetKey("UI/AboutTextColor");
    187187        if (!strColor.isEmpty())
    188188            palette.setColor(QPalette::WindowText, QColor(strColor).name());
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r103781 r103793  
    3737#include <QProcess>
    3838#include <QProgressDialog>
    39 #include <QRegularExpression>
    4039#include <QSessionManager>
    4140#include <QSettings>
     
    8079#include "UIThreadPool.h"
    8180#include "UITranslator.h"
     81#include "UIVersion.h"
    8282#include "UIVirtualBoxClientEventHandler.h"
    8383#include "UIVirtualBoxEventHandler.h"
     
    662662                              NULL /*pErrInfo*/);
    663663
    664         LogRel(("Qt version: %s\n", qtRTVersionString().toUtf8().constData()));
     664        LogRel(("Qt version: %s\n", UIVersionInfo::qtRTVersionString().toUtf8().constData()));
    665665    }
    666666
     
    842842
    843843    LogRel(("GUI: UICommon: aboutToQuit request handled!\n"));
    844 }
    845 
    846 /* static */
    847 QString UICommon::qtRTVersionString()
    848 {
    849     return QString::fromLatin1(qVersion());
    850 }
    851 
    852 /* static */
    853 uint UICommon::qtRTVersion()
    854 {
    855     const QString strVersionRT = UICommon::qtRTVersionString();
    856     return (strVersionRT.section('.', 0, 0).toInt() << 16) +
    857            (strVersionRT.section('.', 1, 1).toInt() << 8) +
    858            strVersionRT.section('.', 2, 2).toInt();
    859 }
    860 
    861 /* static */
    862 uint UICommon::qtRTMajorVersion()
    863 {
    864     return UICommon::qtRTVersionString().section('.', 0, 0).toInt();
    865 }
    866 
    867 /* static */
    868 uint UICommon::qtRTMinorVersion()
    869 {
    870     return UICommon::qtRTVersionString().section('.', 1, 1).toInt();
    871 }
    872 
    873 /* static */
    874 uint UICommon::qtRTRevisionNumber()
    875 {
    876     return UICommon::qtRTVersionString().section('.', 2, 2).toInt();
    877 }
    878 
    879 /* static */
    880 QString UICommon::qtCTVersionString()
    881 {
    882     return QString::fromLatin1(QT_VERSION_STR);
    883 }
    884 
    885 /* static */
    886 uint UICommon::qtCTVersion()
    887 {
    888     const QString strVersionCompiled = UICommon::qtCTVersionString();
    889     return (strVersionCompiled.section('.', 0, 0).toInt() << 16) +
    890            (strVersionCompiled.section('.', 1, 1).toInt() << 8) +
    891            strVersionCompiled.section('.', 2, 2).toInt();
    892 }
    893 
    894 QString UICommon::vboxVersionString() const
    895 {
    896     const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    897     return comVBox.GetVersion();
    898 }
    899 
    900 QString UICommon::vboxVersionStringNormalized() const
    901 {
    902     const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    903     return comVBox.GetVersionNormalized();
    904 }
    905 
    906 bool UICommon::isBeta() const
    907 {
    908     return vboxVersionString().contains(QRegularExpression("BETA|ALPHA", QRegularExpression::CaseInsensitiveOption));
    909 }
    910 
    911 bool UICommon::showBetaLabel() const
    912 {
    913     return    isBeta()
    914            && !gEDataManager->preventBetaBuildLavel();
    915 }
    916 
    917 bool UICommon::brandingIsActive(bool fForce /* = false */)
    918 {
    919     if (fForce)
    920         return true;
    921 
    922     if (m_strBrandingConfigFilePath.isEmpty())
    923     {
    924         m_strBrandingConfigFilePath = QDir(QApplication::applicationDirPath()).absolutePath();
    925         m_strBrandingConfigFilePath += "/custom/custom.ini";
    926     }
    927 
    928     return QFile::exists(m_strBrandingConfigFilePath);
    929 }
    930 
    931 QString UICommon::brandingGetKey(QString strKey) const
    932 {
    933     QSettings settings(m_strBrandingConfigFilePath, QSettings::IniFormat);
    934     return settings.value(QString("%1").arg(strKey)).toString();
    935844}
    936845
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r103781 r103793  
    150150    /** @} */
    151151
    152     /** @name Versioning stuff.
    153      * @{ */
    154         /** Returns Qt runtime version string. */
    155         static QString qtRTVersionString();
    156         /** Returns Qt runtime version. */
    157         static uint qtRTVersion();
    158         /** Returns Qt runtime major version. */
    159         static uint qtRTMajorVersion();
    160         /** Returns Qt runtime minor version. */
    161         static uint qtRTMinorVersion();
    162         /** Returns Qt runtime revision number. */
    163         static uint qtRTRevisionNumber();
    164 
    165         /** Returns Qt compiled version string. */
    166         static QString qtCTVersionString();
    167         /** Returns Qt compiled version. */
    168         static uint qtCTVersion();
    169 
    170         /** Returns VBox version string. */
    171         QString vboxVersionString() const;
    172         /** Returns normalized VBox version string. */
    173         QString vboxVersionStringNormalized() const;
    174         /** Returns whether VBox version string contains BETA word. */
    175         bool isBeta() const;
    176         /** Returns whether BETA label should be shown. */
    177         bool showBetaLabel() const;
    178 
    179         /** Returns whether branding is active. */
    180         bool brandingIsActive(bool fForce = false);
    181         /** Returns value for certain branding @a strKey from custom.ini file. */
    182         QString brandingGetKey(QString strKey) const;
    183     /** @} */
    184 
    185152    /** @name Host OS stuff.
    186153     * @{ */
     
    601568    /** @} */
    602569
    603     /** @name Versioning stuff.
    604      * @{ */
    605         /** Holds the VBox branding config file path. */
    606         QString  m_strBrandingConfigFilePath;
    607     /** @} */
    608 
    609570    /** @name Host OS stuff.
    610571     * @{ */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICursor.cpp

    r103710 r103793  
    3333#include "UICursor.h"
    3434#ifdef VBOX_WS_NIX
    35 # include "UICommon.h"
     35# include "UIVersion.h"
    3636#endif
    3737
     
    4848     * extension. Qt (before 5.11) fails to handle the case where the mentioned extension
    4949     * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */
    50     if ((UICommon::qtRTMajorVersion() < 5) ||
    51         (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
     50    if ((UIVersionInfo::qtRTMajorVersion() < 5) ||
     51        (UIVersionInfo::qtRTMajorVersion() == 5 && UIVersionInfo::qtRTMinorVersion() < 11))
    5252    {
    5353        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
     
    7474     * extension. Qt (before 5.11) fails to handle the case where the mentioned extension
    7575     * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */
    76     if ((UICommon::qtRTMajorVersion() < 5) ||
    77         (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
     76    if ((UIVersionInfo::qtRTMajorVersion() < 5) ||
     77        (UIVersionInfo::qtRTMajorVersion() == 5 && UIVersionInfo::qtRTMinorVersion() < 11))
    7878    {
    7979        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
     
    100100     * extension. Qt (before 5.11) fails to handle the case where the mentioned extension
    101101     * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */
    102     if ((UICommon::qtRTMajorVersion() < 5) ||
    103         (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
     102    if ((UIVersionInfo::qtRTMajorVersion() < 5) ||
     103        (UIVersionInfo::qtRTMajorVersion() == 5 && UIVersionInfo::qtRTMinorVersion() < 11))
    104104    {
    105105        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
     
    126126     * extension. Qt (before 5.11) fails to handle the case where the mentioned extension
    127127     * is missing. Please see https://codereview.qt-project.org/#/c/225665/ for Qt patch: */
    128     if ((UICommon::qtRTMajorVersion() < 5) ||
    129         (UICommon::qtRTMajorVersion() == 5 && UICommon::qtRTMinorVersion() < 11))
     128    if ((UIVersionInfo::qtRTMajorVersion() < 5) ||
     129        (UIVersionInfo::qtRTMajorVersion() == 5 && UIVersionInfo::qtRTMinorVersion() < 11))
    130130    {
    131131        if (NativeWindowSubsystem::checkExtension(uiCommon().X11ServerAvailable(), "RENDER"))
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r103771 r103793  
    5454#include "UIProgressDialog.h"
    5555#include "UITranslator.h"
     56#include "UIVersion.h"
    5657#include "VBoxAboutDlg.h"
    5758#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
     
    20942095{
    20952096    CVirtualBox vbox = gpGlobalSession->virtualBox();
    2096     const QString strFullVersion = uiCommon().brandingIsActive()
     2097    const QString strFullVersion = UIVersionInfo::brandingIsActive()
    20972098                                 ? QString("%1 r%2 - %3").arg(vbox.GetVersion())
    20982099                                                         .arg(vbox.GetRevision())
    2099                                                          .arg(uiCommon().brandingGetKey("Name"))
     2100                                                         .arg(UIVersionInfo::brandingGetKey("Name"))
    21002101                                 : QString("%1 r%2").arg(vbox.GetVersion())
    21012102                                                    .arg(vbox.GetRevision());
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.cpp

    r98103 r103793  
    2727
    2828/* Qt includes: */
     29#include <QApplication>
     30#include <QDir>
     31#include <QFile>
     32#include <QRegularExpression>
     33#include <QSettings>
    2934#include <QStringList>
    3035
    3136/* GUI includes: */
     37#include "UIExtraDataManager.h"
     38#include "UIGlobalSession.h"
    3239#include "UIVersion.h"
     40
     41/* COM includes: */
     42#include "CVirtualBox.h"
    3343
    3444/* Other VBox includes: */
    3545#include <iprt/string.h>
    3646
     47
     48/*********************************************************************************************************************************
     49*   Class UIVersion implementation.                                                                                              *
     50*********************************************************************************************************************************/
    3751
    3852UIVersion::UIVersion()
     
    123137    return version;
    124138}
     139
     140
     141/*********************************************************************************************************************************
     142*   Class UIVersionInfo implementation.                                                                                          *
     143*********************************************************************************************************************************/
     144
     145/* static */
     146QString UIVersionInfo::s_strBrandingConfigFilePath = QString();
     147
     148/* static */
     149QString UIVersionInfo::qtRTVersionString()
     150{
     151    return QString::fromLatin1(qVersion());
     152}
     153
     154/* static */
     155uint UIVersionInfo::qtRTVersion()
     156{
     157    const QString strVersionRT = qtRTVersionString();
     158    return (strVersionRT.section('.', 0, 0).toInt() << 16) +
     159           (strVersionRT.section('.', 1, 1).toInt() << 8) +
     160           strVersionRT.section('.', 2, 2).toInt();
     161}
     162
     163/* static */
     164uint UIVersionInfo::qtRTMajorVersion()
     165{
     166    return qtRTVersionString().section('.', 0, 0).toInt();
     167}
     168
     169/* static */
     170uint UIVersionInfo::qtRTMinorVersion()
     171{
     172    return qtRTVersionString().section('.', 1, 1).toInt();
     173}
     174
     175/* static */
     176uint UIVersionInfo::qtRTRevisionNumber()
     177{
     178    return qtRTVersionString().section('.', 2, 2).toInt();
     179}
     180
     181/* static */
     182QString UIVersionInfo::qtCTVersionString()
     183{
     184    return QString::fromLatin1(QT_VERSION_STR);
     185}
     186
     187/* static */
     188uint UIVersionInfo::qtCTVersion()
     189{
     190    const QString strVersionCompiled = qtCTVersionString();
     191    return   (strVersionCompiled.section('.', 0, 0).toInt() << 16)
     192           + (strVersionCompiled.section('.', 1, 1).toInt() << 8)
     193           + strVersionCompiled.section('.', 2, 2).toInt();
     194}
     195
     196/* static */
     197QString UIVersionInfo::vboxVersionString()
     198{
     199    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
     200    return comVBox.GetVersion();
     201}
     202
     203/* static */
     204QString UIVersionInfo::vboxVersionStringNormalized()
     205{
     206    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
     207    return comVBox.GetVersionNormalized();
     208}
     209
     210/* static */
     211bool UIVersionInfo::isBeta()
     212{
     213    return vboxVersionString().contains(QRegularExpression("BETA|ALPHA", QRegularExpression::CaseInsensitiveOption));
     214}
     215
     216/* static */
     217bool UIVersionInfo::showBetaLabel()
     218{
     219    return    isBeta()
     220           && !gEDataManager->preventBetaBuildLavel();
     221}
     222
     223/* static */
     224bool UIVersionInfo::brandingIsActive(bool fForce /* = false */)
     225{
     226    if (fForce)
     227        return true;
     228
     229    if (s_strBrandingConfigFilePath.isEmpty())
     230    {
     231        s_strBrandingConfigFilePath = QDir(QApplication::applicationDirPath()).absolutePath();
     232        s_strBrandingConfigFilePath += "/custom/custom.ini";
     233    }
     234
     235    return QFile::exists(s_strBrandingConfigFilePath);
     236}
     237
     238/* static */
     239QString UIVersionInfo::brandingGetKey(QString strKey)
     240{
     241    QSettings settings(s_strBrandingConfigFilePath, QSettings::IniFormat);
     242    return settings.value(QString("%1").arg(strKey)).toString();
     243}
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h

    r98103 r103793  
    3434/* Qt includes: */
    3535#include <QString>
     36
     37/* GUI includes: */
     38#include "UILibraryDefs.h"
    3639
    3740/** Represents VirtualBox version wrapper. */
     
    102105};
    103106
     107/** Represents VirtualBox version info interface. */
     108class SHARED_LIBRARY_STUFF UIVersionInfo
     109{
     110public:
     111
     112    /** Returns Qt runtime version string. */
     113    static QString qtRTVersionString();
     114    /** Returns Qt runtime version. */
     115    static uint qtRTVersion();
     116    /** Returns Qt runtime major version. */
     117    static uint qtRTMajorVersion();
     118    /** Returns Qt runtime minor version. */
     119    static uint qtRTMinorVersion();
     120    /** Returns Qt runtime revision number. */
     121    static uint qtRTRevisionNumber();
     122
     123    /** Returns Qt compiled version string. */
     124    static QString qtCTVersionString();
     125    /** Returns Qt compiled version. */
     126    static uint qtCTVersion();
     127
     128    /** Returns VBox version string. */
     129    static QString vboxVersionString();
     130    /** Returns normalized VBox version string. */
     131    static QString vboxVersionStringNormalized();
     132    /** Returns whether VBox version string contains BETA word. */
     133    static bool isBeta();
     134    /** Returns whether BETA label should be shown. */
     135    static bool showBetaLabel();
     136
     137    /** Returns whether branding is active. */
     138    static bool brandingIsActive(bool fForce = false);
     139    /** Returns value for certain branding @a strKey from custom.ini file. */
     140    static QString brandingGetKey(QString strKey);
     141
     142private:
     143
     144    /** Constructs version info: */
     145    UIVersionInfo();
     146
     147    /** Holds the VBox branding config file path. */
     148    static QString  s_strBrandingConfigFilePath;
     149};
     150
    104151#endif /* !FEQT_INCLUDED_SRC_globals_UIVersion_h */
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r103551 r103793  
    3838#include "UICommon.h"
    3939#include "UILoggingDefs.h"
     40#include "UIModalWindowManager.h"
    4041#include "UIStarter.h"
    41 #include "UIModalWindowManager.h"
    4242#ifdef VBOX_WS_MAC
    4343# include "VBoxUtils.h"
    4444# include "UICocoaApplication.h"
    4545#endif /* VBOX_WS_MAC */
     46#ifdef VBOX_WS_NIX
     47# include "UIVersion.h"
     48#endif
    4649
    4750/* Other VBox includes: */
     
    524527
    525528        /* Qt version check (major.minor are sensitive, fix number is ignored): */
    526         if (UICommon::qtRTVersion() < (UICommon::qtCTVersion() & 0xFFFF00))
     529        if (UIVersionInfo::qtRTVersion() < (UIVersionInfo::qtCTVersion() & 0xFFFF00))
    527530        {
    528531            QString strMsg = QApplication::tr("Executable <b>%1</b> requires Qt %2.x, found Qt %3.")
    529532                                              .arg(qAppName())
    530                                               .arg(UICommon::qtCTVersionString().section('.', 0, 1))
    531                                               .arg(UICommon::qtRTVersionString());
     533                                              .arg(UIVersionInfo::qtCTVersionString().section('.', 0, 1))
     534                                              .arg(UIVersionInfo::qtRTVersionString());
    532535            QMessageBox::critical(0, QApplication::tr("Incompatible Qt Library Error"),
    533536                                  strMsg, QMessageBox::Abort, QMessageBox::NoButton);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r103781 r103793  
    7777#include "UIVirtualMachineItemCloud.h"
    7878#include "UIVirtualMachineItemLocal.h"
     79#include "UIVirtualBoxEventHandler.h"
    7980#include "UIVMLogViewerDialog.h"
    80 #include "UIVirtualBoxEventHandler.h"
    8181#include "UIWizardAddCloudVM.h"
    8282#include "UIWizardCloneVD.h"
     
    9393# include "UIImageTools.h"
    9494# include "UIWindowMenuManager.h"
     95# include "UIVersion.h"
    9596# include "VBoxUtils.h"
    9697#else
     
    23992400#ifdef VBOX_WS_MAC
    24002401    /* Beta label? */
    2401     if (uiCommon().showBetaLabel())
     2402    if (UIVersionInfo::showBetaLabel())
    24022403    {
    24032404        QPixmap betaLabel = ::betaLabel(QSize(74, darwinWindowTitleHeight(this) - 1));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r103771 r103793  
    5555#ifdef VBOX_WS_MAC
    5656# include "UIIconPool.h"
     57# include "UIVersion.h"
    5758#endif
    5859#ifndef VBOX_WS_MAC
     
    679680                        m_pToolBar->emulateMacToolbar();
    680681                        /* Branding stuff for Qt6 beta: */
    681                         if (uiCommon().showBetaLabel())
     682                        if (UIVersionInfo::showBetaLabel())
    682683                            m_pToolBar->enableBranding(UIIconPool::iconSet(":/explosion_hazard_32px.png"),
    683684                                                       "Dev Preview", // do we need to make it NLS?
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp

    r103771 r103793  
    3434/* GUI includes: */
    3535#include "QIFileDialog.h"
    36 #include "UICommon.h"
    3736#include "UIDownloaderExtensionPack.h"
    3837#include "UIGlobalSession.h"
     
    5049{
    5150    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
    52     const QString strVersion = UIVersion(uiCommon().vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
     51    const QString strVersion = UIVersion(UIVersionInfo::vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
    5352
    5453    /* Prepare source/target: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp

    r103771 r103793  
    3434/* GUI includes: */
    3535#include "QIFileDialog.h"
    36 #include "UICommon.h"
    3736#include "UIDownloaderGuestAdditions.h"
    3837#include "UIGlobalSession.h"
     
    5049{
    5150    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
    52     const QString strVersion = UIVersion(uiCommon().vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
     51    const QString strVersion = UIVersion(UIVersionInfo::vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
    5352
    5453    /* Prepare source/target: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp

    r103771 r103793  
    4646{
    4747    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
    48     const QString strVersion = UIVersion(uiCommon().vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
     48    const QString strVersion = UIVersion(UIVersionInfo::vboxVersionStringNormalized()).effectiveReleasedVersion().toString();
    4949
    5050    /* Compose User Manual filename: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp

    r103771 r103793  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
    3433#include "UIExtraDataManager.h"
    3534#include "UIGlobalSession.h"
     
    3837#include "UINotificationCenter.h"
    3938#include "UIUpdateDefs.h"
     39#include "UIVersion.h"
    4040#ifdef Q_OS_LINUX
    4141# include "QIProcess.h"
     
    6161    url.addQueryItem("platform", gpGlobalSession->virtualBox().GetPackageType());
    6262    /* Check if branding is active: */
    63     if (uiCommon().brandingIsActive())
     63    if (UIVersionInfo::brandingIsActive())
    6464    {
    6565        /* Branding: Check whether we have a local branding file which tells us our version suffix "FOO"
     
    6767        url.addQueryItem("version", QString("%1_%2_%3").arg(gpGlobalSession->virtualBox().GetVersion())
    6868                                                       .arg(gpGlobalSession->virtualBox().GetRevision())
    69                                                        .arg(uiCommon().brandingGetKey("VerSuffix")));
     69                                                       .arg(UIVersionInfo::brandingGetKey("VerSuffix")));
    7070    }
    7171    else
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateDefs.cpp

    r101452 r103793  
    3232
    3333/* GUI includes: */
    34 #include "UICommon.h"
    3534#include "UINotificationCenter.h"
    3635#include "UIUpdateDefs.h"
     36#include "UIVersion.h"
    3737
    3838/* COM includes: */
     
    131131    m_fCheckRequired =    (QDate::currentDate() >= date())
    132132                       && (   !version().isValid()
    133                            || version() != UIVersion(uiCommon().vboxVersionStringNormalized()));
     133                           || version() != UIVersion(UIVersionInfo::vboxVersionStringNormalized()));
    134134}
    135135
     
    165165
    166166    /* Encode 'version' value: */
    167     m_version = UIVersion(uiCommon().vboxVersionStringNormalized());
     167    m_version = UIVersion(UIVersionInfo::vboxVersionStringNormalized());
    168168    const QString strVersionValue = m_version.toString();
    169169
     
    174174    m_fCheckRequired =    (QDate::currentDate() >= date())
    175175                       && (   !version().isValid()
    176                            || version() != UIVersion(uiCommon().vboxVersionStringNormalized()));
     176                           || version() != UIVersion(UIVersionInfo::vboxVersionStringNormalized()));
    177177}
    178178
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp

    r103771 r103793  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
    3433#include "UIExecutionQueue.h"
    3534#include "UIExtension.h"
     
    4140#include "UIUpdateDefs.h"
    4241#include "UIUpdateManager.h"
     42#include "UIVersion.h"
     43#ifdef VBOX_WITH_UPDATE_REQUEST
     44# include "UICommon.h"
     45#endif
    4346
    4447/* COM includes: */
     
    159162
    160163    /* Get VirtualBox version: */
    161     UIVersion vboxVersion(uiCommon().vboxVersionStringNormalized());
     164    UIVersion vboxVersion(UIVersionInfo::vboxVersionStringNormalized());
    162165    /* Get extension pack version: */
    163166    QString strExtPackVersion(extPack.GetVersion());
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r103771 r103793  
    7373#include "UISoftKeyboard.h"
    7474#include "UITakeSnapshotDialog.h"
     75#include "UIVersion.h"
    7576#include "UIVirtualBoxEventHandler.h"
    7677#include "UIVMLogViewerDialog.h"
     
    23082309    else
    23092310    {
    2310         const QString strName = QString("%1_%2.iso").arg(GUI_GuestAdditionsName, uiCommon().vboxVersionStringNormalized());
     2311        const QString strName = QString("%1_%2.iso").arg(GUI_GuestAdditionsName, UIVersionInfo::vboxVersionStringNormalized());
    23112312        foreach (const CMedium &comMedium, comMedia)
    23122313        {
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r103771 r103793  
    5454#include "UISession.h"
    5555#include "UITextTable.h"
     56#include "UIVersion.h"
    5657#ifdef VBOX_GUI_WITH_KEYS_RESET_HANDLER
    5758# include "UIKeyboardHandler.h"
     
    224225
    225226    /* Some logging right after we powered up: */
    226     LogRel(("GUI: Qt version: %s\n", UICommon::qtRTVersionString().toUtf8().constData()));
     227    LogRel(("GUI: Qt version: %s\n", UIVersionInfo::qtRTVersionString().toUtf8().constData()));
    227228#ifdef VBOX_WS_NIX
    228229    LogRel(("GUI: X11 Window Manager code: %d\n", (int)uiCommon().typeOfWindowManager()));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r103538 r103793  
    5959# include "UIImageTools.h"
    6060# include "UICocoaApplication.h"
     61# include "UIVersion.h"
    6162#endif /* VBOX_WS_MAC */
    6263
     
    267268#ifdef VBOX_WS_MAC
    268269    /* Beta label? */
    269     if (uiCommon().showBetaLabel())
     270    if (UIVersionInfo::showBetaLabel())
    270271    {
    271272        QPixmap betaLabel = ::betaLabel(QSize(74, darwinWindowTitleHeight(this) - 1));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp

    r103538 r103793  
    4949# include "UIImageTools.h"
    5050# include "UICocoaApplication.h"
     51# include "UIVersion.h"
    5152#endif
    5253
     
    8384
    8485    /* Beta label? */
    85     if (uiCommon().showBetaLabel())
     86    if (UIVersionInfo::showBetaLabel())
    8687    {
    8788        QPixmap betaLabel = ::betaLabel(QSize(74, darwinWindowTitleHeight(this) - 1));
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBar.cpp

    r98103 r103793  
    3232
    3333/* GUI includes: */
    34 #include "UICommon.h"
    3534#include "UIDesktopWidgetWatchdog.h"
    3635#include "UIImageTools.h"
    3736#include "UIMenuBar.h"
     37#include "UIVersion.h"
    3838
    3939
     
    4343{
    4444    /* Check for beta versions: */
    45     if (uiCommon().showBetaLabel())
     45    if (UIVersionInfo::showBetaLabel())
    4646        m_fShowBetaLabel = true;
    4747}
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