Avoid an overwrite confirmation when selecting a file argument.
commit9f78e7f40827d6be7408cc937374253d7d7e4825
authorJohannes Sixt <j6t@kdbg.org>
Sat, 3 Mar 2018 16:58:45 +0000 (3 17:58 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Sat, 3 Mar 2018 18:11:21 +0000 (3 19:11 +0100)
treefc5f63c416a119ab774a792f985df5c94f4392a1
parent2a52593a046918d84464e21dfc68eb928ddddfb1
Avoid an overwrite confirmation when selecting a file argument.

The Program Arguments dialog has a button 'Insert file name' that permits
to select a file whose path name is then inserted in the program command
line edit box. Since the code uses getSaveFileName(), a warning "Do you
wish to overwrite [the file]?" is presented when an exisiting file is
selected.

We could use getOpenFileName() to avoid the warning, but then only existing
files can be selected. As we have to inject the option QFileDialog::AnyFile
in the dialog, we have to do it all manually.

While we are here, change the text of the button to "Insert", because it is
not an "Open" operation anymore.
kdbg/pgmargs.cpp