changeset: 17792:7237f30b70d3 bookmark: @ tag: qbase tag: qsci_2_6_mac_p07 tag: qtip tag: tip user: Torsten date: Tue Oct 29 18:53:34 2013 +0100 summary: [mq]: qsci_2_6_mac_p07 diff -r 224e76250443 -r 7237f30b70d3 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Tue Oct 29 10:28:39 2013 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Oct 29 18:53:34 2013 +0100 @@ -84,40 +84,40 @@ _find_dialog = 0; _find_dialog_is_visible = false; - // symbols - _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/bookmark.png"), - debugger_position); + //// symbols + //_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/bookmark.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)); - _edit_area->setMarginsBackgroundColor (QColor (232, 232, 220)); - _edit_area->setMarginType (2, QsciScintilla::TextMargin); + //// line numbers + //_edit_area->setMarginsForegroundColor (QColor (96, 96, 96)); + //_edit_area->setMarginsBackgroundColor (QColor (232, 232, 220)); + //_edit_area->setMarginType (2, QsciScintilla::TextMargin); - // code folding - _edit_area->setMarginType (3, QsciScintilla::SymbolMargin); - _edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3); + //// code folding + //_edit_area->setMarginType (3, QsciScintilla::SymbolMargin); + //_edit_area->setFolding (QsciScintilla::BoxedTreeFoldStyle , 3); - // other features - _edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch); - _edit_area->setAutoIndent (true); - _edit_area->setIndentationWidth (2); - _edit_area->setIndentationsUseTabs (false); + //// other features + //_edit_area->setBraceMatching (QsciScintilla::StrictBraceMatch); + //_edit_area->setAutoIndent (true); + //_edit_area->setIndentationWidth (2); + //_edit_area->setIndentationsUseTabs (false); _edit_area->setUtf8 (true); - // auto completion - _edit_area->autoCompleteFromAll (); - _edit_area->setAutoCompletionSource (QsciScintilla::AcsAll); + //// auto completion + //_edit_area->autoCompleteFromAll (); + //_edit_area->setAutoCompletionSource (QsciScintilla::AcsAll); QVBoxLayout *edit_area_layout = new QVBoxLayout (); edit_area_layout->addWidget (_edit_area); @@ -134,9 +134,9 @@ connect (&_file_system_watcher, SIGNAL (fileChanged (const QString&)), this, SLOT (file_has_changed (const QString&))); - QSettings *settings = resource_manager::get_settings (); - if (settings) - notice_settings (settings); + //QSettings *settings = resource_manager::get_settings (); + //if (settings) + //notice_settings (settings); } file_editor_tab::~file_editor_tab (void) @@ -286,44 +286,44 @@ } } - _lexer_apis = new QsciAPIs(lexer); - if (_lexer_apis) - { - // get path to prepared api info - QDesktopServices desktopServices; - QString prep_apis_path - = desktopServices.storageLocation (QDesktopServices::HomeLocation) - + "/.config/octave/" + QString(OCTAVE_VERSION) + "/qsci/"; - _prep_apis_file = prep_apis_path + lexer->lexer () + ".pap"; + //_lexer_apis = new QsciAPIs(lexer); + //if (_lexer_apis) + //{ + //// get path to prepared api info + //QDesktopServices desktopServices; + //QString prep_apis_path + //= desktopServices.storageLocation (QDesktopServices::HomeLocation) + //+ "/.config/octave/" + QString(OCTAVE_VERSION) + "/qsci/"; + //_prep_apis_file = prep_apis_path + lexer->lexer () + ".pap"; - if (!_lexer_apis->loadPrepared (_prep_apis_file)) - { - // no prepared info loaded, prepare and save if possible + //if (!_lexer_apis->loadPrepared (_prep_apis_file)) + //{ + //// no prepared info loaded, prepare and save if possible - // create raw apis info - QString keyword; - QStringList keyword_list; - int i,j; - for (i=1; i<=3; i++) // test the first 5 keyword sets - { - keyword = QString(lexer->keywords (i)); // get list - keyword_list = keyword.split (QRegExp ("\\s+")); // split - for (j = 0; j < keyword_list.size (); j++) // add to API - _lexer_apis->add (keyword_list.at (j)); - } + //// create raw apis info + //QString keyword; + //QStringList keyword_list; + //int i,j; + //for (i=1; i<=3; i++) // test the first 5 keyword sets + //{ + //keyword = QString(lexer->keywords (i)); // get list + //keyword_list = keyword.split (QRegExp ("\\s+")); // split + //for (j = 0; j < keyword_list.size (); j++) // add to API + //_lexer_apis->add (keyword_list.at (j)); + //} - // dsiconnect slot for saving prepared info if already connected - disconnect (_lexer_apis, SIGNAL (apiPreparationFinished ()), 0, 0); - // check whether path for prepared info exists or can be created - if (QDir("/").mkpath (prep_apis_path)) - { - // path exists, apis info can be saved there - connect (_lexer_apis, SIGNAL (apiPreparationFinished ()), - this, SLOT (save_apis_info ())); - } - _lexer_apis->prepare (); // prepare apis info - } - } + //// dsiconnect slot for saving prepared info if already connected + //disconnect (_lexer_apis, SIGNAL (apiPreparationFinished ()), 0, 0); + //// check whether path for prepared info exists or can be created + //if (QDir("/").mkpath (prep_apis_path)) + //{ + //// path exists, apis info can be saved there + //connect (_lexer_apis, SIGNAL (apiPreparationFinished ()), + //this, SLOT (save_apis_info ())); + //} + //_lexer_apis->prepare (); // prepare apis info + //} + //} QSettings *settings = resource_manager::get_settings (); if (settings) diff -r 224e76250443 -r 7237f30b70d3 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Tue Oct 29 10:28:39 2013 -0700 +++ b/libgui/src/m-editor/octave-qscintilla.cc Tue Oct 29 18:53:34 2013 +0100 @@ -89,6 +89,7 @@ contextmenu_run (true); } +#ifndef Q_OS_MAC #ifdef HAVE_QSCI_VERSION_2_6_0 // context menu requested void @@ -145,6 +146,7 @@ context_menu->exec (global_pos); } #endif +#endif // handle the menu entry for calling help or doc diff -r 224e76250443 -r 7237f30b70d3 libgui/src/m-editor/octave-qscintilla.h --- a/libgui/src/m-editor/octave-qscintilla.h Tue Oct 29 10:28:39 2013 -0700 +++ b/libgui/src/m-editor/octave-qscintilla.h Tue Oct 29 18:53:34 2013 +0100 @@ -38,9 +38,11 @@ octave_qscintilla (QWidget *p); ~octave_qscintilla (); +#ifndef Q_OS_MAC #ifdef HAVE_QSCI_VERSION_2_6_0 virtual void contextMenuEvent (QContextMenuEvent *e); #endif +#endif void context_help_doc (bool); void context_edit (); void context_run ();