Skip to content

Commit 104d4d6

Browse files
kwvgUdjinM6
andcommitted
qt: fetch existing parameters when building parameter list
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
1 parent b9f1ddf commit 104d4d6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/qt/rpcconsole.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,17 @@ void RPCConsole::walletReindex()
820820
void RPCConsole::buildParameterlist(QString arg)
821821
{
822822
// Get command-line arguments and remove the application name
823-
QStringList args = QApplication::arguments();
824-
args.removeFirst();
823+
QStringList args;
824+
825+
for (const auto& [key, values] : gArgs.GetCommandLineArgs()) {
826+
for (const auto& value : values) {
827+
if (value.getValStr().empty()) {
828+
args << QString::fromStdString("-" + key);
829+
} else {
830+
args << QString::fromStdString("-" + key + "=" + value.getValStr());
831+
}
832+
}
833+
}
825834

826835
// Remove existing repair-options
827836
args.removeAll(RESCAN1);

0 commit comments

Comments
 (0)