diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-25 14:57:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-30 11:27:08 +0000 |
commit | f332f2e8e66a5fa67b302893a13f0be3687ccc38 (patch) | |
tree | 282dbf2b6845b3c90d51c345ecbd55562a4814f9 /sources/shiboken2/generator/main.cpp | |
parent | d79bb0f4877bd35af99f8ec97aa91ca56207bc23 (diff) |
shiboken: Refactor progress message output handling
In class ReportHandler, replace the step counting by a simple pair of
startProgress()/endProgress() functions that check for warnings and
print the appropriate terminator. Module name and timestamp are now
also printed.
Add a few more messages and give proper names to the generators.
Change-Id: I92b4ef2854b824fbba3d371417edc1f88561a2cb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/main.cpp')
-rw-r--r-- | sources/shiboken2/generator/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/main.cpp b/sources/shiboken2/generator/main.cpp index 9beaf47c7..ac576d657 100644 --- a/sources/shiboken2/generator/main.cpp +++ b/sources/shiboken2/generator/main.cpp @@ -624,7 +624,10 @@ int main(int argc, char *argv[]) for (const GeneratorPtr &g : qAsConst(generators)) { g->setOutputDirectory(outputDirectory); g->setLicenseComment(licenseComment); - if (!g->setup(extractor) || !g->generate()) { + ReportHandler::startProgress(QByteArray("Running ") + g->name() + "..."); + const bool ok = g->setup(extractor) && g->generate(); + ReportHandler::endProgress(); + if (!ok) { errorPrint(QLatin1String("Error running generator: ") + QLatin1String(g->name()) + QLatin1Char('.')); return EXIT_FAILURE; |