From 56c6df30e6271199327075e531944f11576e201d Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 13 Jun 2014 16:39:50 +0200 Subject: [PATCH] --verbose is now --debug, CalamaresApplication keeps track of it --- src/calamares/CalamaresApplication.cpp | 14 ++++++++++++++ src/calamares/CalamaresApplication.h | 4 ++++ src/calamares/main.cpp | 7 ++++--- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index e9401ae34..aa05f34e5 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -113,3 +113,17 @@ CalamaresApplication::initJobQueue() } +void +CalamaresApplication::setDebug( bool enabled ) +{ + m_debugMode = enabled; +} + + +bool +CalamaresApplication::isDebug() +{ + return m_debugMode; +} + + diff --git a/src/calamares/CalamaresApplication.h b/src/calamares/CalamaresApplication.h index 7a599e194..55bf81319 100644 --- a/src/calamares/CalamaresApplication.h +++ b/src/calamares/CalamaresApplication.h @@ -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; }; diff --git a/src/calamares/main.cpp b/src/calamares/main.cpp index e561a85c8..989b5a928 100644 --- a/src/calamares/main.cpp +++ b/src/calamares/main.cpp @@ -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() )