[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kcachegrind] kcachegrind: KDE runtime warnings-- (Use KActionCollaction::setDefaultShortcut instead
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2016-11-21 18:41:56
Message-ID: E1c8tXQ-0002si-Ti () code ! kde ! org
[Download RAW message or body]

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 QAction::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 = actionCollection()->addAction( QStringLiteral("layout_duplicate") );
   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 + Qt::Key_Plus));
   hint = i18n("<b>Duplicate Current Layout</b>"
               "<p>Make a copy of the current layout.</p>");
   action->setWhatsThis( hint );
@@ -391,14 +391,14 @@ void TopLevel::createLayoutActions()
   action = 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 + Qt::Key_Right));
   hint = i18n("Go to Next Layout");
   action->setWhatsThis( hint );
 
   action = actionCollection()->addAction( QStringLiteral("layout_previous") );
   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 + Qt::Key_Left));
   hint = 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::Reload));
+  actionCollection()->setDefaultShortcut(action, KStandardShortcut::Reload);
   hint = i18n("<b>Reload Profile Data</b>"
               "<p>This loads any new created parts, too.</p>");
   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 = i18n("<b>Force Dump</b>"
               "<p>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 = 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 = KStandardGuiItem::backAndForward();
   _paBack = 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 + Qt::Key_Left));
   connect( _paBack->menu(), &QMenu::aboutToShow,
            this, &TopLevel::backAboutToShow );
   connect( _paBack->menu(), &QMenu::triggered,
@@ -629,10 +629,10 @@ void TopLevel::createMiscActions()
 
   _paForward = 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,
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic