Warning, file /graphics/krita/sdk/tests/simpletest.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 #ifndef SIMPLETEST_H 0002 #define SIMPLETEST_H 0003 0004 #include <QtTest> 0005 #include <QTest> 0006 #include <QStandardPaths> 0007 #include <QLocale> 0008 // #include <KLocalizedString> 0009 #include <KoTestConfig.h> 0010 0011 #define SIMPLE_MAIN_IMPL(TestObject) \ 0012 qputenv("LANGUAGE", "en"); \ 0013 QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates)); \ 0014 QStandardPaths::setTestModeEnabled(true); \ 0015 qputenv("EXTRA_RESOURCE_DIRS", QByteArray(KRITA_RESOURCE_DIRS_FOR_TESTS)); \ 0016 qputenv("KRITA_PLUGIN_PATH", QByteArray(KRITA_PLUGINS_DIR_FOR_TESTS)); \ 0017 QApplication app(argc, argv); \ 0018 app.setAttribute(Qt::AA_Use96Dpi, true); \ 0019 /*QLocale en_US(QLocale::English, QLocale::UnitedStates); \ 0020 KLocalizedString::setLanguages(QStringList() << QStringLiteral("en_US"));*/ \ 0021 QTEST_DISABLE_KEYPAD_NAVIGATION \ 0022 TestObject tc; \ 0023 QTEST_SET_MAIN_SOURCE_PATH \ 0024 return QTest::qExec(&tc, argc, argv); 0025 0026 #define SIMPLE_TEST_MAIN(TestObject) \ 0027 int main(int argc, char *argv[]) \ 0028 { \ 0029 QStandardPaths::setTestModeEnabled(true); \ 0030 SIMPLE_MAIN_IMPL(TestObject) \ 0031 } 0032 0033 #endif // SIMPLETEST_H