From 8f2a8930dfc79777eab6467f76f5340aaf85de71 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Mon, 11 Sep 2017 17:07:43 +0500 Subject: [PATCH] UI: Use textChanged() signal instead of editingFinished(). To use edited text when clicked on OK immediately. --- src/ui/qml/controls/TextAreaFrame.qml | 4 ++-- src/ui/qml/pages/addresses/AddressesColumn.qml | 2 +- src/ui/qml/pages/apps/AppsColumn.qml | 4 ++-- src/ui/qml/pages/apps/AppsTextColumn.qml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ui/qml/controls/TextAreaFrame.qml b/src/ui/qml/controls/TextAreaFrame.qml index ad2e7a3d..0b60d1f0 100644 --- a/src/ui/qml/controls/TextAreaFrame.qml +++ b/src/ui/qml/controls/TextAreaFrame.qml @@ -4,7 +4,7 @@ import QtQuick.Controls 2.2 Frame { id: frame - signal editingFinished() // Workaround for QTBUG-59908 + signal textChanged() // Workaround for QTBUG-59908 readonly property alias textArea: textArea @@ -16,7 +16,7 @@ Frame { TextArea { id: textArea clip: true // to clip placeholder text - onEditingFinished: frame.editingFinished() + onTextChanged: frame.textChanged() } } } diff --git a/src/ui/qml/pages/addresses/AddressesColumn.qml b/src/ui/qml/pages/addresses/AddressesColumn.qml index 435b67a8..9a6b2187 100644 --- a/src/ui/qml/pages/addresses/AddressesColumn.qml +++ b/src/ui/qml/pages/addresses/AddressesColumn.qml @@ -46,7 +46,7 @@ ColumnLayout { text: addressGroup.text } - onEditingFinished: { + onTextChanged: { addressGroup.text = textArea.text; setConfEdited(); diff --git a/src/ui/qml/pages/apps/AppsColumn.qml b/src/ui/qml/pages/apps/AppsColumn.qml index 26bc078c..990e2e01 100644 --- a/src/ui/qml/pages/apps/AppsColumn.qml +++ b/src/ui/qml/pages/apps/AppsColumn.qml @@ -59,7 +59,7 @@ C:\\Program Files\\Internet Explorer\\iexplore.exe text: appGroup.blockText } - onEditingFinished: { + onTextChanged: { appGroup.blockText = textArea.text; setConfEdited(); @@ -80,7 +80,7 @@ C:\\Program Files\\Skype\\Phone\\Skype.exe text: appGroup.allowText } - onEditingFinished: { + onTextChanged: { appGroup.allowText = textArea.text; setConfEdited(); diff --git a/src/ui/qml/pages/apps/AppsTextColumn.qml b/src/ui/qml/pages/apps/AppsTextColumn.qml index 429a7920..d4588be5 100644 --- a/src/ui/qml/pages/apps/AppsTextColumn.qml +++ b/src/ui/qml/pages/apps/AppsTextColumn.qml @@ -9,7 +9,7 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - signal editingFinished() // Workaround for QTBUG-59908 + signal textChanged() // Workaround for QTBUG-59908 readonly property alias title: title readonly property alias textArea: textAreaFrame.textArea @@ -25,6 +25,6 @@ ColumnLayout { Layout.fillWidth: true Layout.fillHeight: true - onEditingFinished: container.editingFinished() + onTextChanged: container.textChanged() } }