VirtualBox

Changeset 91029 in vbox


Ignore:
Timestamp:
Aug 31, 2021 11:48:58 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: Moving encryption password stuff related warning 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

    r91007 r91029  
    567567             .arg(strKey, CMachine(machine).GetName(), strValue),
    568568          UIErrorString::formatErrorInfo(machine));
    569 }
    570 
    571 void UIMessageCenter::warnAboutInvalidEncryptionPassword(const QString &strPasswordId, QWidget *pParent /* = 0 */)
    572 {
    573     alert(pParent, MessageType_Error,
    574           tr("Encryption password for <nobr>ID = '%1'</nobr> is invalid.")
    575              .arg(strPasswordId));
    576569}
    577570
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r91007 r91029  
    271271    void cannotSetExtraData(const CVirtualBox &vbox, const QString &strKey, const QString &strValue);
    272272    void cannotSetExtraData(const CMachine &machine, const QString &strKey, const QString &strValue);
    273     void warnAboutInvalidEncryptionPassword(const QString &strPasswordId, QWidget *pParent = 0);
    274273    void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox, QWidget *pParent = 0) const;
    275274    void cannotAcquireSessionParameter(const CSession &comSession, QWidget *pParent = 0) const;
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r91007 r91029  
    8686                                                   "This is currently not possible because the guest does not support "
    8787                                                   "software shutdown."));
     88}
     89
     90/* static */
     91void UINotificationMessage::warnAboutInvalidEncryptionPassword(const QString &strPasswordId)
     92{
     93    createMessage(
     94        QApplication::translate("UIMessageCenter", "Invalid Password ..."),
     95        QApplication::translate("UIMessageCenter", "Encryption password for <nobr>ID = '%1'</nobr> is invalid.")
     96                                                   .arg(strPasswordId));
    8897}
    8998
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r91007 r91029  
    6969    /** Notifies about inability to send ACPI shutdown. */
    7070    static void cannotSendACPIToMachine();
     71    /** Notifies about invalid encryption password.
     72      * @param  strPasswordId  Brings password ID. */
     73    static void warnAboutInvalidEncryptionPassword(const QString &strPasswordId);
    7174
    7275    /** Reminds about keyboard auto capturing. */
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIAddDiskEncryptionPasswordDialog.cpp

    r82968 r91029  
    3535#include "UIIconPool.h"
    3636#include "UIMedium.h"
    37 #include "UIMessageCenter.h"
     37#include "UINotificationCenter.h"
    3838
    3939/* Other VBox includes: */
     
    509509        if (!isPasswordValid(uMediumId, strPassword))
    510510        {
    511             msgCenter().warnAboutInvalidEncryptionPassword(strPasswordId, this);
     511            UINotificationMessage::warnAboutInvalidEncryptionPassword(strPasswordId);
    512512            AssertPtrReturnVoid(m_pTableEncryptionData);
    513513            m_pTableEncryptionData->setFocus();
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