aboutsummaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/indicator-sound-test-base.cpp14
-rw-r--r--tests/integration/indicator-sound-test-base.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp
index 1cea780..cf60868 100644
--- a/tests/integration/indicator-sound-test-base.cpp
+++ b/tests/integration/indicator-sound-test-base.cpp
@@ -448,15 +448,15 @@ bool IndicatorSoundTestBase::initializeMenuChangedSignal()
return true;
}
-QVariant IndicatorSoundTestBase::waitPropertyChanged(QString property)
+QVariant IndicatorSoundTestBase::waitPropertyChanged(QSignalSpy *signalSpy, QString property)
{
QVariant ret_val;
- if (signal_spy_volume_changed_)
+ if (signalSpy)
{
- signal_spy_volume_changed_->wait();
- if (signal_spy_volume_changed_->count())
+ signalSpy->wait();
+ if (signalSpy->count())
{
- QList<QVariant> arguments = signal_spy_volume_changed_->takeLast();
+ QList<QVariant> arguments = signalSpy->takeLast();
if (arguments.size() == 3 && static_cast<QMetaType::Type>(arguments.at(1).type()) == QMetaType::QVariantMap)
{
QMap<QString, QVariant> map = arguments.at(1).toMap();
@@ -472,13 +472,13 @@ QVariant IndicatorSoundTestBase::waitPropertyChanged(QString property)
}
bool IndicatorSoundTestBase::waitVolumeChangedInIndicator()
{
- QVariant val = waitPropertyChanged("Volume");
+ QVariant val = waitPropertyChanged(signal_spy_volume_changed_.get(), "Volume");
return !val.isNull();
}
QVariant IndicatorSoundTestBase::waitLastRunningPlayerChanged()
{
- return waitPropertyChanged("LastRunningPlayer");
+ return waitPropertyChanged(signal_spy_volume_changed_.get(), "LastRunningPlayer");
}
void IndicatorSoundTestBase::initializeAccountsInterface()
diff --git a/tests/integration/indicator-sound-test-base.h b/tests/integration/indicator-sound-test-base.h
index ecdbd7d..5c36031 100644
--- a/tests/integration/indicator-sound-test-base.h
+++ b/tests/integration/indicator-sound-test-base.h
@@ -144,7 +144,7 @@ protected:
float getVolumeValue(bool *isValid = nullptr);
- QVariant waitPropertyChanged(QString property);
+ static QVariant waitPropertyChanged(QSignalSpy * signalSpy, QString property);
QVariant waitLastRunningPlayerChanged();