diff --git a/UI/window-importer.cpp b/UI/window-importer.cpp index e55027987..3e21ad523 100644 --- a/UI/window-importer.cpp +++ b/UI/window-importer.cpp @@ -92,6 +92,9 @@ QWidget *ImporterEntryPathItemDelegate::createEditor( QSizePolicy::ControlType::LineEdit)); layout->addWidget(text); + QObject::connect(text, SIGNAL(editingFinished()), this, + SLOT(updateText())); + QToolButton *browseButton = new QToolButton(); browseButton->setText("..."); browseButton->setSizePolicy(buttonSizePolicy); @@ -121,8 +124,6 @@ void ImporterEntryPathItemDelegate::setEditorData( { QLineEdit *text = editor->findChild(); text->setText(index.data().toString()); - QObject::connect(text, SIGNAL(textEdited(QString)), this, - SLOT(updateText())); editor->setProperty(PATH_LIST_PROP, QVariant()); } diff --git a/UI/window-remux.cpp b/UI/window-remux.cpp index 6a94ed5e3..9fa62631a 100644 --- a/UI/window-remux.cpp +++ b/UI/window-remux.cpp @@ -112,6 +112,9 @@ QWidget *RemuxEntryPathItemDelegate::createEditor( QSizePolicy::ControlType::LineEdit)); layout->addWidget(text); + QObject::connect(text, SIGNAL(editingFinished()), this, + SLOT(updateText())); + QToolButton *browseButton = new QToolButton(); browseButton->setText("..."); browseButton->setSizePolicy(buttonSizePolicy); @@ -143,8 +146,6 @@ void RemuxEntryPathItemDelegate::setEditorData(QWidget *editor, { QLineEdit *text = editor->findChild(); text->setText(index.data().toString()); - QObject::connect(text, SIGNAL(textEdited(QString)), this, - SLOT(updateText())); editor->setProperty(PATH_LIST_PROP, QVariant()); }