Commit e6ee67c2 authored by Dan Weatherill's avatar Dan Weatherill Committed by Kevin Funk

work around bug in kLineEdit

a bug in kLineEdit causes spurious emission of textEdited signals when calling setText().

This in turn causes spurious calls of compilerEdited() when selecting a compiler in the compilers window,
 which leads to a segfault (e.g. this bug and I think some duplicates also.

I have submitted also a patch to kcompletion,

This is a workaround for those systems until that is fixed

Reviewers: #kdevelop, apol, mwolff

Reviewed By: #kdevelop, mwolff

Subscribers: mwolff, anthonyfieroni, kdevelop-devel

Tags: #kdevelop

Differential Revision:
BUG: 373004
FIXED-IN: 5.2.2
parent 2adeca0d
......@@ -25,6 +25,7 @@
#include <QTest>
#include <QTemporaryFile>
#include <QSignalBlocker>
#include <tests/autotestshell.h>
#include <tests/testcore.h>
......@@ -33,6 +33,7 @@
#include <QKeySequence>
#include <QMenu>
#include <QSignalMapper>
#include <QSignalBlocker>
#include "ui_compilerswidget.h"
#include "compilersmodel.h"
......@@ -162,7 +163,15 @@ void CompilersWidget::compilerSelected(const QModelIndex& index)
auto compiler =;
if (compiler.value<CompilerPointer>()) {
//NOTE: there is a bug in kLineEdit, which causes textEdited signal to be
// spuriously emitted on calling setText(). See bug report here:
// The resulting spurious call of compilerEdited then fails with an assert.
//Work around this bug until it is fixed upstream by disabling signals here
const QSignalBlocker blocker(m_ui->compilerPath);
} else {
......@@ -194,6 +203,10 @@ void CompilersWidget::enableItems(bool enable)
if(!enable) {
//NOTE: this is to work around the
//spurious signal bug in kLineEdit
const QSignalBlocker blocker(m_ui->compilerPath);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment