Gui: fix possible problems with new style connect

* In UIntSpinBox rename the signal to not overwrite the signal of the base class
* In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox
* To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
This commit is contained in:
wmayer
2023-01-12 17:02:59 +01:00
parent b5a44e6f73
commit 3f615bbe05
14 changed files with 43 additions and 50 deletions

View File

@@ -236,12 +236,12 @@ TextEditor::TextEditor(QWidget* parent)
// set colors and font
hPrefGrp->NotifyAll();
connect(this, &Gui::TextEditor::cursorPositionChanged,
this, &TextEditor::highlightCurrentLine);
connect(this, &Gui::TextEditor::blockCountChanged,
this, &TextEditor::updateLineNumberAreaWidth);
connect(this, &Gui::TextEditor::updateRequest,
this, &TextEditor::updateLineNumberArea);
connect(this, &QPlainTextEdit::cursorPositionChanged,
this, &TextEditor::highlightCurrentLine);
connect(this, &QPlainTextEdit::blockCountChanged,
this, &TextEditor::updateLineNumberAreaWidth);
connect(this, &QPlainTextEdit::updateRequest,
this, &TextEditor::updateLineNumberArea);
updateLineNumberAreaWidth(0);
highlightCurrentLine();