diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-03-03 13:56:05 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-03-11 09:49:25 +0000 |
commit | 972ea4cba0472029786a57004d3b2fe24191cfdf (patch) | |
tree | 7876bf888843b431835e4f0670b99c6991039ad2 /src/plugins/qtsupport/qscxmlcgenerator.h | |
parent | 119a7dfd201aeaf892f6f4a351911c1f0102be9c (diff) |
ExtraCompiler: Run extra compiler in a thread
and make sure there are not too many of these threads
running at any time. This stops the massive process
startup when loading a project with many UI files, etc.
Task-number: QTCREATORBUG-15795
Change-Id: Icfcddd80d04e36b61ecafbbefe5a1a8b7ea02ec6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qtsupport/qscxmlcgenerator.h')
-rw-r--r-- | src/plugins/qtsupport/qscxmlcgenerator.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/plugins/qtsupport/qscxmlcgenerator.h b/src/plugins/qtsupport/qscxmlcgenerator.h index 9a305996e70..cb375999c64 100644 --- a/src/plugins/qtsupport/qscxmlcgenerator.h +++ b/src/plugins/qtsupport/qscxmlcgenerator.h @@ -33,20 +33,25 @@ namespace QtSupport { -class QScxmlcGenerator : public ProjectExplorer::ExtraCompiler +class QScxmlcGenerator : public ProjectExplorer::ProcessExtraCompiler { Q_OBJECT public: QScxmlcGenerator(const ProjectExplorer::Project *project, const Utils::FileName &source, const Utils::FileNameList &targets, QObject *parent = 0); +protected: + Utils::FileName command() const override; + QStringList arguments() const override; + Utils::FileName workingDirectory() const override; + private: - void finishProcess(); - void run(const QByteArray &sourceContent) override; + Utils::FileName tmpFile() const; + QList<QByteArray> handleProcessFinished(QProcess *process) override; + bool prepareToRun(const QByteArray &sourceContents) override; + QList<ProjectExplorer::Task> parseIssues(const QByteArray &processStderr) override; - QProcess m_process; QTemporaryDir m_tmpdir; - void parseIssues(const QByteArray &processStderr); }; class QScxmlcGeneratorFactory : public ProjectExplorer::ExtraCompilerFactory |