diff options
author | Aleix Pol <aleixpol@kde.org> | 2014-02-21 17:52:40 +0100 |
---|---|---|
committer | Aleix Pol <aleixpol@kde.org> | 2014-04-26 14:11:15 +0200 |
commit | e9abee49ea22102ba1ae72f6ee7ba44143fe8445 (patch) | |
tree | 52ef5d72709ac4bbf21147ae23e7e06aab29ce69 | |
parent | d975ecb36863309ab539ddaf55d53e6423a60883 (diff) | |
download | kconfig-e9abee49ea22102ba1ae72f6ee7ba44143fe8445.tar.gz kconfig-e9abee49ea22102ba1ae72f6ee7ba44143fe8445.tar.bz2 |
fix indentation, to some extent
-rw-r--r-- | src/kreadconfig/kreadconfig.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/kreadconfig/kreadconfig.cpp b/src/kreadconfig/kreadconfig.cpp index cbdb3ec8..44bcbacd 100644 --- a/src/kreadconfig/kreadconfig.cpp +++ b/src/kreadconfig/kreadconfig.cpp @@ -89,35 +89,35 @@ int main(int argc, char **argv) if (file.isEmpty()) konfig = KSharedConfig::openConfig().data(); else - { - konfig = new KConfig( file, KConfig::NoGlobals ); - configMustDeleted=true; - } - KConfigGroup cfgGroup = konfig->group(""); - foreach (const QString &grp, groups) - cfgGroup = cfgGroup.group(grp); + { + konfig = new KConfig( file, KConfig::NoGlobals ); + configMustDeleted=true; + } + KConfigGroup cfgGroup = konfig->group(""); + foreach (const QString &grp, groups) + cfgGroup = cfgGroup.group(grp); if(type=="bool") { dflt=dflt.toLower(); bool def=(dflt=="true" || dflt=="on" || dflt=="yes" || dflt=="1"); - bool retValue = !cfgGroup.readEntry(key, def); - if ( configMustDeleted ) - delete konfig; + bool retValue = !cfgGroup.readEntry(key, def); + if ( configMustDeleted ) + delete konfig; return retValue; } else if((type=="num") || (type=="int")) { - int retValue = cfgGroup.readEntry(key, dflt.toInt()); - if ( configMustDeleted ) - delete konfig; - return retValue; + int retValue = cfgGroup.readEntry(key, dflt.toInt()); + if ( configMustDeleted ) + delete konfig; + return retValue; } else if (type=="path"){ - fprintf(stdout, "%s\n", cfgGroup.readPathEntry(key, dflt).toLocal8Bit().data()); - if ( configMustDeleted ) - delete konfig; + fprintf(stdout, "%s\n", cfgGroup.readPathEntry(key, dflt).toLocal8Bit().data()); + if ( configMustDeleted ) + delete konfig; return 0; } else { - /* Assume it's a string... */ - fprintf(stdout, "%s\n", cfgGroup.readEntry(key, dflt).toLocal8Bit().data()); - if ( configMustDeleted ) - delete konfig; + /* Assume it's a string... */ + fprintf(stdout, "%s\n", cfgGroup.readEntry(key, dflt).toLocal8Bit().data()); + if ( configMustDeleted ) + delete konfig; return 0; } } |