1
0
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:
Leo Franchi 2011-05-02 22:17:53 -04:00
parent 0f47027c9c
commit 8b95f7330b

View File

@ -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();
}