VirtualBox

Changeset 90933 in vbox


Ignore:
Timestamp:
Aug 27, 2021 7:43:58 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
146571
Message:

FE/Qt: bugref:10067: Moving Experimental/BETA build warnings from UIMessageCenter to UINotificationCenter.

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

Legend:

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

    r90893 r90933  
    407407}
    408408
    409 void UIMessageCenter::warnAboutUnknownOptionType(const QString &strOption)
    410 {
    411     alert(0, MessageType_Error,
    412           tr("Unknown option <b>%1</b>.")
    413              .arg(strOption));
    414 }
    415 
    416 void UIMessageCenter::warnAboutUnrelatedOptionType(const QString &strOption)
     409void UIMessageCenter::warnAboutUnrelatedOptionType(const QString &strOption) const
    417410{
    418411    alert(0, MessageType_Error,
     
    457450    /* Show error: */
    458451    alert(0, MessageType_Error, strError.arg(strTable.arg(strUsage)));
    459 }
    460 
    461 void UIMessageCenter::showBetaBuildWarning() const
    462 {
    463     alert(0, MessageType_Warning,
    464           tr("You are running a prerelease version of VirtualBox. "
    465              "This version is not suitable for production use."));
    466 }
    467 
    468 void UIMessageCenter::showExperimentalBuildWarning() const
    469 {
    470     alert(0, MessageType_Warning,
    471           tr("You are running an EXPERIMENTAL build of VirtualBox. "
    472              "This version is not suitable for production use."));
    473452}
    474453
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r90893 r90933  
    242242                                 int cMinDuration = 2000);
    243243
    244     /* API: Main (startup) warnings: */
    245     void warnAboutUnknownOptionType(const QString &strOption);
    246     void warnAboutUnrelatedOptionType(const QString &strOption);
     244    /** @name General (startup) warnings.
     245      * @{ */
     246        void warnAboutUnrelatedOptionType(const QString &strOption) const;
    247247#ifdef RT_OS_LINUX
    248     void warnAboutWrongUSBMounted() const;
    249 #endif /* RT_OS_LINUX */
    250     void cannotStartSelector() const;
    251     void cannotStartRuntime() const;
    252     void showBetaBuildWarning() const;
    253     void showExperimentalBuildWarning() const;
    254 
    255     /* API: COM startup warnings: */
    256     void cannotInitUserHome(const QString &strUserHome) const;
    257     void cannotInitCOM(HRESULT rc) const;
    258     void cannotCreateVirtualBoxClient(const CVirtualBoxClient &client) const;
    259     void cannotAcquireVirtualBox(const CVirtualBoxClient &client) const;
     248        void warnAboutWrongUSBMounted() const;
     249#endif
     250        void cannotStartSelector() const;
     251        void cannotStartRuntime() const;
     252    /** @} */
     253
     254    /** @name COM (startup) warnings.
     255      * @{ */
     256        void cannotInitUserHome(const QString &strUserHome) const;
     257        void cannotInitCOM(HRESULT rc) const;
     258        void cannotCreateVirtualBoxClient(const CVirtualBoxClient &client) const;
     259        void cannotAcquireVirtualBox(const CVirtualBoxClient &client) const;
     260    /** @} */
    260261
    261262    /* API: Global warnings: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp

    r88740 r90933  
    2323#include "UIExtraDataManager.h"
    2424#include "UIMessageCenter.h"
     25#include "UINotificationCenter.h"
    2526#include "UIStarter.h"
    2627#ifndef VBOX_RUNTIME_UI
     
    107108# ifdef VBOX_BLEEDING_EDGE
    108109    /* Show EXPERIMENTAL BUILD warning: */
    109     msgCenter().showExperimentalBuildWarning();
     110    UINotificationMessage::remindAboutExperimentalBuild();
    110111# else /* !VBOX_BLEEDING_EDGE */
    111112#  ifndef DEBUG
     
    114115    if (   vboxVersion.contains("BETA")
    115116        && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion)
    116         msgCenter().showBetaBuildWarning();
     117        UINotificationMessage::remindAboutBetaBuild();
    117118#  endif /* !DEBUG */
    118119# endif /* !VBOX_BLEEDING_EDGE */
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r90925 r90933  
    101101
    102102/* static */
     103void UINotificationMessage::remindAboutBetaBuild()
     104{
     105    createMessage(
     106        QApplication::translate("UIMessageCenter", "BETA build warning!"),
     107        QApplication::translate("UIMessageCenter", "You are running a prerelease version of VirtualBox. "
     108                                                   "This version is not suitable for production use."));
     109}
     110
     111/* static */
     112void UINotificationMessage::remindAboutExperimentalBuild()
     113{
     114    createMessage(
     115        QApplication::translate("UIMessageCenter", "Experimental build warning!"),
     116        QApplication::translate("UIMessageCenter", "You are running an EXPERIMENTAL build of VirtualBox. "
     117                                                   "This version is not suitable for production use."));
     118}
     119
     120/* static */
    103121void UINotificationMessage::remindAboutMouseIntegration(bool fSupportsAbsolute)
    104122{
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r90925 r90933  
    7070    /** Reminds about keyboard auto capturing. */
    7171    static void remindAboutAutoCapture();
     72    /** Reminds about BETA build. */
     73    static void remindAboutBetaBuild();
     74    /** Reminds about BETA build. */
     75    static void remindAboutExperimentalBuild();
    7276    /** Reminds about mouse integration.
    7377      * @param  fSupportsAbsolute  Brings whether mouse supports absolute pointing. */
Note: See TracChangeset for help on using the changeset viewer.

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