--verbose is now --debug, CalamaresApplication keeps track of it

This commit is contained in:
Teo Mrnjavac 2014-06-13 16:39:50 +02:00
parent 1f98c3efae
commit 56c6df30e6
3 changed files with 22 additions and 3 deletions

View File

@ -113,3 +113,17 @@ CalamaresApplication::initJobQueue()
}
void
CalamaresApplication::setDebug( bool enabled )
{
m_debugMode = enabled;
}
bool
CalamaresApplication::isDebug()
{
return m_debugMode;
}

View File

@ -40,9 +40,13 @@ public:
void initPlugins();
void initJobQueue();
void setDebug( bool enabled );
bool isDebug();
private:
CalamaresWindow* m_mainwindow;
bool m_debugMode;
//QPointer< Calamares::JobQueue > m_jobQueue;
};

View File

@ -34,14 +34,15 @@ main( int argc, char *argv[] )
parser.setApplicationDescription( "Distribution-independent installer framework" );
parser.addHelpOption();
parser.addVersionOption();
QCommandLineOption verboseOption( QStringList() << "v" << "verbose",
QCommandLineOption debugOption( QStringList() << "d" << "debug",
"Verbose output for debugging purposes." );
parser.addOption( verboseOption );
parser.addOption( debugOption );
parser.process( a );
a.setDebug( parser.isSet( debugOption ) );
KDSingleApplicationGuard guard( KDSingleApplicationGuard::AutoKillOtherInstances );
QObject::connect( &guard, SIGNAL( instanceStarted( KDSingleApplicationGuard::Instance ) ), &a, SLOT( instanceStarted( KDSingleApplicationGuard::Instance ) ) );
int returnCode = 0;
if ( guard.isPrimaryInstance() )