[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: 2007-04-03 10:41:42
Message-ID: 1175596902.192800.2035.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 649880 by dfaure:
Ah but QByteArray and QString overloads are still ambiguous when given char* - add \
the third one, like in kconfig.
M +10 -0 kconfig_compiler.cpp
--- trunk/KDE/kdelibs/kdecore/kconfig_compiler/kconfig_compiler.cpp #649879:649880
@@ -1417,6 +1417,7 @@
h << " static " << className << " *self();" << endl;
if (cfgFileNameArg)
{
+ h << " static void instance(const char* cfgfilename);" << endl;
h << " static void instance(const QByteArray& cfgfilename);" << endl;
h << " static void instance(const QString& cfgfilename);" << endl;
}
@@ -1722,6 +1723,15 @@
cpp << "}" << endl << endl;
if ( cfgFileNameArg ) {
+ cpp << "void " << className << "::instance(const char* cfgfilename)" << endl;
+ cpp << "{" << endl;
+ cpp << " if (mSelf) {" << endl;
+ cpp << " kDebug() << \"" << className << "::instance called after the \
first use - ignoring\" << endl;" << endl; + cpp << " return;" << endl;
+ cpp << " }" << endl;
+ cpp << " static" << className << "Deleter.setObject( mSelf, new " << \
className << "(QFile::decodeName(cfgfilename)) );" << endl; + cpp << " \
mSelf->readConfig();" << endl; + cpp << "}" << endl << endl;
cpp << "void " << className << "::instance(const QByteArray& cfgfilename)" << \
endl; cpp << "{" << endl;
cpp << " if (mSelf) {" << endl;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic