Accepting request 88163 from KDE:Distro:Factory

Added a patch for bko#283444 (forwarded request 88072 from adra)

OBS-URL: https://build.opensuse.org/request/show/88163
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tellico?expand=0&rev=48
This commit is contained in:
Sascha Peilicke 2011-10-18 12:31:18 +00:00 committed by Git OBS Bridge
parent 24ce90bbfa
commit aaf827088d
3 changed files with 44 additions and 0 deletions

34
boolean_fields_fix.patch Normal file
View File

@ -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()) {

View File

@ -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

View File

@ -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