comparison libgui/src/main-window.cc @ 15300:fd27e10b9b05

pass QString by const reference instead of value * files-dockwidget.cc, files-dockwidget.h, history-dockwidget.h, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, main-window.cc, main-window.h, octave-qt-event-listener.h, parser.cc, parser.h, webinfo.cc, webinfo.h, resource-manager.cc, resource-manager.h: For all functions that take QString arguments, use "const Qstring&" instead of passing QString by value.
author John W. Eaton <jwe@octave.org>
date Wed, 05 Sep 2012 11:41:21 -0400
parents ae9079bbc627
children 450fedd44176
comparison
equal deleted inserted replaced
15299:8bd5c490b787 15300:fd27e10b9b05
83 _file_editor->request_open_file (); 83 _file_editor->request_open_file ();
84 focus_editor (); 84 focus_editor ();
85 } 85 }
86 86
87 void 87 void
88 main_window::open_file (QString file_name) 88 main_window::open_file (const QString& file_name)
89 { 89 {
90 _file_editor->request_open_file (file_name); 90 _file_editor->request_open_file (file_name);
91 focus_editor (); 91 focus_editor ();
92 } 92 }
93 93
94 void 94 void
95 main_window::report_status_message (QString statusMessage) 95 main_window::report_status_message (const QString& statusMessage)
96 { 96 {
97 _status_bar->showMessage (statusMessage, 1000); 97 _status_bar->showMessage (statusMessage, 1000);
98 } 98 }
99 99
100 void 100 void
138 octave_link::instance () 138 octave_link::instance ()
139 ->post_event (new octave_clear_history_event (*this)); 139 ->post_event (new octave_clear_history_event (*this));
140 } 140 }
141 141
142 void 142 void
143 main_window::handle_command_double_clicked (QString command) 143 main_window::handle_command_double_clicked (const QString& command)
144 { 144 {
145 _terminal->sendText (command); 145 _terminal->sendText (command);
146 _terminal->setFocus (); 146 _terminal->setFocus ();
147 } 147 }
148 148
214 { 214 {
215 // TODO: Implement. 215 // TODO: Implement.
216 } 216 }
217 217
218 void 218 void
219 main_window::current_working_directory_has_changed (QString directory) 219 main_window::current_working_directory_has_changed (const QString& directory)
220 { 220 {
221 if (_current_directory_combo_box->count () > 31) 221 if (_current_directory_combo_box->count () > 31)
222 { 222 {
223 _current_directory_combo_box->removeItem (0); 223 _current_directory_combo_box->removeItem (0);
224 } 224 }
242 selectedDirectory.toStdString ())); 242 selectedDirectory.toStdString ()));
243 } 243 }
244 } 244 }
245 245
246 void 246 void
247 main_window::set_current_working_directory (QString directory) 247 main_window::set_current_working_directory (const QString& directory)
248 { 248 {
249 octave_link::instance () 249 octave_link::instance ()
250 ->post_event (new octave_change_directory_event (*this, 250 ->post_event (new octave_change_directory_event (*this,
251 directory.toStdString ())); 251 directory.toStdString ()));
252 } 252 }