Changeset 73198 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 18, 2018 11:24:33 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123802
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r72920 r73198 383 383 384 384 return fRc; 385 } 386 387 void UIMessageCenter::warnAboutUnknownOptionType(const QString &strOption) 388 { 389 alert(0, MessageType_Error, 390 tr("Unknown option <b>%1</b>.") 391 .arg(strOption)); 392 } 393 394 void UIMessageCenter::warnAboutUnrelatedOptionType(const QString &strOption) 395 { 396 alert(0, MessageType_Error, 397 tr("<b>%1</b> is an option for the VirtualBox VM runner (VirtualBoxVM) application, not the VirtualBox Manager.") 398 .arg(strOption)); 385 399 } 386 400 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r72920 r73198 231 231 232 232 /* API: Main (startup) warnings: */ 233 void warnAboutUnknownOptionType(const QString &strOption); 234 void warnAboutUnrelatedOptionType(const QString &strOption); 233 235 #ifdef RT_OS_LINUX 234 236 void warnAboutWrongUSBMounted() const; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r73196 r73198 4052 4052 #ifdef RT_OS_WINDOWS /** @todo add more here, please... */ 4053 4053 else 4054 msgCenter(). error(0, MessageType_Error, tr("Unknown option <b>%1</b>.").arg(arguments.at(i)), "");4054 msgCenter().warnAboutUnknownOptionType(arguments.at(i)); 4055 4055 #endif 4056 4056 #ifdef VBOX_GUI_WITH_SHARED_LIBRARY 4057 4057 if (enmOptType == OptType_VMRunner && m_enmType != UIType_RuntimeUI) 4058 msgCenter().error(0, MessageType_Error, 4059 tr("<b>%1</b> is an option for the VirtualBox VM runner (VirtualBoxVM) application, not the selector") 4060 .arg(arg), ""); 4058 msgCenter().warnAboutUnrelatedOptionType(arg); 4061 4059 #endif 4062 4060 -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r73192 r73198 338 338 339 339 #ifdef RT_OS_WINDOWS 340 /* 341 * Show message box. We modify the option list a little to better 342 * make it fit in the dialog. 343 */ 344 char szTitleWithVersion[sizeof(s_szTitle) + 128]; 345 char szMsg[sizeof(s_szUsage) + 128]; 346 char *pszDst = szMsg; 347 size_t offSrc = 0; 340 /* Show message box. Modify the option list a little 341 * to better make it fit in the upcoming dialog. */ 342 char szTitleWithVersion[sizeof(s_szTitle) + 128]; 343 char szMsg[sizeof(s_szUsage) + 128]; 344 char *pszDst = szMsg; 345 size_t offSrc = 0; 348 346 while (offSrc < sizeof(s_szUsage) - 1U) 349 347 { … … 352 350 && s_szUsage[offSrc + 1] == ' ' 353 351 && ( (ch = s_szUsage[offSrc + 2]) == '-' /* option line */ 354 || ch == 'V' /* env.var. line */ ))352 || ch == 'V' /* env.var. line */)) 355 353 { 356 354 /* Split option lines: */ … … 361 359 while ( s_szUsage[offSrc + cchOption] != ' ' 362 360 || s_szUsage[offSrc + cchOption + 1] != ' ') 363 cchOption++;361 ++cchOption; 364 362 365 363 memcpy(pszDst, &s_szUsage[offSrc], cchOption); 366 offSrc 367 pszDst 364 offSrc += cchOption + 2; 365 pszDst += cchOption; 368 366 } 369 367 /* Change environment variable indentation: */ … … 373 371 size_t cchLine = 0; 374 372 while ((ch = s_szUsage[offSrc + cchLine]) != '\n' && ch != '\0') 375 cchLine++;373 ++cchLine; 376 374 377 375 memcpy(pszDst, &s_szUsage[offSrc], cchLine); … … 383 381 384 382 while (s_szUsage[offSrc] == ' ') 385 offSrc++;383 ++offSrc; 386 384 } 387 385 388 /* Copy up to and including end of line .*/386 /* Copy up to and including end of line: */ 389 387 while ((ch = s_szUsage[offSrc++]) != '\n' && ch != '\0') 390 388 *pszDst++ = ch; … … 616 614 # endif /* VBOX_WS_X11 */ 617 615 618 /* 619 * Initialize VBox Runtime. 620 */ 616 /* Initialize VBox Runtime: */ 621 617 # if !defined(VBOX_GUI_WITH_SHARED_LIBRARY) || defined(VBOX_RUNTIME_UI) 622 618 /* Initialize the SUPLib as well only if we are really about to start a VM. … … 698 694 } 699 695 700 /* 701 * Call actual main function: 702 */ 696 /* Call to actual main function: */ 703 697 return TrustedMain(argc, argv, envp); 704 698 }
Note:
See TracChangeset
for help on using the changeset viewer.