# HG changeset patch # User John Donoghue # Date 1416927412 18000 # Node ID 76b4256bcbd871bab2eb26ce0916d8e85c15c170 # Parent 2f9d9663b6b000521f59f8333da73d3f22315db8 uigetfile should select existing files only (Bug #43688) * libgui/src/dialog.h, libgui/src/dialog.cc (FileDialog::FileDialog): connect accept,reject to accept/rejectSelection. (FileDialog::reject): rename to FileDialog::rejectSelection, dont call done. (FileDialog::accept): rename to FileDialog::acceptSelection, dont call done. diff -r 2f9d9663b6b0 -r 76b4256bcbd8 libgui/src/dialog.cc --- a/libgui/src/dialog.cc Tue Nov 25 23:14:24 2014 +0100 +++ b/libgui/src/dialog.cc Tue Nov 25 09:56:52 2014 -0500 @@ -466,18 +466,18 @@ &uiwidget_creator, SLOT (filedialog_finished (const QStringList&, const QString&, int))); + connect (this, SIGNAL (accepted ()), this, SLOT (acceptSelection ())); + connect (this, SIGNAL (rejected ()), this, SLOT (rejectSelection ())); } void -FileDialog::reject (void) +FileDialog::rejectSelection(void) { QStringList empty; emit finish_input (empty, "", 0); - done (QDialog::Rejected); - } -void FileDialog::accept (void) +void FileDialog::acceptSelection (void) { QStringList string_result; QString path; @@ -513,6 +513,5 @@ // send the selected info emit finish_input (string_result, path, idx); - done (QDialog::Accepted); } diff -r 2f9d9663b6b0 -r 76b4256bcbd8 libgui/src/dialog.h --- a/libgui/src/dialog.h Tue Nov 25 23:14:24 2014 +0100 +++ b/libgui/src/dialog.h Tue Nov 25 09:56:52 2014 -0500 @@ -261,9 +261,9 @@ private slots: - void reject (void); + void rejectSelection (void); - void accept (void); + void acceptSelection (void); }; #endif