Mercurial > octave
comparison libgui/src/m-editor/file-editor-tab.cc @ 27929:265b386f8b20
maint: Use two spaces between sentences in code comments.
* Canvas.cc, Figure.cc, ObjectProxy.cc, documentation.cc,
gui-preferences-sc.h, gui-settings.cc, file-editor-tab.cc, file-editor.cc,
find-dialog.cc, octave-qscintilla.cc, main-window.cc, qt-interpreter-events.cc,
resource-manager.cc, workspace-model.cc, gl2ps-print.cc, graphics.cc,
ls-hdf5.cc, urlwrite.cc, __ode15__.cc, gzip.cc, pt-anon-scopes.cc, pt-jit.cc,
DASPK.cc, url-transfer.cc: Use two spaces between sentences in code comments.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 10 Jan 2020 12:10:13 -0800 |
parents | bd51beb6205e |
children | f1844e33f621 |
comparison
equal
deleted
inserted
replaced
27928:6804f2feea46 | 27929:265b386f8b20 |
---|---|
306 int save_dialog = check_file_modified (true); | 306 int save_dialog = check_file_modified (true); |
307 if ((save_dialog == QMessageBox::Cancel) || | 307 if ((save_dialog == QMessageBox::Cancel) || |
308 (save_dialog == QMessageBox::Save)) | 308 (save_dialog == QMessageBox::Save)) |
309 { | 309 { |
310 // Ignore close event if file is saved or user cancels | 310 // Ignore close event if file is saved or user cancels |
311 // closing this window. In case of saving, tab is closed after | 311 // closing this window. In case of saving, tab is closed after |
312 // successful saving. | 312 // successful saving. |
313 e->ignore (); | 313 e->ignore (); |
314 } | 314 } |
315 else | 315 else |
316 { | 316 { |
697 { | 697 { |
698 m_lexer_apis->cancelPreparation (); // stop preparing if apis exists | 698 m_lexer_apis->cancelPreparation (); // stop preparing if apis exists |
699 | 699 |
700 bool update_apis = false; // flag, whether update of apis files | 700 bool update_apis = false; // flag, whether update of apis files |
701 | 701 |
702 // Get path to prepared api info (cache). Temporarily set the | 702 // Get path to prepared api info (cache). Temporarily set the |
703 // application name to 'octave' instead of 'GNU Octave' name for | 703 // application name to 'octave' instead of 'GNU Octave' name for |
704 // not having blanks in the path. | 704 // not having blanks in the path. |
705 QString tmp_app_name = QCoreApplication::applicationName (); | 705 QString tmp_app_name = QCoreApplication::applicationName (); |
706 QCoreApplication::setApplicationName ("octave"); // Set new name | 706 QCoreApplication::setApplicationName ("octave"); // Set new name |
707 | 707 |
751 // flag whether apis file needs update | 751 // flag whether apis file needs update |
752 update_apis = ! apis_file.exists (); | 752 update_apis = ! apis_file.exists (); |
753 | 753 |
754 if (octave_functions) | 754 if (octave_functions) |
755 { | 755 { |
756 // Functions may change frequently. Update the apis data | 756 // Functions may change frequently. Update the apis data |
757 // if the file is older than a few minutes preventing from | 757 // if the file is older than a few minutes preventing from |
758 // re-preparing data when the user opens several files. | 758 // re-preparing data when the user opens several files. |
759 QDateTime apis_time = apis_file.lastModified (); | 759 QDateTime apis_time = apis_file.lastModified (); |
760 if (QDateTime::currentDateTime () > apis_time.addSecs (180)) | 760 if (QDateTime::currentDateTime () > apis_time.addSecs (180)) |
761 update_apis = true; | 761 update_apis = true; |
1021 } | 1021 } |
1022 | 1022 |
1023 if (step_into) | 1023 if (step_into) |
1024 { | 1024 { |
1025 // Get current first breakpoint and set breakpoint waiting for | 1025 // Get current first breakpoint and set breakpoint waiting for |
1026 // the returned line number. Store whether to remove this breakpoint | 1026 // the returned line number. Store whether to remove this breakpoint |
1027 // afterwards. | 1027 // afterwards. |
1028 int first_bp_line | 1028 int first_bp_line |
1029 = m_edit_area->markerFindNext (0, (1 << marker::breakpoint)) + 1; | 1029 = m_edit_area->markerFindNext (0, (1 << marker::breakpoint)) + 1; |
1030 | 1030 |
1031 // Set flag for storing the line number of the breakpoint | 1031 // Set flag for storing the line number of the breakpoint |
2602 | 2602 |
2603 QString modified = ""; | 2603 QString modified = ""; |
2604 if (m_edit_area->isModified ()) | 2604 if (m_edit_area->isModified ()) |
2605 modified = tr ("\n\nWarning: The contents in the editor is modified!"); | 2605 modified = tr ("\n\nWarning: The contents in the editor is modified!"); |
2606 | 2606 |
2607 // Create a WindowModal message. The file editor tab can't be made | 2607 // Create a WindowModal message. The file editor tab can't be made |
2608 // parent because it may be deleted depending upon the response. | 2608 // parent because it may be deleted depending upon the response. |
2609 // Instead, change the m_edit_area to read only. | 2609 // Instead, change the m_edit_area to read only. |
2610 QMessageBox *msgBox | 2610 QMessageBox *msgBox |
2611 = new QMessageBox (QMessageBox::Warning, tr ("Octave Editor"), | 2611 = new QMessageBox (QMessageBox::Warning, tr ("Octave Editor"), |
2612 tr ("It seems that the file\n" | 2612 tr ("It seems that the file\n" |
2846 } | 2846 } |
2847 else | 2847 else |
2848 { | 2848 { |
2849 // Definitely close the file. | 2849 // Definitely close the file. |
2850 // Set modified to false to prevent the dialog box when the close event | 2850 // Set modified to false to prevent the dialog box when the close event |
2851 // is posted. If the user cancels the close in this dialog the tab is | 2851 // is posted. If the user cancels the close in this dialog the tab is |
2852 // left open with a non-existing file. | 2852 // left open with a non-existing file. |
2853 m_edit_area->setModified (false); | 2853 m_edit_area->setModified (false); |
2854 close (); | 2854 close (); |
2855 } | 2855 } |
2856 } | 2856 } |