From: druid23 Date: Sat, 21 Aug 2010 20:58:25 +0000 (+0100) Subject: Playlist tweak - minimizing impact of refresh on the UI. X-Git-Tag: v0.5~12 X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=ed6b3f2ed33dfb5300c9f2df401fd5b4c633b5de;hp=9637e172411142f0973de244835a1f6f1d0cb244;p=vlc-remote Playlist tweak - minimizing impact of refresh on the UI. modified: playlistmainwindow.cpp --- diff --git a/playlistmainwindow.cpp b/playlistmainwindow.cpp index 61a4717..ca4ce3b 100644 --- a/playlistmainwindow.cpp +++ b/playlistmainwindow.cpp @@ -138,8 +138,6 @@ void PlayListMainWindow::onClear() { connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList())); } void PlayListMainWindow::requestPlayList() { - mContents->clear(); - ui->listWidget->clear(); mResponse.clear(); ui->removeButton->setDisabled(true); ui->playButton->setDisabled(true); @@ -177,6 +175,7 @@ void PlayListMainWindow::finished(QNetworkReply * reply) { } void PlayListMainWindow::parseXmlPlayList() { + mContents->clear(); QDomDocument doc; doc.setContent(this->mResponse); QDomElement docElem = doc.documentElement(); @@ -346,6 +345,7 @@ VlcPlayListElementSimple PlayListMainWindow::getElementFromText(QString text) { } void PlayListMainWindow::updateList() { + ui->listWidget->clear(); int ct = this->mContents->count(); if (0 < ct) { QIcon icon_audio = QIcon::fromTheme("general_audio_file");