mov the mobile text actions in own import

this avoids a qml type resolution recurtion which can
in some cases stuck the component to loading forever
this was particularly visible in plasma mobile
This commit is contained in:
Marco Martin 2019-04-08 13:31:21 +02:00
parent 78a48451b2
commit c72ee78bbb
7 changed files with 10 additions and 7 deletions

View File

@ -25,6 +25,7 @@ import QtGraphicalEffects 1.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.5 as Kirigami
import "private" as Private
import "mobiletextselection" as MobileTextSelection
T.ComboBox {
id: control
@ -154,7 +155,7 @@ T.ComboBox {
opacity: control.enabled ? 1 : 0.3
onFocusChanged: {
if (focus) {
Private.MobileTextActionsToolBar.controlRoot = textField;
MobileTextSelection.MobileTextActionsToolBar.controlRoot = textField;
}
}

View File

@ -24,6 +24,7 @@ import QtQuick.Templates @QQC2_VERSION@ as T
import org.kde.plasma.core 2.0 as PlasmaCore
import "private" as Private
import org.kde.kirigami 2.5 as Kirigami
import "mobiletextselection" as MobileTextSelection
T.TextArea {
id: control
@ -78,7 +79,7 @@ T.TextArea {
onFocusChanged: {
if (focus) {
Private.MobileTextActionsToolBar.controlRoot = control;
MobileTextSelection.MobileTextActionsToolBar.controlRoot = control;
}
}

View File

@ -24,6 +24,7 @@ import QtQuick.Templates @QQC2_VERSION@ as T
import org.kde.plasma.core 2.0 as PlasmaCore
import "private" as Private
import org.kde.kirigami 2.5 as Kirigami
import "mobiletextselection" as MobileTextSelection
T.TextField {
id: control
@ -57,7 +58,7 @@ T.TextField {
}
onFocusChanged: {
if (focus) {
Private.MobileTextActionsToolBar.controlRoot = control;
MobileTextSelection.MobileTextActionsToolBar.controlRoot = control;
}
}

View File

@ -23,7 +23,6 @@ import QtQuick 2.1
import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
import QtQuick.Controls @QQC2_VERSION@
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.5 as Kirigami
Popup {

View File

@ -0,0 +1,3 @@
singleton MobileTextActionsToolBar 1.0 MobileTextActionsToolBar.qml
MobileCursor 1.0 MobileCursor.qml

View File

@ -1,7 +1,5 @@
singleton MobileTextActionsToolBar 1.0 MobileTextActionsToolBar.qml
ButtonShadow 1.0 ButtonShadow.qml
DefaultListItemBackground 1.0 DefaultListItemBackground.qml
MobileCursor 1.0 MobileCursor.qml
RoundShadow 1.0 RoundShadow.qml
TextFieldFocus 1.0 TextFieldFocus.qml