equal
deleted
inserted
replaced
138 { |
138 { |
139 public: |
139 public: |
140 QExternalTestPrivate() |
140 QExternalTestPrivate() |
141 : qtModules(QExternalTest::QtCore | QExternalTest::QtGui | QExternalTest::QtTest), |
141 : qtModules(QExternalTest::QtCore | QExternalTest::QtGui | QExternalTest::QtTest), |
142 appType(QExternalTest::AutoApplication), |
142 appType(QExternalTest::AutoApplication), |
143 debugMode(true), |
|
144 exitCode(-1) |
143 exitCode(-1) |
145 { |
144 { |
146 } |
145 } |
147 ~QExternalTestPrivate() |
146 ~QExternalTestPrivate() |
148 { |
147 { |
154 QList<QByteArray> qmakeLines; |
153 QList<QByteArray> qmakeLines; |
155 QStringList extraProgramSources; |
154 QStringList extraProgramSources; |
156 QByteArray programHeader; |
155 QByteArray programHeader; |
157 QExternalTest::QtModules qtModules; |
156 QExternalTest::QtModules qtModules; |
158 QExternalTest::ApplicationType appType; |
157 QExternalTest::ApplicationType appType; |
159 bool debugMode; |
|
160 |
158 |
161 QString temporaryDir; |
159 QString temporaryDir; |
162 QByteArray sourceCode; |
160 QByteArray sourceCode; |
163 QByteArray std_out; |
161 QByteArray std_out; |
164 QByteArray std_err; |
162 QByteArray std_err; |
186 } |
184 } |
187 |
185 |
188 QExternalTest::~QExternalTest() |
186 QExternalTest::~QExternalTest() |
189 { |
187 { |
190 delete d; |
188 delete d; |
191 } |
|
192 |
|
193 bool QExternalTest::isDebugMode() const |
|
194 { |
|
195 return d->debugMode; |
|
196 } |
|
197 |
|
198 void QExternalTest::setDebugMode(bool enable) |
|
199 { |
|
200 d->debugMode = enable; |
|
201 } |
189 } |
202 |
190 |
203 QList<QByteArray> QExternalTest::qmakeSettings() const |
191 QList<QByteArray> QExternalTest::qmakeSettings() const |
204 { |
192 { |
205 return d->qmakeLines; |
193 return d->qmakeLines; |
522 "SOURCES += project.cpp\n" |
510 "SOURCES += project.cpp\n" |
523 "QT -= core gui\n" |
511 "QT -= core gui\n" |
524 "INCLUDEPATH += . "); |
512 "INCLUDEPATH += . "); |
525 projectFile.write(QFile::encodeName(QDir::currentPath())); |
513 projectFile.write(QFile::encodeName(QDir::currentPath())); |
526 |
514 |
527 if (debugMode) |
515 #ifndef QT_NO_DEBUG |
528 projectFile.write("\nCONFIG += debug\n"); |
516 projectFile.write("\nCONFIG += debug\n"); |
529 else |
517 #else |
530 projectFile.write("\nCONFIG += release\n"); |
518 projectFile.write("\nCONFIG += release\n"); |
|
519 #endif |
531 |
520 |
532 QByteArray extraSources = QFile::encodeName(extraProgramSources.join(" ")); |
521 QByteArray extraSources = QFile::encodeName(extraProgramSources.join(" ")); |
533 if (!extraSources.isEmpty()) { |
522 if (!extraSources.isEmpty()) { |
534 projectFile.write("SOURCES += "); |
523 projectFile.write("SOURCES += "); |
535 projectFile.write(extraSources); |
524 projectFile.write(extraSources); |