summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsensorgestures_gestures/mockcommon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qsensorgestures_gestures/mockcommon.cpp')
-rw-r--r--tests/auto/qsensorgestures_gestures/mockcommon.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/auto/qsensorgestures_gestures/mockcommon.cpp b/tests/auto/qsensorgestures_gestures/mockcommon.cpp
index e068a460..b11e4f67 100644
--- a/tests/auto/qsensorgestures_gestures/mockcommon.cpp
+++ b/tests/auto/qsensorgestures_gestures/mockcommon.cpp
@@ -61,21 +61,12 @@ void mockcommonPrivate::timerout()
bool mockcommonPrivate::setFile(const QString &filename)
{
- if (filename.isEmpty())
- return false;
-
- if (pFile.isOpen()) {
+ if (pFile.isOpen())
pFile.close();
- }
oldAccelTs = 0;
firstRun = true;
- pFile.setFileName(QCoreApplication::instance()->applicationDirPath() + "/" + filename);
- bool ok = pFile.open(QIODevice::ReadOnly);
- if (!ok) {
- pFile.setFileName(SRCDIR "/" + filename);
- ok = pFile.open(QIODevice::ReadOnly);
- }
- return ok;
+ pFile.setFileName(":/" + filename);
+ return pFile.open(QIODevice::ReadOnly);
}
bool mockcommonPrivate::parseData(const QString &line)