[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/bindings/smokegenerator/generators/smoke
From: Arno Rehn <kde () arnorehn ! de>
Date: 2009-06-30 21:50:53
Message-ID: 1246398653.195455.23584.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 989772 by arnorehn:
add an option to specifiy string-like types - these will be mapped to scalars ($) \
instead of objects (#) in the munged names
M +4 -0 generator_smoke.cpp
M +1 -0 globals.h
M +1 -1 helpers.cpp
--- trunk/playground/bindings/smokegenerator/generators/smoke/generator_smoke.cpp \
#989771:989772 @@ -38,6 +38,7 @@
int Options::parts = 20;
QString Options::module = "qt";
QStringList Options::parentModules;
+QStringList Options::stringTypes;
static void showUsage()
{
@@ -46,6 +47,7 @@
" -m <module name> (default: 'qt')" << std::endl <<
" -p <parts> (default: 20)" << std::endl <<
" -pm <comma-seperated list of parent modules>" << std::endl;
+ " -st <comma-seperated list of types storing strings>" << std::endl;
}
extern "C" Q_DECL_EXPORT
@@ -71,6 +73,8 @@
}
} else if (args[i] == "-pm") {
Options::parentModules = args[++i].split(',');
+ } else if (args[i] == "-st") {
+ Options::stringTypes = args[++i].split(',');
} else if (args[i] == "-h" || args[i] == "--help") {
showUsage();
return EXIT_SUCCESS;
--- trunk/playground/bindings/smokegenerator/generators/smoke/globals.h \
#989771:989772 @@ -50,6 +50,7 @@
static int parts;
static QString module;
static QStringList parentModules;
+ static QStringList stringTypes;
static QList<QFileInfo> headerList;
static QStringList classList;
};
--- trunk/playground/bindings/smokegenerator/generators/smoke/helpers.cpp \
#989771:989772 @@ -281,7 +281,7 @@
if (type->pointerDepth() > 1) {
// reference to array or hash
ret += "?";
- } else if (type->isIntegral() || type->getEnum()) {
+ } else if (type->isIntegral() || type->getEnum() || \
Options::stringTypes.contains(type->name())) { // plain scalar
ret += "$";
} else if (type->getClass()) {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic