diff -r 32e56106abf2 -r 66b5fe3c07fd homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp --- a/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp Mon Sep 27 11:52:00 2010 +0300 +++ b/homescreenapp/stateplugins/hsmenuworkerstateplugin/src/hscollectionnamedialog.cpp Wed Oct 06 16:06:24 2010 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "hscollectionnamedialog.h" @@ -133,31 +134,26 @@ QString newName(name); + QChar leadingCharacter('0'); + static const int fieldWidth(2); + static const int base(10); unsigned int numToAppend(1); - bool defaultCollection = false; - if (newName == hbTrId("txt_applib_dialog_entry_collection")) { - defaultCollection = true; - } - if (defaultCollection) { + + if (newName == HbParameterLengthLimiter( + "txt_applib_dialog_entry_collection")) { while (mOtherCollectionsNames.contains(newName)) { - newName = hbTrId("txt_applib_dialog_entry_collectionl1").arg( - numToAppend); + newName = HbParameterLengthLimiter( + "txt_applib_dialog_entry_collectionl1").arg( + numToAppend, fieldWidth, base, leadingCharacter); numToAppend++; } } else { - QString textMap = hbTrId( - "txt_applib_dialog_collection_name_entry_1_l1"); - // TODO: Temporary workaround. - // The "if" instruction below can be removed when - // a text map "txt_applib_dialog_collection_name_entry_1_l1" - // is available in the platform. - if (textMap == "txt_applib_dialog_collection_name_entry_1_l1") { - textMap = "%2 (%L1)"; - } while (mOtherCollectionsNames.contains(newName)) { - newName = textMap.arg(numToAppend).arg(name); + newName = HbParameterLengthLimiter( + "txt_applib_dialog_collection_name_entry_1_l1").arg( + numToAppend, fieldWidth, base, leadingCharacter).arg(name); numToAppend++; } }