Changeset 35587 in vbox
- Timestamp:
- Jan 17, 2011 2:21:04 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69482
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r35274 r35587 1972 1972 } 1973 1973 1974 void VBoxProblemReporter::warnAboutCannotCreateMachineFolder(QWidget *pParent, const QString &strFolderName) 1975 { 1976 message(pParent ? pParent : mainWindowShown(), Critical, 1977 tr("<p>Cannot create the machine folder:</p>" 1978 "<p><b>%1</b></p>" 1979 "<p>Please check you have the permissions required to do so.</p>").arg(strFolderName)); 1980 } 1981 1974 1982 /** 1975 1983 * @return @c true if the user has selected to continue without attaching a -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h
r35273 r35587 323 323 bool confirmVMReset (QWidget *aParent); 324 324 325 void warnAboutCannotCreateMachineFolder(QWidget *pParent, const QString &strFolderName); 325 326 bool confirmHardDisklessMachine (QWidget *aParent); 326 327 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp
r35234 r35587 266 266 { 267 267 /* Cleanup old folder if present: */ 268 cleanupMachineFolder(); 268 bool fMachineFolderDeleted = cleanupMachineFolder(); 269 if (!fMachineFolderDeleted) 270 { 271 vboxProblem().warnAboutCannotCreateMachineFolder(this, m_strMachineFolder); 272 return false; 273 } 274 269 275 /* Get VBox: */ 270 276 CVirtualBox vbox = vboxGlobal().virtualBox(); … … 276 282 /* Get machine directory: */ 277 283 QString strMachineFolder = fileInfo.absolutePath(); 284 278 285 /* Try to create this machine directory (and it's predecessors): */ 279 286 bool fMachineFolderCreated = QDir().mkpath(strMachineFolder); 287 if (!fMachineFolderCreated) 288 { 289 vboxProblem().warnAboutCannotCreateMachineFolder(this, strMachineFolder); 290 return false; 291 } 292 280 293 /* Initialize machine dir value: */ 281 if (fMachineFolderCreated) 282 m_strMachineFolder = strMachineFolder; 283 /* Return creation result: */ 284 return fMachineFolderCreated; 294 m_strMachineFolder = strMachineFolder; 295 return true; 285 296 } 286 297 … … 289 300 /* Return if machine folder was NOT set: */ 290 301 if (m_strMachineFolder.isEmpty()) 291 return false;302 return true; 292 303 /* Try to cleanup this machine directory (and it's predecessors): */ 293 304 bool fMachineFolderRemoved = QDir().rmpath(m_strMachineFolder);
Note:
See TracChangeset
for help on using the changeset viewer.