Commit d24f7bb8 authored by Andrius Štikonas's avatar Andrius Štikonas

USe QDockWidget::toggleViewAction instead of KToggleAction.

When closing the dock this makes sure that action in the menu is unchecked.
parent 6ba4d4bf
......@@ -152,9 +152,10 @@ void KReversiMainWindow::setupActionsInit()
// Move history
// NOTE: read/write this from/to config file? Or not necessary?
m_showMovesAct = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-history")), i18n("Show Move History"), this);
m_showMovesAct = m_historyDock->toggleViewAction();
m_showMovesAct->setIcon(QIcon::fromTheme(QStringLiteral("view-history")));
m_showMovesAct->setText(i18n("Show Move History"));
actionCollection()->addAction(QStringLiteral("show_moves"), m_showMovesAct);
connect(m_showMovesAct, &KToggleAction::triggered, this, &KReversiMainWindow::slotShowMovesHistory);
}
void KReversiMainWindow::loadSettings()
......
......@@ -93,7 +93,7 @@ private:
QAction *m_hintAct;
KToggleAction *m_showLast;
KToggleAction *m_showLegal;
KToggleAction *m_showMovesAct;
QAction *m_showMovesAct;
KSelectAction *m_animSpeedAct;
KToggleAction *m_coloredChipsAct;
......
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