forked from qt-creator/qt-creator
		
	Qnx: modernize editor connect
Change-Id: I8fe1c8906b7d7b9adda78e5aabf99232bee3ffab Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -55,9 +55,6 @@ public:
 | 
			
		||||
 | 
			
		||||
    void setHistoryCompleter(const QString &key);
 | 
			
		||||
 | 
			
		||||
private slots:
 | 
			
		||||
    void emitCommitData();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    Utils::PathChooser::Kind m_kind;
 | 
			
		||||
    QString m_filter;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user