VirtualBox

Changeset 99904 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
May 22, 2023 2:44:15 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
157547
Message:

FE/Qt: bugref:10451. Some cleaning before moving stuff around. part 1.

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  
    21412141}
    21422142
    2143 void UIMessageCenter::sltShowUserManual(const QString &strLocation)
    2144 {
    2145     Q_UNUSED(strLocation);
    2146 #if defined (VBOX_WITH_DOCS_QHELP)
    2147     showHelpBrowser(strLocation);
     2143void 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();
    21482161#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);
    21652163#endif
     2164
    21662165}
    21672166
     
    21822181#if defined(VBOX_WITH_DOCS_QHELP)
    21832182    /* First open or show the help browser: */
    2184     showHelpBrowser(uiCommon().helpFile());
     2183    sltShowUserManual(uiCommon().helpFile());
    21852184    /* Show the help page for the @p strHelpKeyword: */
    21862185    if (m_pHelpBrowserDialog)
     
    23742373    return iResultCode;
    23752374}
    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 #else
    2396     Q_UNUSED(strHelpFilePath);
    2397 #endif
    2398 }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r99903 r99904  
    467467    void sltShowHelpHelpDialog();
    468468    void sltResetSuppressedMessages();
    469     void sltShowUserManual(const QString &strLocation);
     469    void sltShowUserManual(const QString &strHelpFilePath);
    470470
    471471    /// @todo move it away ..
     
    526526                       const QString &strAutoConfirmId, const QString &strHelpKeyword) const;
    527527
    528     /// @todo move it away ..
    529     void showHelpBrowser(const QString &strHelpFilePath);
    530 
    531528    /** Holds the list of shown warnings. */
    532529    mutable QStringList m_warnings;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette