Changeset 99904 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- May 22, 2023 2:44:15 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157547
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r99903 r99904 2141 2141 } 2142 2142 2143 void UIMessageCenter::sltShowUserManual(const QString &strLocation) 2144 { 2145 Q_UNUSED(strLocation); 2146 #if defined (VBOX_WITH_DOCS_QHELP) 2147 showHelpBrowser(strLocation); 2143 void UIMessageCenter::sltShowUserManual(const QString &strHelpFilePath) 2144 { 2145 #if defined(VBOX_WITH_DOCS_QHELP) 2146 if (!QFileInfo(strHelpFilePath).exists()) 2147 { 2148 UINotificationMessage::cannotFindHelpFile(strHelpFilePath); 2149 return; 2150 } 2151 if (!m_pHelpBrowserDialog) 2152 { 2153 m_pHelpBrowserDialog = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath); 2154 AssertReturnVoid(m_pHelpBrowserDialog); 2155 connect(m_pHelpBrowserDialog, &QMainWindow::destroyed, this, &UIMessageCenter::sltHelpBrowserClosed); 2156 } 2157 2158 m_pHelpBrowserDialog->show(); 2159 m_pHelpBrowserDialog->setWindowState(m_pHelpBrowserDialog->windowState() & ~Qt::WindowMinimized); 2160 m_pHelpBrowserDialog->activateWindow(); 2148 2161 #else 2149 #if defined (VBOX_WS_WIN) 2150 HtmlHelp(GetDesktopWindow(), strLocation.utf16(), HH_DISPLAY_TOPIC, NULL); 2151 #endif 2152 2153 #if !defined(VBOX_OSE) 2154 char szViewerPath[RTPATH_MAX]; 2155 int rc; 2156 rc = RTPathAppPrivateArch(szViewerPath, sizeof(szViewerPath)); 2157 AssertRC(rc); 2158 QProcess::startDetached(QString(szViewerPath) + "/kchmviewer", QStringList(strLocation)); 2159 # else /* #ifndef VBOX_OSE */ 2160 uiCommon().openURL("file://" + strLocation); 2161 # endif /* #ifdef VBOX_OSE */ 2162 #if defined (VBOX_WS_MAC) 2163 uiCommon().openURL("file://" + strLocation); 2164 #endif 2162 Q_UNUSED(strHelpFilePath); 2165 2163 #endif 2164 2166 2165 } 2167 2166 … … 2182 2181 #if defined(VBOX_WITH_DOCS_QHELP) 2183 2182 /* First open or show the help browser: */ 2184 s howHelpBrowser(uiCommon().helpFile());2183 sltShowUserManual(uiCommon().helpFile()); 2185 2184 /* Show the help page for the @p strHelpKeyword: */ 2186 2185 if (m_pHelpBrowserDialog) … … 2374 2373 return iResultCode; 2375 2374 } 2376 2377 void UIMessageCenter::showHelpBrowser(const QString &strHelpFilePath)2378 {2379 #if defined(VBOX_WITH_DOCS_QHELP)2380 if (!QFileInfo(strHelpFilePath).exists())2381 {2382 UINotificationMessage::cannotFindHelpFile(strHelpFilePath);2383 return;2384 }2385 if (!m_pHelpBrowserDialog)2386 {2387 m_pHelpBrowserDialog = new UIHelpBrowserDialog(0 /* parent */, 0 /* Center Widget */, strHelpFilePath);2388 AssertReturnVoid(m_pHelpBrowserDialog);2389 connect(m_pHelpBrowserDialog, &QMainWindow::destroyed, this, &UIMessageCenter::sltHelpBrowserClosed);2390 }2391 2392 m_pHelpBrowserDialog->show();2393 m_pHelpBrowserDialog->setWindowState(m_pHelpBrowserDialog->windowState() & ~Qt::WindowMinimized);2394 m_pHelpBrowserDialog->activateWindow();2395 #else2396 Q_UNUSED(strHelpFilePath);2397 #endif2398 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r99903 r99904 467 467 void sltShowHelpHelpDialog(); 468 468 void sltResetSuppressedMessages(); 469 void sltShowUserManual(const QString &str Location);469 void sltShowUserManual(const QString &strHelpFilePath); 470 470 471 471 /// @todo move it away .. … … 526 526 const QString &strAutoConfirmId, const QString &strHelpKeyword) const; 527 527 528 /// @todo move it away ..529 void showHelpBrowser(const QString &strHelpFilePath);530 531 528 /** Holds the list of shown warnings. */ 532 529 mutable QStringList m_warnings;
Note:
See TracChangeset
for help on using the changeset viewer.