From dfc972be63b669950f10281b1e6971df3a0d39c5 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Tue, 23 Mar 2010 21:44:43 +0000 Subject: [PATCH] Use the global QApplication now --- tests/albumcoverfetcher_test.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tests/albumcoverfetcher_test.cpp b/tests/albumcoverfetcher_test.cpp index b9821640f..e09f4cd47 100644 --- a/tests/albumcoverfetcher_test.cpp +++ b/tests/albumcoverfetcher_test.cpp @@ -11,19 +11,12 @@ namespace { -static int argc = 1; -static const char* argv[] = { "test", 0 }; - class AlbumCoverFetcherTest : public ::testing::Test { protected: static void SetUpTestCase() { lastfm::ws::ApiKey = "foobar"; } - AlbumCoverFetcherTest() - : app_(argc, (char**)argv) { - } - void SetUp() { // Lastfm takes ownership of this. network_ = new MockNetworkAccessManager; @@ -31,7 +24,6 @@ class AlbumCoverFetcherTest : public ::testing::Test { } MockNetworkAccessManager* network_; - QCoreApplication app_; }; @@ -54,10 +46,10 @@ TEST_F(AlbumCoverFetcherTest, FetchesAlbumCover) { fetcher.FetchAlbumCover("Foo", "Bar"); get_info_reply->Done(); - app_.processEvents(QEventLoop::ExcludeUserInputEvents); + QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); album_reply->Done(); - app_.processEvents(QEventLoop::ExcludeUserInputEvents); + QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); EXPECT_EQ(1, spy.count()); }