mirror of
https://github.com/tnodir/fort
synced 2024-11-15 10:25:10 +00:00
Tests: StatTest: Setup resources for DB migrations.
This commit is contained in:
parent
482d80941a
commit
92fc8f2d98
@ -5,6 +5,8 @@
|
|||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#include <fortmanager.h>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
@ -12,5 +14,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
|
|
||||||
|
FortManager::setupResources();
|
||||||
|
|
||||||
return RUN_ALL_TESTS();
|
return RUN_ALL_TESTS();
|
||||||
}
|
}
|
||||||
|
@ -785,3 +785,13 @@ void FortManager::activateModalWidget()
|
|||||||
w->activateWindow();
|
w->activateWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FortManager::setupResources()
|
||||||
|
{
|
||||||
|
Q_INIT_RESOURCE(appinfo_migrations);
|
||||||
|
Q_INIT_RESOURCE(conf_migrations);
|
||||||
|
Q_INIT_RESOURCE(conf_zone);
|
||||||
|
Q_INIT_RESOURCE(stat_migrations);
|
||||||
|
|
||||||
|
Q_INIT_RESOURCE(fort_icons);
|
||||||
|
}
|
||||||
|
@ -127,6 +127,8 @@ public slots:
|
|||||||
bool showYesNoBox(const QString &text, const QString &yesText, const QString &noText,
|
bool showYesNoBox(const QString &text, const QString &yesText, const QString &noText,
|
||||||
const QString &title = QString());
|
const QString &title = QString());
|
||||||
|
|
||||||
|
static void setupResources();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupThreadPool();
|
void setupThreadPool();
|
||||||
|
|
||||||
|
@ -28,16 +28,6 @@ static void uninstall()
|
|||||||
DriverCommon::provUnregister(); // Unregister booted provider
|
DriverCommon::provUnregister(); // Unregister booted provider
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setupResources()
|
|
||||||
{
|
|
||||||
Q_INIT_RESOURCE(appinfo_migrations);
|
|
||||||
Q_INIT_RESOURCE(conf_migrations);
|
|
||||||
Q_INIT_RESOURCE(conf_zone);
|
|
||||||
Q_INIT_RESOURCE(stat_migrations);
|
|
||||||
|
|
||||||
Q_INIT_RESOURCE(fort_icons);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setupAppStyle()
|
static void setupAppStyle()
|
||||||
{
|
{
|
||||||
const auto fusionStyle = QStyleFactory::create("Fusion");
|
const auto fusionStyle = QStyleFactory::create("Fusion");
|
||||||
@ -81,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
return controlManager.postCommand() ? 0 : FORT_ERROR_CONTROL;
|
return controlManager.postCommand() ? 0 : FORT_ERROR_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
setupResources();
|
FortManager::setupResources();
|
||||||
|
|
||||||
FortManager fortManager(&settings, &envManager, &controlManager);
|
FortManager fortManager(&settings, &envManager, &controlManager);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user