Changeset View
Changeset View
Standalone View
Standalone View
src/amarokurls/AmarokUrlAction.cpp
Show All 18 Lines | |||||
19 | 19 | | |||
20 | AmarokUrlAction::AmarokUrlAction( const QIcon & icon, AmarokUrlPtr url, QObject * parent ) | 20 | AmarokUrlAction::AmarokUrlAction( const QIcon & icon, AmarokUrlPtr url, QObject * parent ) | ||
21 | : QAction( icon, url->name(), parent ) | 21 | : QAction( icon, url->name(), parent ) | ||
22 | , m_url( url ) | 22 | , m_url( url ) | ||
23 | { | 23 | { | ||
24 | if ( !url->description().isEmpty() ) | 24 | if ( !url->description().isEmpty() ) | ||
25 | setToolTip( url->description() ); | 25 | setToolTip( url->description() ); | ||
26 | 26 | | |||
27 | connect( this, SIGNAL(triggered(bool)), this, SLOT(run()) ); | 27 | connect( this, &AmarokUrlAction::triggered, this, &AmarokUrlAction::run ); | ||
28 | } | 28 | } | ||
29 | 29 | | |||
30 | AmarokUrlAction::AmarokUrlAction( AmarokUrlPtr url, QObject * parent ) | 30 | AmarokUrlAction::AmarokUrlAction( AmarokUrlPtr url, QObject * parent ) | ||
31 | : QAction(url->name(), parent ) | 31 | : QAction(url->name(), parent ) | ||
32 | , m_url( url ) | 32 | , m_url( url ) | ||
33 | { | 33 | { | ||
34 | if ( !url->description().isEmpty() ) | 34 | if ( !url->description().isEmpty() ) | ||
35 | setToolTip( url->description() ); | 35 | setToolTip( url->description() ); | ||
36 | 36 | | |||
37 | setIcon( The::amarokUrlHandler()->iconForCommand( url->command() ) ); | 37 | setIcon( The::amarokUrlHandler()->iconForCommand( url->command() ) ); | ||
38 | connect( this, SIGNAL(triggered(bool)), this, SLOT(run()) ); | 38 | connect( this, &AmarokUrlAction::triggered, this, &AmarokUrlAction::run ); | ||
39 | } | 39 | } | ||
40 | 40 | | |||
41 | 41 | | |||
42 | void AmarokUrlAction::run() | 42 | void AmarokUrlAction::run() | ||
43 | { | 43 | { | ||
44 | m_url->run(); | 44 | m_url->run(); | ||
45 | } | 45 | } |