Mercurial > hg > octave-nkf
changeset 19556:76b4256bcbd8 gui-release
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.
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Tue, 25 Nov 2014 09:56:52 -0500 |
parents | 2f9d9663b6b0 |
children | 7c31a83e25bc |
files | libgui/src/dialog.cc libgui/src/dialog.h |
diffstat | 2 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/dialog.cc +++ b/libgui/src/dialog.cc @@ -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); }