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

Backport 3.8: Fix multi-selection on value relation widget using string fields #31189

Merged
merged 26 commits into from
Aug 19, 2019

Conversation

m-kuhn
Copy link
Member

@m-kuhn m-kuhn commented Aug 10, 2019

Manual backport of #30610

code mostly taken from this integration in the postgresprovider / postgresconn
x
…ctions we use there and possibly in future there are more coming and renamed the methods

fixed indents and comments
…Variant::List - since these values are not stored as string, the tests don't need to check the GDAL version (what shouldn't have been done before anyway because it only concerns geopackages, where this version is checked on storing data...)
@signedav
Copy link
Contributor

Thanks @m-kuhn

Copy link
Member Author

@m-kuhn m-kuhn left a comment

Choose a reason for hiding this comment

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

@signedav looks safe to backport to me. Can you have a look at those suggestions (which I think would make sense on master too)

src/core/fieldformatter/qgsvaluerelationfieldformatter.cpp Outdated Show resolved Hide resolved
qDebug() << QString::fromStdString( ex.what() );
catch ( json::parse_error &ex )
{
qDebug() << QString::fromStdString( ex.what() );
Copy link
Member Author

Choose a reason for hiding this comment

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

@signedav is this something that can happen in real life? In this case wouldn't a message log entry be better?

Copy link
Contributor

Choose a reason for hiding this comment

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

Rarely but still possible. In the case that someone used json in string fields to fill up the valuerelation, what would be technically possible since 3.8 - and if this json strings are not formatted correctly.

I'm okay with log as well...

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you do a PR for this on master and we can backport it on top of this one?

Copy link
Contributor

Choose a reason for hiding this comment

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

src/core/qgspostgresstringutils.h Outdated Show resolved Hide resolved
@m-kuhn m-kuhn merged commit 27b466f into qgis:release-3_8 Aug 19, 2019
@m-kuhn m-kuhn deleted the backport-30610-to-release-3_8_a branch August 19, 2019 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants