X-Git-Url: http://git.maemo.org/git/?p=vlc-remote;a=blobdiff_plain;f=playlistmainwindow.cpp;h=8ba441210642d77b3fcc9eab65e768dd6469699a;hp=4af4b7aab9b8319d768ba040ca1854d1b8817619;hb=1838d485921625ac370fb4de93e185cae95fb341;hpb=41becf578bfb2621ec53d9989ae113f243157f91 diff --git a/playlistmainwindow.cpp b/playlistmainwindow.cpp index 4af4b7a..8ba4412 100644 --- a/playlistmainwindow.cpp +++ b/playlistmainwindow.cpp @@ -109,7 +109,7 @@ void PlayListMainWindow::onListSelectionChanged() { void PlayListMainWindow::onRemove() { if (0 < this->mCurrentVlcIndex) { /*QNetworkReply * reply = */ mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_delete&id=" + QString::number(this->mCurrentVlcIndex)))); - this->requestPlayList(); + connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList())); } } void PlayListMainWindow::onPlay() { @@ -128,7 +128,7 @@ void PlayListMainWindow::onShuffle() { } void PlayListMainWindow::onClear() { /*QNetworkReply * reply = */ mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml?command=pl_empty"))); - this->requestPlayList(); + connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList())); } void PlayListMainWindow::requestPlayList() { mContents->clear(); @@ -137,6 +137,7 @@ void PlayListMainWindow::requestPlayList() { ui->removeButton->setDisabled(true); ui->playButton->setDisabled(true); QNetworkReply * reply = mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/playlist.xml"))); + disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(requestPlayList())); connect(reply,SIGNAL(readyRead()),this,SLOT(readReady())); connect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *))); }