Hello community,

here is the log from the commit of package tellico for openSUSE:Factory
checked in at Tue Oct 18 14:31:27 CEST 2011.



--------
--- openSUSE:Factory/tellico/tellico.changes    2011-10-06 16:46:19.000000000 
+0200
+++ /mounts/work_src_done/STABLE/tellico/tellico.changes        2011-10-16 
13:08:50.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Oct 16 11:06:34 UTC 2011 - [email protected]
+
+- 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).
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  boolean_fields_fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tellico.spec ++++++
--- /var/tmp/diff_new_pack.OFL7YL/_old  2011-10-18 14:31:17.000000000 +0200
+++ /var/tmp/diff_new_pack.OFL7YL/_new  2011-10-18 14:31:17.000000000 +0200
@@ -26,6 +26,8 @@
 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 
[email protected] -- 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 @@
 %lang_package
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %cmake_kde4 "-DENABLE_WEBCAM=true" -d build

++++++ boolean_fields_fix.patch ++++++
--- 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()) {
continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to