diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-12 19:09:46 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-01-26 21:44:13 +0100 |
commit | b106eafb0edab2e596a997592e75a81396f8f36c (patch) | |
tree | 1be29b8717ba96540cc56ac6d660c93356e58816 /src/ui | |
parent | Fix gray scale images breaking notifications on dunst (diff) | |
download | nheko-b106eafb0edab2e596a997592e75a81396f8f36c.tar.xz |
Initial qml root window
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/NhekoGlobalObject.cpp | 2 | ||||
-rw-r--r-- | src/ui/UIA.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/NhekoGlobalObject.cpp b/src/ui/NhekoGlobalObject.cpp index 450cb0d0..3d8d9959 100644 --- a/src/ui/NhekoGlobalObject.cpp +++ b/src/ui/NhekoGlobalObject.cpp @@ -139,5 +139,5 @@ Nheko::openCreateRoomDialog() const void Nheko::reparent(QWindow *win) const { - win->setTransientParent(MainWindow::instance()->windowHandle()); + win->setTransientParent(MainWindow::instance()); } diff --git a/src/ui/UIA.cpp b/src/ui/UIA.cpp index 291d0a9f..9f28ca6a 100644 --- a/src/ui/UIA.cpp +++ b/src/ui/UIA.cpp @@ -13,7 +13,6 @@ #include <mtx/responses/common.hpp> #include "Logging.h" -#include "MainWindow.h" #include "dialogs/FallbackAuth.h" #include "dialogs/ReCaptcha.h" @@ -71,7 +70,7 @@ UIA::genericHandler(QString context) emit phoneNumber(); } else if (current_stage == mtx::user_interactive::auth_types::recaptcha) { auto captchaDialog = - new dialogs::ReCaptcha(QString::fromStdString(u.session), MainWindow::instance()); + new dialogs::ReCaptcha(QString::fromStdString(u.session), nullptr); captchaDialog->setWindowTitle(context); connect( @@ -95,7 +94,7 @@ UIA::genericHandler(QString context) } else if (current_stage == mtx::user_interactive::auth_types::registration_token) { bool ok; QString token = - QInputDialog::getText(MainWindow::instance(), + QInputDialog::getText(nullptr, context, tr("Please enter a valid registration token."), QLineEdit::Normal, @@ -113,7 +112,7 @@ UIA::genericHandler(QString context) // use fallback auto dialog = new dialogs::FallbackAuth(QString::fromStdString(current_stage), QString::fromStdString(u.session), - MainWindow::instance()); + nullptr); dialog->setWindowTitle(context); connect(dialog, &dialogs::FallbackAuth::confirmation, this, [h, u, dialog]() { |