| 156 | } |
| 157 | |
| 158 | bool TestFile::waitForParsed(int timeout) |
| 159 | { |
| 160 | Q_D(TestFile); |
| 161 | |
| 162 | if (!d->ready) { |
| 163 | // optimize: we don't want to wait the usual timeout before parsing documents here |
| 164 | ICore::self()->languageController()->backgroundParser()->parseDocuments(); |
| 165 | } |
| 166 | QElapsedTimer t; |
| 167 | t.start(); |
| 168 | while (!d->ready && t.elapsed() < timeout) { |
| 169 | QTest::qWait(10); |
| 170 | } |
| 171 | return d->ready; |
| 172 | } |
| 173 | |
| 174 | bool TestFile::isReady() const |
| 175 | { |
no test coverage detected