]> git.tdb.fi Git - builder.git/blob - source/internalaction.cpp
Replace per-file copyright notices with a single file
[builder.git] / source / internalaction.cpp
1 #include "internalaction.h"
2
3 InternalAction::InternalAction(Builder &b):
4         Action(b),
5         worker(0)
6 { }
7
8 InternalAction::~InternalAction()
9 {
10         delete worker;
11 }
12
13 int InternalAction::check()
14 {
15         if(!worker)  // True for dry run
16         {
17                 signal_done.emit();
18                 return 0;
19         }
20
21         if(worker->get_done())
22         {
23                 signal_done.emit();
24                 worker->join();
25                 return worker->get_error()?1:0;
26         }
27
28         return -1;
29 }
30
31
32 InternalAction::Worker::Worker():
33         done(false),
34         error(false)
35 { }