You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/qml/components/DeveloperOptions.qml
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -27,12 +27,19 @@ ColumnLayout {
27
27
id: dbcacheSetting
28
28
Layout.fillWidth:true
29
29
header:qsTr("Database cache size (MiB)")
30
+
errorText:qsTr("This is not a valid cache size. Please choose a value between %1 and %2 MiB.").arg(optionsModel.minDbcacheSizeMiB).arg(optionsModel.maxDbcacheSizeMiB)
31
+
showErrorText:false
30
32
actionItem: ValueInput {
31
33
parentState:dbcacheSetting.state
32
34
description:optionsModel.dbcacheSizeMiB
33
35
onEditingFinished: {
34
-
optionsModel.dbcacheSizeMiB=parseInt(text)
35
-
dbcacheSetting.forceActiveFocus()
36
+
if (checkValidity(optionsModel.minDbcacheSizeMiB, optionsModel.maxDbcacheSizeMiB, parseInt(text))) {
37
+
optionsModel.dbcacheSizeMiB=parseInt(text)
38
+
dbcacheSetting.forceActiveFocus()
39
+
dbcacheSetting.showErrorText=false
40
+
} else {
41
+
dbcacheSetting.showErrorText=true
42
+
}
36
43
}
37
44
}
38
45
onClicked: {
@@ -45,12 +52,19 @@ ColumnLayout {
45
52
id: parSetting
46
53
Layout.fillWidth:true
47
54
header:qsTr("Script verification threads")
55
+
errorText:qsTr("This is not a valid thread count. Please choose a value between %1 and %2 threads.").arg(optionsModel.minScriptThreads).arg(optionsModel.maxScriptThreads)
0 commit comments