[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Problems with the new kmail templates feature
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2006-10-24 21:09:45
Message-ID: 200610242309.51343.dfaure () klaralvdalens-datakonsult ! se
[Download RAW message or body]
Allen asked me to post this here: some feedback about the kmail templates code.
1) The default forward message is too simplistic, it misses the four lines under \
---------- Forwarded Message ---------- that used to be there before:
Subject: ...
Date: ...
From: ...
To: ...
2) Coding style: I see a lot of tabs in templatesconfigurationimpl.cpp (but also some \
spaces), please use spaces everywhere. For reference, \
http://pim.kde.org/development/coding-korganizer.php says 2 spaces, and \
http://pim.kde.org/development/coding.php says that the above page applies to kmail \
too, not sure if that's 100% true, but at least the part about 2 spaces is true.
I see this many times:
if ( str.isEmpty() ) {
str = GlobalSettings::self()->templateReply();
}; // the ';' is not necessary here, please remove it
if(tid) delete(tid); // the if can be removed, delete(0) is ok and does nothing.
3) translation
GlobalSettings::self()->setTemplateForward( QString(
"%REM=\"Default forward template\"%-\n"
"---------- %1 ----------\n"
"%TEXT\n"
"-------------------------------------------------------\n"
).arg( convertPhrases( str ) ) );
Shouldn't "Default forward template" be translated?
Best way is to replace it with %1 and move it out to .arg( i18n("Default forward \
template") ), so that translators don't see the strange syntax.
But what confuses me is that this seems duplicated in \
TemplatesConfiguration::defaultForward(). Surely the default should be in the code \
only once.
4) QString TemplatesConfiguration::convertPhrases( QString str ) {
should take a const QString& str
--
David Faure, faure@kde.org, dfaure@klaralvdalens-datakonsult.se
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software solutions
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic