aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/qconf.cc
diff options
context:
space:
mode:
authorBoris Barbulovski <bbarbulovski@gmail.com>2015-09-22 14:36:12 -0400
committerMichal Marek <mmarek@suse.com>2015-10-14 08:59:01 -0400
commit9c86235a19861155cdd81e0cb29f34cd0d07fbe2 (patch)
tree84f8948cce57818a62dc97c085952737014abcb7 /scripts/kconfig/qconf.cc
parent92298b496df10415b03574efee5fbba9ce8f5ca0 (diff)
Port xconfig to Qt5 - Update QAction checkable
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/kconfig/qconf.cc')
-rw-r--r--scripts/kconfig/qconf.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 6d32f3996ab6..c2f9767514de 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -817,28 +817,28 @@ void ConfigList::contextMenuEvent(QContextMenuEvent *e)
817 817
818 headerPopup = new QMenu(this); 818 headerPopup = new QMenu(this);
819 action = new QAction(_("Show Name"), this); 819 action = new QAction(_("Show Name"), this);
820 action->setToggleAction(TRUE); 820 action->setCheckable(TRUE);
821 connect(action, SIGNAL(toggled(bool)), 821 connect(action, SIGNAL(toggled(bool)),
822 parent(), SLOT(setShowName(bool))); 822 parent(), SLOT(setShowName(bool)));
823 connect(parent(), SIGNAL(showNameChanged(bool)), 823 connect(parent(), SIGNAL(showNameChanged(bool)),
824 action, SLOT(setOn(bool))); 824 action, SLOT(setOn(bool)));
825 action->setOn(showName); 825 action->setChecked(showName);
826 action->addTo(headerPopup); 826 action->addTo(headerPopup);
827 action = new QAction(_("Show Range"), this); 827 action = new QAction(_("Show Range"), this);
828 action->setToggleAction(TRUE); 828 action->setCheckable(TRUE);
829 connect(action, SIGNAL(toggled(bool)), 829 connect(action, SIGNAL(toggled(bool)),
830 parent(), SLOT(setShowRange(bool))); 830 parent(), SLOT(setShowRange(bool)));
831 connect(parent(), SIGNAL(showRangeChanged(bool)), 831 connect(parent(), SIGNAL(showRangeChanged(bool)),
832 action, SLOT(setOn(bool))); 832 action, SLOT(setOn(bool)));
833 action->setOn(showRange); 833 action->setChecked(showRange);
834 action->addTo(headerPopup); 834 action->addTo(headerPopup);
835 action = new QAction( _("Show Data"), this); 835 action = new QAction( _("Show Data"), this);
836 action->setToggleAction(TRUE); 836 action->setCheckable(TRUE);
837 connect(action, SIGNAL(toggled(bool)), 837 connect(action, SIGNAL(toggled(bool)),
838 parent(), SLOT(setShowData(bool))); 838 parent(), SLOT(setShowData(bool)));
839 connect(parent(), SIGNAL(showDataChanged(bool)), 839 connect(parent(), SIGNAL(showDataChanged(bool)),
840 action, SLOT(setOn(bool))); 840 action, SLOT(setOn(bool)));
841 action->setOn(showData); 841 action->setChecked(showData);
842 action->addTo(headerPopup); 842 action->addTo(headerPopup);
843 } 843 }
844 headerPopup->exec(e->globalPos()); 844 headerPopup->exec(e->globalPos());
@@ -1161,10 +1161,10 @@ QMenu* ConfigInfoView::createStandardContextMenu(const QPoint & pos)
1161{ 1161{
1162 QMenu* popup = Parent::createStandardContextMenu(pos); 1162 QMenu* popup = Parent::createStandardContextMenu(pos);
1163 QAction* action = new QAction(_("Show Debug Info"), popup); 1163 QAction* action = new QAction(_("Show Debug Info"), popup);
1164 action->setToggleAction(TRUE); 1164 action->setCheckable(TRUE);
1165 connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); 1165 connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
1166 connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); 1166 connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool)));
1167 action->setOn(showDebug()); 1167 action->setChecked(showDebug());
1168 popup->addSeparator(); 1168 popup->addSeparator();
1169 action->addTo(popup); 1169 action->addTo(popup);
1170 return popup; 1170 return popup;
@@ -1337,20 +1337,20 @@ ConfigMainWindow::ConfigMainWindow(void)
1337 connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView())); 1337 connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView()));
1338 1338
1339 QAction *showNameAction = new QAction(_("Show Name"), this); 1339 QAction *showNameAction = new QAction(_("Show Name"), this);
1340 showNameAction->setToggleAction(TRUE); 1340 showNameAction->setCheckable(TRUE);
1341 connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); 1341 connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool)));
1342 connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool))); 1342 connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool)));
1343 showNameAction->setOn(configView->showName()); 1343 showNameAction->setChecked(configView->showName());
1344 QAction *showRangeAction = new QAction(_("Show Range"), this); 1344 QAction *showRangeAction = new QAction(_("Show Range"), this);
1345 showRangeAction->setToggleAction(TRUE); 1345 showRangeAction->setCheckable(TRUE);
1346 connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); 1346 connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool)));
1347 connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool))); 1347 connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool)));
1348 showRangeAction->setOn(configList->showRange); 1348 showRangeAction->setChecked(configList->showRange);
1349 QAction *showDataAction = new QAction(_("Show Data"), this); 1349 QAction *showDataAction = new QAction(_("Show Data"), this);
1350 showDataAction->setToggleAction(TRUE); 1350 showDataAction->setCheckable(TRUE);
1351 connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); 1351 connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool)));
1352 connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool))); 1352 connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool)));
1353 showDataAction->setOn(configList->showData); 1353 showDataAction->setChecked(configList->showData);
1354 1354
1355 QActionGroup *optGroup = new QActionGroup(this); 1355 QActionGroup *optGroup = new QActionGroup(this);
1356 optGroup->setExclusive(TRUE); 1356 optGroup->setExclusive(TRUE);
@@ -1362,18 +1362,18 @@ ConfigMainWindow::ConfigMainWindow(void)
1362 configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); 1362 configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup);
1363 configView->showAllAction = new QAction(_("Show All Options"), optGroup); 1363 configView->showAllAction = new QAction(_("Show All Options"), optGroup);
1364 configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); 1364 configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup);
1365 configView->showNormalAction->setToggleAction(TRUE); 1365 configView->showNormalAction->setCheckable(TRUE);
1366 configView->showNormalAction->setOn(configList->optMode == normalOpt); 1366 configView->showNormalAction->setChecked(configList->optMode == normalOpt);
1367 configView->showAllAction->setToggleAction(TRUE); 1367 configView->showAllAction->setCheckable(TRUE);
1368 configView->showAllAction->setOn(configList->optMode == allOpt); 1368 configView->showAllAction->setChecked(configList->optMode == allOpt);
1369 configView->showPromptAction->setToggleAction(TRUE); 1369 configView->showPromptAction->setCheckable(TRUE);
1370 configView->showPromptAction->setOn(configList->optMode == promptOpt); 1370 configView->showPromptAction->setChecked(configList->optMode == promptOpt);
1371 1371
1372 QAction *showDebugAction = new QAction( _("Show Debug Info"), this); 1372 QAction *showDebugAction = new QAction( _("Show Debug Info"), this);
1373 showDebugAction->setToggleAction(TRUE); 1373 showDebugAction->setCheckable(TRUE);
1374 connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); 1374 connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool)));
1375 connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool))); 1375 connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool)));
1376 showDebugAction->setOn(helpText->showDebug()); 1376 showDebugAction->setChecked(helpText->showDebug());
1377 1377
1378 QAction *showIntroAction = new QAction( _("Introduction"), this); 1378 QAction *showIntroAction = new QAction( _("Introduction"), this);
1379 connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro())); 1379 connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));