[libcalamares] Use -D for just debug-level setting
- Original flag -d sets debugging but also changes behavior - New -D just sets debugging - Simplify QStringList (use C++ 11)
This commit is contained in:
parent
ae5511c2f3
commit
79d81700b3
@ -63,11 +63,14 @@ main( int argc, char* argv[] )
|
||||
parser.setApplicationDescription( "Distribution-independent installer framework" );
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
QCommandLineOption debugOption( QStringList() << "d" << "debug",
|
||||
"Verbose output for debugging purposes." );
|
||||
QCommandLineOption debugOption( QStringList{ "d", "debug"},
|
||||
"Also look in current directory for configuration. Implies -D." );
|
||||
parser.addOption( debugOption );
|
||||
|
||||
QCommandLineOption configOption( QStringList() << "c" << "config",
|
||||
parser.addOption( QCommandLineOption( QStringLiteral("D"),
|
||||
"Verbose output for debugging purposes." ) );
|
||||
|
||||
QCommandLineOption configOption( QStringList{ "c", "config"},
|
||||
"Configuration directory to use, for testing purposes.", "config" );
|
||||
parser.addOption( configOption );
|
||||
|
||||
|
@ -47,7 +47,8 @@ log( const char* msg, unsigned int debugLevel, bool toDisk = true )
|
||||
if ( !s_threshold )
|
||||
{
|
||||
if ( qApp->arguments().contains( "--debug" ) ||
|
||||
qApp->arguments().contains( "-d" ) )
|
||||
qApp->arguments().contains( "-d" ) ||
|
||||
qApp->arguments().contains( "-D" ) )
|
||||
s_threshold = LOGVERBOSE;
|
||||
else
|
||||
#ifdef QT_NO_DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user