forked from quickshell/quickshell
service/greetd: add greetd service
This commit is contained in:
parent
72956185bd
commit
3573663ab6
11 changed files with 522 additions and 4 deletions
|
@ -302,6 +302,12 @@ void EngineGeneration::assignIncubationController() {
|
|||
this->engine->setIncubationController(controller);
|
||||
}
|
||||
|
||||
EngineGeneration* EngineGeneration::currentGeneration() {
|
||||
if (g_generations.size() == 1) {
|
||||
return *g_generations.begin();
|
||||
} else return nullptr;
|
||||
}
|
||||
|
||||
EngineGeneration* EngineGeneration::findEngineGeneration(QQmlEngine* engine) {
|
||||
return g_generations.value(engine);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,10 @@ public:
|
|||
static EngineGeneration* findEngineGeneration(QQmlEngine* engine);
|
||||
static EngineGeneration* findObjectGeneration(QObject* object);
|
||||
|
||||
// Returns the current generation if there is only one generation,
|
||||
// otherwise null.
|
||||
static EngineGeneration* currentGeneration();
|
||||
|
||||
RootWrapper* wrapper = nullptr;
|
||||
QDir rootPath;
|
||||
QmlScanner scanner;
|
||||
|
@ -57,12 +61,14 @@ signals:
|
|||
void filesChanged();
|
||||
void reloadFinished();
|
||||
|
||||
public slots:
|
||||
void quit();
|
||||
void exit(int code);
|
||||
|
||||
private slots:
|
||||
void onFileChanged(const QString& name);
|
||||
void onDirectoryChanged();
|
||||
void incubationControllerDestroyed();
|
||||
void quit();
|
||||
void exit(int code);
|
||||
|
||||
private:
|
||||
void postReload();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue