Skip to content

Commit 643bfa1

Browse files
committed
Fixed al-probe-* command line option
1 parent c29a6bc commit 643bfa1

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

mainwindow.cpp

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ QStringList MainWindow::getCmdLineArguments()
256256
{
257257
QStringList arguments;
258258
int i;
259+
int pos;
259260

260261
arguments += args[ FILEARGS ].getAllArgs();
261262
arguments += args[ COMMONARGS ].getAllArgs();
@@ -277,14 +278,28 @@ QStringList MainWindow::getCmdLineArguments()
277278

278279
while( i < arguments.size() )
279280
{
280-
if( arguments[i].contains("=false") ) //Remove lines with a false boolean option ("--metric=false")
281-
arguments.removeAt(i);
282-
else
281+
if( arguments[i].contains("al-probe-") )
282+
{
283+
pos = arguments[i].indexOf('=');
284+
285+
if( pos > 0 )
286+
{
287+
arguments[i].prepend("--");
288+
arguments[i].insert( pos + 1, '\'');
289+
arguments[i].append('\'');
290+
i++;
291+
}
292+
else
293+
arguments.removeAt(i);
294+
}
295+
else if( !arguments[i].contains("=false") ) //Remove lines with a false boolean option ("--metric=false")
283296
{
284297
arguments[i].remove("=true"); //Remove =true ("--metric=true" --> "--metric")
285298
arguments[i].prepend("--"); //Add the "--"
286299
i++;
287300
}
301+
else
302+
arguments.removeAt(i);
288303
}
289304

290305
return arguments;

mainwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<enum>QTabWidget::Rounded</enum>
4646
</property>
4747
<property name="currentIndex">
48-
<number>3</number>
48+
<number>0</number>
4949
</property>
5050
<widget class="QWidget" name="commonTab">
5151
<attribute name="title">

0 commit comments

Comments
 (0)