summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-06-04 19:35:29 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2013-06-07 14:46:25 +0300
commit098b014cf37787e4234de0050e0d761161f3316a (patch)
tree4e526acb047819bfb8edc5db02bd216b2de7427c
parent6fa92030bb1636d94517be2d7272203af3b73ef7 (diff)
discoverertest: Fix variable scope problem
On Visual Studio, this doesn't work. Obviously VS doesn't allow defining a local variable in a loop with the same name as an existing variable in its parent scope.
-rw-r--r--tests/auto/discoverertest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/discoverertest.cpp b/tests/auto/discoverertest.cpp
index cc3d36a..5953bb0 100644
--- a/tests/auto/discoverertest.cpp
+++ b/tests/auto/discoverertest.cpp
@@ -486,21 +486,21 @@ void DiscovererTest::verifyStreamInfo(QGst::DiscovererInfoPtr info)
QCOMPARE(info->streams(GST_TYPE_DISCOVERER_STREAM_INFO).count(), streams.count());
QCOMPARE(info->streams().count(), streams.count());
- Q_FOREACH(const QGst::DiscovererStreamInfoPtr &info, info->streams()) {
+ Q_FOREACH(const QGst::DiscovererStreamInfoPtr &streamInfo, info->streams()) {
const StreamInfoList::ConstIterator it =
std::find_if(streams.constBegin(), streams.constEnd(),
- std::bind2nd(std::mem_fun(&StreamInfo::acceptStream), info));
+ std::bind2nd(std::mem_fun(&StreamInfo::acceptStream), streamInfo));
if (it == streams.constEnd()) {
Q_FOREACH(const StreamInfoPtr expectedInfo, streams) {
- expectedInfo->acceptStream(info, StreamInfo::Debug);
+ expectedInfo->acceptStream(streamInfo, StreamInfo::Debug);
}
- QFAIL(qPrintable("Unexpected stream: " + info->caps()->toString()));
+ QFAIL(qPrintable("Unexpected stream: " + streamInfo->caps()->toString()));
}
streams.removeAt(it - streams.constBegin());
- QVERIFY(!info->misc().isValid());
+ QVERIFY(!streamInfo->misc().isValid());
}
QVERIFY(streams.isEmpty());