Compare commits
	
		
			2 commits
		
	
	
		
			ffa9d02d48
			...
			b42add3967
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b42add3967 | |||
| 087c929871 | 
					 2 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -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());
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -141,8 +141,9 @@ void Process::startProcessIfReady() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void Process::onStarted() {
 | 
			
		||||
	emit this->started();
 | 
			
		||||
	emit this->pidChanged();
 | 
			
		||||
	emit this->runningChanged();
 | 
			
		||||
	emit this->started();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Process::onFinished(qint32 exitCode, QProcess::ExitStatus exitStatus) {
 | 
			
		||||
| 
						 | 
				
			
			@ -153,6 +154,7 @@ void Process::onFinished(qint32 exitCode, QProcess::ExitStatus exitStatus) {
 | 
			
		|||
 | 
			
		||||
	emit this->exited(exitCode, exitStatus);
 | 
			
		||||
	emit this->runningChanged();
 | 
			
		||||
	emit this->pidChanged();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Process::onErrorOccurred(QProcess::ProcessError error) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue