Changeset 86846 in vbox
- Timestamp:
- Nov 10, 2020 11:13:28 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
-
globals/UIMessageCenter.cpp (modified) (1 diff)
-
globals/UIMessageCenter.h (modified) (1 diff)
-
manager/UIVirtualBoxManager.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r86845 r86846 1071 1071 alert(pParent, MessageType_Error, 1072 1072 tr("Public key file path is empty.")); 1073 } 1074 1075 void UIMessageCenter::publicKeyFileDoesntExist(const QString &strPath, QWidget *pParent /* = 0 */) const 1076 { 1077 alert(pParent, MessageType_Error, 1078 tr("Failed to open the public key file <nobr><b>%1</b></nobr>. File doesn't exist.") 1079 .arg(strPath)); 1080 } 1081 1082 void UIMessageCenter::publicKeyFileIsOfTooLargeSize(const QString &strPath, QWidget *pParent /* = 0 */) const 1083 { 1084 alert(pParent, MessageType_Error, 1085 tr("Failed to open the public key file <nobr><b>%1</b></nobr>. File is too large for the key.") 1086 .arg(strPath)); 1073 1087 } 1074 1088 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r86845 r86846 310 310 void cannotDeleteConsoleConnection(const CProgress &comProgress, const QString &strMachineName, QWidget *pParent = 0); 311 311 void publicKeyFilePathIsEmpty(QWidget *pParent = 0) const; 312 void publicKeyFileDoesntExist(const QString &strPath, QWidget *pParent = 0) const; 313 void publicKeyFileIsOfTooLargeSize(const QString &strPath, QWidget *pParent = 0) const; 312 314 void publicKeyFileIsntReadable(const QString &strPath, QWidget *pParent = 0) const; 313 315 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r86845 r86846 246 246 } 247 247 248 /* Make sure file exists and is of suitable size: */ 249 QFileInfo fi(strPath); 250 if (!fi.exists()) 251 { 252 if (!fIgnoreErrors) 253 msgCenter().publicKeyFileDoesntExist(strPath); 254 return false; 255 } 256 if (fi.size() > 10 * _1K) 257 { 258 if (!fIgnoreErrors) 259 msgCenter().publicKeyFileIsOfTooLargeSize(strPath); 260 return false; 261 } 262 248 263 /* Make sure file can be opened: */ 249 264 QFile file(strPath);
Note:
See TracChangeset
for help on using the changeset viewer.

