Changeset 92101 in vbox
- Timestamp:
- Oct 27, 2021 1:00:54 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r92089 r92101 2002 2002 } 2003 2003 2004 void UIMessageCenter::cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent /* = 0 */) const2005 {2006 /* Show the error: */2007 error(pParent, MessageType_Error,2008 tr("Failed to acquire hard disk location."), UIErrorString::formatErrorInfo(comMedium));2009 }2010 2011 void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /* = 0*/) const2012 {2013 error(pParent, MessageType_Error,2014 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")2015 .arg(strLocation),2016 UIErrorString::formatErrorInfo(medium));2017 }2018 2019 void UIMessageCenter::cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /* = 0*/) const2020 {2021 error(pParent, MessageType_Error,2022 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")2023 .arg(strLocation),2024 UIErrorString::formatErrorInfo(progress));2025 }2026 2027 void UIMessageCenter::cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent /* = 0*/) const2028 {2029 error(pParent, MessageType_Error,2030 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")2031 .arg(strMachineName),2032 UIErrorString::formatErrorInfo(machine));2033 }2034 2035 void UIMessageCenter::cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent /* = 0*/) const2036 {2037 error(pParent, MessageType_Error,2038 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.")2039 .arg(strMachineName),2040 UIErrorString::formatErrorInfo(progress));2041 }2042 2043 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &comMachine,2044 const QString &strName,2045 QWidget *pParent /* = 0 */) const2046 {2047 error(pParent, MessageType_Error,2048 tr("Can't find snapshot named <b>%1</b>.")2049 .arg(strName),2050 UIErrorString::formatErrorInfo(comMachine));2051 }2052 2053 2004 void UIMessageCenter::cannotCreateMachine(const CVirtualBox &vbox, QWidget *pParent /* = 0*/) const 2054 2005 { … … 2167 2118 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"), 2168 2119 UIErrorString::formatErrorInfo(comAppliance)); 2169 }2170 2171 void UIMessageCenter::cannotAcquireVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent /* = 0 */) const2172 {2173 error(pParent, MessageType_Critical, tr("<p>Cannot create a virtual system description.</p>"),2174 UIErrorString::formatErrorInfo(comAppliance));2175 }2176 2177 void UIMessageCenter::cannotAddVirtualSystemDescriptionValue(const CVirtualSystemDescription &comDescription,2178 QWidget *pParent /* = 0 */) const2179 {2180 error(pParent, MessageType_Critical, tr("<p>Cannot add a virtual system description value.</p>"),2181 UIErrorString::formatErrorInfo(comDescription));2182 }2183 2184 void UIMessageCenter::cannotAcquireVirtualSystemDescriptionFormProperty(const CVirtualSystemDescriptionForm &comForm,2185 QWidget *pParent /* = 0 */) const2186 {2187 error(pParent, MessageType_Critical, tr("<p>Cannot acquire a virtual system description property.</p>"),2188 UIErrorString::formatErrorInfo(comForm));2189 }2190 2191 void UIMessageCenter::cannotImportAppliance(CAppliance &appliance, QWidget *pParent /* = 0*/) const2192 {2193 /* Preserve error-info: */2194 QString strErrorInfo = UIErrorString::formatErrorInfo(appliance);2195 /* Add the warnings in the case of an early error: */2196 QString strWarningInfo;2197 foreach(const QString &strWarning, appliance.GetWarnings())2198 strWarningInfo += QString("<br />Warning: %1").arg(strWarning);2199 if (!strWarningInfo.isEmpty())2200 strWarningInfo = "<br />" + strWarningInfo;2201 /* Show the error: */2202 error(pParent, MessageType_Error,2203 tr("Failed to open/interpret appliance <b>%1</b>.")2204 .arg(appliance.GetPath()),2205 strWarningInfo + strErrorInfo);2206 }2207 2208 void UIMessageCenter::cannotImportAppliance(const CProgress &progress, const QString &strPath, QWidget *pParent /* = 0*/) const2209 {2210 error(pParent, MessageType_Error,2211 tr("Failed to import appliance <b>%1</b>.")2212 .arg(strPath),2213 UIErrorString::formatErrorInfo(progress));2214 }2215 2216 bool UIMessageCenter::cannotRemoveFiles(const CVFSExplorer &comVFSExplorer, QWidget *pParent /* = 0 */) const2217 {2218 error(pParent, MessageType_Error,2219 tr("Failed to remove file."),2220 UIErrorString::formatErrorInfo(comVFSExplorer));2221 return false;2222 }2223 2224 bool UIMessageCenter::cannotRemoveFiles(const CProgress &comProgress, QWidget *pParent /* = 0 */) const2225 {2226 error(pParent, MessageType_Error,2227 tr("Failed to remove file."),2228 UIErrorString::formatErrorInfo(comProgress));2229 return false;2230 2120 } 2231 2121 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r92089 r92101 453 453 * @{ */ 454 454 /// @todo move to notification-center after wizards get theirs.. :) 455 void cannotAcquireHardDiskLocation(const CMedium &comMedium, QWidget *pParent = 0) const;456 void cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent = 0) const;457 void cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent = 0) const;458 void cannotTakeSnapshot(const CMachine &machine, const QString &strMachineName, QWidget *pParent = 0) const;459 void cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent = 0) const;460 void cannotFindSnapshotByName(const CMachine &comMachine, const QString &strName, QWidget *pParent = 0) const;461 455 bool confirmHardDisklessMachine(QWidget *pParent = 0) const; 462 456 void cannotCreateMachine(const CVirtualBox &vbox, QWidget *pParent = 0) const; … … 475 469 void cannotCreateAppliance(const CVirtualBox &comVBox, QWidget *pParent = 0) const; 476 470 void cannotCreateVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const; 477 void cannotAcquireVirtualSystemDescription(const CAppliance &comAppliance, QWidget *pParent = 0) const;478 void cannotAddVirtualSystemDescriptionValue(const CVirtualSystemDescription &comDescription, QWidget *pParent = 0) const;479 void cannotAcquireVirtualSystemDescriptionFormProperty(const CVirtualSystemDescriptionForm &comForm, QWidget *pParent = 0) const;480 void cannotImportAppliance(CAppliance &appliance, QWidget *pParent = 0) const;481 void cannotImportAppliance(const CProgress &progress, const QString &strPath, QWidget *pParent = 0) const;482 bool cannotRemoveFiles(const CVFSExplorer &comVFSExplorer, QWidget *pParent = 0) const;483 bool cannotRemoveFiles(const CProgress &comProgress, QWidget *pParent = 0) const;484 471 bool confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent = 0) const; 485 472 void cannotRunUnattendedGuestInstall(const CUnattended &comUnattendedInstall, QWidget *pParent = 0);
Note:
See TracChangeset
for help on using the changeset viewer.