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 =3D 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::cl= earSelection); = a =3D KStandardAction::redisplay( m_browser, SLOT(go()), actionCollect= ion() ); @@ -724,7 +724,7 @@ void MainWindow::Window::setupMenuBar() m_deleteSelected =3D actionCollection()->addAction(QString::fromLatin1= ("deleteSelected")); m_deleteSelected->setText( i18nc("Delete selected images", "Delete Sel= ected" ) ); m_deleteSelected->setIcon( QIcon::fromTheme( QString::fromLatin1("edit= -delete") ) ); - m_deleteSelected->setShortcut( Qt::Key_Delete ); + actionCollection()->setDefaultShortcut(m_deleteSelected, Qt::Key_Delet= e); connect(m_deleteSelected, &QAction::triggered, this, &Window::slotDele= teSelected); = a =3D actionCollection()->addAction(QString::fromLatin1("removeTokens"= ), this, SLOT(slotRemoveTokens())); @@ -736,37 +736,37 @@ void MainWindow::Window::setupMenuBar() = m_configOneAtATime =3D actionCollection()->addAction( QString::fromLat= in1("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 =3D 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 =3D actionCollection()->addAction( QString::fromLat= in1("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 =3D actionCollection()->addAction( QString::fromLatin1= ("unStackImages"), this, SLOT(slotUnStackImages()) ); m_unStackImages->setText( i18n("Remove Images from Stack") ); = m_setStackHead =3D 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 =3D actionCollection()->addAction( QString::fromLatin1("rota= teLeft"), this, SLOT(slotRotateSelectedLeft()) ); m_rotLeft->setText( i18n( "Rotate counterclockwise" ) ); - m_rotLeft->setShortcut( Qt::Key_7 ); + actionCollection()->setDefaultShortcut(m_rotLeft, Qt::Key_7); = = m_rotRight =3D actionCollection()->addAction( QString::fromLatin1("rot= ateRight"), 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 =3D actionCollection()->addAction( QString::fromLatin1("viewIma= ges"), 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 =3D actionCollection()->addAction( QString::fromLati= n1("viewImagesNewWindow"), this, SLOT(slotViewNewWindow()) ); m_viewInNewWindow->setText( i18n("View (In New Window)") ); @@ -774,7 +774,7 @@ void MainWindow::Window::setupMenuBar() m_runSlideShow =3D actionCollection()->addAction( QString::fromLatin1(= "runSlideShow"), this, SLOT(slotRunSlideShow()) ); m_runSlideShow->setText( i18n("Run Slide Show") ); m_runSlideShow->setIcon( QIcon::fromTheme( QString::fromLatin1("view-p= resentation") ) ); - m_runSlideShow->setShortcut( Qt::CTRL+Qt::Key_R ); + actionCollection()->setDefaultShortcut(m_runSlideShow, Qt::CTRL + Qt::= Key_R); = m_runRandomSlideShow =3D actionCollection()->addAction( QString::fromL= atin1("runRandomizedSlideShow"), this, SLOT(slotRunRandomizedSlideShow()) ); m_runRandomSlideShow->setText( i18n( "Run Randomized Slide Show" ) ); @@ -811,7 +811,7 @@ void MainWindow::Window::setupMenuBar() = m_jumpToContext =3D 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( "kpho= toalbum" ) ) ); // icon suggestion: go-jump (don't know the exact meaning t= hough, so I didn't replace it right away = m_lock =3D actionCollection()->addAction( QString::fromLatin1("lockToD= efaultScope"), this, SLOT(lockToDefaultScope()) ); @@ -822,7 +822,7 @@ void MainWindow::Window::setupMenuBar() = a =3D actionCollection()->addAction( QString::fromLatin1("changeScopeP= asswd"), this, SLOT(changePassword()) ); a->setText( i18n("Change Password...") ); - a->setShortcut( 0 ); + actionCollection()->setDefaultShortcut(a, 0); = m_setDefaultPos =3D 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 =3D actionCollection()->add( QString::fromLatin1("sho= wToolTipOnImages") ); 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::Thumbna= ilFacade::showToolTipsOnImages); = = @@ -943,11 +943,11 @@ void MainWindow::Window::setupMenuBar() = m_useNextVideoThumbnail =3D actionCollection()->addAction( QString::fr= omLatin1("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::CT= RL + Qt::Key_Plus); = m_usePreviousVideoThumbnail =3D actionCollection()->addAction( QString= ::fromLatin1("usePreviousVideoThumbnail"), this, SLOT(usePreviousVideoThumb= nail())); m_usePreviousVideoThumbnail->setText(i18n("Use previous video thumbnai= l")); - m_usePreviousVideoThumbnail->setShortcut(Qt::CTRL + Qt::Key_Minus); + actionCollection()->setDefaultShortcut(m_usePreviousVideoThumbnail, Qt= ::CTRL + Qt::Key_Minus); = createGUI( QString::fromLatin1( "kphotoalbumui.rc" ) ); }