diff --git a/src/qml/BadLayerItem.qml b/src/qml/BadLayerItem.qml index 233a884128..76d62098b7 100644 --- a/src/qml/BadLayerItem.qml +++ b/src/qml/BadLayerItem.qml @@ -6,21 +6,26 @@ import org.qfield 1.0 import Theme 1.0 Page { + id: badLayerPage + property alias model: table.model - signal finished + padding: 5 + width: mainWindow.width + height: mainWindow.height + header: PageHeader { - title: qsTr( 'Unable to load some layers' ) + title: qsTr( 'Unable to load some layers' ) - showBackButton: false - showApplyButton: false - showCancelButton: true + showBackButton: false + showApplyButton: false + showCancelButton: true - topMargin: mainWindow.sceneTopMargin + topMargin: mainWindow.sceneTopMargin - onFinished: parent.finished() - } + onFinished: badLayerPage.visible = false + } ColumnLayout { anchors.margins: 8 @@ -30,15 +35,13 @@ Page { spacing: 10 Label { + Layout.fillWidth: true + Layout.fillHeight: false + text: qsTr( "The following layers could not be loaded, please review those and reconfigure the QGIS project." ) font: Theme.defaultFont color: Theme.mainTextColor - wrapMode: Text.WordWrap - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight } Rectangle { @@ -56,6 +59,14 @@ Page { spacing: 2 anchors.fill: parent + model: BadLayerHandler { + project: qgisProject + + onBadLayersFound: { + badLayerPage.visible = true + } + } + delegate: Rectangle { id: rectangle width: parent ? parent.width : undefined @@ -91,20 +102,17 @@ Page { } Label { + Layout.fillWidth: true + Layout.fillHeight: false + Layout.topMargin: 5 + text: qsTr( 'You may check the %1Portable Project%2 documentation page for more help.') .arg( "" ) .arg( "" ) - textFormat: Text.RichText font: Theme.tipFont color: Theme.secondaryTextColor - wrapMode: Text.WordWrap - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight - Layout.topMargin: 5 onLinkActivated: (link) => { Qt.openUrlExternally(link) } } diff --git a/src/qml/CodeReader.qml b/src/qml/CodeReader.qml index 0ac27ed04a..5426ce6f6d 100644 --- a/src/qml/CodeReader.qml +++ b/src/qml/CodeReader.qml @@ -4,7 +4,6 @@ import QtQuick.Layouts import QtQuick.Shapes import QtMultimedia import QtCore -import Qt.labs.settings 1.0 import org.qfield 1.0 diff --git a/src/qml/PositioningSettings.qml b/src/qml/PositioningSettings.qml index abb73b6db1..622d74baa1 100644 --- a/src/qml/PositioningSettings.qml +++ b/src/qml/PositioningSettings.qml @@ -1,9 +1,9 @@ import QtQuick 2.14 -import Qt.labs.settings 1.0 as LabSettings +import QtCore import org.qfield 1.0 -LabSettings.Settings { +Settings { property bool positioningActivated: false property bool positioningCoordinateLock: false diff --git a/src/qml/QFieldCamera.qml b/src/qml/QFieldCamera.qml index 524ebfb10a..5403215773 100644 --- a/src/qml/QFieldCamera.qml +++ b/src/qml/QFieldCamera.qml @@ -4,7 +4,6 @@ import QtQuick.Shapes import QtQuick.Window import QtMultimedia import QtCore -import Qt.labs.settings import org.qfield 1.0 diff --git a/src/qml/QFieldCloudDeltaHistory.qml b/src/qml/QFieldCloudDeltaHistory.qml index 96bce8e21a..916c004e3c 100644 --- a/src/qml/QFieldCloudDeltaHistory.qml +++ b/src/qml/QFieldCloudDeltaHistory.qml @@ -90,7 +90,7 @@ Popup { id: deltaList width: parent.width height: visible ? mainWindow.height - 160 : 0 - visible: deltaList.model && deltaList.model.rowCount !== 0 + visible: deltaList && deltaList.model !== undefined && deltaList.model.rowCount !== 0 clip: true delegate: Rectangle { diff --git a/src/qml/QFieldSettings.qml b/src/qml/QFieldSettings.qml index 55b3da4a72..6c139771da 100644 --- a/src/qml/QFieldSettings.qml +++ b/src/qml/QFieldSettings.qml @@ -1,7 +1,7 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 -import Qt.labs.settings 1.0 +import QtCore import org.qfield 1.0 diff --git a/src/qml/QFieldSketcher.qml b/src/qml/QFieldSketcher.qml index 6046e4dfa3..1a8fb61e40 100644 --- a/src/qml/QFieldSketcher.qml +++ b/src/qml/QFieldSketcher.qml @@ -1,7 +1,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.14 import QtQuick.Layouts 1.14 -import Qt.labs.settings 1.0 +import QtCore import Theme 1.0 import org.qfield 1.0 diff --git a/src/qml/WelcomeScreen.qml b/src/qml/WelcomeScreen.qml index 534a968bba..2cfe275619 100644 --- a/src/qml/WelcomeScreen.qml +++ b/src/qml/WelcomeScreen.qml @@ -3,7 +3,7 @@ import QtQuick.Controls 2.14 import QtQuick.Controls.Material.impl 2.14 import QtQuick.Layouts 1.14 import QtQuick.Particles 2.14 -import Qt.labs.settings 1.0 +import QtCore import org.qfield 1.0 import Theme 1.0 diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index 851c81a97d..64b1822f96 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -21,7 +21,7 @@ import QtQuick.Controls.Material 2.14 import QtQuick.Window 2.14 import QtQml 2.14 import QtSensors 5.14 -import Qt.labs.settings 1.0 as LabSettings +import QtCore import org.qgis 1.0 import org.qfield 1.0 @@ -60,7 +60,7 @@ ApplicationWindow { } } - LabSettings.Settings { + Settings { property alias x: mainWindow.x property alias y: mainWindow.y property alias width: mainWindow.width @@ -360,7 +360,7 @@ ApplicationWindow { if ( hovered ) { hasBeenHovered = true; } else { - if ( currentRubberband.model.vertexCount > 1 ) { + if ( currentRubberband && currentRubberband.model.vertexCount > 1 ) { coordinateLocator.sourceLocation = mapCanvas.mapSettings.coordinateToScreen( currentRubberband.model.lastCoordinate ) } else { coordinateLocator.sourceLocation = undefined @@ -3580,21 +3580,7 @@ ApplicationWindow { BadLayerItem { id: badLayersView - - anchors.fill: parent - model: BadLayerHandler { - project: qgisProject - - onBadLayersFound: { - badLayersView.visible = true - } - } - visible: false - - onFinished: { - visible = false - } } Item {