From 990c27af49da1647e66fbc7d4ae8f564b1b3e265 Mon Sep 17 00:00:00 2001 From: Flavio Date: Tue, 8 Jan 2013 16:19:49 +0100 Subject: [PATCH] do not emit name changed multiple times --- src/ytsearch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ytsearch.cpp b/src/ytsearch.cpp index a5d03df..c9e3c40 100644 --- a/src/ytsearch.cpp +++ b/src/ytsearch.cpp @@ -16,7 +16,7 @@ YTSearch::YTSearch(SearchParams *searchParams, QObject *parent) : } void YTSearch::loadVideos(int max, int skip) { - this->aborted = false; + aborted = false; QUrl url("https://gdata.youtube.com/feeds/api/videos/"); url.addQueryItem("v", "2"); @@ -102,7 +102,7 @@ void YTSearch::parseResults(QByteArray data) { QList videos = reader.getVideos(); suggestions = reader.getSuggestions(); - if (!searchParams->author().isEmpty()) { + if (name.isEmpty() && !searchParams->author().isEmpty()) { if (videos.isEmpty()) name = searchParams->author(); else name = videos.first()->author(); emit nameChanged(name); -- 2.39.5