summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2010-10-20 13:30:28 +1000
committerMichael Goddard <michael.goddard@nokia.com>2010-10-20 13:46:03 +1000
commit1a5c287dffa9b7a527a464eaaf761dd49cec7ced (patch)
tree0972318e5ac27998f8e7288a6a28201d4941d160 /tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp
parente79d00e9702ef169758c7056fb20a0e70ec30843 (diff)
Make sure the example (and feedback stack) enumerate actuators correctly.
The code in the hapticsplayer was doing some strange things. Add an autotest to check that two actuators from the test plugin show up correctly. This might also fix the "no feedback" issue on S60, if the wrong actuator was passed to the backend. Task-number: MOBILITY-1631, MOBILITY-1784
Diffstat (limited to 'tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp')
-rw-r--r--tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp b/tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp
index fe7d3cebf4..167389151c 100644
--- a/tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp
+++ b/tests/auto/qfeedbackplugin/testplugin/qfeedbacktestplugin.cpp
@@ -53,7 +53,7 @@ Q_EXPORT_PLUGIN2(feedback_testplugin, QFeedbackTestPlugin)
QFeedbackTestPlugin::QFeedbackTestPlugin() : QObject(qApp), mHapticState(QFeedbackEffect::Stopped), mFileState(QFeedbackEffect::Stopped)
{
- actuators_ << createFeedbackActuator(this, 7357);
+ actuators_ << createFeedbackActuator(this, 0) << createFeedbackActuator(this, 1);
mHapticTimer.setSingleShot(true);
connect(&mHapticTimer, SIGNAL(timeout()), this, SLOT(timerExpired()));
}
@@ -85,7 +85,10 @@ QVariant QFeedbackTestPlugin::actuatorProperty(const QFeedbackActuator &actuator
switch (prop) {
case Name:
+ if (actuator.id() == 0)
return QString(QLatin1String("test plugin"));
+ else
+ return QString(QLatin1String("5555"));
case State:
return static_cast<int>(QFeedbackActuator::Unknown);