diff --git a/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.cpp b/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.cpp --- a/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.cpp +++ b/plugins/custom-definesandincludes/compilerprovider/widget/compilerswidget.cpp @@ -162,7 +162,16 @@ auto compiler = index.data(CompilersModel::CompilerDataRole); if (compiler.value()) { m_ui->compilerName->setText(compiler.value()->name()); + + //NOTE: there is a bug in kLineEdit, which causes textEdited signal to be + // spuriously emitted on calling setText(). See bug report here: + // https://bugs.kde.org/show_bug.cgi?id=388798 + // The resulting spurious call of compilerEdited then fails with an assert. + //Work around this bug until it is fixed upstream by disabling signals here + m_ui->compilerPath->blockSignals(true); m_ui->compilerPath->setText(compiler.value()->path()); + m_ui->compilerPath->blockSignals(false); + enableItems(true); } else { enableItems(false); @@ -194,7 +203,12 @@ if(!enable) { m_ui->compilerName->clear(); + + //NOTE: this is to work around the + //spurious signal bug in kLineEdit + m_ui->compilerPath->blockSignals(true); m_ui->compilerPath->clear(); + m_ui->compilerPath->blockSignals(false); } }