separe mobile text selection to avoid recursive imports
Summary: the mobile text selection toolbar uses toolbuttons, which in turn use the private import. This will make the components loading stuck in dependency resolution Test Plan: all loads correctly now Reviewers: #plasma, hein Reviewed By: #plasma, hein Subscribers: hein, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D20428
This commit is contained in:
parent
846741f851
commit
58dd4c5c0f
@ -70,4 +70,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/BusyIndicator.qml
|
||||
DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components.3)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/private DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components.3)
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plasmacomponents3/mobiletextselection DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/components.3)
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +177,7 @@ T.ComboBox {
|
||||
}
|
||||
}
|
||||
|
||||
Private.MobileCursor {
|
||||
MobileTextSelection.MobileCursor {
|
||||
target: textField
|
||||
selectionStartHandle: true
|
||||
property var rect: textField.positionToRectangle(textField.selectionStart)
|
||||
|
@ -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
|
||||
@ -68,7 +69,7 @@ T.TextArea {
|
||||
selectWord();
|
||||
}
|
||||
|
||||
Private.MobileCursor {
|
||||
MobileTextSelection.MobileCursor {
|
||||
target: control
|
||||
selectionStartHandle: true
|
||||
property var rect: target.positionToRectangle(target.selectionStart)
|
||||
@ -78,7 +79,7 @@ T.TextArea {
|
||||
|
||||
onFocusChanged: {
|
||||
if (focus) {
|
||||
Private.MobileTextActionsToolBar.controlRoot = control;
|
||||
MobileTextSelection.MobileTextActionsToolBar.controlRoot = control;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
@ -51,13 +52,13 @@ T.TextField {
|
||||
cursorDelegate: Kirigami.Settings.tabletMode ? mobileCursor : null
|
||||
Component {
|
||||
id: mobileCursor
|
||||
Private.MobileCursor {
|
||||
MobileTextSelection.MobileCursor {
|
||||
target: control
|
||||
}
|
||||
}
|
||||
onFocusChanged: {
|
||||
if (focus) {
|
||||
Private.MobileTextActionsToolBar.controlRoot = control;
|
||||
MobileTextSelection.MobileTextActionsToolBar.controlRoot = control;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
@ -81,4 +80,4 @@ Popup {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
|
||||
singleton MobileTextActionsToolBar 1.0 MobileTextActionsToolBar.qml
|
||||
MobileCursor 1.0 MobileCursor.qml
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user