From f54dcc4c81d17a6c987cc8943327dffd02a513cc Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Thu, 19 May 2016 12:40:56 +0200 Subject: [PATCH] Qnx: modernize editor connect Change-Id: I8fe1c8906b7d7b9adda78e5aabf99232bee3ffab Reviewed-by: hjk --- src/plugins/qnx/pathchooserdelegate.cpp | 9 +++------ src/plugins/qnx/pathchooserdelegate.h | 3 --- 2 files changed, 3 insertions(+), 9 deletions(-) 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;