From kde-commits Mon Nov 21 18:41:56 2016 From: Christian Ehrlicher Date: Mon, 21 Nov 2016 18:41:56 +0000 To: kde-commits Subject: [kcachegrind] kcachegrind: KDE runtime warnings-- (Use KActionCollaction::setDefaultShortcut instead Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=147975372729510 Git commit 5485d86cc349e4a8059e3b755a30c508dcfbddb9 by Christian Ehrlicher. Committed on 21/11/2016 at 18:41. Pushed by chehrlic into branch 'master'. KDE runtime warnings-- (Use KActionCollaction::setDefaultShortcut instead Q= Action::setShortcut) REVIEW: 129430 M +8 -8 kcachegrind/toplevel.cpp http://commits.kde.org/kcachegrind/5485d86cc349e4a8059e3b755a30c508dcfbddb9 diff --git a/kcachegrind/toplevel.cpp b/kcachegrind/toplevel.cpp index 0c3ebfe..8567af7 100644 --- a/kcachegrind/toplevel.cpp +++ b/kcachegrind/toplevel.cpp @@ -376,7 +376,7 @@ void TopLevel::createLayoutActions() action =3D actionCollection()->addAction( QStringLiteral("layout_duplica= te") ); action->setText( i18n( "&Duplicate" ) ); connect(action, &QAction::triggered, this, &TopLevel::layoutDuplicate); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus)); + actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Q= t::Key_Plus)); hint =3D i18n("Duplicate Current Layout" "

Make a copy of the current layout.

"); action->setWhatsThis( hint ); @@ -391,14 +391,14 @@ void TopLevel::createLayoutActions() action =3D actionCollection()->addAction( QStringLiteral("layout_next") = ); action->setText( i18n( "&Go to Next" ) ); connect(action, &QAction::triggered, this, &TopLevel::layoutNext); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Right)); + actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Q= t::Key_Right)); hint =3D i18n("Go to Next Layout"); action->setWhatsThis( hint ); = action =3D actionCollection()->addAction( QStringLiteral("layout_previou= s") ); action->setText( i18n( "&Go to Previous" ) ); connect(action, &QAction::triggered, this, &TopLevel::layoutPrevious); - action->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Left)); + actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Q= t::Key_Left)); hint =3D i18n("Go to Previous Layout"); action->setWhatsThis( hint ); = @@ -436,7 +436,7 @@ void TopLevel::createMiscActions() action->setIcon( QIcon::fromTheme(QStringLiteral("view-refresh")) ); action->setText( i18nc("Reload a document", "&Reload" ) ); connect(action, &QAction::triggered, this, &TopLevel::reload); - action->setShortcuts(KStandardShortcut::shortcut(KStandardShortcut::Relo= ad)); + actionCollection()->setDefaultShortcut(action, KStandardShortcut::Reload= ); hint =3D i18n("Reload Profile Data" "

This loads any new created parts, too.

"); action->setWhatsThis( hint ); @@ -455,7 +455,7 @@ void TopLevel::createMiscActions() _taDump->setIcon( QIcon::fromTheme(QStringLiteral("edit-redo")) ); _taDump->setText( i18n( "&Force Dump" ) ); connect(_taDump, &QAction::triggered, this, &TopLevel::forceTrace); - _taDump->setShortcut(QKeySequence::Undo); + actionCollection()->setDefaultShortcut(_taDump, QKeySequence::Undo); hint =3D i18n("Force Dump" "

This forces a dump for a Callgrind profile run " "in the current directory. This action is checked while " @@ -598,10 +598,10 @@ void TopLevel::createMiscActions() = _paUp =3D new KToolBarPopupAction( QIcon::fromTheme( QStringLiteral("go-= up") ), i18n( "&Up" ), this ); - _paUp->setShortcut( QKeySequence(Qt::ALT + Qt::Key_Up) ); connect( _paUp, &QAction::triggered, _stackSelection, &StackSelection::browserUp ); actionCollection()->addAction( QStringLiteral("go_up"), _paUp ); + actionCollection()->setDefaultShortcut(_paUp, QKeySequence(Qt::ALT + Qt:= :Key_Up)); connect( _paUp->menu(), &QMenu::aboutToShow, this, &TopLevel::upAboutToShow ); connect( _paUp->menu(), &QMenu::triggered, @@ -615,10 +615,10 @@ void TopLevel::createMiscActions() QPair< KGuiItem, KGuiItem > backForward =3D KStandardGuiItem::backAndFor= ward(); _paBack =3D new KToolBarPopupAction( backForward.first.icon(), backForward.first.text(), this ); - _paBack->setShortcut( QKeySequence(Qt::ALT+Qt::Key_Left) ); connect( _paBack, &QAction::triggered, _stackSelection, &StackSelection::browserBack ); actionCollection()->addAction( QStringLiteral("go_back"), _paBack ); + actionCollection()->setDefaultShortcut(_paBack, QKeySequence(Qt::ALT + Q= t::Key_Left)); connect( _paBack->menu(), &QMenu::aboutToShow, this, &TopLevel::backAboutToShow ); connect( _paBack->menu(), &QMenu::triggered, @@ -629,10 +629,10 @@ void TopLevel::createMiscActions() = _paForward =3D new KToolBarPopupAction( backForward.second.icon(), backForward.second.text(), this ); - _paForward->setShortcut( QKeySequence(Qt::ALT+Qt::Key_Right) ); connect( _paForward, &QAction::triggered, _stackSelection, &StackSelection::browserForward ); actionCollection()->addAction( QStringLiteral("go_forward"), _paForward = ); + actionCollection()->setDefaultShortcut(_paForward, QKeySequence(Qt::ALT = + Qt::Key_Right)); connect( _paForward->menu(), &QMenu::aboutToShow, this, &TopLevel::forwardAboutToShow ); connect( _paForward->menu(), &QMenu::triggered,