diff --git a/boolean_fields_fix.patch b/boolean_fields_fix.patch new file mode 100644 index 0000000..ddca99c --- /dev/null +++ b/boolean_fields_fix.patch @@ -0,0 +1,34 @@ +--- 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()) { diff --git a/tellico.changes b/tellico.changes index bbf487b..5ceaa99 100644 --- a/tellico.changes +++ b/tellico.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Oct 16 11:06:34 UTC 2011 - asterios.dramis@gmail.com + +- Added a patch "boolean_fields_fix.patch" (taken from upstream) to fix + "Boolean fields are always shown with checkmark in list view, no matter the + value" (bko#283444). + ------------------------------------------------------------------- Mon Sep 26 19:02:39 UTC 2011 - asterios.dramis@gmail.com diff --git a/tellico.spec b/tellico.spec index e7980e7..de631ed 100644 --- a/tellico.spec +++ b/tellico.spec @@ -26,6 +26,8 @@ License: GPL-2.0+ Url: http://tellico-project.org/ Group: Productivity/Office/Other Source0: http://tellico-project.org/files/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM boolean_fields_fix.patch bko#283444 asterios.dramis@gmail.com -- Fix for "Boolean fields are always shown with checkmark in list view, no matter the value" (taken from upstream) +Patch0: boolean_fields_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fdupes @@ -61,6 +63,7 @@ stamps, trading cards, comic books, and wines. %lang_package %prep %setup -q +%patch0 -p1 %build %cmake_kde4 "-DENABLE_WEBCAM=true" -d build