Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
@@ -0,0 +1,34 @@
#include "configfile.h"
#include "gui/networkinformation.h"
#include "libsync/platform.h"
#include "logger.h"
#include "resources/loadresources.h"
#include "testutils.h"
#include <QCoreApplication>
namespace {
// create a platform object before qApp
const auto platform = OCC::Platform::create(OCC::Platform::Type::Terminal);
void setUpTests()
{
Q_ASSERT(platform);
// load the resources
static const OCC::ResourcesLoader resources;
static auto dir = OCC::TestUtils::createTempDir();
OCC::ConfigFile::setConfDir(QStringLiteral("%1/config").arg(dir.path())); // we don't want to pollute the user's config file
OCC::Logger::instance()->setLogFile(QStringLiteral("-"));
OCC::Logger::instance()->addLogRule({ QStringLiteral("sync.httplogger=true") });
OCC::Logger::instance()->setLogDebug(true);
OCC::Account::setCommonCacheDirectory(QStringLiteral("%1/cache").arg(dir.path()));
// ensure we have an instance of NetworkInformation
OCC::NetworkInformation::instance();
}
Q_COREAPP_STARTUP_FUNCTION(setUpTests)
}