Skip to content

Commit

Permalink
Merge pull request #5198 from opengisch/warnings_gone
Browse files Browse the repository at this point in the history
Takes care of all remaining harmless warnings
  • Loading branch information
nirvn authored Apr 20, 2024
2 parents 56553be + e5e4551 commit 3b03fff
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 45 deletions.
48 changes: 28 additions & 20 deletions src/qml/BadLayerItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -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( "<a href=\"https://docs.qfield.org/how-to/movable-project\">" )
.arg( "</a>" )

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) }
}
Expand Down
1 change: 0 additions & 1 deletion src/qml/CodeReader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/qml/PositioningSettings.qml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 0 additions & 1 deletion src/qml/QFieldCamera.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import QtQuick.Shapes
import QtQuick.Window
import QtMultimedia
import QtCore
import Qt.labs.settings

import org.qfield 1.0

Expand Down
2 changes: 1 addition & 1 deletion src/qml/QFieldCloudDeltaHistory.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/qml/QFieldSettings.qml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/qml/QFieldSketcher.qml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/qml/WelcomeScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 3 additions & 17 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,7 +60,7 @@ ApplicationWindow {
}
}

LabSettings.Settings {
Settings {
property alias x: mainWindow.x
property alias y: mainWindow.y
property alias width: mainWindow.width
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

1 comment on commit 3b03fff

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.