X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=playermainwindow.cpp;h=5ffb274d497522e7fb18c04d694db9014542ef6d;hb=52328acdcfb60461e72f210ac7345781ec297eb7;hp=9ee1480d3f8479f921e2131e9e2ce2ff992f1d01;hpb=77153ee186168c5a623c1d80a1cb81afb266e646;p=vlc-remote diff --git a/playermainwindow.cpp b/playermainwindow.cpp index 9ee1480..5ffb274 100644 --- a/playermainwindow.cpp +++ b/playermainwindow.cpp @@ -95,7 +95,6 @@ connect(ui->playpauseButton,SIGNAL(clicked()),this,SLOT(playpause())); connect(ui->stopButton,SIGNAL(clicked()),this,SLOT(stop())); - //connect(ui->pauseButton,SIGNAL(clicked()),this,SLOT(playpause())); connect(ui->previousButton,SIGNAL(clicked()),this,SLOT(previous())); connect(ui->nextButton,SIGNAL(clicked()),this,SLOT(next())); connect(ui->fullscreenButton,SIGNAL(clicked()),this,SLOT(fullscreen())); @@ -297,7 +296,7 @@ void PlayerMainWindow::askStatus() { - qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss"); + //qDebug() << "Status requested. at:" << QTime::currentTime().toString("hh::mm:ss"); QNetworkReply * reply = mNetManager->get(QNetworkRequest(QUrl("http://"+mIp+"/requests/status.xml"))); connect(reply,SIGNAL(readyRead()),this,SLOT(parseXmlStatus())); } @@ -334,6 +333,10 @@ QString album = metaInfoNode.namedItem("album").toElement().text(); QString now_playing = metaInfoNode.namedItem("now_playing").toElement().text(); QString art_url = metaInfoNode.namedItem("art_url").toElement().text(); + //metaInfoNode.clear(); + //infoNode.clear(); + //docElem.clear(); + //doc.clear(); // Populate the current status structure // now would be a good time to work out if we are a new track / file or not. // key if we are going to look for album art later @@ -403,8 +406,11 @@ } - if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100) + if (mCurrentStatus.position >= 0 && mCurrentStatus.position <= 100) { + ui->slider->blockSignals(true); ui->slider->setValue(mCurrentStatus.position); + ui->slider->blockSignals(false); + } ui->labelTitle->setText(mCurrentStatus.title); ui->labelArtist->setText(mCurrentStatus.artist); @@ -454,6 +460,7 @@ this->setCoverArt(mResponse); // only interested in finished signals disconnect(mNetManager,SIGNAL(finished(QNetworkReply *)),this,SLOT(finished(QNetworkReply *))); + delete reply; } void PlayerMainWindow::getCoverArt(int id) { qDebug() << "getCoverArt id=!" << id; @@ -485,6 +492,7 @@ ui->labelArtPortrait->setVisible(false); ui->labelArtLandscape->setVisible(false); } + delete image; } void PlayerMainWindow::setCoverArtFromPixmap(QPixmap image) { mHasImage = true;