summaryrefslogtreecommitdiff
path: root/src/lib/buildgraph/executor.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2012-11-16 14:15:41 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2012-11-27 15:36:27 +0100
commitee7b117b62d220e7ea3f38168ef5e07bd41786d6 (patch)
tree37d952ac2479f929746a0307ff51309dda1b6d22 /src/lib/buildgraph/executor.h
parent6d6714519cb3e292d52b3ad684201950a01f7c7f (diff)
downloadqbs-ee7b117b62d220e7ea3f38168ef5e07bd41786d6.tar.gz
Make the public API asynchronous.
This simplifies things a lot for IDEs, which are no longer forced to run a dedicated thread for a QbsEngine, as everything on the calling side can now happen in the main loop. Getting rid of blocking operations also allows for more flexibility in that it is now possible to load one project while another is building etc. This patch also moves all the high-level types into src/lib/api/. Until now, they were scattered around language/ and tools/, where they do not belong. Very few things had to be touched in the back-end; most notable is the fact that BuildGraph's ScriptEngine is now settable, because we must exchange it between resolving and building, as the former operation runs in its own thread. Change-Id: I5c8a7cc3517ebc2489678c0d5b1068972997e930 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/buildgraph/executor.h')
-rw-r--r--src/lib/buildgraph/executor.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/buildgraph/executor.h b/src/lib/buildgraph/executor.h
index 08d65efc9..e6365e044 100644
--- a/src/lib/buildgraph/executor.h
+++ b/src/lib/buildgraph/executor.h
@@ -41,20 +41,18 @@
#include <QVariant>
namespace qbs {
-class ProgressObserver;
-
namespace Internal {
-
class AutoMoc;
class ExecutorJob;
class InputArtifactScannerContext;
+class ProgressObserver;
class ScanResultCache;
class Executor : public QObject
{
Q_OBJECT
public:
- Executor();
+ Executor(QObject *parent = 0);
~Executor();
void build(const QList<BuildProduct::Ptr> &productsToBuild);
@@ -78,7 +76,7 @@ public:
BuildResult buildResult() const { return m_buildResult; }
signals:
- void error();
+ void error(const Error &error);
void finished();
private slots:
@@ -101,7 +99,7 @@ private:
void finish();
void initializeArtifactsState();
void setState(ExecutorState);
- void setError(const QString &errorMessage);
+ void setError(const Error &e);
void addExecutorJobs(int jobNumber);
void removeExecutorJobs(int jobNumber);
void runAutoMoc();