mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-23 17:29:42 +01:00
also send args on first startup, not completely working
This commit is contained in:
parent
0f47027c9c
commit
8b95f7330b
10
src/main.cpp
10
src/main.cpp
@ -45,16 +45,22 @@ main( int argc, char *argv[] )
|
||||
TomahawkApp a( argc, argv );
|
||||
KDSingleApplicationGuard guard( &a, KDSingleApplicationGuard::AutoKillOtherInstances );
|
||||
QObject::connect( &guard, SIGNAL( instanceStarted( KDSingleApplicationGuard::Instance ) ), &a, SLOT( instanceStarted( KDSingleApplicationGuard::Instance ) ) );
|
||||
|
||||
|
||||
if ( guard.isPrimaryInstance() )
|
||||
a.init();
|
||||
|
||||
|
||||
QString locale = QLocale::system().name();
|
||||
|
||||
QTranslator translator;
|
||||
translator.load( QString( ":/lang/tomahawk_" ) + locale );
|
||||
a.installTranslator( &translator );
|
||||
|
||||
if ( argc > 1 )
|
||||
{
|
||||
QString arg = a.arguments()[ 1 ];
|
||||
a.loadUrl( arg );
|
||||
}
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user