Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Aug 12, 2024
1 parent 7ed2df5 commit e765ddb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/providers/hana/qgshanadataitemguiprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "qgshanautils.h"
#include "qgsnewnamedialog.h"
#include "qgsdataitemguiproviderutils.h"
#include "qgssettings.h"

#include <QInputDialog>
#include <QMessageBox>
Expand Down Expand Up @@ -52,7 +53,7 @@ void QgsHanaDataItemGuiProvider::populateContextMenu(

QAction *actionDuplicate = new QAction( tr( "Duplicate Connection" ), this );
connect( actionDuplicate, &QAction::triggered, this, [connItem] { duplicateConnection( connItem ); } );
menu->addAction( actionDuplicate )
menu->addAction( actionDuplicate );

const QList< QgsHanaConnectionItem * > hanaConnectionItems = QgsDataItem::filteredItems<QgsHanaConnectionItem>( selection );
QAction *actionDelete = new QAction( hanaConnectionItems.size() > 1 ? tr( "Remove Connections…" ) : tr( "Remove Connection…" ), menu );
Expand Down
5 changes: 3 additions & 2 deletions src/providers/oracle/qgsoracledataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "qgsdbquerylog_p.h"
#include "qgsvectorlayerexporter.h"
#include "qgsdataitemguiproviderutils.h"
#include "qgssettings.h"

#include <QMessageBox>
#include <QProgressDialog>
Expand Down Expand Up @@ -312,7 +313,7 @@ void QgsOracleConnectionItem::duplicateConnection()
const QStringList connections = settings.childGroups();
settings.endGroup();

const QString newConnectionName = QgsDataItemGuiProviderUtils::uniqueName( connectionName, connections );
const QString newConnectionName = QgsDataItemGuiProviderUtils::uniqueName( mName, connections );

QString key = QStringLiteral( "/Oracle/connections/" ) + mName;
QString newKey = QStringLiteral( "/Oracle/connections/" ) + newConnectionName;
Expand All @@ -329,7 +330,7 @@ void QgsOracleConnectionItem::duplicateConnection()
settings.setValue( newKey + QStringLiteral( "/estimatedMetadata" ), settings.value( key + QStringLiteral( "/estimatedMetadata" ), false ).toBool() );
settings.setValue( newKey + QStringLiteral( "/onlyExistingTypes" ), settings.value( key + QStringLiteral( "/onlyExistingTypes" ), true ).toBool() );
settings.setValue( newKey + QStringLiteral( "/includeGeoAttributes" ), settings.value( key + QStringLiteral( "/includeGeoAttributes" ), false ).toBool() );
settings.setValue( newKey + QStringLiteral( "/projectsInDatabase" ), ettings.value( key + "/projectsInDatabase", false ).toBool() );
settings.setValue( newKey + QStringLiteral( "/projectsInDatabase" ), settings.value( key + "/projectsInDatabase", false ).toBool() );
settings.setValue( newKey + QStringLiteral( "/saveUsername" ), settings.value( key + QStringLiteral( "/saveUsername" ) ).toString() );
settings.setValue( newKey + QStringLiteral( "/savePassword" ), settings.value( key + QStringLiteral( "/savePassword" ) ).toString() );
settings.setValue( newKey + QStringLiteral( "/dboptions" ), settings.value( key + QStringLiteral( "/dboptions" ) ).toString() );
Expand Down

0 comments on commit e765ddb

Please sign in to comment.