aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/generator/shiboken2/headergenerator.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-12 10:38:41 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-05-15 12:49:05 +0200
commit6762ddea99f65ebf4dfa704e5f8c3b3453832c0f (patch)
tree1867344501c66de874a6f22abef6b5164b9a8254 /sources/shiboken2/generator/shiboken2/headergenerator.h
parentc16caeb5cb0fbce4a552080d75166caf15374767 (diff)
shiboken: Constify GeneratorContext
Pass around by const-ref and return a const pointer to the class. In HeaderGenerator::generateClass(), make a copy of the context passed in to prevent writing back via reference in the base class loop. Change-Id: I0338bd93b5a53c25ec18bc45b407ab67d8c7c91e Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/headergenerator.h')
-rw-r--r--sources/shiboken2/generator/shiboken2/headergenerator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/shiboken2/headergenerator.h b/sources/shiboken2/generator/shiboken2/headergenerator.h
index 5f59dd13a..30ce06636 100644
--- a/sources/shiboken2/generator/shiboken2/headergenerator.h
+++ b/sources/shiboken2/generator/shiboken2/headergenerator.h
@@ -47,8 +47,8 @@ public:
protected:
QString fileNameSuffix() const override;
- QString fileNameForContext(GeneratorContext &context) const override;
- void generateClass(QTextStream &s, GeneratorContext &classContext) override;
+ QString fileNameForContext(const GeneratorContext &context) const override;
+ void generateClass(QTextStream &s, const GeneratorContext &classContext) override;
bool finishGeneration() override;
private: