VirtualBox

Ignore:
Timestamp:
Oct 22, 2020 8:24:56 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9831. Searching for the index.html within the content during startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp

    r86634 r86679  
    306306    AssertReturnVoid(m_pContentViewer && m_pHelpEngine);
    307307    QList<QUrl> files = m_pHelpEngine->files(m_pHelpEngine->namespaceName(m_strHelpFilePath), QStringList());
    308     if (!files.empty())
    309         m_pContentViewer->setSource(files[0]);
     308    /* Search for the index of the index.htnl: */
     309    int iIndex = 0;
     310    for (int i = 0; i < files.size(); ++i)
     311    {
     312        if (files[i].toString().contains("index.html", Qt::CaseInsensitive))
     313        {
     314            iIndex = i;
     315            break;
     316        }
     317    }
     318    if (files.size() > iIndex)
     319        m_pContentViewer->setSource(files[iIndex]);
    310320    /** @todo show some kind of error maybe. */
    311321#endif
Note: See TracChangeset for help on using the changeset viewer.

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