core/qmlglobal: add shellId, instanceId, appId and launchTime props
This commit is contained in:
parent
b83c39c8af
commit
d612227740
2 changed files with 37 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "../io/processcore.hpp"
|
||||
#include "generation.hpp"
|
||||
#include "iconimageprovider.hpp"
|
||||
#include "instanceinfo.hpp"
|
||||
#include "paths.hpp"
|
||||
#include "qmlscreen.hpp"
|
||||
#include "rootwrapper.hpp"
|
||||
|
|
@ -153,6 +154,22 @@ qint32 QuickshellGlobal::processId() const { // NOLINT
|
|||
return getpid();
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::instanceId() const { // NOLINT
|
||||
return InstanceInfo::CURRENT.instanceId;
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::shellId() const { // NOLINT
|
||||
return InstanceInfo::CURRENT.shellId;
|
||||
}
|
||||
|
||||
QString QuickshellGlobal::appId() const { // NOLINT
|
||||
return InstanceInfo::CURRENT.appId;
|
||||
}
|
||||
|
||||
QDateTime QuickshellGlobal::launchTime() const { // NOLINT
|
||||
return InstanceInfo::CURRENT.launchTime;
|
||||
}
|
||||
|
||||
qsizetype QuickshellGlobal::screensCount(QQmlListProperty<QuickshellScreenInfo>* /*unused*/) {
|
||||
return QuickshellTracked::instance()->screens.size();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue