fix: intialization ui/squawk.cpp before than Core::Squawk::ready
This commit is contained in:
parent
645b92ba51
commit
11da9c8ae5
1 changed files with 3 additions and 3 deletions
|
@ -29,6 +29,7 @@ Application::Application(Core::Squawk* p_core):
|
||||||
destroyingSquawk(false),
|
destroyingSquawk(false),
|
||||||
storage()
|
storage()
|
||||||
{
|
{
|
||||||
|
squawk = new Squawk(roster);
|
||||||
connect(&roster, &Models::Roster::unnoticedMessage, this, &Application::notify);
|
connect(&roster, &Models::Roster::unnoticedMessage, this, &Application::notify);
|
||||||
connect(&roster, &Models::Roster::unreadMessagesCountChanged, this, &Application::unreadMessagesCountChanged);
|
connect(&roster, &Models::Roster::unreadMessagesCountChanged, this, &Application::unreadMessagesCountChanged);
|
||||||
|
|
||||||
|
@ -53,7 +54,7 @@ Application::Application(Core::Squawk* p_core):
|
||||||
connect(&roster, &Models::Roster::localPathInvalid, core, &Core::Squawk::onLocalPathInvalid);
|
connect(&roster, &Models::Roster::localPathInvalid, core, &Core::Squawk::onLocalPathInvalid);
|
||||||
|
|
||||||
|
|
||||||
//coonecting backend to myself
|
//connecting backend to myself
|
||||||
connect(core, &Core::Squawk::stateChanged, this, &Application::stateChanged);
|
connect(core, &Core::Squawk::stateChanged, this, &Application::stateChanged);
|
||||||
|
|
||||||
connect(core, &Core::Squawk::accountMessage, &roster, &Models::Roster::addMessage);
|
connect(core, &Core::Squawk::accountMessage, &roster, &Models::Roster::addMessage);
|
||||||
|
@ -147,8 +148,7 @@ void Application::checkForTheLastWindow()
|
||||||
|
|
||||||
void Application::createMainWindow()
|
void Application::createMainWindow()
|
||||||
{
|
{
|
||||||
if (squawk == nullptr) {
|
if (squawk) {
|
||||||
squawk = new Squawk(roster);
|
|
||||||
|
|
||||||
connect(squawk, &Squawk::notify, this, &Application::notify);
|
connect(squawk, &Squawk::notify, this, &Application::notify);
|
||||||
connect(squawk, &Squawk::changeSubscription, this, &Application::changeSubscription);
|
connect(squawk, &Squawk::changeSubscription, this, &Application::changeSubscription);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue