swift
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
swift::core::CApplication Class Reference

Our runtime. More...

Inheritance diagram for swift::core::CApplication:
[legend]

Signals

void updateInfoAvailable (bool success)
 Update info available (cache, web load)
 
void startUpCompleted (bool success)
 Startup has been completed Will be triggered shortly before starting the event loop.
 
void coreFacadeStarted ()
 Facade started.
 
void webDataServicesStarted (bool success)
 Web data services started.
 
void aboutToShutdown ()
 About to shutdown.
 

Public Member Functions

 CApplication (swift::misc::CApplicationInfo::Application application, bool init=true)
 Constructor.
 
 CApplication (const QString &applicationName=executable(), swift::misc::CApplicationInfo::Application application=swift::misc::CApplicationInfo::Unknown, bool init=true)
 Constructor.
 
 ~CApplication ()
 Destructor.
 
bool isAlreadyRunning () const
 True if this swift application is already running (including different versions)
 
virtual void gracefulShutdown ()
 Graceful shutdown.
 
bool isShuttingDown () const
 Is application shutting down? More...
 
bool isIncognito () const
 Is incognito mode? More...
 
void setIncognito (bool incognito)
 Set incognito mode. More...
 
void toggleIncognito ()
 Toggle incognito mode. More...
 
const swift::misc::CApplicationInfogetApplicationInfo () const
 swift application running
 
const QString & getApplicationName () const
 Application name and version.
 
const QString & getApplicationNameAndVersion () const
 Application name and version.
 
const QString & getApplicationNameVersionDetailed () const
 Version, name beta and dev info.
 
data::CGlobalSetup getGlobalSetup () const
 Global setup. More...
 
swift::misc::db::CUpdateInfo getUpdateInfo () const
 Update info.
 
void reloadUpdateInfo ()
 Reload update info.
 
swift::misc::db::CDistribution getOwnDistribution () const
 Own distribution. More...
 
const QString & versionStringDetailed () const
 String with beta, dev. and version.
 
const QString & swiftVersionString () const
 swift info string
 
const char * swiftVersionChar ()
 swift info string
 
bool isDeveloperFlagSet () const
 Running with dev.flag?
 
QString getInfoString (const QString &separator) const
 Comprehensive info.
 
void restartApplication (const QStringList &newArguments={}, const QStringList &removeArguments={})
 Stop and restart application.
 
int exec ()
 Finishes initialization and executes the event loop.
 
bool hasUnsavedSettings () const
 Unsaved settings.
 
void saveSettingsOnShutdown (bool saveSettings)
 Save settings on shutdown.
 
QStringList getUnsavedSettingsKeys () const
 All unsaved settings.
 
swift::misc::CStatusMessage saveSettingsByKey (const QStringList &keys)
 Save all settings.
 
QStringList argumentsJoined (const QStringList &newArguments={}, const QStringList &removeArguments={}) const
 Current parameters replaced by new arguments without the cmd line argument.
 
void enableCrashDumpUpload (bool enable)
 Enable crash upload. More...
 
bool isSupportingCrashpad () const
 Has crashpad support?
 
CInputManagergetInputManager () const
 The input manager, if available.
 
QPointer< ISimulatorgetISimulator () const
 The simulator plugin, if available.
 
bool hasSimulator () const
 Simulator object available?
 
swift::misc::shared_state::CDataLinkDBusgetDataLinkDBus ()
 Transport mechanism for sharing state between applications.
 
virtual bool hasMinimumMappingVersion () const
 Minimum mapping version check.
 
bool hasSetupReader () const
 Setup reader?
 
CSetupReadergetSetupReader () const
 Access to setup reader. More...
 
bool isSetupAvailable () const
 Setup already synchronized.
 
swift::misc::network::CUrl getVatsimMetarUrl () const
 Consolidated version of METAR URLs, either from CGlobalSetup or CVatsimSetup. More...
 
swift::misc::network::CUrl getVatsimDataFileUrl () const
 Consolidated version of data file URL, either from CGlobalSetup or CVatsimSetup. More...
 
swift::misc::network::CUrl getVatsimServerFileUrl () const
 Get URL to file which contains the list of VATSIM servers.
 
swift::misc::network::CUrl getVatsimFsdHttpUrl () const
 Get VATSIM FSD HTTP URL.
 
virtual bool start ()
 Start services, if not yet parsed call CApplication::parse.
 
cmd line args and parsing of command line options
bool addParserOption (const QCommandLineOption &option)
 
bool addParserOptions (const QList< QCommandLineOption > &options)
 
void addDBusAddressOption ()
 CMD line argument for DBus address.
 
QString getCmdDBusAddressValue () const
 DBus address from CMD line, otherwise "".
 
void addNetworkOptions ()
 Add the network options.
 
void addAudioOptions ()
 Add the audio options.
 
bool skipSingleApplicationCheck () const
 Skip the single application check.
 
bool isParserOptionSet (const QString &option) const
 Delegates to QCommandLineParser::isSet.
 
bool isParserOptionSet (const QCommandLineOption &option) const
 Delegates to QCommandLineParser::isSet.
 
QString getParserValue (const QString &option) const
 Delegates to QCommandLineParser::value.
 
QString getParserValue (const QCommandLineOption &option) const
 Delegates to QCommandLineParser::value.
 
bool parseCommandLineArgsAndLoadSetup ()
 Combined function that does a startup check, parses the command line arguments and loads the setup. More...
 
virtual void cmdLineErrorMessage (const QString &text, const QString &informativeText) const
 Display error message.
 
virtual void cmdLineErrorMessage (const swift::misc::CStatusMessageList &msgs) const
 Display error message.
 
Context / core facade related
bool supportsContexts (bool ignoreShutdownTest=false) const
 Supports contexts. More...
 
const CCoreFacadeConfiggetCoreFacadeConfig () const
 The core facade config.
 
swift::misc::CStatusMessageList initContextsAndStartCoreFacade (const CCoreFacadeConfig &coreConfig)
 Init the contexts part and start core facade. More...
 
swift::misc::CStatusMessageList startCoreFacadeWithoutContexts ()
 Starts the core facade without any contexts. More...
 
swift::misc::CStatusMessageList initAndStartWebDataServices (CWebReaderFlags::WebReader webReader, const db::CDatabaseReaderConfigList &dbReaderConfig)
 Init web data services and start them. More...
 
CCoreFacadegetCoreFacade ()
 Get the facade.
 
bool isLocalContext () const
 Local application? (not DBus)
 
bool isDBusContext () const
 DBus application? (not Local)
 
const CCoreFacadegetCoreFacade () const
 Get the facade.
 
const context::IContextNetworkgetIContextNetwork () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
const context::IContextAudiogetIContextAudio () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
const context::CContextAudioBasegetCContextAudioBase () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
const context::IContextApplicationgetIContextApplication () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
const context::IContextOwnAircraftgetIContextOwnAircraft () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
const context::IContextSimulatorgetIContextSimulator () const
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::IContextNetworkgetIContextNetwork ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::IContextAudiogetIContextAudio ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::CContextAudioBasegetCContextAudioBase ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::IContextApplicationgetIContextApplication ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::IContextOwnAircraftgetIContextOwnAircraft ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
context::IContextSimulatorgetIContextSimulator ()
 Direct access to contexts if a CCoreFacade has been initialized.
 
- Public Member Functions inherited from swift::misc::CIdentifiable
const CIdentifieridentifier () const
 Get identifier.
 
void setIdentifier (const CIdentifier &identifier)
 Set identifier, allows to set an external identifier.
 
bool isMyIdentifier (const CIdentifier &otherIdentifier) const
 My identifier?
 

Static Public Member Functions

static CApplicationinstance ()
 Similar to. More...
 
static const QStringList & getLogCategories ()
 Own log categories.
 
static swift::misc::CApplicationInfoList getRunningApplications ()
 Information about all running apps (including this one only if exec() has already been called)
 
static bool isApplicationRunning (swift::misc::CApplicationInfo::Application application)
 Is application running?
 
static QString getTemporaryDirectory ()
 Directory for temporary files.
 
static bool registerAsRunning ()
 Register as running. More...
 
static bool unregisterAsRunning ()
 Unregister from running. More...
 
static void exit (int retcode=EXIT_SUCCESS)
 Exit application, perform graceful shutdown and exit.
 
static void processEventsFor (int milliseconds)
 Process all events for some time. More...
 
static QStringList clearCaches ()
 Clear the caches. More...
 
static QStringList arguments ()
 Similar to QCoreApplication::arguments.
 

Protected Member Functions

virtual void displaySetupLoadFailure (swift::misc::CStatusMessageList msgs)
 Display the failures caused by loading the setup file.
 
virtual void onStartUpCompleted ()
 Startup completed.
 
void init (bool withMetadata)
 Init class, allows to init from swift::gui::CGuiApplication as well (pseudo virtual)
 
virtual bool parsingHookIn ()
 Can be used to parse specialized arguments.
 
virtual void onCoreFacadeStarted ()
 Called when facade/contexts have been started.
 
virtual swift::misc::CStatusMessageList startHookIn ()
 Can be used to start special services.
 
bool isSet (const QCommandLineOption &option) const
 Flag set or explicitly set to true.
 
swift::misc::CStatusMessageList startCoreFacade ()
 Start the core facade. More...
 
swift::misc::CStatusMessageList startWebDataServices (CWebReaderFlags::WebReader webReader, const db::CDatabaseReaderConfigList &dbReaderConfig)
 Start the web data services. More...
 
- Protected Member Functions inherited from swift::misc::CIdentifiable
 CIdentifiable (const QString &objectName)
 Use literal based object name.
 
 CIdentifiable (QObject *nameProvider)
 Connect with QObject providing the name.
 
 CIdentifiable ()
 Construct without a name.
 
 ~CIdentifiable ()
 Destructor.
 
 CIdentifiable (const CIdentifiable &)=default
 Copy constructor.
 
CIdentifiableoperator= (const CIdentifiable &)=default
 Copy assignment operator.
 

Static Protected Member Functions

static int indexOfCommandLineOption (const QCommandLineOption &option, const QStringList &args=CApplication::arguments())
 Is the command line option represented in the given arguments?
 
static void argumentsWithoutOption (const QCommandLineOption &option, QStringList &args)
 Arguments without that given option.
 
static const QString & executable ()
 executable name
 
static void registerMetadata ()
 Register metadata.
 

Protected Attributes

QList< QCommandLineOption > m_allOptions
 All registered options.
 
QCommandLineParser m_parser
 cmd parser
 
QCommandLineOption m_cmdHelp { "help" }
 help option
 
QCommandLineOption m_cmdVersion { "version" }
 version option
 
QCommandLineOption m_cmdDBusAddress { "emptyDBus" }
 DBus address.
 
QCommandLineOption m_cmdDevelopment { "dev" }
 Development flag.
 
QCommandLineOption m_cmdClearCache { "clearcache" }
 Clear cache.
 
QCommandLineOption m_cmdTestCrashpad { "testcrashpad" }
 Test a crasphpad upload.
 
QCommandLineOption m_cmdSkipSingleApp { "skipsa" }
 Skip test for single application.
 
bool m_parsed = false
 Parsing accomplished?
 
bool m_started = false
 Started with success?
 
bool m_alreadyRunning = false
 Application already running.
 
std::atomic_bool m_shutdown { false }
 Is being shutdown?
 
std::atomic_bool m_incognito { false }
 Incognito mode?
 
std::atomic_bool m_shutdownInProgress { false }
 shutdown in progress?
 

network

using CallbackSlot = swift::misc::CSlot< void(QNetworkReply *)>
 The network reply callback when request is completed.
 
using ProgressSlot = swift::misc::CSlot< void(int, qint64, qint64, const QUrl &)>
 The progress slot.
 
static constexpr int NoRedirects = -1
 network request not allowing redirects
 
static constexpr int NoLogRequestId = -1
 network request without logging
 
static constexpr int DefaultMaxRedirects = 2
 network request, default for max.redirects
 
void deleteAllCookies ()
 Delete all cookies from cookie manager.
 
const QNetworkAccessManager * getNetworkAccessManager () const
 Access to access manager. More...
 
QNetworkAccessManager * getNetworkAccessManager ()
 Access to access manager. More...
 
bool hasWebDataServices () const
 Web data services available? More...
 
CWebDataServicesgetWebDataServices () const
 Get the web data services. More...
 
QNetworkReply * getFromNetwork (const swift::misc::network::CUrl &url, const CallbackSlot &callback, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply. More...
 
QNetworkReply * getFromNetwork (const swift::misc::network::CUrl &url, const CallbackSlot &callback, const ProgressSlot &progress, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply. More...
 
QNetworkReply * getFromNetwork (const swift::misc::network::CUrl &url, int logId, const CallbackSlot &callback, const ProgressSlot &progress, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply, supporting swift::misc::network::CUrlLog. More...
 
QNetworkReply * getFromNetwork (const QNetworkRequest &request, const CallbackSlot &callback, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply. More...
 
QNetworkReply * getFromNetwork (const QNetworkRequest &request, const CallbackSlot &callback, const ProgressSlot &progress, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply. More...
 
QNetworkReply * getFromNetwork (const QNetworkRequest &request, int logId, const CallbackSlot &callback, const ProgressSlot &progress, int maxRedirects=DefaultMaxRedirects)
 Request to get network reply, supporting swift::misc::network::CUrlLog. More...
 
QNetworkReply * deleteResourceFromNetwork (const QNetworkRequest &request, int logId, const CallbackSlot &callback, int maxRedirects=DefaultMaxRedirects)
 Request to delete a network resource from network, supporting swift::misc::network::CUrlLog. More...
 
QNetworkReply * postToNetwork (const QNetworkRequest &request, int logId, const QByteArray &data, const CallbackSlot &callback)
 Post to network. More...
 
QNetworkReply * postToNetwork (const QNetworkRequest &request, int logId, QHttpMultiPart *multiPart, const CallbackSlot &callback)
 Post to network. More...
 
QNetworkReply * headerFromNetwork (const swift::misc::network::CUrl &url, const CallbackSlot &callback, int maxRedirects=NoRedirects)
 Request to get network repy using HTTP's HEADER method. More...
 
QNetworkReply * headerFromNetwork (const QNetworkRequest &request, const CallbackSlot &callback, int maxRedirects=NoRedirects)
 Request to get network repy using HTTP's HEADER method. More...
 
QNetworkReply * downloadFromNetwork (const swift::misc::network::CUrl &url, const QString &saveAsFileName, const swift::misc::CSlot< void(const swift::misc::CStatusMessage &)> &callback, int maxRedirects=DefaultMaxRedirects)
 Download file from network and store it as passed. More...
 

Detailed Description

Our runtime.

Normally one instance is to be initialized at the beginning of main, and thereafter it can be used everywhere via QApplication::instance

See also
swift::gui::CGuiApplication for the GUI version of application

Definition at line 86 of file application.h.

Member Function Documentation

◆ addParserOption()

bool swift::core::CApplication::addParserOption ( const QCommandLineOption &  option)

Definition at line 923 of file application.cpp.

◆ addParserOptions()

bool swift::core::CApplication::addParserOptions ( const QList< QCommandLineOption > &  options)

Definition at line 929 of file application.cpp.

◆ clearCaches()

QStringList swift::core::CApplication::clearCaches ( )
static

Clear the caches.

Returns
all cache files

Definition at line 816 of file application.cpp.

◆ deleteResourceFromNetwork()

QNetworkReply * swift::core::CApplication::deleteResourceFromNetwork ( const QNetworkRequest &  request,
int  logId,
const CallbackSlot callback,
int  maxRedirects = DefaultMaxRedirects 
)

Request to delete a network resource from network, supporting swift::misc::network::CUrlLog.

Remarks
This function is thread safe.

Definition at line 520 of file application.cpp.

◆ downloadFromNetwork()

QNetworkReply * swift::core::CApplication::downloadFromNetwork ( const swift::misc::network::CUrl url,
const QString &  saveAsFileName,
const swift::misc::CSlot< void(const swift::misc::CStatusMessage &)> &  callback,
int  maxRedirects = DefaultMaxRedirects 
)

Download file from network and store it as passed.

Remarks
This function is thread safe.

Definition at line 571 of file application.cpp.

◆ enableCrashDumpUpload()

void swift::core::CApplication::enableCrashDumpUpload ( bool  enable)

Enable crash upload.

Remarks
only change for testing

Definition at line 1276 of file application.cpp.

◆ getFromNetwork() [1/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const QNetworkRequest &  request,
const CallbackSlot callback,
const ProgressSlot progress,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply.

Remarks
This function is thread safe.

Definition at line 502 of file application.cpp.

◆ getFromNetwork() [2/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const QNetworkRequest &  request,
const CallbackSlot callback,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply.

Remarks
This function is thread safe.

Definition at line 495 of file application.cpp.

◆ getFromNetwork() [3/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const QNetworkRequest &  request,
int  logId,
const CallbackSlot callback,
const ProgressSlot progress,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply, supporting swift::misc::network::CUrlLog.

Remarks
This function is thread safe.

Definition at line 509 of file application.cpp.

◆ getFromNetwork() [4/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const swift::misc::network::CUrl url,
const CallbackSlot callback,
const ProgressSlot progress,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply.

Remarks
This function is thread safe.

Definition at line 483 of file application.cpp.

◆ getFromNetwork() [5/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const swift::misc::network::CUrl url,
const CallbackSlot callback,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply.

Remarks
This function is thread safe.

Definition at line 476 of file application.cpp.

◆ getFromNetwork() [6/6]

QNetworkReply * swift::core::CApplication::getFromNetwork ( const swift::misc::network::CUrl url,
int  logId,
const CallbackSlot callback,
const ProgressSlot progress,
int  maxRedirects = DefaultMaxRedirects 
)

Request to get network reply, supporting swift::misc::network::CUrlLog.

Remarks
This function is thread safe.

Definition at line 489 of file application.cpp.

◆ getGlobalSetup()

CGlobalSetup swift::core::CApplication::getGlobalSetup ( ) const

Global setup.

Remarks
This function is thread safe.

Definition at line 260 of file application.cpp.

◆ getNetworkAccessManager() [1/2]

QNetworkAccessManager* swift::core::CApplication::getNetworkAccessManager ( )
inline

Access to access manager.

Remarks
supposed to be used only in special cases

Definition at line 431 of file application.h.

◆ getNetworkAccessManager() [2/2]

const QNetworkAccessManager* swift::core::CApplication::getNetworkAccessManager ( ) const
inline

Access to access manager.

Remarks
supposed to be used only in special cases

Definition at line 427 of file application.h.

◆ getOwnDistribution()

CDistribution swift::core::CApplication::getOwnDistribution ( ) const

Own distribution.

Remarks
This function is thread safe.

Definition at line 282 of file application.cpp.

◆ getSetupReader()

CSetupReader * swift::core::CApplication::getSetupReader ( ) const

Access to setup reader.

Remarks
supposed to be used only in special cases

Definition at line 1217 of file application.cpp.

◆ getVatsimDataFileUrl()

CUrl swift::core::CApplication::getVatsimDataFileUrl ( ) const

Consolidated version of data file URL, either from CGlobalSetup or CVatsimSetup.

Remarks
This function is thread safe.

Definition at line 1240 of file application.cpp.

◆ getVatsimMetarUrl()

CUrl swift::core::CApplication::getVatsimMetarUrl ( ) const

Consolidated version of METAR URLs, either from CGlobalSetup or CVatsimSetup.

Remarks
This function is thread safe.

Definition at line 1228 of file application.cpp.

◆ getWebDataServices()

CWebDataServices * swift::core::CApplication::getWebDataServices ( ) const

Get the web data services.

Remarks
use hasWebDataServices to test if services are available

Definition at line 356 of file application.cpp.

◆ hasWebDataServices()

bool swift::core::CApplication::hasWebDataServices ( ) const

Web data services available?

Remarks
This function is thread safe.

Definition at line 350 of file application.cpp.

◆ headerFromNetwork() [1/2]

QNetworkReply * swift::core::CApplication::headerFromNetwork ( const QNetworkRequest &  request,
const CallbackSlot callback,
int  maxRedirects = NoRedirects 
)

Request to get network repy using HTTP's HEADER method.

Remarks
This function is thread safe.

Definition at line 563 of file application.cpp.

◆ headerFromNetwork() [2/2]

QNetworkReply * swift::core::CApplication::headerFromNetwork ( const swift::misc::network::CUrl url,
const CallbackSlot callback,
int  maxRedirects = NoRedirects 
)

Request to get network repy using HTTP's HEADER method.

Remarks
This function is thread safe.

Definition at line 558 of file application.cpp.

◆ initAndStartWebDataServices()

CStatusMessageList swift::core::CApplication::initAndStartWebDataServices ( CWebReaderFlags::WebReader  webReader,
const db::CDatabaseReaderConfigList dbReaderConfig 
)

Init web data services and start them.

See also
webDataServicesStarted
Remarks
requires setup loaded

Definition at line 696 of file application.cpp.

◆ initContextsAndStartCoreFacade()

CStatusMessageList swift::core::CApplication::initContextsAndStartCoreFacade ( const CCoreFacadeConfig coreConfig)

Init the contexts part and start core facade.

See also
coreFacadeStarted
Remarks
requires setup loaded

Definition at line 664 of file application.cpp.

◆ instance()

CApplication * swift::core::CApplication::instance ( )
static

Similar to.

See also
QCoreApplication::instance() returns the single instance

Definition at line 905 of file application.cpp.

◆ isIncognito()

bool swift::core::CApplication::isIncognito ( ) const

Is incognito mode?

Remarks
This function is thread safe.

Definition at line 242 of file application.cpp.

◆ isShuttingDown()

bool swift::core::CApplication::isShuttingDown ( ) const

Is application shutting down?

Remarks
This function is thread safe.

Definition at line 240 of file application.cpp.

◆ parseCommandLineArgsAndLoadSetup()

bool swift::core::CApplication::parseCommandLineArgsAndLoadSetup ( )

Combined function that does a startup check, parses the command line arguments and loads the setup.

See also
startupCheck
parseCommandLineArguments
loadSetupAndHandleErrors
Remarks
This function cannot automatically called from the constructor because (1) it calls virtual functions to show error messages and (2) the some command line arguments are added after constructing the object

Definition at line 969 of file application.cpp.

◆ postToNetwork() [1/2]

QNetworkReply * swift::core::CApplication::postToNetwork ( const QNetworkRequest &  request,
int  logId,
const QByteArray &  data,
const CallbackSlot callback 
)

Post to network.

Remarks
This function is thread safe.

Definition at line 531 of file application.cpp.

◆ postToNetwork() [2/2]

QNetworkReply * swift::core::CApplication::postToNetwork ( const QNetworkRequest &  request,
int  logId,
QHttpMultiPart *  multiPart,
const CallbackSlot callback 
)

Post to network.

Note
This method takes ownership over multiPart.
Remarks
This function is thread safe.

Definition at line 541 of file application.cpp.

◆ processEventsFor()

void swift::core::CApplication::processEventsFor ( int  milliseconds)
static

Process all events for some time.

Remarks
unlike QCoreApplication::processEvents this will spend at least the given time in the function, using QThread::msleep
using processEventsFor can lead to undesired behaviour: A function may be called again before it is finished, even with only one thread
See also
swift::misc::CEventLoop

Definition at line 654 of file application.cpp.

◆ registerAsRunning()

bool swift::core::CApplication::registerAsRunning ( )
static

Register as running.

Note
Normally done automatically when CApplication::exec is called
Fixme:
KB 2017-11 maybe this code can be encapsulated somewhere

Definition at line 168 of file application.cpp.

◆ setIncognito()

void swift::core::CApplication::setIncognito ( bool  incognito)

Set incognito mode.

Remarks
This function is thread safe.

Definition at line 244 of file application.cpp.

◆ startCoreFacade()

CStatusMessageList swift::core::CApplication::startCoreFacade ( )
protected

Start the core facade.

Note
does nothing when setup is not yet loaded

Definition at line 717 of file application.cpp.

◆ startCoreFacadeWithoutContexts()

CStatusMessageList swift::core::CApplication::startCoreFacadeWithoutContexts ( )

Starts the core facade without any contexts.

See also
coreFacadeStarted
Remarks
requires setup loaded

Definition at line 684 of file application.cpp.

◆ startWebDataServices()

CStatusMessageList swift::core::CApplication::startWebDataServices ( CWebReaderFlags::WebReader  webReader,
const db::CDatabaseReaderConfigList dbReaderConfig 
)
protected

Start the web data services.

Note
does nothing when setup is not yet loaded

Definition at line 740 of file application.cpp.

◆ supportsContexts()

bool swift::core::CApplication::supportsContexts ( bool  ignoreShutdownTest = false) const

Supports contexts.

Remarks
checks the real availability of the contexts, so it can happen that we want to use contexts, and they are not yet initialized (false here)
See also
m_useContexts we use or we will use contexts

Definition at line 1126 of file application.cpp.

◆ toggleIncognito()

void swift::core::CApplication::toggleIncognito ( )

Toggle incognito mode.

Remarks
This function is thread safe.

Definition at line 246 of file application.cpp.

◆ unregisterAsRunning()

bool swift::core::CApplication::unregisterAsRunning ( )
static

Unregister from running.

Note
Normally done automatically, needed for restart
Fixme:
KB 2017-11 maybe this code can be encapsulated somewhere

Definition at line 183 of file application.cpp.


The documentation for this class was generated from the following files: