From 884f89b9b0381ca6381d582ce114bdd87da55c0c Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 25 Apr 2017 15:10:24 +0100 Subject: [PATCH] [TextFieldStyle] Fix textField is not defined error Summary: The reference textField is undefined in this context It works if the style happens to be used from PlasmaComponents Use control instead to access the TextField. Reviewers: #plasma, broulik Reviewed By: #plasma, broulik Subscribers: ltoscano, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D5297 --- src/declarativeimports/plasmastyle/TextFieldStyle.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmastyle/TextFieldStyle.qml b/src/declarativeimports/plasmastyle/TextFieldStyle.qml index 116871fdc..3c2499e13 100644 --- a/src/declarativeimports/plasmastyle/TextFieldStyle.qml +++ b/src/declarativeimports/plasmastyle/TextFieldStyle.qml @@ -73,7 +73,7 @@ QtQuickControlStyle.TextFieldStyle { //TODO: if QtControls gets a component for this, use it instead of this hardcoded heuristic root.padding.right = Qt.binding(function() { - var actionIconSize = Math.max(textField.height * 0.8, units.iconSizes.small); + var actionIconSize = Math.max(control.height * 0.8, units.iconSizes.small); //actionCount is an int of the number of items var actionCount = (control.hasOwnProperty("clearButtonShown") && control.clearButtonShown) + (control.hasOwnProperty("__effectiveRevealPasswordButtonShown") && control.__effectiveRevealPasswordButtonShown);