# HG changeset patch # User Torsten Lilge # Date 1630133181 -7200 # Node ID c72ddd9fb513ebf9521f9017c7b38bcd6334f388 # Parent 7c494a811cc31499f9877845e48dc2dc059f0324 maint: use "m_" prefix for member variables in class find_dialog diff -r 7c494a811cc3 -r c72ddd9fb513 libgui/src/m-editor/find-dialog.cc --- a/libgui/src/m-editor/find-dialog.cc Fri Aug 27 16:50:57 2021 +0200 +++ b/libgui/src/m-editor/find-dialog.cc Sat Aug 28 08:46:21 2021 +0200 @@ -96,105 +96,105 @@ setWindowTitle (tr ("Editor: Find and Replace")); setWindowIcon (QIcon (":/actions/icons/find.png")); - _search_label = new QLabel (tr ("Find &what:")); - _search_line_edit = new QComboBox (this); - _search_line_edit->setToolTip (tr ("Enter text to search for")); - _search_line_edit->setEditable (true); - _search_line_edit->setMaxCount (m_mru_length); - _search_line_edit->completer ()->setCaseSensitivity (Qt::CaseSensitive); - _search_label->setBuddy (_search_line_edit); + m_search_label = new QLabel (tr ("Find &what:")); + m_search_line_edit = new QComboBox (this); + m_search_line_edit->setToolTip (tr ("Enter text to search for")); + m_search_line_edit->setEditable (true); + m_search_line_edit->setMaxCount (m_mru_length); + m_search_line_edit->completer ()->setCaseSensitivity (Qt::CaseSensitive); + m_search_label->setBuddy (m_search_line_edit); - _replace_label = new QLabel (tr ("Re&place with:")); - _replace_line_edit = new QComboBox (this); - _replace_line_edit->setToolTip (tr ("Enter new text replacing search hits")); - _replace_line_edit->setEditable (true); - _replace_line_edit->setMaxCount (m_mru_length); - _replace_line_edit->completer ()->setCaseSensitivity (Qt::CaseSensitive); - _replace_label->setBuddy (_replace_line_edit); + m_replace_label = new QLabel (tr ("Re&place with:")); + m_replace_line_edit = new QComboBox (this); + m_replace_line_edit->setToolTip (tr ("Enter new text replacing search hits")); + m_replace_line_edit->setEditable (true); + m_replace_line_edit->setMaxCount (m_mru_length); + m_replace_line_edit->completer ()->setCaseSensitivity (Qt::CaseSensitive); + m_replace_label->setBuddy (m_replace_line_edit); - int width = QFontMetrics (_search_line_edit->font ()).averageCharWidth(); - _search_line_edit->setFixedWidth (20*width); - _replace_line_edit->setFixedWidth (20*width); + int width = QFontMetrics (m_search_line_edit->font ()).averageCharWidth(); + m_search_line_edit->setFixedWidth (20*width); + m_replace_line_edit->setFixedWidth (20*width); - _case_check_box = new QCheckBox (tr ("Match &case")); - _from_start_check_box = new QCheckBox (tr ("Search from &start")); - _wrap_check_box = new QCheckBox (tr ("&Wrap while searching")); - _wrap_check_box->setChecked (true); - _find_next_button = new QPushButton (tr ("&Find Next")); - _find_prev_button = new QPushButton (tr ("Find &Previous")); - _replace_button = new QPushButton (tr ("&Replace")); - _replace_all_button = new QPushButton (tr ("Replace &All")); + m_case_check_box = new QCheckBox (tr ("Match &case")); + m_from_start_check_box = new QCheckBox (tr ("Search from &start")); + m_wrap_check_box = new QCheckBox (tr ("&Wrap while searching")); + m_wrap_check_box->setChecked (true); + m_find_next_button = new QPushButton (tr ("&Find Next")); + m_find_prev_button = new QPushButton (tr ("Find &Previous")); + m_replace_button = new QPushButton (tr ("&Replace")); + m_replace_all_button = new QPushButton (tr ("Replace &All")); - _more_button = new QPushButton (tr ("&More...")); - _more_button->setCheckable (true); - _more_button->setAutoDefault (false); + m_more_button = new QPushButton (tr ("&More...")); + m_more_button->setCheckable (true); + m_more_button->setAutoDefault (false); - _button_box = new QDialogButtonBox (Qt::Vertical); - _button_box->addButton (_find_next_button, QDialogButtonBox::ActionRole); - _button_box->addButton (_find_prev_button, QDialogButtonBox::ActionRole); - _button_box->addButton (_replace_button, QDialogButtonBox::ActionRole); - _button_box->addButton (_replace_all_button, QDialogButtonBox::ActionRole); - _button_box->addButton (_more_button, QDialogButtonBox::ActionRole); - _button_box->addButton (QDialogButtonBox::Close); + m_button_box = new QDialogButtonBox (Qt::Vertical); + m_button_box->addButton (m_find_next_button, QDialogButtonBox::ActionRole); + m_button_box->addButton (m_find_prev_button, QDialogButtonBox::ActionRole); + m_button_box->addButton (m_replace_button, QDialogButtonBox::ActionRole); + m_button_box->addButton (m_replace_all_button, QDialogButtonBox::ActionRole); + m_button_box->addButton (m_more_button, QDialogButtonBox::ActionRole); + m_button_box->addButton (QDialogButtonBox::Close); - _extension = new QWidget (this); - _whole_words_check_box = new QCheckBox (tr ("&Whole words")); - _regex_check_box = new QCheckBox (tr ("Regular E&xpressions")); - _backward_check_box = new QCheckBox (tr ("Search &backward")); - _search_selection_check_box = new QCheckBox (tr ("Search se&lection")); - _search_selection_check_box->setCheckable (true); + m_extension = new QWidget (this); + m_whole_words_check_box = new QCheckBox (tr ("&Whole words")); + m_regex_check_box = new QCheckBox (tr ("Regular E&xpressions")); + m_backward_check_box = new QCheckBox (tr ("Search &backward")); + m_search_selection_check_box = new QCheckBox (tr ("Search se&lection")); + m_search_selection_check_box->setCheckable (true); - connect (_find_next_button, &QPushButton::clicked, + connect (m_find_next_button, &QPushButton::clicked, this, &find_dialog::find_next); - connect (_find_prev_button, &QPushButton::clicked, + connect (m_find_prev_button, &QPushButton::clicked, this, &find_dialog::find_prev); - connect (_more_button, &QPushButton::toggled, - _extension, &QWidget::setVisible); - connect (_replace_button, &QPushButton::clicked, + connect (m_more_button, &QPushButton::toggled, + m_extension, &QWidget::setVisible); + connect (m_replace_button, &QPushButton::clicked, this, &find_dialog::replace); - connect (_replace_all_button, &QPushButton::clicked, + connect (m_replace_all_button, &QPushButton::clicked, this, &find_dialog::replace_all); - connect (_backward_check_box, &QCheckBox::stateChanged, + connect (m_backward_check_box, &QCheckBox::stateChanged, this, &find_dialog::handle_backward_search_changed); - connect (_button_box, &QDialogButtonBox::rejected, + connect (m_button_box, &QDialogButtonBox::rejected, this, &find_dialog::close); - connect (_search_selection_check_box, &QCheckBox::stateChanged, + connect (m_search_selection_check_box, &QCheckBox::stateChanged, this, &find_dialog::handle_sel_search_changed); QVBoxLayout *extension_layout = new QVBoxLayout (); extension_layout->setMargin (0); - extension_layout->addWidget (_whole_words_check_box); - extension_layout->addWidget (_backward_check_box); - extension_layout->addWidget (_search_selection_check_box); - _extension->setLayout (extension_layout); + extension_layout->addWidget (m_whole_words_check_box); + extension_layout->addWidget (m_backward_check_box); + extension_layout->addWidget (m_search_selection_check_box); + m_extension->setLayout (extension_layout); QGridLayout *top_left_layout = new QGridLayout; - top_left_layout->addWidget (_search_label, 1, 1); - top_left_layout->addWidget (_search_line_edit, 1, 2); - top_left_layout->addWidget (_replace_label, 2, 1); - top_left_layout->addWidget (_replace_line_edit, 2, 2); + top_left_layout->addWidget (m_search_label, 1, 1); + top_left_layout->addWidget (m_search_line_edit, 1, 2); + top_left_layout->addWidget (m_replace_label, 2, 1); + top_left_layout->addWidget (m_replace_line_edit, 2, 2); QVBoxLayout *left_layout = new QVBoxLayout; left_layout->addLayout (top_left_layout); left_layout->insertStretch (1, 5); - left_layout->addWidget (_case_check_box); - left_layout->addWidget (_from_start_check_box); - left_layout->addWidget (_wrap_check_box); - left_layout->addWidget (_regex_check_box); + left_layout->addWidget (m_case_check_box); + left_layout->addWidget (m_from_start_check_box); + left_layout->addWidget (m_wrap_check_box); + left_layout->addWidget (m_regex_check_box); QGridLayout *main_layout = new QGridLayout; main_layout->setSizeConstraint (QLayout::SetFixedSize); main_layout->addLayout (left_layout, 0, 0); - main_layout->addWidget (_button_box, 0, 1); - main_layout->addWidget (_extension, 1, 0); + main_layout->addWidget (m_button_box, 0, 1); + main_layout->addWidget (m_extension, 1, 0); setLayout (main_layout); - _extension->hide (); - _find_next_button->setDefault (true); - _find_result_available = false; - _rep_all = 0; - _rep_active = false; + m_extension->hide (); + m_find_next_button->setDefault (true); + m_find_result_available = false; + m_rep_all = 0; + m_rep_active = false; // Connect required external signals connect (ed, SIGNAL (edit_area_changed (octave_qscintilla*)), @@ -209,10 +209,10 @@ // The edit_area has changed: update relevant data of the file dialog void find_dialog::update_edit_area (octave_qscintilla* edit_area) { - _edit_area = edit_area; - _search_selection_check_box->setEnabled (edit_area->hasSelectedText ()); + m_edit_area = edit_area; + m_search_selection_check_box->setEnabled (edit_area->hasSelectedText ()); - connect (_edit_area, SIGNAL (copyAvailable (bool)), + connect (m_edit_area, SIGNAL (copyAvailable (bool)), this, SLOT (handle_selection_changed (bool)), Qt::UniqueConnection); } @@ -236,30 +236,30 @@ s->setValue (ed_fdlg_pos.key, m_last_position); // Is current search/replace text in the mru list? - mru_update (_search_line_edit); - mru_update (_replace_line_edit); + mru_update (m_search_line_edit); + mru_update (m_replace_line_edit); // Store mru lists QStringList mru; - for (int i = 0; i < _search_line_edit->count (); i++) - mru.append (_search_line_edit->itemText (i)); + for (int i = 0; i < m_search_line_edit->count (); i++) + mru.append (m_search_line_edit->itemText (i)); s->setValue (ed_fdlg_search.key, mru); mru.clear (); - for (int i = 0; i < _replace_line_edit->count (); i++) - mru.append (_replace_line_edit->itemText (i)); + for (int i = 0; i < m_replace_line_edit->count (); i++) + mru.append (m_replace_line_edit->itemText (i)); s->setValue (ed_fdlg_replace.key, mru); // Store dialog's options int opts = 0 - + _extension->isVisible () * FIND_DLG_MORE - + _case_check_box->isChecked () * FIND_DLG_CASE - + _from_start_check_box->isChecked () * FIND_DLG_START - + _wrap_check_box->isChecked () * FIND_DLG_WRAP - + _regex_check_box->isChecked () * FIND_DLG_REGX - + _whole_words_check_box->isChecked () * FIND_DLG_WORDS - + _backward_check_box->isChecked () * FIND_DLG_BACK - + _search_selection_check_box->isChecked () * FIND_DLG_SEL; + + m_extension->isVisible () * FIND_DLG_MORE + + m_case_check_box->isChecked () * FIND_DLG_CASE + + m_from_start_check_box->isChecked () * FIND_DLG_START + + m_wrap_check_box->isChecked () * FIND_DLG_WRAP + + m_regex_check_box->isChecked () * FIND_DLG_REGX + + m_whole_words_check_box->isChecked () * FIND_DLG_WORDS + + m_backward_check_box->isChecked () * FIND_DLG_BACK + + m_search_selection_check_box->isChecked () * FIND_DLG_SEL; s->setValue (ed_fdlg_opts.key, opts); s->sync (); @@ -274,24 +274,24 @@ QStringList mru = s->value (ed_fdlg_search.key).toStringList (); while (mru.length () > m_mru_length) mru.removeLast (); - _search_line_edit->addItems (mru); + m_search_line_edit->addItems (mru); mru = s->value (ed_fdlg_replace.key).toStringList (); while (mru.length () > m_mru_length) mru.removeLast (); - _replace_line_edit->addItems (mru); + m_replace_line_edit->addItems (mru); // Get the dialog's options int opts = s->value (ed_fdlg_opts.key, ed_fdlg_opts.def).toInt (); - _extension->setVisible (FIND_DLG_MORE & opts); - _case_check_box->setChecked (FIND_DLG_CASE & opts); - _from_start_check_box->setChecked (FIND_DLG_START & opts); - _wrap_check_box->setChecked (FIND_DLG_WRAP & opts); - _regex_check_box->setChecked (FIND_DLG_REGX & opts); - _whole_words_check_box->setChecked (FIND_DLG_WORDS & opts); - _backward_check_box->setChecked (FIND_DLG_BACK & opts); - _search_selection_check_box->setChecked (FIND_DLG_SEL & opts); + m_extension->setVisible (FIND_DLG_MORE & opts); + m_case_check_box->setChecked (FIND_DLG_CASE & opts); + m_from_start_check_box->setChecked (FIND_DLG_START & opts); + m_wrap_check_box->setChecked (FIND_DLG_WRAP & opts); + m_regex_check_box->setChecked (FIND_DLG_REGX & opts); + m_whole_words_check_box->setChecked (FIND_DLG_WORDS & opts); + m_backward_check_box->setChecked (FIND_DLG_BACK & opts); + m_search_selection_check_box->setChecked (FIND_DLG_SEL & opts); // Position: lower right of editor's position int xp = ed_bottom_right.x () - sizeHint ().width (); @@ -320,32 +320,32 @@ void find_dialog::handle_backward_search_changed (int backward) { if (backward) - _from_start_check_box->setText (tr ("Search from end")); + m_from_start_check_box->setText (tr ("Search from end")); else - _from_start_check_box->setText (tr ("Search from start")); + m_from_start_check_box->setText (tr ("Search from start")); } // search text has changed: reset the search void find_dialog::handle_search_text_changed (void) { // Return if nothing has changed - if (_search_line_edit->currentText () == _search_line_edit->itemText (0)) + if (m_search_line_edit->currentText () == m_search_line_edit->itemText (0)) return; - if (_search_selection_check_box->isChecked ()) - _find_result_available = false; + if (m_search_selection_check_box->isChecked ()) + m_find_result_available = false; - mru_update (_search_line_edit); + mru_update (m_search_line_edit); } // replaced text has changed: reset the search void find_dialog::handle_replace_text_changed (void) { // Return if nothing has changed - if (_replace_line_edit->currentText () == _replace_line_edit->itemText (0)) + if (m_replace_line_edit->currentText () == m_replace_line_edit->itemText (0)) return; - mru_update (_replace_line_edit); + mru_update (m_replace_line_edit); } // Update the mru list @@ -377,52 +377,52 @@ void find_dialog::handle_sel_search_changed (int selected) { - _from_start_check_box->setEnabled (! selected); - _find_result_available = false; + m_from_start_check_box->setEnabled (! selected); + m_find_result_available = false; } void find_dialog::handle_selection_changed (bool has_selected) { - if (_rep_active) + if (m_rep_active) return; - _search_selection_check_box->setEnabled (has_selected); - _find_result_available = false; + m_search_selection_check_box->setEnabled (has_selected); + m_find_result_available = false; } // initialize search text with selected text if this is in one single line void find_dialog::init_search_text (void) { - if (_edit_area && _edit_area->hasSelectedText ()) + if (m_edit_area && m_edit_area->hasSelectedText ()) { int lbeg, lend, cbeg, cend; - _edit_area->getSelection (&lbeg,&cbeg,&lend,&cend); + m_edit_area->getSelection (&lbeg,&cbeg,&lend,&cend); if (lbeg == lend) - _search_line_edit->setCurrentText (_edit_area->selectedText ()); + m_search_line_edit->setCurrentText (m_edit_area->selectedText ()); } // set focus to "Find what" and select all text - _search_line_edit->setFocus (); - _search_line_edit->lineEdit ()->selectAll (); + m_search_line_edit->setFocus (); + m_search_line_edit->lineEdit ()->selectAll (); // Default to "find" next time. // Otherwise, it defaults to the last action, which may be "replace all". - _find_next_button->setDefault (true); + m_find_next_button->setDefault (true); } void find_dialog::find_next (void) { - find (! _backward_check_box->isChecked ()); + find (! m_backward_check_box->isChecked ()); } void find_dialog::find_prev (void) { - find (_backward_check_box->isChecked ()); + find (m_backward_check_box->isChecked ()); } void find_dialog::find (bool forward) { - if (! _edit_area) + if (! m_edit_area) return; handle_search_text_changed (); @@ -430,21 +430,21 @@ // line adn col: -1 means search starts at current position int line = -1, col = -1; - bool do_wrap = _wrap_check_box->isChecked (); + bool do_wrap = m_wrap_check_box->isChecked (); bool do_forward = forward; // Initialize the selection begin and end if it is the first search - if (! _find_result_available) + if (! m_find_result_available) { - if (_search_selection_check_box->isChecked () - && _edit_area->hasSelectedText ()) + if (m_search_selection_check_box->isChecked () + && m_edit_area->hasSelectedText ()) { int l1, c1, l2, c2; - _edit_area->getSelection (&l1, &c1, &l2, &c2); + m_edit_area->getSelection (&l1, &c1, &l2, &c2); // Store the position of the selection - m_sel_beg = _edit_area->positionFromLineIndex (l1, c1); - m_sel_end = _edit_area->positionFromLineIndex (l2, c2); + m_sel_beg = m_edit_area->positionFromLineIndex (l1, c1); + m_sel_end = m_edit_area->positionFromLineIndex (l2, c2); m_in_sel = true; } else @@ -452,14 +452,14 @@ } // Get the correct line/col for beginning the search - if (_rep_all) + if (m_rep_all) { // Replace All - if (_rep_all == 1) + if (m_rep_all == 1) { // Start at the beginning of file/sel if it is the first try if (m_in_sel) - _edit_area->lineIndexFromPosition (m_sel_beg, &line, &col); + m_edit_area->lineIndexFromPosition (m_sel_beg, &line, &col); else { line = 0; @@ -472,15 +472,15 @@ { // Normal search (not replace all): calculate start position of // search (in file or selection) - if (_from_start_check_box->isChecked () - || (m_in_sel && (! _find_result_available))) + if (m_from_start_check_box->isChecked () + || (m_in_sel && (! m_find_result_available))) { // From the beginning or the end of file/sel if (do_forward) { // From the beginning if (m_in_sel) - _edit_area->lineIndexFromPosition (m_sel_beg, &line, &col); + m_edit_area->lineIndexFromPosition (m_sel_beg, &line, &col); else { line = 0; @@ -491,11 +491,11 @@ { // From the end if (m_in_sel) - _edit_area->lineIndexFromPosition (m_sel_end, &line, &col); + m_edit_area->lineIndexFromPosition (m_sel_end, &line, &col); else { - line = _edit_area->lines () - 1; - col = _edit_area->text (line).length () - 1; + line = m_edit_area->lines () - 1; + col = m_edit_area->text (line).length () - 1; if (col == -1) col = 0; } @@ -505,24 +505,24 @@ { // Start from where the cursor is. Fix QScintilla's cursor // positioning - _edit_area->getCursorPosition (&line,&col); - if (_find_result_available && _edit_area->hasSelectedText ()) + m_edit_area->getCursorPosition (&line,&col); + if (m_find_result_available && m_edit_area->hasSelectedText ()) { - int currpos = _edit_area->positionFromLineIndex (line,col); - currpos -= (_search_line_edit->currentText ().length ()); + int currpos = m_edit_area->positionFromLineIndex (line,col); + currpos -= (m_search_line_edit->currentText ().length ()); if (currpos < 0) currpos = 0; - _edit_area->lineIndexFromPosition (currpos, &line, &col); + m_edit_area->lineIndexFromPosition (currpos, &line, &col); } } } // Do the search - _find_result_available - = _edit_area->findFirst (_search_line_edit->currentText (), - _regex_check_box->isChecked (), - _case_check_box->isChecked (), - _whole_words_check_box->isChecked (), + m_find_result_available + = m_edit_area->findFirst (m_search_line_edit->currentText (), + m_regex_check_box->isChecked (), + m_case_check_box->isChecked (), + m_whole_words_check_box->isChecked (), do_wrap, do_forward, line,col, @@ -532,42 +532,42 @@ #endif ); - if (_find_result_available) + if (m_find_result_available) { // Search successful: reset search-from-start box and check for // the current selection - _from_start_check_box->setChecked (0); + m_from_start_check_box->setChecked (0); if (m_in_sel) { - _edit_area->getCursorPosition (&line,&col); - int pos = _edit_area->positionFromLineIndex (line, col); + m_edit_area->getCursorPosition (&line,&col); + int pos = m_edit_area->positionFromLineIndex (line, col); int l1, c1, l2, c2; - _edit_area->lineIndexFromPosition (m_sel_beg, &l1, &c1); - _edit_area->lineIndexFromPosition (m_sel_end, &l2, &c2); - _edit_area->show_selection_markers (l1, c1, l2, c2); + m_edit_area->lineIndexFromPosition (m_sel_beg, &l1, &c1); + m_edit_area->lineIndexFromPosition (m_sel_end, &l2, &c2); + m_edit_area->show_selection_markers (l1, c1, l2, c2); // Check if new start position is still within the selection - _find_result_available = pos >= m_sel_beg && pos <= m_sel_end; + m_find_result_available = pos >= m_sel_beg && pos <= m_sel_end; } } // No more search hits - if (! _find_result_available) + if (! m_find_result_available) { if (m_in_sel) { // Restore real selection and remove marker for selection int l1, c1, l2, c2; - _edit_area->lineIndexFromPosition (m_sel_beg, &l1, &c1); - _edit_area->lineIndexFromPosition (m_sel_end, &l2, &c2); - _edit_area->setSelection (l1, c1, l2, c2); - _edit_area->clear_selection_markers (); + m_edit_area->lineIndexFromPosition (m_sel_beg, &l1, &c1); + m_edit_area->lineIndexFromPosition (m_sel_end, &l2, &c2); + m_edit_area->setSelection (l1, c1, l2, c2); + m_edit_area->clear_selection_markers (); } // Display message if not replace all - if (! _rep_all) + if (! m_rep_all) no_matches_message (); } @@ -575,31 +575,31 @@ void find_dialog::do_replace (void) { - if (_edit_area) + if (m_edit_area) { - _rep_active = true; // changes in selection not made by the user + m_rep_active = true; // changes in selection not made by the user - _edit_area->replace (_replace_line_edit->currentText ()); + m_edit_area->replace (m_replace_line_edit->currentText ()); if (m_in_sel) { // Update the length of the selection m_sel_end = m_sel_end - - _search_line_edit->currentText ().toUtf8 ().size () - + _replace_line_edit->currentText ().toUtf8 ().size (); + - m_search_line_edit->currentText ().toUtf8 ().size () + + m_replace_line_edit->currentText ().toUtf8 ().size (); } - _rep_active = false; + m_rep_active = false; } } void find_dialog::replace (void) { - if (_edit_area) + if (m_edit_area) { handle_replace_text_changed (); // Do the replace if we have selected text - if (_find_result_available && _edit_area->hasSelectedText ()) + if (m_find_result_available && m_edit_area->hasSelectedText ()) do_replace (); find_next (); @@ -610,34 +610,34 @@ { int line, col; - if (_edit_area) + if (m_edit_area) { handle_replace_text_changed (); - _edit_area->getCursorPosition (&line,&col); + m_edit_area->getCursorPosition (&line,&col); - _rep_all = 1; + m_rep_all = 1; find_next (); // find first occurrence (forward) - _edit_area->beginUndoAction (); - while (_find_result_available) // while search string is found + m_edit_area->beginUndoAction (); + while (m_find_result_available) // while search string is found { do_replace (); - _rep_all++; // inc counter + m_rep_all++; // inc counter find_next (); // find next } - _edit_area->endUndoAction (); + m_edit_area->endUndoAction (); QMessageBox msg_box (QMessageBox::Information, tr ("Replace Result"), - tr ("%1 items replaced").arg (_rep_all-1), + tr ("%1 items replaced").arg (m_rep_all-1), QMessageBox::Ok, this); msg_box.exec (); - _rep_all = 0; - _find_result_available = false; + m_rep_all = 0; + m_find_result_available = false; - if (! _search_selection_check_box->isChecked ()) - _edit_area->setCursorPosition (line,col); + if (! m_search_selection_check_box->isChecked ()) + m_edit_area->setCursorPosition (line,col); } } diff -r 7c494a811cc3 -r c72ddd9fb513 libgui/src/m-editor/find-dialog.h --- a/libgui/src/m-editor/find-dialog.h Fri Aug 27 16:50:57 2021 +0200 +++ b/libgui/src/m-editor/find-dialog.h Sat Aug 28 08:46:21 2021 +0200 @@ -144,36 +144,36 @@ octave_dock_widget *m_editor; - QLabel *_search_label; - QComboBox *_search_line_edit; - QLabel *_replace_label; - QComboBox *_replace_line_edit; - QCheckBox *_case_check_box; - QCheckBox *_from_start_check_box; - QCheckBox *_wrap_check_box; - QCheckBox *_whole_words_check_box; - QCheckBox *_regex_check_box; - QCheckBox *_search_selection_check_box; - QCheckBox *_backward_check_box; - QDialogButtonBox *_button_box; - QPushButton *_find_next_button; - QPushButton *_find_prev_button; - QPushButton *_replace_button; - QPushButton *_replace_all_button; - QPushButton *_more_button; - QWidget *_extension; - octave_qscintilla *_edit_area; - bool _find_result_available; - int _rep_all; - bool _rep_active; + QLabel *m_search_label; + QComboBox *m_search_line_edit; + QLabel *m_replace_label; + QComboBox *m_replace_line_edit; + QCheckBox *m_case_check_box; + QCheckBox *m_from_start_check_box; + QCheckBox *m_wrap_check_box; + QCheckBox *m_whole_words_check_box; + QCheckBox *m_regex_check_box; + QCheckBox *m_search_selection_check_box; + QCheckBox *m_backward_check_box; + QDialogButtonBox *m_button_box; + QPushButton *m_find_next_button; + QPushButton *m_find_prev_button; + QPushButton *m_replace_button; + QPushButton *m_replace_all_button; + QPushButton *m_more_button; + QWidget *m_extension; + octave_qscintilla *m_edit_area; + bool m_find_result_available; + int m_rep_all; + bool m_rep_active; - bool m_in_sel; - int m_sel_beg; - int m_sel_end; + bool m_in_sel; + int m_sel_beg; + int m_sel_end; - QPoint m_last_position; + QPoint m_last_position; - const int m_mru_length = 10; + const int m_mru_length = 10; }; }