// SPDX-License-Identifier: MIT #include #include #include #include class TestSetup : public QObject { Q_OBJECT public: TestSetup() { qputenv("XDG_CONFIG_HOME", m_config.path().toUtf8()); } Q_INVOKABLE QString i18n(const QString &text) { return text; } public Q_SLOTS: void qmlEngineAvailable(QQmlEngine *engine) { engine->rootContext()->setContextObject(this); } private: QTemporaryDir m_config; }; QUICK_TEST_MAIN_WITH_SETUP(panelareas, TestSetup) #include "quicktest.moc"