diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-01-30 15:00:04 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2023-01-30 15:39:37 +0100 |
commit | b03fd195a14e0eb103c7171284dee8a7bb176e8d (patch) | |
tree | 09f7235137d5a9dd1ca5ab081d5f6ebe59f9e12d /src/shared | |
parent | 3dcf1490cb2bce34cb1f7777dfe836310f305817 (diff) | |
download | qttools-b03fd195a14e0eb103c7171284dee8a7bb176e8d.tar.gz |
QtTools: Replace string connection leftovers with typed connections
Pick-to: 6.5
Change-Id: Ib52412754f1bba53e3cd16c5aa51716e2679c0e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/qtpropertybrowser/qtpropertybrowser.h | 8 | ||||
-rw-r--r-- | src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp | 2 | ||||
-rw-r--r-- | src/shared/qtpropertybrowser/qttreepropertybrowser.cpp | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/shared/qtpropertybrowser/qtpropertybrowser.h b/src/shared/qtpropertybrowser/qtpropertybrowser.h index d2731feb4..623ea5d67 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowser.h +++ b/src/shared/qtpropertybrowser/qtpropertybrowser.h @@ -123,15 +123,15 @@ public: return; m_managers.insert(manager); connectPropertyManager(manager); - connect(manager, SIGNAL(destroyed(QObject *)), - this, SLOT(managerDestroyed(QObject *))); + connect(manager, &QObject::destroyed, + this, &QtAbstractEditorFactory<PropertyManager>::managerDestroyed); } void removePropertyManager(PropertyManager *manager) { if (!m_managers.contains(manager)) return; - disconnect(manager, SIGNAL(destroyed(QObject *)), - this, SLOT(managerDestroyed(QObject *))); + disconnect(manager, &QObject::destroyed, + this, &QtAbstractEditorFactory<PropertyManager>::managerDestroyed); disconnectPropertyManager(manager); m_managers.remove(manager); } diff --git a/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp b/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp index 6c2470861..1716652f2 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp +++ b/src/shared/qtpropertybrowser/qtpropertybrowserutils.cpp @@ -228,7 +228,7 @@ QtBoolEdit::QtBoolEdit(QWidget *parent) : lt->setContentsMargins(0, 0, 4, 0); lt->addWidget(m_checkBox); setLayout(lt); - connect(m_checkBox, SIGNAL(toggled(bool)), this, SIGNAL(toggled(bool))); + connect(m_checkBox, &QAbstractButton::toggled, this, &QtBoolEdit::toggled); setFocusProxy(m_checkBox); m_checkBox->setText(tr("True")); } diff --git a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp index e9d3c2545..95ef2736e 100644 --- a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp +++ b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp @@ -102,7 +102,7 @@ QtPropertyEditorView::QtPropertyEditorView(QWidget *parent) : QTreeWidget(parent), m_editorPrivate(0) { - connect(header(), SIGNAL(sectionDoubleClicked(int)), this, SLOT(resizeColumnToContents(int))); + connect(header(), &QHeaderView::sectionDoubleClicked, this, &QTreeView::resizeColumnToContents); } void QtPropertyEditorView::drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const @@ -273,7 +273,8 @@ QWidget *QtPropertyEditorDelegate::createEditor(QWidget *parent, if (editor) { editor->setAutoFillBackground(true); editor->installEventFilter(const_cast<QtPropertyEditorDelegate *>(this)); - connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); + connect(editor, &QObject::destroyed, + this, &QtPropertyEditorDelegate::slotEditorDestroyed); m_propertyToEditor[property] = editor; m_editorToProperty[editor] = property; m_editedItem = item; |