Skip to content

Commit 4cf1212

Browse files
committed
Fix #13737 (GUI: should not timeout when premiumaddon takes more than 30 seconds)
1 parent 43bbfa2 commit 4cf1212

15 files changed

Lines changed: 2343 additions & 2340 deletions

gui/checkthread.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ int CheckThread::executeCommand(std::string exe, std::vector<std::string> args,
9090
}
9191

9292
process.start(e, args2);
93-
process.waitForFinished();
93+
while (!Settings::terminated() && !process.waitForFinished(1000)) {
94+
if (process.state() == QProcess::ProcessState::NotRunning)
95+
break;
96+
}
9497

9598
if (redirect == "2>&1") {
9699
QString s1 = process.readAllStandardOutput();
@@ -151,7 +154,7 @@ void CheckThread::run()
151154
QString file = mResult.getNextFile();
152155
while (!file.isEmpty() && mState == Running) {
153156
qDebug() << "Checking file" << file;
154-
cppcheck.check(FileWithDetails(file.toStdString()));
157+
cppcheck.check(FileWithDetails(file.toStdString(), Path::identify(file.toStdString(), mSettings.cppHeaderProbe), 0));
155158
runAddonsAndTools(mSettings, nullptr, file);
156159
emit fileChecked(file);
157160

gui/cppcheck_de.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_es.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_fi.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_fr.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_it.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_ja.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_ka.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_ko.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

gui/cppcheck_nl.ts

Lines changed: 167 additions & 167 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)