Git commit 89750bbe3f8a361032051261388b1ab94fb7f695 by Luk=C3=A1=C5=A1 Tink= l. Committed on 30/11/2014 at 21:33. Pushed by lukas into branch 'frameworks'. fix shortcut warnings M +2 -2 src/app/actions.cpp M +11 -11 src/app/mainWindow.cpp http://commits.kde.org/dragon/89750bbe3f8a361032051261388b1ab94fb7f695 diff --git a/src/app/actions.cpp b/src/app/actions.cpp index d480773..3ce044d 100644 --- a/src/app/actions.cpp +++ b/src/app/actions.cpp @@ -37,7 +37,7 @@ Dragon::PlayAction::PlayAction( QObject *receiver, const = char *slot, KActionColl setInactiveGuiItem(KGuiItem(i18n("Play"), QStringLiteral("media-playba= ck-start"))); setActiveGuiItem(KGuiItem(i18n("Pause"), QStringLiteral( "media-playba= ck-pause"))); setAutoToggle( false ); - setShortcut( Qt::Key_Space ); + ac->setDefaultShortcut(this, Qt::Key_Space); ac->addAction( objectName(), this ); connect( this, SIGNAL(triggered(bool)), receiver, slot ); } @@ -55,7 +55,7 @@ Dragon::VolumeAction::VolumeAction( QObject *receiver, co= nst char *slot, KAction { setObjectName( QLatin1String( "volume" ) ); setIcon( QIcon::fromTheme(QLatin1String( "player-volume" ) ) ); - setShortcut( Qt::Key_V ); + ac->setDefaultShortcut(this, Qt::Key_V); ac->addAction( objectName(), this ); connect( this, SIGNAL(triggered(bool)), receiver, slot ); connect( engine(), SIGNAL(mutedChanged(bool)), this, SLOT(mutedChanged= (bool)) ); diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index a8788b2..0f5ffbf 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -276,7 +276,7 @@ MainWindow::setupActions() = KToggleFullScreenAction* toggleFullScreen =3D new KToggleFullScreenAct= ion( this, ac ); toggleFullScreen->setObjectName( QLatin1String( "fullscreen" ) ); - toggleFullScreen->setShortcut( Qt::Key_F ); + ac->setDefaultShortcuts(toggleFullScreen, QList() << Qt:= :Key_F << KStandardShortcut::fullScreen()); toggleFullScreen->setAutoRepeat( false ); connect( toggleFullScreen, SIGNAL(toggled(bool)), Dragon::mainWindow()= , SLOT(setFullScreen(bool)) ); addToAc( toggleFullScreen ); @@ -301,25 +301,25 @@ MainWindow::setupActions() = QAction* playerStop =3D new QAction( QIcon::fromTheme(QLatin1String( "= media-playback-stop" )), i18n("Stop"), ac ); playerStop->setObjectName( QLatin1String( "stop" ) ); - playerStop->setShortcut( Qt::Key_S ); + ac->setDefaultShortcut(playerStop, Qt::Key_S); connect( playerStop, SIGNAL(triggered()), this, SLOT(stop()) ); addToAc( playerStop ) = KToggleAction* mute =3D new KToggleAction( QIcon::fromTheme(QLatin1Str= ing( "player-volume-muted" )), i18nc( "Mute the sound output", "Mute"), ac = ); mute->setObjectName( QLatin1String( "mute" ) ); - mute->setShortcut( Qt::Key_M ); + ac->setDefaultShortcut(mute, Qt::Key_M); connect( mute, SIGNAL(toggled(bool)), videoWindow(), SLOT(mute(bool)) = ); addToAc( mute ) = QAction* resetZoom =3D new QAction( QIcon::fromTheme(QLatin1String( "z= oom-fit-best" )), i18n("Reset Video Scale"), ac ); resetZoom->setObjectName( QLatin1String( "reset_zoom" ) ); - resetZoom->setShortcut( Qt::Key_Equal ); + ac->setDefaultShortcut(resetZoom, Qt::Key_Equal); connect( resetZoom, SIGNAL(triggered()), videoWindow(), SLOT(resetZoom= ()) ); addToAc( resetZoom ) = QAction* dvdMenu =3D new QAction( QIcon::fromTheme(QLatin1String( "med= ia-optical-video" )), i18n("Menu Toggle"), ac ); dvdMenu->setObjectName( QLatin1String( "toggle_dvd_menu" ) ); - dvdMenu->setShortcut( Qt::Key_R ); + ac->setDefaultShortcut(dvdMenu, Qt::Key_R); connect( dvdMenu, SIGNAL(triggered()), engine(), SLOT(toggleDVDMenu())= ); addToAc( dvdMenu ) = @@ -347,39 +347,39 @@ MainWindow::setupActions() = QAction* prev_chapter =3D new QAction( QIcon::fromTheme(QLatin1String(= "media-skip-backward" )), i18n("Previous Chapter"), ac ); prev_chapter->setObjectName( QLatin1String( "prev_chapter" ) ); - prev_chapter->setShortcut( Qt::Key_Comma ); + ac->setDefaultShortcut(prev_chapter, Qt::Key_Comma); connect( prev_chapter, SIGNAL(triggered()), engine(), SLOT(prevChapter= ()) ); addToAc( prev_chapter ) = QAction* next_chapter =3D new QAction( QIcon::fromTheme(QLatin1String(= "media-skip-forward" )), i18n("Next Chapter"), ac ); next_chapter->setObjectName( QLatin1String( "next_chapter" ) ); - next_chapter->setShortcut( Qt::Key_Period ); + ac->setDefaultShortcut(next_chapter, Qt::Key_Period); connect( next_chapter, SIGNAL(triggered()), engine(), SLOT(nextChapter= ()) ); addToAc( next_chapter ) = // xgettext: no-c-format QAction* tenPercentBack =3D new QAction( QIcon::fromTheme(QLatin1Strin= g( "media-seek-backward" )), i18n("Return 10% Back"), ac ); tenPercentBack->setObjectName( QLatin1String( "ten_percent_back" ) ); - tenPercentBack->setShortcut( Qt::Key_PageUp ); + ac->setDefaultShortcut(tenPercentBack, Qt::Key_PageUp); connect( tenPercentBack, SIGNAL(triggered()), engine(), SLOT(tenPercen= tBack()) ); addToAc( tenPercentBack ) = // xgettext: no-c-format QAction* tenPercentForward =3D new QAction( QIcon::fromTheme(QLatin1St= ring( "media-seek-forward" )), i18n("Go 10% Forward"), ac ); tenPercentForward->setObjectName( QLatin1String( "ten_percent_forward"= ) ); - tenPercentForward->setShortcut( Qt::Key_PageDown ); + ac->setDefaultShortcut(tenPercentForward, Qt::Key_PageDown); connect( tenPercentForward, SIGNAL(triggered()), engine(), SLOT(tenPer= centForward()) ); addToAc( tenPercentForward ) = QAction* tenSecondsBack =3D new QAction( QIcon::fromTheme(QLatin1Strin= g( "media-seek-backward" )), i18n("Return 10 Seconds Back"), ac ); tenSecondsBack->setObjectName( QLatin1String( "ten_seconds_back" ) ); - tenSecondsBack->setShortcut( Qt::Key_Minus ); + ac->setDefaultShortcut(tenSecondsBack, Qt::Key_Minus); connect( tenSecondsBack, SIGNAL(triggered()), engine(), SLOT(tenSecond= sBack()) ); addToAc( tenSecondsBack ) = QAction* tenSecondsForward =3D new QAction( QIcon::fromTheme(QLatin1St= ring( "media-seek-forward" )), i18n("Go 10 Seconds Forward"), ac ); tenSecondsForward->setObjectName( QLatin1String( "ten_seconds_forward"= ) ); - tenSecondsForward->setShortcut( Qt::Key_Plus ); + ac->setDefaultShortcut(tenSecondsForward, Qt::Key_Plus); connect( tenSecondsForward, SIGNAL(triggered()), engine(), SLOT(tenSec= ondsForward()) ); addToAc( tenSecondsForward ) #undef addToAc