mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-04 12:38:31 -04:00
qs: large sweep of dead code removals
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import qs.Common
|
||||
import qs.Widgets
|
||||
import "../../Common/QmlUtils.js" as QmlUtils
|
||||
|
||||
Column {
|
||||
id: root
|
||||
@@ -20,7 +21,7 @@ Column {
|
||||
spacing: Theme.spacingS
|
||||
|
||||
function loadValue() {
|
||||
const settings = findSettings();
|
||||
const settings = QmlUtils.findSettings(root.parent);
|
||||
if (settings && settings.pluginService) {
|
||||
value = settings.loadValue(settingKey, defaultValue);
|
||||
}
|
||||
@@ -31,23 +32,12 @@ Column {
|
||||
}
|
||||
|
||||
onValueChanged: {
|
||||
const settings = findSettings();
|
||||
const settings = QmlUtils.findSettings(root.parent);
|
||||
if (settings) {
|
||||
settings.saveValue(settingKey, value);
|
||||
}
|
||||
}
|
||||
|
||||
function findSettings() {
|
||||
let item = parent;
|
||||
while (item) {
|
||||
if (item.saveValue !== undefined && item.loadValue !== undefined) {
|
||||
return item;
|
||||
}
|
||||
item = item.parent;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.label
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
|
||||
Reference in New Issue
Block a user