Changeset 86781 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 2, 2020 2:12:51 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86776 r86781 22 22 #include <QFont> 23 23 #include <QHBoxLayout> 24 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 24 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 25 25 #include <QtHelp/QHelpEngine> 26 26 #include <QtHelp/QHelpContentWidget> 27 27 #include <QtHelp/QHelpIndexWidget> 28 #include <QtHelp/QHelpSearchEngine>29 #include <QtHelp/QHelpSearchQueryWidget>30 #include <QtHelp/QHelpSearchResultWidget>28 #include <QtHelp/QHelpSearchEngine> 29 #include <QtHelp/QHelpSearchQueryWidget> 30 #include <QtHelp/QHelpSearchResultWidget> 31 31 #endif 32 32 #include <QMenu> … … 91 91 private: 92 92 93 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 93 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 94 94 const QHelpEngine* m_pHelpEngine; 95 95 #endif … … 103 103 UIHelpBrowserViewer::UIHelpBrowserViewer(const QHelpEngine *pHelpEngine, QWidget *pParent /* = 0 */) 104 104 :QTextBrowser(pParent) 105 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 105 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 106 106 , m_pHelpEngine(pHelpEngine) 107 107 #endif 108 108 { 109 #if !defined(RT_OS_LINUX) || !defined(VBOX_WITH_DOCS_QHELP) 109 #if !defined(RT_OS_LINUX) || !defined(VBOX_WITH_DOCS_QHELP) || !(QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 110 110 Q_UNUSED(pHelpEngine); 111 111 #endif … … 114 114 QVariant UIHelpBrowserViewer::loadResource(int type, const QUrl &name) 115 115 { 116 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 116 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 117 117 if (name.scheme() == "qthelp" && m_pHelpEngine) 118 118 return QVariant(m_pHelpEngine->fileData(name)); … … 143 143 , m_pToolBar(0) 144 144 , m_strHelpFilePath(strHelpFilePath) 145 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 145 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 146 146 , m_pHelpEngine(0) 147 147 #endif … … 240 240 241 241 m_pMainLayout->addWidget(m_pSplitter); 242 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 242 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 243 243 m_pHelpEngine = new QHelpEngine(m_strHelpFilePath, this); 244 244 m_pBookmarksWidget = new QWidget(this); … … 302 302 void UIHelpBrowserWidget::prepareSearchWidgets() 303 303 { 304 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 304 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 305 305 # if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) 306 306 … … 397 397 void UIHelpBrowserWidget::loadOptions() 398 398 { 399 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 399 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 400 400 if (m_pContentViewer && m_pHelpEngine) 401 401 { … … 512 512 QUrl UIHelpBrowserWidget::findIndexHtml() const 513 513 { 514 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 514 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 515 515 QList<QUrl> files = m_pHelpEngine->files(m_pHelpEngine->namespaceName(m_strHelpFilePath), QStringList()); 516 516 int iIndex = -1; … … 552 552 void UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished() 553 553 { 554 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 554 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 555 555 AssertReturnVoid(m_pContentViewer && m_pHelpEngine); 556 556 /* Search for the index of the index.htnl: */ … … 567 567 void UIHelpBrowserWidget::sltHandleContentWidgetItemClicked(const QModelIndex &index) 568 568 { 569 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 569 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 570 570 AssertReturnVoid(m_pContentViewer && m_pHelpEngine && m_pContentWidget); 571 571 QHelpContentModel *pContentModel = … … 589 589 void UIHelpBrowserWidget::sltHandleHelpBrowserViewerSourceChange(const QUrl &source) 590 590 { 591 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 591 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 592 592 if (m_fModelContentCreated && m_pContentWidget && source.isValid() && m_pContentModel) 593 593 { … … 714 714 void UIHelpBrowserWidget::sltHandleSearchStart() 715 715 { 716 #if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)716 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 717 717 AssertReturnVoid(m_pHelpSearchEngine && m_pHelpSearchQueryWidget); 718 718 m_pHelpSearchEngine->search(m_pHelpSearchQueryWidget->searchInput()); -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
r86776 r86781 148 148 149 149 QString m_strHelpFilePath; 150 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) 150 #if defined(RT_OS_LINUX) && defined(VBOX_WITH_DOCS_QHELP) && (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) 151 151 QHelpEngine *m_pHelpEngine; 152 152 #endif
Note:
See TracChangeset
for help on using the changeset viewer.