Skip to content

Commit d85de33

Browse files
committed
kconfig: qconf: fix signal connection to invalid slots
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 <[email protected]>
1 parent e29a6d6 commit d85de33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/kconfig/qconf.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
885885
connect(action, SIGNAL(toggled(bool)),
886886
parent(), SLOT(setShowName(bool)));
887887
connect(parent(), SIGNAL(showNameChanged(bool)),
888-
action, SLOT(setOn(bool)));
888+
action, SLOT(setChecked(bool)));
889889
action->setChecked(showName);
890890
headerPopup->addAction(action);
891891

@@ -894,7 +894,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
894894
connect(action, SIGNAL(toggled(bool)),
895895
parent(), SLOT(setShowRange(bool)));
896896
connect(parent(), SIGNAL(showRangeChanged(bool)),
897-
action, SLOT(setOn(bool)));
897+
action, SLOT(setChecked(bool)));
898898
action->setChecked(showRange);
899899
headerPopup->addAction(action);
900900

@@ -903,7 +903,7 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
903903
connect(action, SIGNAL(toggled(bool)),
904904
parent(), SLOT(setShowData(bool)));
905905
connect(parent(), SIGNAL(showDataChanged(bool)),
906-
action, SLOT(setOn(bool)));
906+
action, SLOT(setChecked(bool)));
907907
action->setChecked(showData);
908908
headerPopup->addAction(action);
909909
}
@@ -1275,7 +1275,7 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
12751275

12761276
action->setCheckable(true);
12771277
connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
1278-
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
1278+
connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setChecked(bool)));
12791279
action->setChecked(showDebug());
12801280
popup->addSeparator();
12811281
popup->addAction(action);

0 commit comments

Comments
 (0)