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

Problem with empty values in getFeatures with OrderBy #24537

Closed
qgib opened this issue May 29, 2017 · 2 comments
Closed

Problem with empty values in getFeatures with OrderBy #24537

qgib opened this issue May 29, 2017 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions

Comments

@qgib
Copy link
Contributor

qgib commented May 29, 2017

Author Name: Marcos Medeiros (Marcos Medeiros)
Original Redmine Issue: 16637
Affected QGIS version: 2.16.1
Redmine category:expressions


I am trying to display features list on my own QAbstractTableModel.
By now it can sort columns just fine when all rows contains data. But whenever the column contains NULL/empty values the QgsVectorLayer::getFeatures method crash the application.

Code:
QgsFeatureRequest req;

req.addOrderBy(mLayer->attributeDisplayName(column), order == Qt::AscendingOrder);

QgsFeatureIterator it = mLayer->getFeatures(req);

QgsFeature feature;
long row = 0;
while (it.nextFeature(feature)) {
mRowToFeatureId[row++] = feature.id();
}

@qgib
Copy link
Contributor Author

qgib commented May 30, 2017

Author Name: Nyall Dawson (@nyalldawson)


2.16 is no longer supported. Is this reproducible in 2.18.9?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Sep 25, 2017

Author Name: Giovanni Manghi (@gioman)


Closing for lack of feedback, please reopen if necessary.


  • resolution was changed from to not reproducable
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Sep 25, 2017
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Expressions Related to the QGIS expression engine or specific expression functions labels May 25, 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! Expressions Related to the QGIS expression engine or specific expression functions
Projects
None yet
Development

No branches or pull requests

1 participant