io/process: use QVariantHash over QHash in Q_PROPERTY

Fixes qmlls for these properties
This commit is contained in:
outfoxxed 2026-01-06 01:05:57 -08:00
parent 41828c4180
commit 341a07d05b
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 2 additions and 2 deletions

View file

@ -102,7 +102,7 @@ class Process: public PostReloadHook {
/// If the process is already running changing this property will affect the next
/// started process. If the property has been changed after starting a process it will
/// return the new value, not the one for the currently running process.
Q_PROPERTY(QHash<QString, QVariant> environment READ environment WRITE setEnvironment NOTIFY environmentChanged);
Q_PROPERTY(QVariantHash environment READ environment WRITE setEnvironment NOTIFY environmentChanged);
/// If the process's environment should be cleared prior to applying @@environment.
/// Defaults to false.
///

View file

@ -13,7 +13,7 @@ namespace qs::io::process {
class ProcessContext {
Q_PROPERTY(QList<QString> command MEMBER command WRITE setCommand);
Q_PROPERTY(QHash<QString, QVariant> environment MEMBER environment WRITE setEnvironment);
Q_PROPERTY(QVariantHash environment MEMBER environment WRITE setEnvironment);
Q_PROPERTY(bool clearEnvironment MEMBER clearEnvironment WRITE setClearEnvironment);
Q_PROPERTY(QString workingDirectory MEMBER workingDirectory WRITE setWorkingDirectory);
Q_PROPERTY(bool unbindStdout MEMBER unbindStdout WRITE setUnbindStdout);