Skip to content

Commit b96d943

Browse files
committedDec 28, 2014
[developers map] open link on external web browser instead of webview widget
1 parent 1e7cc2c commit b96d943

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎src/app/qgsabout.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ void QgsAbout::init()
6363
else
6464
mOptionsListWidget->item( DEVELOPERS_MAP_INDEX )->setHidden( true );
6565

66+
developersMapView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
67+
developersMapView->setContextMenuPolicy( Qt::NoContextMenu );
68+
6669
// set the 60x60 icon pixmap
6770
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
6871
qgisIcon->setPixmap( icon );
@@ -316,6 +319,12 @@ QString QgsAbout::fileSystemSafe( QString fileName )
316319
return result;
317320
}
318321

322+
void QgsAbout::on_developersMapView_linkClicked( const QUrl &url )
323+
{
324+
QString link = url.toString();
325+
openUrl( link );
326+
}
327+
319328
void QgsAbout::setDevelopersMap()
320329
{
321330
developersMapView->settings()->setAttribute( QWebSettings::JavascriptEnabled, true );

‎src/app/qgsabout.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class APP_EXPORT QgsAbout : public QgsOptionsDialogBase, private Ui::QgsAbout
4040
private slots:
4141
void on_btnQgisUser_clicked();
4242
void on_btnQgisHome_clicked();
43+
void on_developersMapView_linkClicked( const QUrl &url );
4344
};
4445

4546
#endif

0 commit comments

Comments
 (0)
Please sign in to comment.