VirtualBox

Changeset 92132 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 28, 2021 10:30:59 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147951
Message:

FE/Qt: bugref:10067: UIVirtualBoxManager: Migrate unattended related UIMessageCenter stuff to UINotificationCenter.

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

Legend:

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

    r92130 r92132  
    20282028}
    20292029
    2030 void UIMessageCenter::cannotRunUnattendedGuestInstall(const CUnattended &comUnattendedInstall, QWidget *pParent /* = 0 */)
    2031 {
    2032     COMErrorInfo comErrorInfo =  comUnattendedInstall.errorInfo();    \
    2033     error(pParent, MessageType_Error,
    2034           tr("An error has occured during unattended guest install setup."),
    2035           UIErrorString::formatErrorInfo(comErrorInfo));
    2036 }
    2037 
    20382030bool UIMessageCenter::confirmOverridingFile(const QString &strPath, QWidget *pParent /* = 0*/) const
    20392031{
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r92130 r92132  
    457457        void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const;
    458458        bool confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent = 0) const;
    459         void cannotRunUnattendedGuestInstall(const CUnattended &comUnattendedInstall, QWidget *pParent = 0);
    460459        bool confirmOverridingFile(const QString &strPath, QWidget *pParent = 0) const;
    461460        bool confirmOverridingFiles(const QVector<QString> &strPaths, QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r92106 r92132  
    24192419}
    24202420
    2421 bool UIVirtualBoxManager::checkUnattendedInstallError(CUnattended &comUnattendedInstaller) const
    2422 {
    2423     if (!comUnattendedInstaller.isOk())
    2424     {
    2425         COMErrorInfo comErrorInfo =  comUnattendedInstaller.errorInfo();
    2426         QString strErrorInfo = UIErrorString::formatErrorInfo(comErrorInfo);
    2427         msgCenter().cannotRunUnattendedGuestInstall(comUnattendedInstaller);
     2421bool UIVirtualBoxManager::checkUnattendedInstallError(const CUnattended &comUnattended) const
     2422{
     2423    if (!comUnattended.isOk())
     2424    {
     2425        UINotificationMessage::cannotRunUnattendedGuestInstall(comUnattended);
    24282426        return false;
    24292427    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r92106 r92132  
    355355        bool isCloudProfileUpdateInProgress() const;
    356356
    357         /* Checks if @p comUnattendedInstaller has any errors. If so shows an error message and return false, else returns true. */
    358         bool checkUnattendedInstallError(CUnattended &comUnattendedInstaller) const;
     357        /** Checks if @a comUnattended has any errors.
     358          * If so shows an error notification and returns false, else returns true. */
     359        bool checkUnattendedInstallError(const CUnattended &comUnattended) const;
    359360    /** @} */
    360361
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r92111 r92132  
    4949#include "CNATNetwork.h"
    5050#include "CNetworkAdapter.h"
     51#include "CUnattended.h"
    5152#include "CVRDEServer.h"
    5253
     
    12441245
    12451246/* static */
     1247void UINotificationMessage::cannotRunUnattendedGuestInstall(const CUnattended &comUnattended)
     1248{
     1249    createMessage(
     1250        QApplication::translate("UIMessageCenter", "Can't run guest install ..."),
     1251        QApplication::translate("UIMessageCenter", "Failed to run unattended guest installation.") +
     1252        UIErrorString::formatErrorInfo(comUnattended));
     1253}
     1254
     1255/* static */
    12461256void UINotificationMessage::cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice)
    12471257{
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r92111 r92132  
    5656class CVirtualBoxErrorInfo;
    5757class CVRDEServer;
     58class CUnattended;
    5859
    5960/** UINotificationObject extension for message functionality. */
     
    478479          * @param  strMachineName   Brings machine name. */
    479480        static void cannotChangeSnapshot(const CSnapshot &comSnapshot, const QString &strSnapshotName, const QString &strMachineName);
     481
     482        /** Notifies about inability to run unattended guest install.
     483          * @param  comUnattended  Brings the unattended being running guest install. */
     484        static void cannotRunUnattendedGuestInstall(const CUnattended &comUnattended);
    480485    /** @} */
    481486
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