diff 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
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Wed Sep 05 08:14:37 2012 -0700
+++ b/libgui/src/main-window.cc	Wed Sep 05 11:41:21 2012 -0400
@@ -85,14 +85,14 @@
 }
 
 void
-main_window::open_file (QString file_name)
+main_window::open_file (const QString& file_name)
 {
   _file_editor->request_open_file (file_name);
   focus_editor ();
 }
 
 void
-main_window::report_status_message (QString statusMessage)
+main_window::report_status_message (const QString& statusMessage)
 {
   _status_bar->showMessage (statusMessage, 1000);
 }
@@ -140,7 +140,7 @@
 }
 
 void
-main_window::handle_command_double_clicked (QString command)
+main_window::handle_command_double_clicked (const QString& command)
 {
   _terminal->sendText (command);
   _terminal->setFocus ();
@@ -216,7 +216,7 @@
 }
 
 void
-main_window::current_working_directory_has_changed (QString directory)
+main_window::current_working_directory_has_changed (const QString& directory)
 {
   if (_current_directory_combo_box->count () > 31)
     {
@@ -244,7 +244,7 @@
 }
 
 void
-main_window::set_current_working_directory (QString directory)
+main_window::set_current_working_directory (const QString& directory)
 {
   octave_link::instance ()
       ->post_event (new octave_change_directory_event (*this,