Merge pull request #74 from mentalfl0w/dev

Improve SingleInstance.
main
zhuzichu 2023-04-26 00:18:46 +08:00 committed by GitHub
commit 2aef114969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
#include "FluApp.h" #include "FluApp.h"
#include <QQmlEngine> #include <QQmlEngine>
#include <QGuiApplication> #include <QGuiApplication>
@ -72,6 +72,8 @@ void FluApp::navigate(const QString& route,const QJsonObject& argument,FluRegist
for (auto& pair : wnds) { for (auto& pair : wnds) {
QString r = pair->property("route").toString(); QString r = pair->property("route").toString();
if(r == route){ if(r == route){
pair->setProperty("argument",argument);
pair->raise();
pair->requestActivate(); pair->requestActivate();
view->deleteLater(); view->deleteLater();
return; return;