Skip to content
This repository has been archived by the owner on May 2, 2019. It is now read-only.

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenx190 committed Oct 26, 2018
1 parent 5a846df commit 8580bf5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/3rdparty/qsimpleupdater/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ void Downloader::startDownload (const QUrl& url)

/* Configure the network request */
QNetworkRequest request (url);
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
if (!m_userAgentString.isEmpty())
request.setRawHeader ("User-Agent", m_userAgentString.toUtf8());

Expand Down Expand Up @@ -258,13 +259,13 @@ void Downloader::cancelDownload()
box.setText (tr ("Are you sure you want to cancel the download?"));

if (box.exec() == QMessageBox::Yes) {
hide();
m_reply->abort();
close();
}
}

else
hide();
close();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/player/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void MainWindow::setVolume(const QVariant& param)
{
qreal newVolume = static_cast<qreal>(volume) * kVolumeInterval;
if (ao->volume() != newVolume)
if (qAbs(static_cast<int>(ao->volume() / kVolumeInterval) - volume) >= static_cast<int>(0.1 / kVolumeInterval))
if (qAbs(static_cast<int>(ao->volume() / kVolumeInterval) - static_cast<int>(volume)) >= static_cast<int>(0.1 / kVolumeInterval))
ao->setVolume(newVolume);
//emit this->sendCommand(qMakePair(QStringLiteral("setVolumeToolTip"), tr("Volume: %0").arg(QString::number(newVolume))));
}
Expand Down
4 changes: 2 additions & 2 deletions src/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"updates": {
"windows": {
"open-url": "",
"latest-version": "1.0.0.1",
"download-url": "https://github.com/wangwenx190/dynamic-desktop/releases/download/v1.0.0p16/dd-v1.0.0p16-x64.exe",
"latest-version": "1.0.0.153",
"download-url": "https://sourceforge.net/projects/dynamic-desktop/files/beta/dd-v1.0.0p19-x64.exe/download",
"changelog": "Change log for testing."
}
}
Expand Down

0 comments on commit 8580bf5

Please sign in to comment.