Skip to content

RunController: ignore projectConfigurationChanged signal

Igor Kushnir requested to merge work/dont-reread-launch-configs into master

No settings within the Configure Project dialog affect launch configurations. So no need to reread the configs and recreate the launches and their actions. I suppose project configuration did affect launch configurations in the past, but I don't see this in current code.

Project target combobox on the native app config page and available targets in suggestion submenus of "Add a new launch configuration" button are populated when a Launch Configurations dialog is created (each time it is shown).

Since 62ae1929 the projectConfigurationChanged signal is also emitted when a CMake import job finishes without error. This was done for the benefit of CompilerProvider and is useless to RunController. The same argument applies to emitting this signal when a Meson import job finishes without error (the code has been copied from cmake plugin to meson plugin).

Recreating the launches and their actions caused a crash when a folder that contained a target was excluded (filtered out) from the project and the Launch Configurations dialog with this target as the Project target of an existing configuration was shown before the CMake import job finished:

    #0 KDevelop::LaunchConfigurationsModel::data() at kdevelop/kdevplatform/shell/launchconfigurationdialog.cpp:611
    #1 QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const() at /usr/lib/libQt5Widgets.so.5
    #2 QStyledItemDelegate::paint(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const() at /usr/lib/libQt5Widgets.so.5
    #3 QTreeView::drawRow(QPainter*, QStyleOptionViewItem const&, QModelIndex const&) const() at /usr/lib/libQt5Widgets.so.5
    #4 QTreeView::drawTree(QPainter*, QRegion const&) const() at /usr/lib/libQt5Widgets.so.5
    #5 QTreeView::paintEvent(QPaintEvent*)() at /usr/lib/libQt5Widgets.so.5

BUG: 428560

FIXED-IN: 5.11.230400


Noticed this useless work and reproduced the crash while analyzing CMakeManager::reload().

Edited by Igor Kushnir

Merge request reports