Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.1
tellico
boolean_fields_fix.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File boolean_fields_fix.patch of Package tellico
--- a/src/models/entrymodel.cpp +++ b/src/models/entrymodel.cpp @@ -104,22 +104,23 @@ QVariant EntryModel::data(const QModelIn if(!field) { return QVariant(); } - if(field->type() == Data::Field::Bool) { - return m_checkPix; - } else if(field->type() == Data::Field::Rating) { - return GUI::RatingWidget::pixmap(value); - } - entry = this->entry(index_); if(!entry) { return QVariant(); } - - // we don't need a formatted value for image id + // we don't need a formatted value for any pixmaps value = entry->field(field); if(value.isEmpty()) { return QVariant(); } + + if(field->type() == Data::Field::Bool) { + // assume any non-empty value equals true + return m_checkPix; + } else if(field->type() == Data::Field::Rating) { + return GUI::RatingWidget::pixmap(value); + } + if(m_imagesAreAvailable && field->type() == Data::Field::Image) { const Data::Image& img = ImageFactory::imageById(value); if(!img.isNull()) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor