20 lines
565 B
C++
20 lines
565 B
C++
// SPDX-License-Identifier: MIT
|
|
#include <QtQuickTest/quicktest.h>
|
|
#include <QQmlContext>
|
|
#include <QQmlEngine>
|
|
#include <QTemporaryDir>
|
|
|
|
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"
|