Implement base classes for application components

PR #17219.
This commit is contained in:
Vladimir Golovnev 2022-06-25 15:46:55 +03:00 committed by GitHub
parent 41a38428fc
commit f8a304abdc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 256 additions and 69 deletions

View file

@ -39,9 +39,8 @@
#include "base/utils/net.h"
#include "webapplication.h"
WebUI::WebUI()
: m_isErrored(false)
, m_port(0)
WebUI::WebUI(IApplication *app)
: ApplicationComponent(app)
{
configure();
connect(Preferences::instance(), &Preferences::changed, this, &WebUI::configure);
@ -77,7 +76,7 @@ void WebUI::configure()
const QString serverAddressString = pref->getWebUiAddress();
if (!m_httpServer)
{
m_webapp = new WebApplication(this);
m_webapp = new WebApplication(app(), this);
m_httpServer = new Http::Server(m_webapp, this);
}
else