aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-03 16:21:38 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-03 16:37:15 -0200
commit17ff35fce3df1b4e52758aaf017cc0261f48deca (patch)
treef304964f58d2b3e2705870bc935a150dfb96184b
parentdfa2689d3868fe37f7142367fbcea426f3772dbd (diff)
Fix indentation problems on code injections.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org> and Renato Araújo <renato.filho@openbossa.org>
-rw-r--r--cppgenerator.cpp2
-rw-r--r--headergenerator.cpp2
-rw-r--r--shibokengenerator.cpp2
-rw-r--r--shibokengenerator.h2
4 files changed, 2 insertions, 6 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index cdcdc268c..54c8138e6 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -28,8 +28,6 @@
#include <QtCore/QTextStream>
#include <QtCore/QDebug>
-static Indentor INDENT;
-
CppGenerator::CppGenerator() : m_currentErrorCode(0)
{
// sequence protocol functions
diff --git a/headergenerator.cpp b/headergenerator.cpp
index b8d7b9e88..eb2e18083 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -30,8 +30,6 @@
#include <QtCore/QRegExp>
#include <QtCore/QDebug>
-static Indentor INDENT;
-
QString HeaderGenerator::fileNameForClass(const AbstractMetaClass* metaClass) const
{
return metaClass->qualifiedCppName().toLower().replace("::", "_") + QLatin1String("_wrapper.h");
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index af1f22d30..1b4d6e9e8 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -34,7 +34,6 @@
#define RETURN_VALUE_HEURISTIC "enable-return-value-heuristic"
#define ENABLE_PYSIDE_EXTENSIONS "enable-pyside-extensions"
-static Indentor INDENT;
//static void dumpFunction(AbstractMetaFunctionList lst);
QHash<QString, QString> ShibokenGenerator::m_pythonPrimitiveTypeName = QHash<QString, QString>();
@@ -800,7 +799,6 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
QString code;
QTextStream tmpStream(&code);
- Indentation indent1(INDENT);
formatCode(tmpStream, snip.code(), INDENT);
if (context) {
diff --git a/shibokengenerator.h b/shibokengenerator.h
index 92c78b143..b46d63d23 100644
--- a/shibokengenerator.h
+++ b/shibokengenerator.h
@@ -300,6 +300,8 @@ protected:
Options options = NoOption) const;
AbstractMetaFunctionList filterFunctions(const AbstractMetaClass* metaClass);
+
+ Indentor INDENT;
private:
bool m_useCtorHeuristic;
bool m_userReturnValueHeuristic;