aboutsummaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-03-02 14:50:43 +0100
committerXavi Garcia Mena <xavi.garcia.mena@canonical.com>2016-03-02 14:50:43 +0100
commit7604867025faaf3b015193ca89454b72d981bd58 (patch)
tree16daaf06f1b389fc9511582a2f8af62726efd7b9 /tests/integration
parent0fe4ec98a470a992eee9f8ed7e404fe767a82076 (diff)
downloadayatana-indicator-sound-7604867025faaf3b015193ca89454b72d981bd58.tar.gz
ayatana-indicator-sound-7604867025faaf3b015193ca89454b72d981bd58.tar.bz2
ayatana-indicator-sound-7604867025faaf3b015193ca89454b72d981bd58.zip
Changed following Charles's suggestions
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();