blob: 17286608fc8db75b0f68ed0d204bb85e356eb8c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
From b8544fc070e88614feb9c198f6ea910c91f3c5d5 Mon Sep 17 00:00:00 2001
From: Ismael Asensio <isma.af@gmail.com>
Date: Mon, 6 Nov 2023 19:13:37 +0000
Subject: [PATCH] kcms/nightcolor: Fix nightcolor with automatic location
As it turns out that the UI never send the geo-location to the
backend so backend always fallbacks to (0, 0) lat and lon
coordinates unless manually changed by `qdbus` commad..
BUG: 469730
FIXED-IN: 5.27.10
(cherry picked from commit cb2b0e9c036d844d87fd104a3ae031b59243eaa5)
---
kcms/nightcolor/package/contents/ui/main.qml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/kcms/nightcolor/package/contents/ui/main.qml b/kcms/nightcolor/package/contents/ui/main.qml
index c7d237f13b..418c05d42f 100644
--- a/kcms/nightcolor/package/contents/ui/main.qml
+++ b/kcms/nightcolor/package/contents/ui/main.qml
@@ -60,6 +60,21 @@ KCM.SimpleKCM {
}
}
+ // Update backend when locator is changed
+ Connections {
+ target: locator
+ function onLatitudeChanged() {
+ if (root.doneLocating) {
+ kcm.nightColorSettings.latitudeAuto = locator.latitude
+ }
+ }
+ function onLongitudeChanged() {
+ if (root.doneLocating) {
+ kcm.nightColorSettings.longitudeAuto = locator.latitude
+ }
+ }
+ }
+
header: ColumnLayout{
Kirigami.InlineMessage {
id: errorMessage
--
GitLab
|