diff libgui/src/m-editor/file-editor-tab.h @ 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 359098ad343e
children 67ef63ead023
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h
+++ b/libgui/src/m-editor/file-editor-tab.h
@@ -65,23 +65,23 @@
   void set_modified (bool modified = true);
 
   bool open_file ();
-  void load_file (QString fileName);
+  void load_file (const QString& fileName);
   void new_file ();
   bool save_file ();
-  bool save_file(QString saveFileName);
+  bool save_file (const QString& saveFileName);
   bool save_file_as();
   void run_file ();
 
-  void file_has_changed (QString fileName);
+  void file_has_changed (const QString& fileName);
 
 signals:
-  void file_name_changed (QString fileName);
+  void file_name_changed (const QString& fileName);
   void editor_state_changed ();
   void close_request ();
 
 protected:
   void closeEvent (QCloseEvent *event);
-  void set_file_name (QString fileName);
+  void set_file_name (const QString& fileName);
 
 private:
   void update_lexer ();
@@ -89,7 +89,7 @@
   void request_remove_breakpoint (int line);
 
   void update_tracked_file ();
-  int check_file_modified (QString msg, int cancelButton);
+  int check_file_modified (const QString& msg, int cancelButton);
   void do_comment_selected_text (bool comment);
 
   file_editor *         _file_editor;