diff --git a/src/plugins/qnx/pathchooserdelegate.cpp b/src/plugins/qnx/pathchooserdelegate.cpp index d934e0a88eb..2b37c0d9b78 100644 --- a/src/plugins/qnx/pathchooserdelegate.cpp +++ b/src/plugins/qnx/pathchooserdelegate.cpp @@ -58,7 +58,9 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi editor->setAutoFillBackground(true); // To hide the text beneath the editor widget editor->lineEdit()->setMinimumWidth(0); - connect(editor, &Utils::PathChooser::browsingFinished, this, &PathChooserDelegate::emitCommitData); + connect(editor, &Utils::PathChooser::browsingFinished, this, [this, editor]() { + emit const_cast(this)->commitData(editor); + }); return editor; } @@ -97,10 +99,5 @@ void PathChooserDelegate::setHistoryCompleter(const QString &key) m_historyKey = key; } -void PathChooserDelegate::emitCommitData() -{ - emit commitData(qobject_cast(sender())); -} - } // namespace Internal } // namespace Qnx diff --git a/src/plugins/qnx/pathchooserdelegate.h b/src/plugins/qnx/pathchooserdelegate.h index fca0fe14124..c8158b423f5 100644 --- a/src/plugins/qnx/pathchooserdelegate.h +++ b/src/plugins/qnx/pathchooserdelegate.h @@ -55,9 +55,6 @@ public: void setHistoryCompleter(const QString &key); -private slots: - void emitCommitData(); - private: Utils::PathChooser::Kind m_kind; QString m_filter;