9 #include <QScopedPointer>
10 #include <QScopedPointerDeleteLater>
11 #include <QStringBuilder>
29 using namespace swift::config;
31 using namespace swift::misc::db;
32 using namespace swift::misc::network;
38 CSetupReader::CSetupReader(QObject *parent) : QObject(parent) {}
43 msgs = this->readLocalBootstrapFile();
53 if (fileName.isEmpty()) {
return CStatusMessage(
this).
error(u
"No file name for local bootstrap file"); }
55 const QFile file(fileName);
56 if (!file.exists()) {
return CStatusMessage(
this).
error(u
"File '%1' not existing") << fileName; }
59 if (content.isEmpty()) {
return CStatusMessage(
this).
error(u
"File '%1' empty") << fileName; }
69 QStringLiteral(
"Parsing local setup file '%1'").arg(fileName));
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
bool isShuttingDown() const
Is application shutting down?
data::CGlobalSetup getSetup() const
Current setup (reader URLs, DB location, crash server)
static const QStringList & getLogCategories()
Categories.
swift::misc::CStatusMessageList loadSetup()
Load the setup. If the setup is already loaded, the setup is reloaded.
Global settings for readers, debug flags, etc.
static QString readFileToString(const QString &fileNameAndPath)
Read file into string.
Thrown when a convertFromJson method encounters an unrecoverable error in JSON data.
static const QString & webservice()
Webservice.
static const QString & startup()
Startup of application.
Derived & error(const char16_t(&format)[N])
Set the severity to error, providing a format string.
Derived & info(const char16_t(&format)[N])
Set the severity to info, providing a format string.
Streamable status message, e.g.
static CStatusMessage fromJsonException(const CJsonException &ex, const CLogCategoryList &categories, const QString &prefix)
Object from JSON exception message.
Status messages, e.g. from Core -> GUI.
bool isSuccess() const
All messages are marked as success.
static const QString & bootstrapResourceFilePath()
Bootstrap resource file path.
Core data traits (aka cached values) and classes.
Backend services of the swift project, like dealing with the network or the simulators.
Free functions in swift::misc.