Mercurial > octave-libgccjit
diff libgui/src/m-editor/file-editor.cc @ 18521:713193ffc8c4 gui-release
allow to select mutliple files in the editors open file dialog (bug #41664)
* file-editor.cc (request_open_file (void)): allow to select multiple files
in the open file dialog, connect filesSelected signal to new slot;
(request_open_files): slot for the open file dialogs signal filesSelected
* file-editor.h: new slot request_open_files
author | Torsten <ttl@justmail.de> |
---|---|
date | Sun, 23 Feb 2014 19:18:24 +0100 |
parents | ca65b05b9a8a |
children | de76baa76aa1 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc Fri Feb 21 18:50:33 2014 -0500 +++ b/libgui/src/m-editor/file-editor.cc Sun Feb 23 19:18:24 2014 +0100 @@ -211,10 +211,11 @@ fileDialog->setAcceptMode (QFileDialog::AcceptOpen); fileDialog->setViewMode (QFileDialog::Detail); + fileDialog->setFileMode (QFileDialog::ExistingFiles); fileDialog->setDirectory (ced); - connect (fileDialog, SIGNAL (fileSelected (const QString&)), - this, SLOT (request_open_file (const QString&))); + connect (fileDialog, SIGNAL (filesSelected (const QStringList&)), + this, SLOT (request_open_files (const QStringList&))); fileDialog->setWindowModality (Qt::NonModal); fileDialog->setAttribute (Qt::WA_DeleteOnClose); @@ -266,6 +267,13 @@ } void +file_editor::request_open_files (const QStringList& open_file_names) +{ + for (int i = 0; i < open_file_names.count (); i++) + request_open_file (open_file_names.at (i)); +} + +void file_editor::request_open_file (const QString& openFileName, int line, bool debug_pointer, bool breakpoint_marker, bool insert)