forked from qt-creator/qt-creator
Task-number: QDS-11177 Change-Id: I94a537af1d55d503aa04dd79c6194ef1a0647e83 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
37 lines
968 B
QML
37 lines
968 B
QML
// Copyright (C) 2023 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
|
|
import QtQuick
|
|
import HelperWidgets as HelperWidgets
|
|
import StudioTheme as StudioTheme
|
|
import EffectMakerBackend
|
|
|
|
Row {
|
|
id: itemPane
|
|
|
|
width: parent.width
|
|
spacing: 5
|
|
|
|
HelperWidgets.UrlChooser {
|
|
backendValue: uniformBackendValue
|
|
|
|
actionIndicatorVisible: false
|
|
|
|
onAbsoluteFilePathChanged: uniformValue = absoluteFilePath
|
|
|
|
function defaultAsString() {
|
|
let urlStr = uniformDefaultValue.toString()
|
|
urlStr = urlStr.replace(/^(file:\/{3})/, "")
|
|
|
|
// Prepend slash if there is no drive letter
|
|
if (urlStr.length > 1 && urlStr[1] !== ':')
|
|
urlStr = '/' + urlStr;
|
|
|
|
return urlStr
|
|
}
|
|
|
|
defaultItems: [uniformDefaultValue.split('/').pop()]
|
|
defaultPaths: [defaultAsString(uniformDefaultValue)]
|
|
}
|
|
}
|