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

[Browser] Renaming only accepts characters and behaviour issue with unaccepted character in name #39288

Closed
roya0045 opened this issue Oct 9, 2020 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@roya0045
Copy link
Contributor

roya0045 commented Oct 9, 2020

Describe the bug
When renaming a geopackage layer, using the rename function only allows the user to provide characters, not symbols (other than _ ) or numbers.

If the name of the layer already contain number or special characters those cannot be interacted with other than by deleting part of the text containing them in one action.

How to Reproduce

In the browser with a geopackage containing layers.
1 Right click any layer
2. Rename Layer ...
3. Try to input numbers

QGIS and OS versions

Win 10, QGIS 3.14.16

Additional context

Untested for any other providers, assuming same constrains apply.

@roya0045 roya0045 added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 9, 2020
@roya0045 roya0045 changed the title [Browser] Renaming only accepts characters [Browser] Renaming only accepts characters and behaviour issue with unaccepted character in name Oct 9, 2020
@roya0045
Copy link
Contributor Author

roya0045 commented Oct 9, 2020

Assuming issue with the regex or regex validation

const QRegExp checkRe( QStringLiteral( R"re([A-Za-z_][A-Za-z0-9_\s]+)re" ) );

@roya0045
Copy link
Contributor Author

roya0045 commented Oct 9, 2020

I'm not sure if there are constraints with geopackage but could we replace the regex with ([A-Za-z_0-9\-][A-Za-z0-9_\s\-]+)??

nyalldawson pushed a commit to nyalldawson/QGIS that referenced this issue Oct 11, 2020
nyalldawson pushed a commit that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant