Skip to content

Commit

Permalink
Upadte Settings page to use new developer mode.
Browse files Browse the repository at this point in the history
Contributes-To: sailfishos-patches#333
  • Loading branch information
nephros committed Jan 6, 2023
1 parent 23d397f commit f0500ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/qml/SettingsPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ Page {
property bool showUnapplyAll: false
}

Component.onCompleted: migrateDevModeSettings()
function migrateDevModeSettings() {
if (PatchManager.developerMode === true) {
console.info("Migrating settings from deprecated developerMode setting.")
PatchManager.patchDevelMode = true
PatchManager.sfosVersionCheck = VersionCheck.RecklessChecking
PatchManager.developerMode = false
}
}

SilicaFlickable {
id: flick
anchors.fill: parent
Expand Down Expand Up @@ -110,13 +120,24 @@ Page {
}
}

TextSwitch {
text: qsTranslate("", "Mode for Patch developers")
description: qsTranslate("", "Enable various functions to be used by Patch developers. Among other things, it shows debug log files for applying the patch file when a Patch is activated on its details page.")
checked: PatchManager.patchDevelMode
onClicked: PatchManager.patchDevelMode = !PatchManager.patchDevelMode
automaticCheck: false
}

/*
* legacy/deprecated Develper mode. See Issue #333
TextSwitch {
text: qsTranslate("", "Developer mode")
description: qsTranslate("", "Enable various functions to be used by Patch developers. Among other things, it shows debug log files for applying the patch file when a Patch is activated on its details page.")
checked: PatchManager.developerMode
onClicked: PatchManager.developerMode = !PatchManager.developerMode
automaticCheck: false
}
*/

TextSwitch {
id: fixBitSwitch
Expand Down

0 comments on commit f0500ce

Please sign in to comment.