Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duplicate functionality to Browser connection items #58342

Merged
merged 10 commits into from
Aug 17, 2024

Conversation

alexbruy
Copy link
Contributor

@alexbruy alexbruy commented Aug 8, 2024

Description

Add "Duplicate connection" action to the context menu of Browser connection items. This allows quickly make a copy of a connection to the same source when only a few details are differ (for example, different PostGIS database on the same server)

image

Funded by NaturalGIS.

@alexbruy alexbruy added GUI/UX Related to QGIS application GUI or User Experience QGIS Browser labels Aug 8, 2024
@github-actions github-actions bot added this to the 3.40.0 milestone Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 3f9f069)

@alexbruy alexbruy closed this Aug 9, 2024
@alexbruy alexbruy reopened this Aug 9, 2024
@alexbruy alexbruy force-pushed the browser-duplicate-connection branch from cf9166f to 7ed2df5 Compare August 12, 2024 12:13
@alexbruy alexbruy force-pushed the browser-duplicate-connection branch from 7ae9cae to e765ddb Compare August 12, 2024 14:40
src/gui/qgsdataitemguiproviderutils.cpp Outdated Show resolved Hide resolved
QgsHanaSettings hanaSettings( connectionName, true );
QgsHanaSettings newHanaSettings( newConnectionName );

newHanaSettings.setConnectionType( hanaSettings.connectionType() );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These copy settings blocks like quite fragile -- i can easily picture them getting skipped when additional connection properties are added in future. Could they instead be moved to eg QgsHanaSettings so that they're in a closer place to where new settings will be added? (The same applies to the other db types)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As other db types do not have separate class to handle settings I have added method to connection classes.

@alexbruy alexbruy force-pushed the browser-duplicate-connection branch from 94a5d8a to b9b164e Compare August 14, 2024 10:58
@nyalldawson nyalldawson merged commit 217210a into qgis:master Aug 17, 2024
29 checks passed
@agiudiceandrea agiudiceandrea added the Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. label Aug 21, 2024
@qgis-bot
Copy link
Collaborator

@alexbruy
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

@alexbruy
A documentation ticket has been opened at qgis/QGIS-Documentation#9206
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@Gustry Gustry added the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label Aug 21, 2024
@qgis-bot
Copy link
Collaborator

@alexbruy

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@alexbruy alexbruy deleted the browser-duplicate-connection branch September 2, 2024 08:06
@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. GUI/UX Related to QGIS application GUI or User Experience Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. QGIS Browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants