mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-24 09:49:42 +01:00
added --help command line option
This commit is contained in:
parent
7baf43e3d7
commit
aff075f2ad
@ -124,6 +124,12 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
void
|
||||
TomahawkApp::init()
|
||||
{
|
||||
if ( arguments().contains( "--help" ) || arguments().contains( "-h" ) )
|
||||
{
|
||||
printHelp();
|
||||
::exit(0);
|
||||
}
|
||||
|
||||
Logger::setupLogfile();
|
||||
qsrand( QTime( 0, 0, 0 ).secsTo( QTime::currentTime() ) );
|
||||
|
||||
@ -297,6 +303,18 @@ TomahawkApp::instance()
|
||||
return (TomahawkApp*)TOMAHAWK_APPLICATION::instance();
|
||||
}
|
||||
|
||||
void
|
||||
TomahawkApp::printHelp()
|
||||
{
|
||||
std::cout << QString( "usage: " + arguments().at( 0 ) + " [options]" ).toAscii().data();
|
||||
std::cout << QString( "options are:" ).toAscii().data();
|
||||
std::cout << QString( " --help Show this help" ).toAscii().data();
|
||||
std::cout << QString( " --http Initialize HTTP server" ).toAscii().data();
|
||||
std::cout << QString( " --filescan Scan for files on startup" ).toAscii().data();
|
||||
std::cout << QString( " --testdb Use a test database instead of real collection" ).toAscii().data();
|
||||
std::cout << QString( " --noupnp Disable UPNP" ).toAscii().data();
|
||||
std::cout << QString( " --nosip Disable SIP" ).toAscii().data();
|
||||
}
|
||||
|
||||
#ifndef TOMAHAWK_HEADLESS
|
||||
AudioControls*
|
||||
|
@ -108,6 +108,8 @@ private slots:
|
||||
private:
|
||||
void registerMetaTypes();
|
||||
|
||||
void printHelp();
|
||||
|
||||
// Start-up order: database, collection, pipeline, servent, http
|
||||
void initDatabase();
|
||||
void initLocalCollection();
|
||||
|
Loading…
x
Reference in New Issue
Block a user