forked from quickshell/quickshell
		
	feat: attach Qt.quit and Qt.exit functions
This commit is contained in:
		
							parent
							
								
									e06b07ac01
								
							
						
					
					
						commit
						7467b65809
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
#include <cstdlib>
 | 
			
		||||
#include <utility>
 | 
			
		||||
 | 
			
		||||
#include <qcoreapplication.h>
 | 
			
		||||
#include <qdir.h>
 | 
			
		||||
#include <qfileinfo.h>
 | 
			
		||||
#include <qlogging.h>
 | 
			
		||||
| 
						 | 
				
			
			@ -21,6 +22,10 @@ RootWrapper::RootWrapper(QString rootPath)
 | 
			
		|||
    , rootPath(std::move(rootPath))
 | 
			
		||||
    , engine(this)
 | 
			
		||||
    , originalWorkingDirectory(QDir::current().absolutePath()) {
 | 
			
		||||
	auto* app = QCoreApplication::instance();
 | 
			
		||||
	QObject::connect(&this->engine, &QQmlEngine::quit, app, &QCoreApplication::quit);
 | 
			
		||||
	QObject::connect(&this->engine, &QQmlEngine::exit, app, &QCoreApplication::exit);
 | 
			
		||||
 | 
			
		||||
	this->reloadGraph(true);
 | 
			
		||||
 | 
			
		||||
	if (this->root == nullptr) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue