changeset 15045:1ffaad442161 gui

Source code formatting (80-column lines, mostly whitespace changes)
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Sat, 28 Jul 2012 21:53:45 -0400
parents b7b1ffc88086
children 11c05ff73c83
files gui/src/m-editor/file-editor-interface.h gui/src/m-editor/file-editor-tab.cc gui/src/m-editor/file-editor.cc gui/src/main-window.cc gui/src/main-window.h gui/src/octave-adapter/octave-event.h gui/src/octave-adapter/octave-main-thread.cc gui/src/octave-adapter/octave-main-thread.h gui/src/symbol-information.h gui/src/welcome-wizard.h gui/src/workspace-model.h
diffstat 11 files changed, 227 insertions(+), 128 deletions(-) [+]
line wrap: on
line diff
--- a/gui/src/m-editor/file-editor-interface.h
+++ b/gui/src/m-editor/file-editor-interface.h
@@ -36,7 +36,8 @@
       _terminal = terminal;
       _main_window = mainWindow;
 
-      connect (this, SIGNAL (visibilityChanged (bool)), this, SLOT (handle_visibility_changed (bool)));
+      connect (this, SIGNAL (visibilityChanged (bool)), this,
+               SLOT (handle_visibility_changed (bool)));
     }
 
     virtual ~file_editor_interface () { }
--- a/gui/src/m-editor/file-editor-tab.cc
+++ b/gui/src/m-editor/file-editor-tab.cc
@@ -45,12 +45,15 @@
   _edit_area->setMarginType (1, QsciScintilla::SymbolMargin);
   _edit_area->setMarginSensitivity (1, true);
   _edit_area->markerDefine (QsciScintilla::RightTriangle, bookmark);
-  _edit_area->markerDefine (QPixmap (":/actions/icons/redled.png"), breakpoint);
+  _edit_area->markerDefine (QPixmap (":/actions/icons/redled.png"),
+                            breakpoint);
   _edit_area->markerDefine (QPixmap (":/actions/icons/arrow_right.png"),
                             debugger_position);
 
-  connect (_edit_area, SIGNAL (marginClicked (int, int, Qt::KeyboardModifiers)),
-           this, SLOT (handle_margin_clicked (int, int, Qt::KeyboardModifiers)));
+  connect (_edit_area, SIGNAL (marginClicked (int, int,
+                                              Qt::KeyboardModifiers)),
+           this, SLOT (handle_margin_clicked (int, int,
+                                              Qt::KeyboardModifiers)));
 
   // line numbers
   _edit_area->setMarginsForegroundColor(QColor(96,96,96));
@@ -164,8 +167,10 @@
     }
   else
     {
-      // ignore close event if file is not saved and user cancels closing this window
-      if (check_file_modified ("Close File", QMessageBox::Cancel) == QMessageBox::Cancel)
+      // ignore close event if file is not saved and user cancels
+      // closing this window
+      if (check_file_modified ("Close File",
+                               QMessageBox::Cancel) == QMessageBox::Cancel)
         {
           event->ignore ();
         }
@@ -185,7 +190,8 @@
 }
 
 void
-file_editor_tab::handle_margin_clicked(int margin, int line, Qt::KeyboardModifiers state)
+file_editor_tab::handle_margin_clicked(int margin, int line,
+                                       Qt::KeyboardModifiers state)
 {
   Q_UNUSED (state);
   if (margin == 1)
@@ -233,14 +239,20 @@
 
       QString keyword;
       QStringList keywordList;
-      keyword = lexer->keywords (1);  // get whole string with all keywords
-      keywordList = keyword.split (QRegExp ("\\s+"));  // split into single strings
+
+       // get whole string with all keywords
+      keyword = lexer->keywords (1);
+      // split into single strings
+      keywordList = keyword.split (QRegExp ("\\s+"));
+
       int i;
       for (i = 0; i < keywordList.size (); i++)
         {
-          lexer_api->add (keywordList.at (i));  // add single strings to the API
+           // add single strings to the API
+          lexer_api->add (keywordList.at (i));
         }
-      lexer_api->prepare ();           // prepare API info ... this make take some time
+      // prepare API info ... this make take some time
+      lexer_api->prepare ();
     }
   else if (_file_name.endsWith (".c")
         || _file_name.endsWith (".cc")
@@ -275,13 +287,15 @@
 
   // Editor font (default or from settings)
   lexer->setDefaultFont (QFont (
-                             settings->value ("editor/fontName","Courier").toString (),
-                             settings->value ("editor/fontSize",10).toInt ()));
+                                settings->value ("editor/fontName",
+                                                 "Courier").toString (),
+                                settings->value ("editor/fontSize",
+                                                 10).toInt ()));
 
   // TODO: Autoindent not working as it should
   lexer->setAutoIndentStyle (QsciScintilla::AiMaintain ||
-                               QsciScintilla::AiOpening  ||
-                               QsciScintilla::AiClosing);
+                             QsciScintilla::AiOpening  ||
+                             QsciScintilla::AiClosing);
 
   _edit_area->setLexer (lexer);
 }
@@ -408,16 +422,17 @@
                                        tr ("The file %1\n"
                                            "has been modified. Do you want to save the changes?").
                                        arg (_file_name),
-                                       QMessageBox::Save, QMessageBox::Discard, cancelButton );
+                                       QMessageBox::Save,
+                                       QMessageBox::Discard, cancelButton );
       if (decision == QMessageBox::Save)
         {
           save_file ();
           if (_edit_area->isModified ())
             {
               // If the user attempted to save the file, but it's still
-              // modified, then probably something went wrong, so return cancel
-              // for cancel this operation or try to save files as if cancel not
-              // possible
+              // modified, then probably something went wrong, so return
+              // cancel for cancel this operation or try to save files
+              // as if cancel not possible
               if ( cancelButton )
                 return (QMessageBox::Cancel);
               else
@@ -663,9 +678,13 @@
   QApplication::setOverrideCursor (Qt::WaitCursor);
   out << _edit_area->text ();
   QApplication::restoreOverrideCursor ();
-  _file_name = saveFileName; // save file name for later use
-  update_window_title (false);      // set the window title to actual file name (not modified)
-  _edit_area->setModified (false); // files is save -> not modified
+
+  // save file name for later use
+  _file_name = saveFileName;
+  // set the window title to actual file name (not modified)
+  update_window_title (false);
+   // files is save -> not modified
+  _edit_area->setModified (false);
   file.close();
 
   if (!watched_files.isEmpty ())
@@ -738,7 +757,8 @@
   Q_UNUSED (fileName);
   if (QFile::exists (_file_name))
     {
-      // Prevent popping up multiple message boxes when the file has been changed multiple times.
+      // Prevent popping up multiple message boxes when the file has
+      // been changed multiple times.
       static bool alreadyAsking = false;
       if (!alreadyAsking)
         {
@@ -747,7 +767,8 @@
           int decision =
           QMessageBox::warning (this, tr ("Octave Editor"),
                                 tr ("It seems that \'%1\' has been modified by another application. Do you want to reload it?").
-                                arg (_file_name), QMessageBox::Yes, QMessageBox::No);
+                                arg (_file_name), QMessageBox::Yes,
+                                QMessageBox::No);
 
           if (decision == QMessageBox::Yes)
             {
@@ -762,7 +783,8 @@
       int decision =
       QMessageBox::warning (this, tr ("Octave Editor"),
                             tr ("It seems that \'%1\' has been deleted or renamed. Do you want to save it now?").
-                            arg (_file_name), QMessageBox::Save, QMessageBox::Close);
+                            arg (_file_name), QMessageBox::Save,
+                            QMessageBox::Close);
       if (decision == QMessageBox::Save)
         {
           if (!save_file_as ())
--- a/gui/src/m-editor/file-editor.cc
+++ b/gui/src/m-editor/file-editor.cc
@@ -259,7 +259,8 @@
 file_editor::handle_file_name_changed (QString fileName)
 {
   QObject *senderObject = sender ();
-  file_editor_tab *fileEditorTab = dynamic_cast<file_editor_tab*> (senderObject);
+  file_editor_tab *fileEditorTab
+    = dynamic_cast<file_editor_tab*> (senderObject);
   if (fileEditorTab)
     {
       for(int i = 0; i < _tab_widget->count (); i++)
@@ -275,7 +276,8 @@
 void
 file_editor::handle_tab_close_request (int index)
 {
-  file_editor_tab *fileEditorTab = dynamic_cast <file_editor_tab*> (_tab_widget->widget (index));
+  file_editor_tab *fileEditorTab
+    = dynamic_cast <file_editor_tab*> (_tab_widget->widget (index));
   if (fileEditorTab)
     if (fileEditorTab->close ())
       {
@@ -337,8 +339,9 @@
   QAction *save_action = new QAction (QIcon(":/actions/icons/filesave.png"),
         tr("&Save File"), _tool_bar);
 
-  QAction *save_as_action = new QAction (QIcon(":/actions/icons/filesaveas.png"),
-        tr("Save File &As"), _tool_bar);
+  QAction *save_as_action
+    = new QAction (QIcon(":/actions/icons/filesaveas.png"),
+                   tr("Save File &As"), _tool_bar);
 
   QAction *undo_action = new QAction (QIcon(":/actions/icons/undo.png"),
         tr("&Undo"), _tool_bar);
@@ -346,8 +349,11 @@
   QAction *redo_action = new QAction (QIcon(":/actions/icons/redo.png"),
         tr("&Redo"), _tool_bar);
 
-  _copy_action = new QAction (QIcon::fromTheme ("edit-copy"), tr ("&Copy"), _tool_bar);
-  _cut_action  = new QAction (QIcon::fromTheme ("edit-cut"), tr ("Cu&t"), _tool_bar);
+  _copy_action = new QAction (QIcon::fromTheme ("edit-copy"),
+                              tr ("&Copy"), _tool_bar);
+
+  _cut_action  = new QAction (QIcon::fromTheme ("edit-cut"),
+                              tr ("Cu&t"), _tool_bar);
 
   QAction *paste_action
       = new QAction (QIcon (":/actions/icons/editpaste.png"),
@@ -445,31 +451,54 @@
   widget->setLayout (layout);
   setWidget (widget);
 
-  connect (new_action,               SIGNAL (triggered ()), this, SLOT (request_new_file ()));
-  connect (open_action,              SIGNAL (triggered ()), this, SLOT (request_open_file ()));
-  connect (undo_action,              SIGNAL (triggered ()), this, SLOT (request_undo ()));
-  connect (redo_action,              SIGNAL (triggered ()), this, SLOT (request_redo ()));
-  connect (_copy_action,            SIGNAL (triggered ()), this, SLOT (request_copy ()));
-  connect (_cut_action,             SIGNAL (triggered ()), this, SLOT (request_cut ()));
-  connect (paste_action,             SIGNAL (triggered ()), this, SLOT (request_paste ()));
-  connect (save_action,              SIGNAL (triggered ()), this, SLOT (request_save_file ()));
-  connect (save_as_action,            SIGNAL (triggered ()), this, SLOT (request_save_file_as ()));
-  connect (_run_action,               SIGNAL (triggered ()), this, SLOT (request_run_file ()));
-  connect (toggle_bookmark_action,    SIGNAL (triggered ()), this, SLOT (request_toggle_bookmark ()));
-  connect (next_bookmark_action,      SIGNAL (triggered ()), this, SLOT (request_next_bookmark ()));
-  connect (previous_bookmark_action,      SIGNAL (triggered ()), this, SLOT (request_previous_bookmark ()));
-  connect (remove_bookmark_action,    SIGNAL (triggered ()), this, SLOT (request_remove_bookmark ()));
-  connect (toggle_breakpoint_action,    SIGNAL (triggered ()), this, SLOT (request_toggle_breakpoint ()));
-  connect (next_breakpoint_action,      SIGNAL (triggered ()), this, SLOT (request_next_breakpoint ()));
-  connect (previous_breakpoint_action,      SIGNAL (triggered ()), this, SLOT (request_previous_breakpoint ()));
-  connect (remove_breakpoint_action,    SIGNAL (triggered ()), this, SLOT (request_remove_breakpoint ()));
-  connect (comment_selection_action,   SIGNAL (triggered ()), this, SLOT (request_comment_selected_text ()));
-  connect (uncomment_selection_action, SIGNAL (triggered ()), this, SLOT (request_uncomment_selected_text ()));
-  connect (_tab_widget, SIGNAL (tabCloseRequested (int)), this, SLOT (handle_tab_close_request (int)));
-  connect (_tab_widget, SIGNAL (currentChanged(int)), this, SLOT (active_tab_changed (int)));
+  connect (new_action,
+           SIGNAL (triggered ()), this, SLOT (request_new_file ()));
+  connect (open_action,              
+           SIGNAL (triggered ()), this, SLOT (request_open_file ()));
+  connect (undo_action,
+           SIGNAL (triggered ()), this, SLOT (request_undo ()));
+  connect (redo_action,
+           SIGNAL (triggered ()), this, SLOT (request_redo ()));
+  connect (_copy_action,
+           SIGNAL (triggered ()), this, SLOT (request_copy ()));
+  connect (_cut_action,
+           SIGNAL (triggered ()), this, SLOT (request_cut ()));
+  connect (paste_action,
+           SIGNAL (triggered ()), this, SLOT (request_paste ()));
+  connect (save_action,
+           SIGNAL (triggered ()), this, SLOT (request_save_file ()));
+  connect (save_as_action,
+           SIGNAL (triggered ()), this, SLOT (request_save_file_as ()));
+  connect (_run_action,
+           SIGNAL (triggered ()), this, SLOT (request_run_file ()));
+  connect (toggle_bookmark_action,
+           SIGNAL (triggered ()), this, SLOT (request_toggle_bookmark ()));
+  connect (next_bookmark_action,
+           SIGNAL (triggered ()), this, SLOT (request_next_bookmark ()));
+  connect (previous_bookmark_action,
+           SIGNAL (triggered ()), this, SLOT (request_previous_bookmark ()));
+  connect (remove_bookmark_action,
+           SIGNAL (triggered ()), this, SLOT (request_remove_bookmark ()));
+  connect (toggle_breakpoint_action,
+           SIGNAL (triggered ()), this, SLOT (request_toggle_breakpoint ()));
+  connect (next_breakpoint_action,
+           SIGNAL (triggered ()), this, SLOT (request_next_breakpoint ()));
+  connect (previous_breakpoint_action,
+           SIGNAL (triggered ()), this, SLOT (request_previous_breakpoint ()));
+  connect (remove_breakpoint_action,
+           SIGNAL (triggered ()), this, SLOT (request_remove_breakpoint ()));
+  connect (comment_selection_action,
+           SIGNAL (triggered ()), this, SLOT (request_comment_selected_text ()));
+  connect (uncomment_selection_action,
+           SIGNAL (triggered ()), this, SLOT (request_uncomment_selected_text ()));
+  connect (_tab_widget,
+           SIGNAL (tabCloseRequested (int)), this, SLOT (handle_tab_close_request (int)));
+  connect (_tab_widget,
+           SIGNAL (currentChanged(int)), this, SLOT (active_tab_changed (int)));
 
   resize (500, 400);
-  setWindowIcon (QIcon::fromTheme ("accessories-text-editor", style->standardIcon (QStyle::SP_FileIcon)));
+  setWindowIcon (QIcon::fromTheme ("accessories-text-editor",
+                                   style->standardIcon (QStyle::SP_FileIcon)));
   setWindowTitle ("Octave Editor");
 }
 
--- a/gui/src/main-window.cc
+++ b/gui/src/main-window.cc
@@ -180,7 +180,8 @@
   else if (cursorType == "block")
     _terminal->setCursorType(QTerminalInterface::BlockCursor, cursorBlinking);
   else if (cursorType == "underline")
-    _terminal->setCursorType(QTerminalInterface::UnderlineCursor, cursorBlinking);
+    _terminal->setCursorType(QTerminalInterface::UnderlineCursor,
+                             cursorBlinking);
 
   resource_manager::instance ()->update_network_settings ();
 }
@@ -500,7 +501,8 @@
   file_menu->addSeparator ();
 
   QAction *preferences_action
-      = file_menu->addAction (QIcon(":/actions/icons/configure.png"), tr ("Preferences..."));
+      = file_menu->addAction (QIcon(":/actions/icons/configure.png"),
+                              tr ("Preferences..."));
   file_menu->addSeparator ();
   QAction *page_setup_action
       = file_menu->addAction (tr ("Page Setup..."));
@@ -559,7 +561,8 @@
   find_action->setEnabled (false); // TODO: Make this work.
   QAction *find_files_action
       = edit_menu->addAction (tr ("Find Files..."));
-  find_files_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_F);
+  find_files_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier
+                                  + Qt::Key_F);
   find_files_action->setEnabled (false); // TODO: Make this work.
   edit_menu->addSeparator ();
 
@@ -609,43 +612,72 @@
 
   // Window menu
   QMenu *   window_menu = menuBar ()->addMenu (tr ("&Window"));
-  QAction * show_command_window_action  = window_menu->addAction (tr ("Show Command Window"));
+  QAction * show_command_window_action
+    = window_menu->addAction (tr ("Show Command Window"));
   show_command_window_action->setCheckable (true);
-  show_command_window_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_0);
-  QAction * show_history_action         = window_menu->addAction (tr ("Show Command History"));
+  show_command_window_action->setShortcut (Qt::ControlModifier
+                                           + Qt::ShiftModifier + Qt::Key_0);
+
+  QAction * show_history_action
+    = window_menu->addAction (tr ("Show Command History"));
   show_history_action->setCheckable (true);
-  show_history_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_1);
-  QAction * show_file_browser_action    = window_menu->addAction (tr ("Show Current Directory"));
+  show_history_action->setShortcut (Qt::ControlModifier
+                                    + Qt::ShiftModifier + Qt::Key_1);
+  QAction * show_file_browser_action
+    = window_menu->addAction (tr ("Show Current Directory"));
   show_file_browser_action->setCheckable (true);
-  show_file_browser_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_2);
-  QAction * show_workspace_action       = window_menu->addAction (tr ("Show Workspace"));
+  show_file_browser_action->setShortcut (Qt::ControlModifier
+                                         + Qt::ShiftModifier + Qt::Key_2);
+
+  QAction * show_workspace_action
+    = window_menu->addAction (tr ("Show Workspace"));
   show_workspace_action->setCheckable (true);
-  show_workspace_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_3);
-  QAction * show_editor_action          = window_menu->addAction (tr ("Show Editor"));
+  show_workspace_action->setShortcut (Qt::ControlModifier
+                                      + Qt::ShiftModifier + Qt::Key_3);
+
+  QAction * show_editor_action = window_menu->addAction (tr ("Show Editor"));
   show_editor_action->setCheckable (true);
-  show_editor_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier + Qt::Key_4);
+  show_editor_action->setShortcut (Qt::ControlModifier + Qt::ShiftModifier
+                                   + Qt::Key_4);
   window_menu->addSeparator ();
-  QAction * command_window_action  = window_menu->addAction (tr ("Command Window"));
+
+  QAction * command_window_action
+    = window_menu->addAction (tr ("Command Window"));
   command_window_action->setShortcut (Qt::ControlModifier + Qt::Key_0);
-  QAction * history_action         = window_menu->addAction (tr ("Command History"));
+
+  QAction * history_action
+    = window_menu->addAction (tr ("Command History"));
   history_action->setShortcut (Qt::ControlModifier + Qt::Key_1);
-  QAction * file_browser_action    = window_menu->addAction (tr ("Current Directory"));
+
+  QAction * file_browser_action
+    = window_menu->addAction (tr ("Current Directory"));
   file_browser_action->setShortcut (Qt::ControlModifier + Qt::Key_2);
-  QAction * workspace_action       = window_menu->addAction (tr ("Workspace"));
+
+  QAction * workspace_action
+    = window_menu->addAction (tr ("Workspace"));
   workspace_action->setShortcut (Qt::ControlModifier + Qt::Key_3);
-  QAction * editor_action          = window_menu->addAction (tr ("Editor"));
+
+  QAction * editor_action
+    = window_menu->addAction (tr ("Editor"));
   editor_action->setShortcut (Qt::ControlModifier + Qt::Key_4);
+
   window_menu->addSeparator ();
-  QAction * reset_windows_action        = window_menu->addAction (tr ("Reset Windows"));
+  QAction * reset_windows_action
+    = window_menu->addAction (tr ("Reset Windows"));
   reset_windows_action->setEnabled (false); // TODO: Make this work.
 
   // Help menu
   QMenu *   help_menu = menuBar ()->addMenu (tr ("&Help"));
-  QAction * report_bug_action           = help_menu->addAction (tr ("Report Bug"));
-  QAction * agora_action                = help_menu->addAction (tr ("Visit Agora"));
-  QAction * octave_forge_action         = help_menu->addAction (tr ("Visit Octave Forge"));
+  QAction * report_bug_action
+    = help_menu->addAction (tr ("Report Bug"));
+  QAction * agora_action
+    = help_menu->addAction (tr ("Visit Agora"));
+  QAction * octave_forge_action
+    = help_menu->addAction (tr ("Visit Octave Forge"));
   help_menu->addSeparator ();
-  QAction * about_octave_action         = help_menu->addAction (tr ("About Octave"));
+
+  QAction * about_octave_action
+    = help_menu->addAction (tr ("About Octave"));
 
   // Toolbars
   QToolBar *main_tool_bar = addToolBar ("Main");
@@ -665,13 +697,13 @@
 
   connect (qApp,                        SIGNAL (aboutToQuit ()),
            this,                        SLOT   (prepare_for_quit ()));
-  connect (preferences_action,             SIGNAL (triggered ()),
+  connect (preferences_action,          SIGNAL (triggered ()),
            this,                        SLOT   (process_settings_dialog_request ()));
   connect (exit_action,                 SIGNAL (triggered ()),
            this,                        SLOT   (close ()));
-  connect (new_script_action,             SIGNAL (triggered ()),
+  connect (new_script_action,           SIGNAL (triggered ()),
            this,                        SLOT   (new_file ()));
-  connect (open_action,            SIGNAL (triggered ()),
+  connect (open_action,                 SIGNAL (triggered ()),
            this,                        SLOT   (open_file ()));
   connect (report_bug_action,           SIGNAL (triggered ()),
            this,                        SLOT   (open_bug_tracker_page ()));
--- a/gui/src/main-window.h
+++ b/gui/src/main-window.h
@@ -63,8 +63,14 @@
   void event_reject (octave_event *e);
 
   QTerminal *get_terminal_view () { return _terminal; }
-  history_dock_widget *get_history_dock_widget () { return _history_dock_widget; }
-  files_dock_widget *get_files_dock_widget () { return _files_dock_widget; }
+  history_dock_widget *get_history_dock_widget ()
+  {
+    return _history_dock_widget;
+  }
+  files_dock_widget *get_files_dock_widget ()
+  {
+    return _files_dock_widget;
+  }
   bool is_closing () { return _closing; }
 
 signals:
--- a/gui/src/octave-adapter/octave-event.h
+++ b/gui/src/octave-adapter/octave-event.h
@@ -53,9 +53,10 @@
     virtual ~octave_event ()
     { }
 
-    /** Performs what is necessary to make this event happen.
-      * This code is thread-safe since it will be executed in the octave thread.
-      * However, you should take care to keep this code as short as possible. */
+    /** Performs what is necessary to make this event happen. This
+      * code is thread-safe since it will be executed in the octave
+      * thread. However, you should take care to keep this code as
+      * short as possible. */
     virtual bool perform () = 0;
 
     /**
--- a/gui/src/octave-adapter/octave-main-thread.cc
+++ b/gui/src/octave-adapter/octave-main-thread.cc
@@ -17,6 +17,7 @@
 
 #include "octave-main-thread.h"
 #include "octave-link.h"
+#include <string>
 
 octave_main_thread::octave_main_thread () : QThread ()
 {
@@ -25,9 +26,9 @@
 void
 octave_main_thread::run ()
 {
-  setlocale(LC_ALL, "en_US.UTF-8");
+  setlocale (LC_ALL, "en_US.UTF-8");
   int argc = 1;
   const char *argv[] = { "octave" };
-  emit ready();
-  octave_main (argc, (char **) argv, 0);
+  emit ready ();
+  octave_main (argc, const_cast<char**>(argv), 0);
 }
--- a/gui/src/octave-adapter/octave-main-thread.h
+++ b/gui/src/octave-adapter/octave-main-thread.h
@@ -33,7 +33,8 @@
   octave_main_thread ();
 
 signals:
-  /** This signal will be emitted when the thread is about to actually run octave_main. */
+  /** This signal will be emitted when the thread is about to actually
+    * run octave_main. */
   void ready();
 
 protected:
--- a/gui/src/symbol-information.h
+++ b/gui/src/symbol-information.h
@@ -88,7 +88,8 @@
   int
   hash () const
   {
-    return qHash (_symbol) + qHash (_type) + qHash (_value) + qHash (_dimension) + (int)_scope;
+    return qHash (_symbol) + qHash (_type) + qHash (_value)
+      + qHash (_dimension) + (int)_scope;
   }
 
   /** Compares two symbol information objects. */
@@ -122,7 +123,8 @@
     _type   = QString (symbol_record.varval ().type_name ().c_str ());
     octave_value ov = symbol_record.varval ();
 
-    // In case we have really large matrices or strings, cut them down for performance reasons.
+    // In case we have really large matrices or strings, cut them down
+    // for performance reasons.
     QString short_value_string;
     bool use_short_value_string = false;
     if (ov.is_matrix_type () || ov.is_cell ())
@@ -130,7 +132,8 @@
         if (ov.rows () * ov.columns () > 10)
           {
             use_short_value_string = true;
-            short_value_string = QString ("%1x%2 items").arg (ov.rows ()).arg (ov.columns ());
+            short_value_string
+              = QString ("%1x%2 items").arg (ov.rows ()).arg (ov.columns ());
           }
       }
     else if (ov.is_string ())
@@ -138,7 +141,8 @@
         if (ov.string_value ().length () > 40)
           {
             use_short_value_string = true;
-            short_value_string = QString::fromStdString (ov.string_value ().substr (0, 40));
+            short_value_string
+              = QString::fromStdString (ov.string_value ().substr (0, 40));
           }
       }
 
@@ -164,9 +168,11 @@
       _dimension = QString ("%1x%2").arg (ov.rows ())
                                     .arg (ov.columns ());
     else if (ov.is_function_handle ())
-      _dimension = QString ("func handle"); // See code for func2str for a possible solution
+      // See code for func2str for a possible solution
+      _dimension = QString ("func handle");
     else if (ov.is_inline_function ())
-      _dimension = QString ("inline func"); // See code for formula for a possible solution
+      // See code for formula for a possible solution
+      _dimension = QString ("inline func");
     else
       _dimension = "1";
 
--- a/gui/src/welcome-wizard.h
+++ b/gui/src/welcome-wizard.h
@@ -29,8 +29,8 @@
   Q_OBJECT
 
 public:
-  explicit welcome_wizard(QWidget *parent = 0);
-  ~welcome_wizard();
+  explicit welcome_wizard (QWidget *parent = 0);
+  ~welcome_wizard ();
 
 public slots:
   void next ();
--- a/gui/src/workspace-model.h
+++ b/gui/src/workspace-model.h
@@ -30,72 +30,72 @@
 class tree_item
 {
 public:
-  tree_item(const QList<QVariant> &data, tree_item *parent = 0) {
+  tree_item (const QList<QVariant> &data, tree_item *parent = 0) {
     _parent_item = parent;
     _item_data = data;
   }
 
-  tree_item(QVariant data = QVariant(), tree_item *parent = 0) {
+  tree_item (QVariant data = QVariant(), tree_item *parent = 0) {
     QList<QVariant> variantList;
     variantList << data << QVariant () << QVariant () << QVariant ();
     _parent_item = parent;
     _item_data = variantList;
   }
 
-  ~tree_item() {
-     qDeleteAll(_child_items);
+  ~tree_item () {
+     qDeleteAll (_child_items);
   }
 
-  void insert_child_item(int at, tree_item *item) {
+  void insert_child_item (int at, tree_item *item) {
     item->_parent_item = this;
-    _child_items.insert(at, item);
+    _child_items.insert (at, item);
   }
 
-  void add_child(tree_item *item) {
+  void add_child (tree_item *item) {
     item->_parent_item = this;
-    _child_items.append(item);
+    _child_items.append (item);
   }
 
-  void delete_child_items() {
-      qDeleteAll(_child_items);
-      _child_items.clear();
+  void delete_child_items () {
+      qDeleteAll (_child_items);
+      _child_items.clear ();
   }
 
-  void remove_child(tree_item *item) {
-    _child_items.removeAll(item);
+  void remove_child (tree_item *item) {
+    _child_items.removeAll (item);
   }
 
-  QVariant data(int column) const
+  QVariant data (int column) const
   {
     return _item_data[column];
   }
 
-  void set_data(int column, QVariant data)
+  void set_data (int column, QVariant data)
   {
     _item_data[column] = data;
   }
 
-  tree_item *child(int row) {
+  tree_item *child (int row) {
     return _child_items[row];
   }
 
-  int child_count() const {
+  int child_count () const {
     return _child_items.count();
   }
 
-  int column_count() const
+  int column_count () const
   {
     return _item_data.count();
   }
 
-  int row() const {
+  int row () const {
     if (_parent_item)
-      return _parent_item->_child_items.indexOf(const_cast<tree_item*>(this));
+      return _parent_item->_child_items.indexOf (const_cast<tree_item*>(this));
 
     return 0;
   }
 
-  tree_item *parent()
+  tree_item *parent ()
   {
     return _parent_item;
   }
@@ -118,15 +118,15 @@
   void event_accepted (octave_event *e);
   void event_reject (octave_event *e);
 
-  QVariant data(const QModelIndex &index, int role) const;
-  Qt::ItemFlags flags(const QModelIndex &index) const;
-  QVariant headerData(int section, Qt::Orientation orientation,
-                      int role = Qt::DisplayRole) const;
-  QModelIndex index(int row, int column,
-                    const QModelIndex &parent = QModelIndex()) const;
-  QModelIndex parent(const QModelIndex &index) const;
-  int rowCount(const QModelIndex &parent = QModelIndex()) const;
-  int columnCount(const QModelIndex &parent = QModelIndex()) const;
+  QVariant data (const QModelIndex &index, int role) const;
+  Qt::ItemFlags flags (const QModelIndex &index) const;
+  QVariant headerData (int section, Qt::Orientation orientation,
+                       int role = Qt::DisplayRole) const;
+  QModelIndex index (int row, int column,
+                    const QModelIndex &parent = QModelIndex ()) const;
+  QModelIndex parent (const QModelIndex &index) const;
+  int rowCount (const QModelIndex &parent = QModelIndex ()) const;
+  int columnCount (const QModelIndex &parent = QModelIndex ()) const;
 
   void insert_top_level_item (int at, tree_item *treeItem);
   tree_item *top_level_item (int at);
@@ -135,7 +135,7 @@
   void request_update_workspace ();
 
 signals:
-  void model_changed();
+  void model_changed ();
 
 private:
   /** Timer for periodically updating the workspace model from the current