Skip to content

Commit a215278

Browse files
masahir0ygregkh
authored andcommitted
kconfig: qconf: fix signal connection to invalid slots
[ Upstream commit d85de33 ] If you right-click in the ConfigList window, you will see the following messages in the console: QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:888 QObject::connect: (sender name: 'config') QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:897 QObject::connect: (sender name: 'config') QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:906 QObject::connect: (sender name: 'config') Right, there is no such slot in QAction. I think this is a typo of setChecked. Due to this bug, when you toggled the menu "Option->Show Name/Range/Data" the state of the context menu was not previously updated. Fix this. Fixes: d5d973c ("Port xconfig to Qt5 - Put back some of the old implementation(part 2)") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f0a4033 commit a215278

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

scripts/kconfig/qconf.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
878878
connect(action, SIGNAL(toggled(bool)),
879879
parent(), SLOT(setShowName(bool)));
880880
connect(parent(), SIGNAL(showNameChanged(bool)),
881-
action, SLOT(setOn(bool)));
881+
action, SLOT(setChecked(bool)));
882882
action->setChecked(showName);
883883
headerPopup->addAction(action);
884884

@@ -887,7 +887,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
887887
connect(action, SIGNAL(toggled(bool)),
888888
parent(), SLOT(setShowRange(bool)));
889889
connect(parent(), SIGNAL(showRangeChanged(bool)),
890-
action, SLOT(setOn(bool)));
890+
action, SLOT(setChecked(bool)));
891891
action->setChecked(showRange);
892892
headerPopup->addAction(action);
893893

@@ -896,7 +896,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
896896
connect(action, SIGNAL(toggled(bool)),
897897
parent(), SLOT(setShowData(bool)));
898898
connect(parent(), SIGNAL(showDataChanged(bool)),
899-
action, SLOT(setOn(bool)));
899+
action, SLOT(setChecked(bool)));
900900
action->setChecked(showData);
901901
headerPopup->addAction(action);
902902
}
@@ -1228,7 +1228,7 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
12281228

12291229
action->setCheckable(true);
12301230
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
1231-
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
1231+
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setChecked(bool)));
12321232
action->setChecked(showDebug());
12331233
popup->addSeparator();
12341234
popup->addAction(action);

0 commit comments

Comments
 (0)