remove wt quit signal.
All checks were successful
Deploy / Build (push) Successful in 5m34s

This commit is contained in:
amass 2025-01-08 15:01:54 +08:00
parent 105db1cbab
commit f8a38365a6
2 changed files with 3 additions and 7 deletions

View File

@ -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<Application *>(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<VisitorRecordsPage>(*m_session);
auto p = m_root->addNew<VisitorRecordsPage>(*m_session);
p->addStyleClass("bulma-is-flex-grow-1");
} else if (path.starts_with("/wt/redirect")) {
m_root->clear();
auto p = m_root->addNew<RedirectPage>();

View File

@ -37,7 +37,6 @@ protected:
private:
std::unique_ptr<Session> m_session;
Wt::JSignal<> m_startup;
Wt::JSignal<> m_quit;
Wt::WContainerWidget *m_root = nullptr;
NavigationBar *m_navigationBar = nullptr;