mirror of
https://github.com/quickshell-mirror/quickshell.git
synced 2026-10-27 02:54:36 +00:00
fix: Process.pid and Quickshell.env returning undefined instead of null
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -79,7 +79,7 @@ void QuickshellGlobal::updateScreens() {
|
||||
|
||||
QVariant QuickshellGlobal::env(const QString& variable) { // NOLINT
|
||||
auto vstr = variable.toStdString();
|
||||
if (!qEnvironmentVariableIsSet(vstr.data())) return QVariant();
|
||||
if (!qEnvironmentVariableIsSet(vstr.data())) return QVariant::fromValue(nullptr);
|
||||
|
||||
return qEnvironmentVariable(vstr.data());
|
||||
}
|
||||
+1
-1
@@ -20,7 +20,7 @@ void Process::setRunning(bool running) {
|
||||
}
|
||||
|
||||
QVariant Process::pid() const {
|
||||
if (this->process == nullptr) return QVariant();
|
||||
if (this->process == nullptr) return QVariant::fromValue(nullptr);
|
||||
return QVariant::fromValue(this->process->processId());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user