VirtualBox

Changeset 92130 in vbox for trunk/src


Ignore:
Timestamp:
Oct 28, 2021 10:01:50 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: A bit of cleanup for UIMessageCenter.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

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

    r92111 r92130  
    20022002}
    20032003
    2004 void UIMessageCenter::cannotCreateMachine(const CVirtualBox &vbox, QWidget *pParent /* = 0*/) const
    2005 {
    2006     error(pParent, MessageType_Error,
    2007           tr("Failed to create a new virtual machine."),
    2008           UIErrorString::formatErrorInfo(vbox));
    2009 }
    2010 
    2011 void UIMessageCenter::cannotOverwriteHardDiskStorage(const QString &strLocation, QWidget *pParent /* = 0*/) const
    2012 {
    2013     alert(pParent, MessageType_Info,
    2014           tr("<p>The hard disk storage unit at location <b>%1</b> already exists. "
    2015              "You cannot create a new virtual hard disk that uses this location "
    2016              "because it can be already used by another virtual hard disk.</p>"
    2017              "<p>Please specify a different location.</p>")
    2018              .arg(strLocation));
    2019 }
    2020 
    2021 void UIMessageCenter::cannotCreateHardDiskStorage(const CVirtualBox &vbox, const QString &strLocation, QWidget *pParent /* = 0*/) const
    2022 {
    2023     error(pParent, MessageType_Error,
    2024           tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>")
    2025              .arg(strLocation),
    2026           UIErrorString::formatErrorInfo(vbox));
    2027 }
    2028 
    2029 void UIMessageCenter::cannotCreateHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /* = 0*/) const
    2030 {
    2031     error(pParent, MessageType_Error,
    2032           tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>")
    2033              .arg(strLocation),
    2034           UIErrorString::formatErrorInfo(medium));
    2035 }
    2036 
    2037 void UIMessageCenter::cannotCreateHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /* = 0*/) const
    2038 {
    2039     error(pParent, MessageType_Error,
    2040           tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>")
    2041              .arg(strLocation),
    2042           UIErrorString::formatErrorInfo(progress));
    2043 }
    2044 
    2045 void UIMessageCenter::cannotCreateHardDiskStorageInFAT(const QString &strLocation, QWidget *pParent /* = 0 */) const
    2046 {
    2047     alert(pParent, MessageType_Info,
    2048           tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr> FAT file systems have 4GB file size limit.")
    2049           .arg(strLocation));
    2050 }
    2051 
    2052 void UIMessageCenter::cannotCreateMediumStorage(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent /* = 0 */) const
    2053 {
    2054     error(pParent, MessageType_Error,
    2055           tr("Failed to create the virtual disk image storage <nobr><b>%1</b>.</nobr>")
    2056              .arg(strLocation),
    2057           UIErrorString::formatErrorInfo(comVBox));
    2058 }
    2059 
    2060 void UIMessageCenter::cannotCreateMediumStorage(const CMedium &comMedium, const QString &strLocation, QWidget *pParent /* = 0 */) const
    2061 {
    2062     error(pParent, MessageType_Error,
    2063           tr("Failed to create the virtual disk image storage <nobr><b>%1</b>.</nobr>")
    2064              .arg(strLocation),
    2065           UIErrorString::formatErrorInfo(comMedium));
    2066 }
    2067 
    2068 void UIMessageCenter::cannotCreateMediumStorage(const CProgress &comProgress, const QString &strLocation, QWidget *pParent /* = 0 */) const
    2069 {
    2070     error(pParent, MessageType_Error,
    2071           tr("Failed to create the virtual disk image storage <nobr><b>%1</b>.</nobr>")
    2072              .arg(strLocation),
    2073           UIErrorString::formatErrorInfo(comProgress));
    2074 }
    2075 
    20762004void UIMessageCenter::cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent /* = 0 */) const
    20772005{
     
    21382066    else
    21392067        return true;
     2068}
     2069
     2070void UIMessageCenter::cannotCreateMediumStorage(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent /* = 0 */) const
     2071{
     2072    error(pParent, MessageType_Error,
     2073          tr("Failed to create the virtual disk image storage <nobr><b>%1</b>.</nobr>")
     2074             .arg(strLocation),
     2075          UIErrorString::formatErrorInfo(comVBox));
    21402076}
    21412077
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r92111 r92130  
    454454        /// @todo move to notification-center after wizards get theirs.. :)
    455455        bool confirmHardDisklessMachine(QWidget *pParent = 0) const;
    456         void cannotCreateMachine(const CVirtualBox &vbox, QWidget *pParent = 0) const;
    457         void cannotOverwriteHardDiskStorage(const QString &strLocation, QWidget *pParent = 0) const;
    458         void cannotCreateHardDiskStorage(const CVirtualBox &vbox, const QString &strLocation,QWidget *pParent = 0) const;
    459         void cannotCreateHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent = 0) const;
    460         void cannotCreateHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent = 0) const;
    461         void cannotCreateHardDiskStorageInFAT(const QString &strLocation, QWidget *pParent = 0) const;
    462         void cannotCreateMediumStorage(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent = 0) const;
    463         void cannotCreateMediumStorage(const CMedium &comMedium, const QString &strLocation, QWidget *pParent = 0) const;
    464         void cannotCreateMediumStorage(const CProgress &comProgress, const QString &strLocation, QWidget *pParent = 0) const;
    465456        void cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent = 0) const;
    466457        void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const;
     
    469460        bool confirmOverridingFile(const QString &strPath, QWidget *pParent = 0) const;
    470461        bool confirmOverridingFiles(const QVector<QString> &strPaths, QWidget *pParent = 0) const;
     462    /** @} */
     463
     464    /** @name VirtualBox Manager / FD Creation Dialog warnings.
     465      * @{ */
     466        void cannotCreateMediumStorage(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent = 0) const;
    471467    /** @} */
    472468
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