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

List:       kde-commits
Subject:    [kphotoalbum] MainWindow: Fixed depreceated direct setShortcut() calls for MainWindow::Window.
From:       Tobias Leupold <tobias.leupold () web ! de>
Date:       2016-08-14 17:43:29
Message-ID: E1bYzRZ-0004LZ-Ul () code ! kde ! org
[Download RAW message or body]

Git commit 999b74dc26b244c592f8e62d245a46e0cc0efa0e by Tobias Leupold.
Committed on 14/08/2016 at 17:42.
Pushed by tleupold into branch 'master'.

Fixed depreceated direct setShortcut() calls for MainWindow::Window.

M  +15   -15   MainWindow/Window.cpp

http://commits.kde.org/kphotoalbum/999b74dc26b244c592f8e62d245a46e0cc0efa0e

diff --git a/MainWindow/Window.cpp b/MainWindow/Window.cpp
index 0acba15..f1b8887 100644
--- a/MainWindow/Window.cpp
+++ b/MainWindow/Window.cpp
@@ -709,7 +709,7 @@ void MainWindow::Window::setupMenuBar()
     a->setEnabled( false );
 
     a = KStandardAction::home( m_browser, SLOT(home()), actionCollection() );
-    a->setShortcut( Qt::CTRL + Qt::Key_Home );
+    actionCollection()->setDefaultShortcut(a, Qt::CTRL + Qt::Key_Home);
     connect(a, &QAction::triggered, m_dateBar, &DateBar::DateBarWidget::clearSelection);
 
     a = KStandardAction::redisplay( m_browser, SLOT(go()), actionCollection() );
@@ -724,7 +724,7 @@ void MainWindow::Window::setupMenuBar()
     m_deleteSelected = actionCollection()->addAction(QString::fromLatin1("deleteSelected"));
     m_deleteSelected->setText( i18nc("Delete selected images", "Delete Selected" ) );
     m_deleteSelected->setIcon( QIcon::fromTheme( QString::fromLatin1("edit-delete") ) );
-    m_deleteSelected->setShortcut( Qt::Key_Delete );
+    actionCollection()->setDefaultShortcut(m_deleteSelected, Qt::Key_Delete);
     connect(m_deleteSelected, &QAction::triggered, this, &Window::slotDeleteSelected);
 
     a = actionCollection()->addAction(QString::fromLatin1("removeTokens"), this, \
SLOT(slotRemoveTokens())); @@ -736,37 +736,37 @@ void MainWindow::Window::setupMenuBar()
 
     m_configOneAtATime = actionCollection()->addAction( QString::fromLatin1("oneProp"), this, \
SLOT(slotConfigureImagesOneAtATime()) );  m_configOneAtATime->setText( i18n( "Annotate Individual Items" \
                ) );
-    m_configOneAtATime->setShortcut(  Qt::CTRL+Qt::Key_1 );
+    actionCollection()->setDefaultShortcut(m_configOneAtATime, Qt::CTRL + Qt::Key_1);
 
     m_configAllSimultaniously = actionCollection()->addAction( QString::fromLatin1("allProp"), this, \
                SLOT(slotConfigureAllImages()) );
     m_configAllSimultaniously->setText( i18n( "Annotate Multiple Items at a Time" ) );
-    m_configAllSimultaniously->setShortcut(  Qt::CTRL+Qt::Key_2 );
+    actionCollection()->setDefaultShortcut(m_configAllSimultaniously, Qt::CTRL + Qt::Key_2);
 
     m_createImageStack = actionCollection()->addAction( QString::fromLatin1("createImageStack"), this, \
SLOT(slotCreateImageStack()) );  m_createImageStack->setText( i18n("Merge Images into a Stack") );
-    m_createImageStack->setShortcut( Qt::CTRL + Qt::Key_3 );
+    actionCollection()->setDefaultShortcut(m_createImageStack, Qt::CTRL + Qt::Key_3);
 
     m_unStackImages = actionCollection()->addAction( QString::fromLatin1("unStackImages"), this, \
SLOT(slotUnStackImages()) );  m_unStackImages->setText( i18n("Remove Images from Stack") );
 
     m_setStackHead = actionCollection()->addAction( QString::fromLatin1("setStackHead"), this, \
SLOT(slotSetStackHead()) );  m_setStackHead->setText( i18n("Set as First Image in Stack") );
-    m_setStackHead->setShortcut( Qt::CTRL + Qt::Key_4 );
+    actionCollection()->setDefaultShortcut(m_setStackHead, Qt::CTRL + Qt::Key_4);
 
     m_rotLeft = actionCollection()->addAction( QString::fromLatin1("rotateLeft"), this, \
SLOT(slotRotateSelectedLeft()) );  m_rotLeft->setText( i18n( "Rotate counterclockwise" ) );
-    m_rotLeft->setShortcut( Qt::Key_7 );
+    actionCollection()->setDefaultShortcut(m_rotLeft, Qt::Key_7);
 
 
     m_rotRight = actionCollection()->addAction( QString::fromLatin1("rotateRight"), this, \
SLOT(slotRotateSelectedRight()) );  m_rotRight->setText( i18n( "Rotate clockwise" ) );
-    m_rotRight->setShortcut( Qt::Key_9 );
+    actionCollection()->setDefaultShortcut(m_rotRight, Qt::Key_9);
 
 
     // The Images menu
     m_view = actionCollection()->addAction( QString::fromLatin1("viewImages"), this, SLOT(slotView()) );
     m_view->setText( i18n("View") );
-    m_view->setShortcut(  Qt::CTRL+Qt::Key_I );
+    actionCollection()->setDefaultShortcut(m_view, Qt::CTRL + Qt::Key_I);
 
     m_viewInNewWindow = actionCollection()->addAction( QString::fromLatin1("viewImagesNewWindow"), this, \
SLOT(slotViewNewWindow()) );  m_viewInNewWindow->setText( i18n("View (In New Window)") );
@@ -774,7 +774,7 @@ void MainWindow::Window::setupMenuBar()
     m_runSlideShow = actionCollection()->addAction( QString::fromLatin1("runSlideShow"), this, \
SLOT(slotRunSlideShow()) );  m_runSlideShow->setText( i18n("Run Slide Show") );
     m_runSlideShow->setIcon( QIcon::fromTheme( QString::fromLatin1("view-presentation") ) );
-    m_runSlideShow->setShortcut( Qt::CTRL+Qt::Key_R );
+    actionCollection()->setDefaultShortcut(m_runSlideShow, Qt::CTRL + Qt::Key_R);
 
     m_runRandomSlideShow = actionCollection()->addAction( QString::fromLatin1("runRandomizedSlideShow"), \
this, SLOT(slotRunRandomizedSlideShow()) );  m_runRandomSlideShow->setText( i18n( "Run Randomized Slide \
Show" ) ); @@ -811,7 +811,7 @@ void MainWindow::Window::setupMenuBar()
 
     m_jumpToContext = actionCollection()->addAction( QString::fromLatin1("jumpToContext"), this, \
SLOT(slotJumpToContext()) );  m_jumpToContext->setText( i18n("Jump to Context") );
-    m_jumpToContext->setShortcut(  Qt::CTRL+Qt::Key_J );
+    actionCollection()->setDefaultShortcut(m_jumpToContext, Qt::CTRL + Qt::Key_J);
     m_jumpToContext->setIcon( QIcon::fromTheme( QString::fromLatin1( "kphotoalbum" ) ) ); // icon \
suggestion: go-jump (don't know the exact meaning though, so I didn't replace it right away  
     m_lock = actionCollection()->addAction( QString::fromLatin1("lockToDefaultScope"), this, \
SLOT(lockToDefaultScope()) ); @@ -822,7 +822,7 @@ void MainWindow::Window::setupMenuBar()
 
     a = actionCollection()->addAction( QString::fromLatin1("changeScopePasswd"), this, \
SLOT(changePassword()) );  a->setText( i18n("Change Password...") );
-    a->setShortcut( 0 );
+    actionCollection()->setDefaultShortcut(a, 0);
 
     m_setDefaultPos = actionCollection()->addAction( QString::fromLatin1("setDefaultScopePositive"), \
this, SLOT(setDefaultScopePositive()) );  m_setDefaultPos->setText( i18n("Lock Away All Other Items") );
@@ -920,7 +920,7 @@ void MainWindow::Window::setupMenuBar()
 
     a = actionCollection()->add<KToggleAction>( QString::fromLatin1("showToolTipOnImages") );
     a->setText( i18n("Show Tooltips in Thumbnails Window") );
-    a->setShortcut( Qt::CTRL+Qt::Key_T );
+    actionCollection()->setDefaultShortcut(a, Qt::CTRL + Qt::Key_T);
     connect(a, &QAction::toggled, m_thumbnailView, \
&ThumbnailView::ThumbnailFacade::showToolTipsOnImages);  
 
@@ -943,11 +943,11 @@ void MainWindow::Window::setupMenuBar()
 
     m_useNextVideoThumbnail = actionCollection()->addAction( \
QString::fromLatin1("useNextVideoThumbnail"), this, SLOT(useNextVideoThumbnail()));  \
                m_useNextVideoThumbnail->setText(i18n("Use next video thumbnail"));
-    m_useNextVideoThumbnail->setShortcut(Qt::CTRL + Qt::Key_Plus);
+    actionCollection()->setDefaultShortcut(m_useNextVideoThumbnail, Qt::CTRL + Qt::Key_Plus);
 
     m_usePreviousVideoThumbnail = actionCollection()->addAction( \
                QString::fromLatin1("usePreviousVideoThumbnail"), this, \
                SLOT(usePreviousVideoThumbnail()));
     m_usePreviousVideoThumbnail->setText(i18n("Use previous video thumbnail"));
-    m_usePreviousVideoThumbnail->setShortcut(Qt::CTRL + Qt::Key_Minus);
+    actionCollection()->setDefaultShortcut(m_usePreviousVideoThumbnail, Qt::CTRL + Qt::Key_Minus);
 
     createGUI( QString::fromLatin1( "kphotoalbumui.rc" ) );
 }


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

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