make sure the cache dir is empty
Change-Id: I916bc173fe3b257705b698d1fe66c5b2bdeb8d3e QStandardPaths::enableTestMode and clean the cache folder
This commit is contained in:
parent
ff9703aabf
commit
656582eb66
@ -23,6 +23,10 @@
|
|||||||
|
|
||||||
void DialogNativeTest::initTestCase()
|
void DialogNativeTest::initTestCase()
|
||||||
{
|
{
|
||||||
|
QStandardPaths::enableTestMode(true);
|
||||||
|
m_cacheDir = QDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||||
|
m_cacheDir.removeRecursively();
|
||||||
|
|
||||||
m_dialog = new PlasmaQuick::Dialog;
|
m_dialog = new PlasmaQuick::Dialog;
|
||||||
|
|
||||||
m_panel = new QQuickView;
|
m_panel = new QQuickView;
|
||||||
@ -50,6 +54,8 @@ void DialogNativeTest::cleanupTestCase()
|
|||||||
delete m_dialog;
|
delete m_dialog;
|
||||||
delete m_panel;
|
delete m_panel;
|
||||||
delete m_panel2;
|
delete m_panel2;
|
||||||
|
|
||||||
|
m_cacheDir.removeRecursively();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogNativeTest::position()
|
void DialogNativeTest::position()
|
||||||
|
@ -43,6 +43,7 @@ private:
|
|||||||
QQuickView *m_panel2;
|
QQuickView *m_panel2;
|
||||||
QQuickItem *m_content;
|
QQuickItem *m_content;
|
||||||
PlasmaQuick::Dialog *m_dialog;
|
PlasmaQuick::Dialog *m_dialog;
|
||||||
|
QDir m_cacheDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,10 @@
|
|||||||
|
|
||||||
void FrameSvgTest::initTestCase()
|
void FrameSvgTest::initTestCase()
|
||||||
{
|
{
|
||||||
|
QStandardPaths::enableTestMode(true);
|
||||||
|
m_cacheDir = QDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||||
|
m_cacheDir.removeRecursively();
|
||||||
|
|
||||||
m_frameSvg = new Plasma::FrameSvg;
|
m_frameSvg = new Plasma::FrameSvg;
|
||||||
m_frameSvg->setImagePath(QFINDTESTDATA("data/background.svgz"));
|
m_frameSvg->setImagePath(QFINDTESTDATA("data/background.svgz"));
|
||||||
QVERIFY(m_frameSvg->isValid());
|
QVERIFY(m_frameSvg->isValid());
|
||||||
@ -32,6 +36,8 @@ void FrameSvgTest::initTestCase()
|
|||||||
void FrameSvgTest::cleanupTestCase()
|
void FrameSvgTest::cleanupTestCase()
|
||||||
{
|
{
|
||||||
delete m_frameSvg;
|
delete m_frameSvg;
|
||||||
|
|
||||||
|
m_cacheDir.removeRecursively();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameSvgTest::margins()
|
void FrameSvgTest::margins()
|
||||||
|
@ -40,6 +40,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Plasma::FrameSvg *m_frameSvg;
|
Plasma::FrameSvg *m_frameSvg;
|
||||||
|
QDir m_cacheDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user