Changeset 95069 in vbox
- Timestamp:
- May 24, 2022 9:40:04 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r95068 r95069 1951 1951 void UIHelpBrowserWidget::sltLinkHighlighted(const QUrl &url) 1952 1952 { 1953 emit sigStatusBarMessage(url.url(), 0); /** @todo qt6: ??? */ 1953 QString strMessage = url.url(); 1954 if (url.scheme() != "qthelp") 1955 strMessage = QString("%1: %2").arg(tr("Click to open this link in an external browser")).arg(url.url()); 1956 1957 emit sigStatusBarMessage(strMessage, 0); /** @todo qt6: ??? */ 1954 1958 } 1955 1959 #else 1956 1960 void UIHelpBrowserWidget::sltLinkHighlighted(const QString &strLink) 1957 1961 { 1958 emit sigStatusBarMessage(strLink, 0); 1962 QString strMessage = strLink; 1963 if (QUrl(strLink).scheme() != "qthelp") 1964 strMessage = QString("%1: %2").arg(tr("Click to open this link in an external browser")).arg(strLink); 1965 1966 emit sigStatusBarMessage(strMessage, 0); 1959 1967 } 1960 1968 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
r94064 r95069 64 64 void sigAddBookmark(); 65 65 void sigStatusBarMessage(const QString &strMessage, int iTimeOut); 66 66 67 public: 67 68 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp
r95068 r95069 463 463 { 464 464 clearOverlay(); 465 if (url.scheme() != "qthelp") 466 return; 465 467 #ifdef VBOX_IS_QT6_OR_LATER 466 468 QTextBrowser::doSetSource(url, type); … … 699 701 700 702 QString strAnchor = anchorAt(pEvent->pos()); 703 701 704 if (!strAnchor.isEmpty()) 702 705 { 706 707 QString strLink = source().resolved(strAnchor).toString(); 708 709 if (source().resolved(strAnchor).scheme() != "qthelp" && pEvent->button() == Qt::LeftButton) 710 { 711 uiCommon().openURL(strLink); 712 return; 713 } 714 703 715 if ((pEvent->modifiers() & Qt::ControlModifier) || 704 716 pEvent->button() == Qt::MiddleButton) 705 717 { 706 QString strLink = source().resolved(strAnchor).toString(); 718 707 719 emit sigOpenLinkInNewTab(strLink, true); 708 720 return; … … 907 919 QUrl url = pSender->data().toUrl(); 908 920 if (url.isValid()) 909 QTextBrowser::setSource(url);921 setSource(url); 910 922 } 911 923
Note:
See TracChangeset
for help on using the changeset viewer.