Skip to content

Commit

Permalink
[developers map] open link on external web browser instead of webview…
Browse files Browse the repository at this point in the history
… widget
  • Loading branch information
slarosa committed Dec 28, 2014
1 parent 1e7cc2c commit b96d943
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/qgsabout.cpp
Expand Up @@ -63,6 +63,9 @@ void QgsAbout::init()
else
mOptionsListWidget->item( DEVELOPERS_MAP_INDEX )->setHidden( true );

developersMapView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
developersMapView->setContextMenuPolicy( Qt::NoContextMenu );

// set the 60x60 icon pixmap
QPixmap icon( QgsApplication::iconsPath() + "qgis-icon-60x60.png" );
qgisIcon->setPixmap( icon );
Expand Down Expand Up @@ -316,6 +319,12 @@ QString QgsAbout::fileSystemSafe( QString fileName )
return result;
}

void QgsAbout::on_developersMapView_linkClicked( const QUrl &url )
{
QString link = url.toString();
openUrl( link );
}

void QgsAbout::setDevelopersMap()
{
developersMapView->settings()->setAttribute( QWebSettings::JavascriptEnabled, true );
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsabout.h
Expand Up @@ -40,6 +40,7 @@ class APP_EXPORT QgsAbout : public QgsOptionsDialogBase, private Ui::QgsAbout
private slots:
void on_btnQgisUser_clicked();
void on_btnQgisHome_clicked();
void on_developersMapView_linkClicked( const QUrl &url );
};

#endif

0 comments on commit b96d943

Please sign in to comment.