Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ committed Oct 5, 2024
1 parent 62e2067 commit a502c2b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ QgsDocumentationPanelWidget::QgsDocumentationPanelWidget( QWidget *parent )
{
setupUi( this );

connect( mPythonHomeButton, &QToolButton::clicked, this, [this] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "pyqgis" ), true );} );
connect( mCppHomeButton, &QToolButton::clicked, this, [this] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "qgis" ), true );} );
connect( mQtHomeButton, &QToolButton::clicked, this, [this] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "qt" ), true );} );
connect( mPythonHomeButton, &QToolButton::clicked, this, [] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "pyqgis" ), true );} );
connect( mCppHomeButton, &QToolButton::clicked, this, [] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "qgis" ), true );} );
connect( mQtHomeButton, &QToolButton::clicked, this, [] {QgisApp::instance()->showApiDocumentation( QStringLiteral( "qt" ), true );} );
connect( mOpenUrlButton, &QToolButton::clicked, this, [this] {QgisApp::instance()->openURL( mWebView->url().toString(), false );} );

}
Expand Down
4 changes: 2 additions & 2 deletions src/gui/codeeditors/qgscodeeditorpython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -759,14 +759,14 @@ void QgsCodeEditorPython::showApiDocumentation( const QString &text )

QString baseUrl = settings.value( QStringLiteral( "qgis/QgisApiUrl" ),
QString( "https://qgis.org/api/%1" ).arg( qgisVersion ) ).toString();
QDesktopServices::openUrl( QUrl( QString( "%1/class%2.html" ).arg( qgisVersion, searchText ) ) );
QDesktopServices::openUrl( QUrl( QString( "%1/class%2.html" ).arg( baseUrl, searchText ) ) );
return;
}
}
else if ( qtExpression.match( searchText ).hasMatch() )
{
QString baseUrl = QString( "https://doc.qt.io/qt-%1" ).arg( qtVersion );
QDesktopServices::openUrl( QUrl( QStringLiteral( "https://doc.qt.io/qt-5/%1.html" ).arg( searchText.toLower() ) ) );
QDesktopServices::openUrl( QUrl( QStringLiteral( "%1/%2.html" ).arg( baseUrl, searchText.toLower() ) ) );
return;
}
QDesktopServices::openUrl( QUrl( QStringLiteral( "https://qgis.org/pyqgis/%1/search.html?q=%2" ).arg( qgisVersion, searchText ) ) );
Expand Down

0 comments on commit a502c2b

Please sign in to comment.