From f8a38365a6ec14897a3bf85b950381a24e840813 Mon Sep 17 00:00:00 2001 From: amass Date: Wed, 8 Jan 2025 15:01:54 +0800 Subject: [PATCH] remove wt quit signal. --- WebApplication/Application.cpp | 9 +++------ WebApplication/Application.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/WebApplication/Application.cpp b/WebApplication/Application.cpp index 37a3e71..c8684d7 100644 --- a/WebApplication/Application.cpp +++ b/WebApplication/Application.cpp @@ -26,7 +26,7 @@ namespace WebToolkit { Application::Application(const Wt::WEnvironment &env, bool embedded) - : Wt::WApplication(env), m_startup(this, "startup"), m_quit(this, "quit"), m_logout(this, "logout") { + : Wt::WApplication(env), m_startup(this, "startup"), m_logout(this, "logout") { messageResourceBundle().use(appRoot() + "wt"); messageResourceBundle().use(appRoot() + "auth_strings"); messageResourceBundle().use(appRoot() + "auth_css_theme"); @@ -96,10 +96,6 @@ Application::Application(const Wt::WEnvironment &env, bool embedded) dynamic_cast(app)->handlePathChange(path); } }); - m_quit.connect(this, []() { - LOG(info) << "wtapp quit."; - Wt::WApplication::instance()->quit(); - }); internalPathChanged().connect(this, &Application::handlePathChange); doJavaScript(m_startup.createCall({})); } @@ -177,7 +173,8 @@ void Application::handlePathChange(const std::string &path) { if (path.starts_with("/wt/register")) { } else if (path.starts_with("/wt/visitor/analysis")) { m_root->clear(); - m_root->addNew(*m_session); + auto p = m_root->addNew(*m_session); + p->addStyleClass("bulma-is-flex-grow-1"); } else if (path.starts_with("/wt/redirect")) { m_root->clear(); auto p = m_root->addNew(); diff --git a/WebApplication/Application.h b/WebApplication/Application.h index faa4161..48f0684 100644 --- a/WebApplication/Application.h +++ b/WebApplication/Application.h @@ -37,7 +37,6 @@ protected: private: std::unique_ptr m_session; Wt::JSignal<> m_startup; - Wt::JSignal<> m_quit; Wt::WContainerWidget *m_root = nullptr; NavigationBar *m_navigationBar = nullptr;