Summary: | Folder properties are not saved | ||
---|---|---|---|
Product: | [Applications] kmail | Reporter: | Andreas Zehender <zehender> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | alastair.scott |
Priority: | NOR | ||
Version: | 1.4 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Andreas Zehender
2002-04-15 20:46:12 UTC
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 15 April 2002 22:46 zehender@kde.org wrote: > When I add folders with special characters ('[' and ']') the folder > properties are not saved or restored correctly. This is most likely a bug in KConfig. It seems that KConfig has problems=20 with ']' in group names. Regards Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD4DBQE8u0WXGnR+RTDgudgRAkRZAJjFlK0pfOaWH3iTqpd4086gUhFvAJ9kPmvv O5vPe3cTb+VGqlcojYJTWw=3D=3D =3DlNeZ -----END PGP SIGNATURE----- -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 15 April 2002 23:26 Ingo Kl=F6cker wrote: > On Monday 15 April 2002 22:46 zehender@kde.org wrote: > > When I add folders with special characters ('[' and ']') the > > folder properties are not saved or restored correctly. > > This is most likely a bug in KConfig. It seems that KConfig has > problems with ']' in group names. According to Waldo brackets are not allowed in config group names. This=20 means we will either have to change the way we store information about=20 the folders (i.e. use [Folder-#1] instead of [Folder-inbox]) or we will=20 have to escape brackets in folder names e.g. [ <-> %( ] <-> %) % <-> %% Regards Ingo -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8u1Q4GnR+RTDgudgRAld8AKCmI6+/6u2P4y+jGVa++ZmhbP/Y3ACeIEGB N8AzBYvMko0eJVqQ1XaF4u0=3D =3Dqz6i -----END PGP SIGNATURE----- *** Bug 46625 has been marked as a duplicate of this bug. *** loss of config data CVS commit by tilladam: Escape [ and ] in folder names to %( and %) when queried via idString() because they are not allowed in kconfig section names. CCMAIL: 41066-done@bugs.kde.org M +6 -1 kmfolder.cpp 1.284 --- kdepim/kmail/kmfolder.cpp #1.283:1.284 @@ -899,5 +899,10 @@ QString KMFolder::idString() const if (!relativePath.isEmpty()) relativePath = relativePath.right( relativePath.length() - 1 ) + "/"; - return relativePath + QString(name()); + QString escapedName = QString( name() ); + /* Escape [ and ] as they are disallowed for kconfig sections and that is + what the idString is primarily used for. */ + escapedName.replace( "[", "%(" ); + escapedName.replace( "]", "%)" ); + return relativePath + escapedName; } |