Changeset 94032 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
- Timestamp:
- Mar 1, 2022 11:29:17 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r93990 r94032 21 21 #include <QtGlobal> 22 22 #ifdef VBOX_WITH_QHELP_VIEWER 23 #include <QtHelp/QHelpEngine> 24 #include <QtHelp/QHelpContentWidget> 25 #include <QtHelp/QHelpIndexWidget> 26 #include <QtHelp/QHelpSearchEngine> 27 #include <QtHelp/QHelpSearchQueryWidget> 28 #include <QtHelp/QHelpSearchResultWidget> 23 # include <QtHelp/QHelpEngine> 24 # include <QtHelp/QHelpContentWidget> 25 # include <QtHelp/QHelpIndexWidget> 26 # include <QtHelp/QHelpSearchEngine> 27 # include <QtHelp/QHelpSearchQueryWidget> 28 # include <QtHelp/QHelpSearchResultWidget> 29 # if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) 30 # include <QtHelp/QHelpLink> 31 # endif 29 32 #endif 30 33 #include <QLabel> … … 71 74 static const int iBookmarkUrlDataType = 6; 72 75 76 73 77 /********************************************************************************************************************************* 74 * UIZoomMenuAction definition. *78 * UIZoomMenuAction definition. * 75 79 *********************************************************************************************************************************/ 76 80 class UIZoomMenuAction : public QIWithRetranslateUI<QWidgetAction> … … 187 191 void sigOpenLinkInNewTab(const QUrl &url, bool fBackground); 188 192 void sigAddBookmark(const QUrl &url, const QString &strTitle); 193 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 194 void sigLinkHighlighted(const QUrl &url); 195 #else 189 196 void sigLinkHighlighted(const QString &strLink); 197 #endif 190 198 void sigZoomPercentageChanged(int iPercentage); 191 199 void sigFindInPageWidgetVisibilityChanged(bool fVisible); … … 267 275 /** list.first is tab title and list.second is tab's index. */ 268 276 void sigTabsListChanged(const QStringList &titleList); 277 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 278 void sigLinkHighlighted(const QUrl &url); 279 #else 269 280 void sigLinkHighlighted(const QString &strLink); 281 #endif 270 282 void sigZoomPercentageChanged(int iPercentage); 271 283 void sigCopyAvailableChanged(bool fAvailable); … … 704 716 connect(m_pContentViewer, &UIHelpViewer::sigAddBookmark, 705 717 this, &UIHelpBrowserTab::sltAddBookmarkAction); 718 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 719 connect(m_pContentViewer, static_cast<void(UIHelpViewer::*)(const QUrl&)>(&UIHelpViewer::highlighted), 720 this, &UIHelpBrowserTab::sigLinkHighlighted); 721 #else 706 722 connect(m_pContentViewer, static_cast<void(UIHelpViewer::*)(const QString&)>(&UIHelpViewer::highlighted), 707 723 this, &UIHelpBrowserTab::sigLinkHighlighted); 724 #endif 708 725 connect(m_pContentViewer, &UIHelpViewer::sigZoomPercentageChanged, 709 726 this, &UIHelpBrowserTab::sigZoomPercentageChanged); … … 1865 1882 void UIHelpBrowserWidget::findAndShowUrlForKeyword(const QString &strKeyword) 1866 1883 { 1884 #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) 1885 QList<QHelpLink> links = m_pHelpEngine->documentsForIdentifier(strKeyword); 1886 if (!links.isEmpty()) 1887 { 1888 /* We have to a have a single url per keyword in this case: */ 1889 m_pTabManager->setSource(links.first().url, true /* new tab */); 1890 } 1891 #else 1867 1892 QMap<QString, QUrl> map = m_pHelpEngine->linksForIdentifier(strKeyword); 1868 1893 if (!map.isEmpty()) … … 1872 1897 m_pTabManager->setSource(keywordUrl, true /* new tab */); 1873 1898 } 1899 #endif 1874 1900 } 1875 1901 … … 1922 1948 } 1923 1949 1950 #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) 1951 void UIHelpBrowserWidget::sltLinkHighlighted(const QUrl &url) 1952 { 1953 emit sigStatusBarMessage(url.url(), 0); /** @todo qt6: ??? */ 1954 } 1955 #else 1924 1956 void UIHelpBrowserWidget::sltLinkHighlighted(const QString &strLink) 1925 1957 { 1926 1958 emit sigStatusBarMessage(strLink, 0); 1927 1959 } 1960 #endif 1928 1961 1929 1962 void UIHelpBrowserWidget::sltMouseOverImage(const QString &strImageName)
Note:
See TracChangeset
for help on using the changeset viewer.