fix null mainwindow in case of login on setup
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com> (cherry picked from commit 7db717ee7c503aef3f3b70bbc4becb8c20485897)
This commit is contained in:
parent
c206064976
commit
2bb094a90b
@ -1179,6 +1179,9 @@ bool Application::event(QEvent* event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (event->type() == QEvent::FileOpen) {
|
if (event->type() == QEvent::FileOpen) {
|
||||||
|
if (!m_mainWindow) {
|
||||||
|
showMainWindow(false);
|
||||||
|
}
|
||||||
auto ev = static_cast<QFileOpenEvent*>(event);
|
auto ev = static_cast<QFileOpenEvent*>(event);
|
||||||
m_mainWindow->processURLs({ ev->url() });
|
m_mainWindow->processURLs({ ev->url() });
|
||||||
}
|
}
|
||||||
@ -1312,6 +1315,9 @@ void Application::messageReceived(const QByteArray& message)
|
|||||||
qWarning() << "Received" << command << "message without a zip path/URL.";
|
qWarning() << "Received" << command << "message without a zip path/URL.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!m_mainWindow) {
|
||||||
|
showMainWindow(false);
|
||||||
|
}
|
||||||
m_mainWindow->processURLs({ normalizeImportUrl(url) });
|
m_mainWindow->processURLs({ normalizeImportUrl(url) });
|
||||||
} else if (command == "launch") {
|
} else if (command == "launch") {
|
||||||
QString id = received.args["id"];
|
QString id = received.args["id"];
|
||||||
|
Loading…
Reference in New Issue
Block a user