Qnx: modernize editor connect

Change-Id: I8fe1c8906b7d7b9adda78e5aabf99232bee3ffab
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-05-19 12:40:56 +02:00
parent 10ca24347f
commit f54dcc4c81
2 changed files with 3 additions and 9 deletions

View File

@@ -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<PathChooserDelegate*>(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<QWidget*>(sender()));
}
} // namespace Internal
} // namespace Qnx

View File

@@ -55,9 +55,6 @@ public:
void setHistoryCompleter(const QString &key);
private slots:
void emitCommitData();
private:
Utils::PathChooser::Kind m_kind;
QString m_filter;