mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
refs #608, generic menus are now available via CGuiApplication and don`t have to be redefined over and over again
This commit is contained in:
committed by
Mathew Sutcliffe
parent
bf9ea12a2b
commit
bcb00b1b91
@@ -83,6 +83,8 @@ namespace BlackCore
|
||||
sApp = this;
|
||||
this->m_setupReader.reset(new CSetupReader(this));
|
||||
connect(this->m_setupReader.data(), &CSetupReader::setupSynchronized, this, &CApplication::ps_setupSyncronized);
|
||||
connect(this->m_setupReader.data(), &CSetupReader::updateInfoSynchronized, this, &CApplication::updateInfoSynchronized);
|
||||
|
||||
this->m_parser.addOptions(this->m_setupReader->getCmdLineOptions());
|
||||
|
||||
// notify when app goes down
|
||||
@@ -107,13 +109,20 @@ namespace BlackCore
|
||||
return s;
|
||||
}
|
||||
|
||||
Data::CGlobalSetup CApplication::getGlobalSetup() const
|
||||
CGlobalSetup CApplication::getGlobalSetup() const
|
||||
{
|
||||
const CSetupReader *r = this->m_setupReader.data();
|
||||
if (!r) { return CGlobalSetup(); }
|
||||
return r->getSetup();
|
||||
}
|
||||
|
||||
CUpdateInfo CApplication::getUpdateInfo() const
|
||||
{
|
||||
const CSetupReader *r = this->m_setupReader.data();
|
||||
if (!r) { return CUpdateInfo(); }
|
||||
return r->getUpdateInfo();
|
||||
}
|
||||
|
||||
bool CApplication::start(bool waitForStart)
|
||||
{
|
||||
if (!this->m_parsed)
|
||||
@@ -523,7 +532,7 @@ namespace BlackCore
|
||||
{
|
||||
if (success)
|
||||
{
|
||||
emit setupSyncronized();
|
||||
emit setupSyncronized(success);
|
||||
this->m_started = this->asyncWebAndContextStart();
|
||||
}
|
||||
this->m_startUpCompleted = true;
|
||||
@@ -695,7 +704,8 @@ namespace BlackCore
|
||||
|
||||
bool CApplication::supportsContexts() const
|
||||
{
|
||||
if (m_coreFacade.isNull()) { return false; }
|
||||
if (this->m_shutdown) { return false; }
|
||||
if (this->m_coreFacade.isNull()) { return false; }
|
||||
if (!this->m_coreFacade->getIContextApplication()) { return false; }
|
||||
return (!this->m_coreFacade->getIContextApplication()->isEmptyObject());
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "corefacadeconfig.h"
|
||||
#include "cookiemanager.h"
|
||||
#include "webdataservices.h"
|
||||
#include "blackcore/data/updateinfo.h"
|
||||
#include "blackmisc/network/url.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
#include "blackmisc/logcategorylist.h"
|
||||
@@ -79,6 +80,10 @@ namespace BlackCore
|
||||
//! \threadsafe
|
||||
BlackCore::Data::CGlobalSetup getGlobalSetup() const;
|
||||
|
||||
//! Update info
|
||||
//! \threadsafe
|
||||
BlackCore::Data::CUpdateInfo getUpdateInfo() const;
|
||||
|
||||
//! Delete all cookies from cookier manager
|
||||
void deleteAllCookies();
|
||||
|
||||
@@ -240,7 +245,10 @@ namespace BlackCore
|
||||
|
||||
signals:
|
||||
//! Setup syncronized
|
||||
void setupSyncronized();
|
||||
void setupSyncronized(bool success);
|
||||
|
||||
//! Update info syncronized
|
||||
void updateInfoSynchronized(bool success);
|
||||
|
||||
//! Startup has been completed
|
||||
void startUpCompleted(bool success);
|
||||
|
||||
Reference in New Issue
Block a user