修改registerForPageResult崩溃问题

main
朱子楚\zhuzi 2023-04-15 09:45:54 +08:00
parent 11b2b04cb9
commit 4ab78bbaba
3 changed files with 5 additions and 5 deletions

View File

@ -43,9 +43,9 @@ void WindowHelper::firstUpdate(){
} }
QVariant WindowHelper::createRegister(const QString& path){ QVariant WindowHelper::createRegister(QQuickWindow* window,const QString& path){
FluRegister *p = new FluRegister(this->window); FluRegister *p = new FluRegister(window);
p->from(this->window); p->from(window);
p->path(path); p->path(path);
return QVariant::fromValue(p); return QVariant::fromValue(p);
} }

View File

@ -16,7 +16,7 @@ public:
Q_INVOKABLE void initWindow(QQuickWindow* window); Q_INVOKABLE void initWindow(QQuickWindow* window);
Q_INVOKABLE void destoryWindow(); Q_INVOKABLE void destoryWindow();
Q_INVOKABLE QVariant createRegister(const QString& path); Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path);
Q_INVOKABLE void firstUpdate(); Q_INVOKABLE void firstUpdate();

View File

@ -87,7 +87,7 @@ ApplicationWindow {
} }
function registerForPageResult(path){ function registerForPageResult(path){
return helper.createRegister(path) return helper.createRegister(window,path)
} }
function onResult(data){ function onResult(data){