diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 0630419fae..db865a4909 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -87,7 +87,7 @@ CallTipsList::CallTipsList(QPlainTextEdit* parent) pal.setColor(QPalette::Inactive, QPalette::HighlightedText, pal.color(QPalette::Active, QPalette::HighlightedText)); parent->setPalette( pal ); - connect(this, &Gui::CallTipsList::itemActivated, this, &CallTipsList::callTipItemActivated); + connect(this, &QListWidget::itemActivated, this, &CallTipsList::callTipItemActivated); hideKeys.append(Qt::Key_Space); hideKeys.append(Qt::Key_Exclam); diff --git a/src/Gui/DlgCustomizeSpaceball.cpp b/src/Gui/DlgCustomizeSpaceball.cpp index 988ad3c266..6af1abb8f3 100644 --- a/src/Gui/DlgCustomizeSpaceball.cpp +++ b/src/Gui/DlgCustomizeSpaceball.cpp @@ -302,7 +302,7 @@ void ButtonModel::loadConfig(const char *RequiredDeviceName) CommandView::CommandView(QWidget *parent) : QTreeView(parent) { this->setEnabled(false); - connect(this, &Gui::Dialog::CommandView::clicked, this, &CommandView::goClicked); + connect(this, &QTreeView::clicked, this, &CommandView::goClicked); } void CommandView::goChangeCommandSelection(const QString& commandName) diff --git a/src/Gui/DlgUndoRedo.cpp b/src/Gui/DlgUndoRedo.cpp index bb38f97341..3aa156fc2f 100644 --- a/src/Gui/DlgUndoRedo.cpp +++ b/src/Gui/DlgUndoRedo.cpp @@ -44,7 +44,7 @@ using namespace Gui::Dialog; UndoDialog::UndoDialog( QWidget* parent ) : QMenu( parent ) { - connect(this, &Gui::Dialog::UndoDialog::aboutToShow, this, &UndoDialog::onFetchInfo); + connect(this, &QMenu::aboutToShow, this, &UndoDialog::onFetchInfo); } /** @@ -92,7 +92,7 @@ void UndoDialog::onSelected() RedoDialog::RedoDialog( QWidget* parent ) : QMenu( parent ) { - connect(this, &Gui::Dialog::RedoDialog::aboutToShow, this, &RedoDialog::onFetchInfo); + connect(this, &QMenu::aboutToShow, this, &RedoDialog::onFetchInfo); } /** diff --git a/src/Gui/ExpressionCompleter.cpp b/src/Gui/ExpressionCompleter.cpp index 92d0357f57..ec3de48404 100644 --- a/src/Gui/ExpressionCompleter.cpp +++ b/src/Gui/ExpressionCompleter.cpp @@ -574,7 +574,7 @@ ExpressionLineEdit::ExpressionLineEdit(QWidget *parent, bool noProperty, char ch , checkInList(checkInList) , checkPrefix(checkPrefix) { - connect(this, &Gui::ExpressionLineEdit::textEdited, this, &ExpressionLineEdit::slotTextChanged); + connect(this, &QLineEdit::textEdited, this, &ExpressionLineEdit::slotTextChanged); } void ExpressionLineEdit::setPrefix(char prefix) { @@ -685,8 +685,7 @@ ExpressionTextEdit::ExpressionTextEdit(QWidget *parent) , block(true) , exactMatch(false) { - connect(this, &Gui::ExpressionTextEdit::textChanged, - this, &ExpressionTextEdit::slotTextChanged); + connect(this, &QPlainTextEdit::textChanged, this, &ExpressionTextEdit::slotTextChanged); } void ExpressionTextEdit::setExactMatch(bool enabled) { diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index 17914f9c69..72484c7536 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -77,7 +77,7 @@ bool DialogOptions::dontUseNativeColorDialog() FileDialog::FileDialog(QWidget * parent) : QFileDialog(parent) { - connect(this, &Gui::FileDialog::filterSelected, this, &FileDialog::onSelectedFilter); + connect(this, &QFileDialog::filterSelected, this, &FileDialog::onSelectedFilter); } FileDialog::~FileDialog() diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index 0d370b0d4c..37937cee77 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -91,7 +91,7 @@ InputField::InputField(QWidget * parent) iconLabel->setPixmap(pixmap); iconLabel->setStyleSheet(QString::fromLatin1("QLabel { border: none; padding: 0px; }")); iconLabel->hide(); - connect(this, &Gui::InputField::textChanged, this, &InputField::updateIconLabel); + connect(this, &QLineEdit::textChanged, this, &InputField::updateIconLabel); int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); setStyleSheet(QString::fromLatin1("QLineEdit { padding-right: %1px } ").arg(iconLabel->sizeHint().width() + frameWidth + 1)); QSize msz = minimumSizeHint(); @@ -100,7 +100,7 @@ InputField::InputField(QWidget * parent) this->setContextMenuPolicy(Qt::DefaultContextMenu); - connect(this, &Gui::InputField::textChanged, this, &InputField::newInput); + connect(this, &QLineEdit::textChanged, this, &InputField::newInput); } InputField::~InputField() diff --git a/src/Gui/ProgressDialog.cpp b/src/Gui/ProgressDialog.cpp index fe41cc82d9..ea22e63352 100644 --- a/src/Gui/ProgressDialog.cpp +++ b/src/Gui/ProgressDialog.cpp @@ -303,7 +303,7 @@ ProgressDialog::ProgressDialog (SequencerDialog* s, QWidget * parent) m_taskbarButton = nullptr; m_taskbarButton = nullptr; #endif - connect(this, &Gui::ProgressDialog::canceled, this, &ProgressDialog::onCancel); + connect(this, &QProgressDialog::canceled, this, &ProgressDialog::onCancel); } ProgressDialog::~ProgressDialog () diff --git a/src/Gui/SpinBox.cpp b/src/Gui/SpinBox.cpp index bf311b3304..d5bf90dc24 100644 --- a/src/Gui/SpinBox.cpp +++ b/src/Gui/SpinBox.cpp @@ -324,7 +324,7 @@ UIntSpinBox::UIntSpinBox (QWidget* parent) { d = new UIntSpinBoxPrivate; d->mValidator = new UnsignedValidator(this->minimum(), this->maximum(), this); - connect(this, &Gui::UIntSpinBox::valueChanged, this, &UIntSpinBox::valueChange); + connect(this, qOverload(&QSpinBox::valueChanged), this, &UIntSpinBox::valueChange); setRange(0, 99); setValue(0); updateValidator(); @@ -361,7 +361,7 @@ void UIntSpinBox::setValue(uint value) void UIntSpinBox::valueChange(int value) { - Q_EMIT valueChanged(d->mapToUInt(value)); + Q_EMIT unsignedChanged(d->mapToUInt(value)); } uint UIntSpinBox::minimum() const @@ -422,8 +422,8 @@ bool UIntSpinBox::apply(const std::string & propName) Gui::Command::doCommand(Gui::Command::Doc, "%s = %u", propName.c_str(), value()); return true; } - else - return false; + + return false; } void UIntSpinBox::setNumberExpression(App::NumberExpression* expr) diff --git a/src/Gui/SpinBox.h b/src/Gui/SpinBox.h index 6313cdfb0f..a0a9aced7a 100644 --- a/src/Gui/SpinBox.h +++ b/src/Gui/SpinBox.h @@ -136,7 +136,7 @@ public: void paintEvent(QPaintEvent *event) override; Q_SIGNALS: - void valueChanged( uint value ); // clazy:exclude=overloaded-signal + void unsignedChanged( uint value ); public Q_SLOTS: void setValue( uint value ); diff --git a/src/Gui/TextEdit.cpp b/src/Gui/TextEdit.cpp index cedbf998bc..4503621f8a 100644 --- a/src/Gui/TextEdit.cpp +++ b/src/Gui/TextEdit.cpp @@ -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(); diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index cade81e15f..326c5402aa 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -504,12 +504,12 @@ TreeWidget::TreeWidget(const char* name, QWidget* parent) this->selectTimer->setSingleShot(true); connect(this->statusTimer, &QTimer::timeout, this, &TreeWidget::onUpdateStatus); - connect(this, &Gui::TreeWidget::itemEntered, this, &TreeWidget::onItemEntered); - connect(this, &Gui::TreeWidget::itemCollapsed, this, &TreeWidget::onItemCollapsed); - connect(this, &Gui::TreeWidget::itemExpanded, this, &TreeWidget::onItemExpanded); - connect(this, &Gui::TreeWidget::itemSelectionChanged, - this, &TreeWidget::onItemSelectionChanged); - connect(this, &Gui::TreeWidget::itemChanged, this, &TreeWidget::onItemChanged); + connect(this, &QTreeWidget::itemEntered, this, &TreeWidget::onItemEntered); + connect(this, &QTreeWidget::itemCollapsed, this, &TreeWidget::onItemCollapsed); + connect(this, &QTreeWidget::itemExpanded, this, &TreeWidget::onItemExpanded); + connect(this, &QTreeWidget::itemSelectionChanged, + this, &TreeWidget::onItemSelectionChanged); + connect(this, &QTreeWidget::itemChanged, this, &TreeWidget::onItemChanged); connect(this->preselectTimer, &QTimer::timeout, this, &TreeWidget::onPreSelectTimer); connect(this->selectTimer, &QTimer::timeout, this, &TreeWidget::onSelectTimer); preselectTime.start(); diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 3a14df767f..b5126c1224 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -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); diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index 2699006ba8..fe86dffb65 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -75,7 +75,7 @@ PropertyEditor::PropertyEditor(QWidget *parent) setExpandsOnDoubleClick(true); #if QT_VERSION < QT_VERSION_CHECK(6,0,0) - QStyleOptionViewItem opt = viewOptions(); + QStyleOptionViewItem opt = PropertyEditor::viewOptions(); #else QStyleOptionViewItem opt; initViewItemOption(&opt); @@ -85,18 +85,12 @@ PropertyEditor::PropertyEditor(QWidget *parent) this->setSelectionMode(QAbstractItemView::ExtendedSelection); - connect(this, &Gui::PropertyEditor::PropertyEditor::activated, - this, &PropertyEditor::onItemActivated); - connect(this, &Gui::PropertyEditor::PropertyEditor::clicked, - this, &PropertyEditor::onItemActivated); - connect(this, &Gui::PropertyEditor::PropertyEditor::expanded, - this, &PropertyEditor::onItemExpanded); - connect(this, &Gui::PropertyEditor::PropertyEditor::collapsed, - this, &PropertyEditor::onItemCollapsed); - connect(propertyModel, &Gui::PropertyEditor::PropertyModel::rowsMoved, - this, &PropertyEditor::onRowsMoved); - connect(propertyModel, &Gui::PropertyEditor::PropertyModel::rowsRemoved, - this, &PropertyEditor::onRowsRemoved); + connect(this, &QTreeView::activated, this, &PropertyEditor::onItemActivated); + connect(this, &QTreeView::clicked, this, &PropertyEditor::onItemActivated); + connect(this, &QTreeView::expanded, this, &PropertyEditor::onItemExpanded); + connect(this, &QTreeView::collapsed, this, &PropertyEditor::onItemCollapsed); + connect(propertyModel, &QAbstractItemModel::rowsMoved, this, &PropertyEditor::onRowsMoved); + connect(propertyModel, &QAbstractItemModel::rowsRemoved, this, &PropertyEditor::onRowsRemoved); } PropertyEditor::~PropertyEditor() diff --git a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp index 57fcec4f8f..f68949bf2f 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherGeneral.cpp @@ -45,16 +45,16 @@ SketcherGeneralWidget::SketcherGeneralWidget(QWidget *parent) ui->renderingOrder->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); // connecting the needed signals - connect(ui->checkBoxShowGrid, &Gui::PrefCheckBox::toggled, + connect(ui->checkBoxShowGrid, &QCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleGridView); - connect(ui->checkBoxGridSnap, &Gui::PrefCheckBox::toggled, + connect(ui->checkBoxGridSnap, &QCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleGridSnap); connect(ui->gridSize, qOverload(&Gui::PrefQuantitySpinBox::valueChanged), this, &SketcherGeneralWidget::emitSetGridSize); - connect(ui->checkBoxAutoconstraints, &Gui::PrefCheckBox::toggled, + connect(ui->checkBoxAutoconstraints, &QCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleAutoconstraints); - connect(ui->checkBoxRedundantAutoconstraints, - &Gui::PrefCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleAvoidRedundant); + connect(ui->checkBoxRedundantAutoconstraints, &QCheckBox::toggled, + this, &SketcherGeneralWidget::emitToggleAvoidRedundant); ui->renderingOrder->installEventFilter(this); }