author | John Kern <johnk@symbian.org> |
Thu, 12 Aug 2010 17:06:22 -0700 | |
changeset 26 | d9f0df25b6a3 |
parent 2 | 6894bf2709c0 |
permissions | -rwxr-xr-x |
1 | 1 |
#include "BuildStatus.h" |
2 |
||
3 |
BuildStatus::BuildStatus(QObject *parent) |
|
4 |
{ |
|
5 |
setParent(parent); |
|
2
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
6 |
this->m_packageName = new QString("<unknown>"); |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
7 |
this->m_PresentStatus = new QString("Pass"); |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
8 |
this->m_status = true; |
1 | 9 |
} |
10 |
||
11 |
void BuildStatus::setTime(QDateTime w) |
|
12 |
{ |
|
13 |
this->m_when = w; |
|
14 |
} |
|
15 |
||
2
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
16 |
QString BuildStatus::time() |
1 | 17 |
{ |
18 |
return this->m_when.toString(); |
|
19 |
} |
|
20 |
||
21 |
void BuildStatus::setName(QString n) |
|
22 |
{ |
|
23 |
if (m_packageName) |
|
24 |
{ |
|
25 |
delete m_packageName; |
|
26 |
m_packageName = NULL; |
|
27 |
} |
|
28 |
m_packageName = new QString(n); |
|
29 |
} |
|
30 |
||
2
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
31 |
const QString *BuildStatus::name() |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
32 |
{ |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
33 |
return m_packageName; |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
34 |
} |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
35 |
|
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
36 |
void BuildStatus::setStatus (bool n ) |
1 | 37 |
{ |
2
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
38 |
m_status = n ; |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
39 |
if (!m_status) |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
40 |
{ |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
41 |
this->m_PresentStatus = new QString("Failed"); |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
42 |
} |
1 | 43 |
} |
2
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
44 |
|
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
45 |
|
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
46 |
const QString *BuildStatus::status() |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
47 |
{ |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
48 |
return this->m_PresentStatus; |
6894bf2709c0
add some regex to parse status information.
John Kern <johnk@symbian.org>
parents:
1
diff
changeset
|
49 |
} |