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

qlonglong with EditRange widget #18307

Closed
qgib opened this issue Mar 11, 2014 · 1 comment
Closed

qlonglong with EditRange widget #18307

qgib opened this issue Mar 11, 2014 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Mar 11, 2014

Author Name: Philippe Dorelon (Philippe Dorelon)
Original Redmine Issue: 9761
Affected QGIS version: 2.2.0


Integer values from spatialite files have QVariant:LongLong format in Qgis and it's impossible to use EditRange widget, value is always 0.
The problem is in qgsattributeeditor_8cpp_source.html, line 1210 : if ( myFieldType == QVariant::Int )
A solution is just to change with that : if ( myFieldType == QVariant::Int || myFieldType == QVariant::LongLong )

And there is a small issue in qgsattributedialog.cpp for linedit widget, line 407 :
switch ( value.type() )
{
case QVariant::Invalid: text = "NULL"; break;
case QVariant::Int: text = QString::number( value.toInt() ); break;
//LongLong type to add
case QVariant::LongLong: text = QString::number( value.toLongLong() ); break;
case QVariant::Double: text = QString::number( value.toDouble() ); break;
case QVariant::String:
default: text = value.toString();
}

@qgib
Copy link
Contributor Author

qgib commented Mar 11, 2014

Author Name: Matthias Kuhn (@m-kuhn)


Fixed in changeset "b02ad1e7d95fe891cc8e2cb9b2a0e3eebe71a9b8".

Thank you for the detailed report


  • status_id was changed from Open to Closed

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib closed this as completed May 24, 2019
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