[Digikam-devel] [Bug 298491] New: Typos in templatemanager.cpp cause locationprovincestate and contactprovincestate not to be loaded or saved to templates
Guillaume Paumier
guillom.pom at gmail.com
Fri Apr 20 15:08:52 BST 2012
https://bugs.kde.org/show_bug.cgi?id=298491
Bug ID: 298491
Severity: normal
Version: unspecified
Priority: NOR
Assignee: digikam-devel at kde.org
Summary: Typos in templatemanager.cpp cause
locationprovincestate and contactprovincestate not to
be loaded or saved to templates
Classification: Unclassified
OS: Linux
Reporter: guillom.pom at gmail.com
Hardware: Compiled Sources
Status: UNCONFIRMED
Component: general
Product: digikam
See below.
Reproducible: Always
Steps to Reproduce:
1. Create a template and fill out the "Location > Province/State" and "Contact
> Province/State" fields
2. Save the template and exit digikam
3. Reopen digikam and open the same template
Actual Results:
The "Location > Province/State" and "Contact > Province/State" fields are
empty.
Expected Results:
The "Location > Province/State" and "Contact > Province/State" fields should
load the values saved into the template.
I believe both issues are caused by typos in
core/libs/template/templatemanager.cpp.
The first issue is at line 230:
else if (name2 == QString::fromLatin1("clocationprovincestate"))
should be
else if (name2 == QString::fromLatin1("locationprovincestate"))
The second issue is an inconsistency between line 258, where the field is
called "contactprovincestate":
else if (name2 == QString::fromLatin1("contactprovincestate"))
and lines 417-419, where it's called "contactprovinceSstate":
QDomElement contactprovinceSstate =
doc.createElement(QString::fromLatin1("contactprovinceSstate"));
contactprovinceSstate.setAttribute(QString::fromLatin1("value"),
t.contactInfo().provinceState);
elem.appendChild(contactprovinceSstate);
Line numbers refer to the current version of the file in git.
I'm guessing that fixing the issues in templatemanager.cpp isn't enough and
that it's also necessary to fix existing templates in
~/.kde4/share/apps/digikam/template.xml, so I preferred to provide a detailed
description of the issue rather than a (possibly incomplete) patch.
This issue is reported against the current version in git but it also seems to
be present in the 2.5.0 release.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list