[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/kconfig_compiler
From: David Faure <faure () kde ! org>
Date: 2005-10-09 20:07:28
Message-ID: 1128888448.228765.11712.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 468947 by dfaure:
Apply patch by aacid: do not put an append into the code of a integer list if there \
is no <default> into the xml file.
M +9 -6 kconfig_compiler.cpp
--- trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp #468946:468947
@@ -309,7 +309,7 @@
cpp << endl;
cpp << " QStringList default" << name << ";" << endl;
- QStringList defaults = defaultValue.split( "," );
+ const QStringList defaults = defaultValue.split( "," );
QStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
cpp << " default" << name << ".append( QString::fromUtf8( \"" << *it << "\" \
) );" @@ -345,11 +345,14 @@
cpp << endl;
cpp << " QList<int> default" << name << ";" << endl;
- QStringList defaults = defaultValue.split( "," );
- QStringList::ConstIterator it;
- for( it = defaults.begin(); it != defaults.end(); ++it ) {
- cpp << " default" << name << ".append( " << *it << " );"
- << endl;
+ if (!defaultValue.isEmpty())
+ {
+ QStringList defaults = defaultValue.split( "," );
+ QStringList::ConstIterator it;
+ for( it = defaults.begin(); it != defaults.end(); ++it ) {
+ cpp << " default" << name << ".append( " << *it << " );"
+ << endl;
+ }
}
defaultValue = "default" + name;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic