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 19d624396f
commit 103de43a4e
14 changed files with 43 additions and 50 deletions

View File

@@ -532,7 +532,7 @@ ClearLineEdit::ClearLineEdit (QWidget * parent)
clearAction = this->addAction(QIcon(QString::fromLatin1(":/icons/edit-cleartext.svg")),
QLineEdit::TrailingPosition);
connect(clearAction, &QAction::triggered, this, &ClearLineEdit::clear);
connect(this, &Gui::ClearLineEdit::textChanged, this, &ClearLineEdit::updateClearButton);
connect(this, &QLineEdit::textChanged, this, &ClearLineEdit::updateClearButton);
}
void ClearLineEdit::resizeEvent(QResizeEvent *e)
@@ -1300,11 +1300,11 @@ PropertyListEditor::PropertyListEditor(QWidget *parent) : QPlainTextEdit(parent)
{
lineNumberArea = new LineNumberArea(this);
connect(this, &Gui::PropertyListEditor::blockCountChanged,
connect(this, &QPlainTextEdit::blockCountChanged,
this, &PropertyListEditor::updateLineNumberAreaWidth);
connect(this, &Gui::PropertyListEditor::updateRequest,
connect(this, &QPlainTextEdit::updateRequest,
this, &PropertyListEditor::updateLineNumberArea);
connect(this, &Gui::PropertyListEditor::cursorPositionChanged,
connect(this, &QPlainTextEdit::cursorPositionChanged,
this, &PropertyListEditor::highlightCurrentLine);
updateLineNumberAreaWidth(0);