fix qmllint warnings in systemd/machinectl modules and services
This commit is contained in:
parent
545812cf75
commit
db2bcb2e69
6 changed files with 39 additions and 24 deletions
|
|
@ -20,10 +20,14 @@ QtObject {
|
|||
_pollProc.running = true;
|
||||
}
|
||||
|
||||
// Per-fetch journal state: kept here (not on the Process) so qmllint can see them.
|
||||
property string _journalUnitName: ""
|
||||
property bool _journalIsUser: false
|
||||
|
||||
function fetchJournal(unitName, isUser) {
|
||||
_journalProc.command = isUser ? ["journalctl", "--user", "-u", unitName, "-n", "80", "--no-pager", "--output=short-precise"] : ["journalctl", "-u", unitName, "-n", "80", "--no-pager", "--output=short-precise"];
|
||||
_journalProc._unitName = unitName;
|
||||
_journalProc._isUser = isUser;
|
||||
root._journalUnitName = unitName;
|
||||
root._journalIsUser = isUser;
|
||||
if (_journalProc.running)
|
||||
_journalProc.running = false;
|
||||
_journalProc.running = true;
|
||||
|
|
@ -64,8 +68,8 @@ QtObject {
|
|||
running: S.Modules.systemd.enable
|
||||
repeat: true
|
||||
triggeredOnStart: true
|
||||
onTriggered: if (!_pollProc.running)
|
||||
_pollProc.running = true
|
||||
onTriggered: if (!root._pollProc.running)
|
||||
root._pollProc.running = true
|
||||
}
|
||||
|
||||
// 4 lines of output: systemState, systemUnits, userState, userUnits
|
||||
|
|
@ -83,10 +87,8 @@ QtObject {
|
|||
}
|
||||
|
||||
property Process _journalProc: Process {
|
||||
property string _unitName: ""
|
||||
property bool _isUser: false
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: root.journalReady(root._journalProc._unitName, root._journalProc._isUser, text)
|
||||
onStreamFinished: root.journalReady(root._journalUnitName, root._journalIsUser, text)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue