lightpreview: note some threading bugs

This commit is contained in:
Eric Wasylishen 2023-09-03 12:46:39 -06:00
parent 43c24bc181
commit 5c285052d1
1 changed files with 3 additions and 0 deletions

View File

@ -709,16 +709,19 @@ int MainWindow::compileMap(const QString &file, bool is_reload)
m_bspdata.loadversion->game->init_filesystem(file.toStdString(), settings);
}
} catch (const settings::parse_exception &p) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;
return 1;
} catch (const settings::quit_after_help_exception &p) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(p.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;
return 1;
} catch (const std::exception &other) {
// FIXME: threading error: don't call Qt widgets code from background thread
auto *textEdit = m_outputLogWidget->textEdit(m_activeLogTab);
textEdit->append(QString::fromUtf8(other.what()) + QString::fromLatin1("\n"));
m_activeLogTab = ETLogTab::TAB_LIGHTPREVIEW;