[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kphotoalbum] Settings: Re-added searching for un-localized special category names when changing a c
From: Tobias Leupold <tobias.leupold () web ! de>
Date: 2016-02-01 21:55:53
Message-ID: E1aQMRt-0002rn-Jz () scm ! kde ! org
[Download RAW message or body]
Git commit 8a395e04cd486b2036ea331b0a7d78f7a3c7c18a by Tobias Leupold.
Committed on 01/02/2016 at 21:55.
Pushed by tleupold into branch 'master'.
Re-added searching for un-localized special category names when changing a category's name.
M +7 -1 Settings/CategoryPage.cpp
http://commits.kde.org/kphotoalbum/8a395e04cd486b2036ea331b0a7d78f7a3c7c18a
diff --git a/Settings/CategoryPage.cpp b/Settings/CategoryPage.cpp
index 4a1f6fe..8eacb4d 100644
--- a/Settings/CategoryPage.cpp
+++ b/Settings/CategoryPage.cpp
@@ -265,8 +265,14 @@ void Settings::CategoryPage::categoryNameChanged(QListWidgetItem* item)
}
// We don't want to have special category names.
+ // We do have to search both for the localized version and the C locale version, because a user
+ // could start KPA e. g. with a German locale and create a "Folder" category (which would not
+ // be catched by i18n("Folder")), and then start KPA with the C locale, which would produce a
+ // doubled "Folder" category.
if (newCategoryName == i18n("Folder")
- || newCategoryName == i18n("Media Type")) {
+ || newCategoryName == QString::fromUtf8("Folder")
+ || newCategoryName == i18n("Media Type")
+ || newCategoryName == QString::fromUtf8("Media Type")) {
resetCategory(item);
KMessageBox::sorry(this,
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic