fixes
- support QT_VERSION < 0x050400 - "Explore download dir" (under Windows)
This commit is contained in:
parent
41c4790a5f
commit
9856bff438
|
@ -5,11 +5,9 @@
|
|||
#include <QWizardPage>
|
||||
#include <QNetworkProxy>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCheckBox;
|
||||
class QTreeView;
|
||||
class QItemSelection;
|
||||
QT_END_NAMESPACE
|
||||
QT_FORWARD_DECLARE_CLASS(QCheckBox)
|
||||
QT_FORWARD_DECLARE_CLASS(QTreeView)
|
||||
QT_FORWARD_DECLARE_CLASS(QItemSelection)
|
||||
|
||||
namespace Widgets {
|
||||
class ClearLineEdit;
|
||||
|
|
|
@ -4,10 +4,8 @@
|
|||
#include <QObject>
|
||||
#include <QSslError>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QWidget;
|
||||
class QString;
|
||||
QT_END_NAMESPACE
|
||||
QT_FORWARD_DECLARE_CLASS(QString)
|
||||
QT_FORWARD_DECLARE_CLASS(QWidget)
|
||||
|
||||
namespace Network {
|
||||
class Download;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <qtutilities/aboutdialog/aboutdialog.h>
|
||||
#include <qtutilities/enterpassworddialog/enterpassworddialog.h>
|
||||
#include <qtutilities/misc/desktoputils.h>
|
||||
|
||||
#include <c++utilities/conversion/stringconversion.h>
|
||||
#include <c++utilities/chrono/timespan.h>
|
||||
|
@ -753,7 +754,7 @@ void MainWindow::exploreDownloadsDir()
|
|||
QMessageBox::warning(this, windowTitle(), tr("There is no download target selected."));
|
||||
} else {
|
||||
if(QDir(GeneralTargetOptionPage::targetDirectory()).exists()) {
|
||||
QDesktopServices::openUrl(QUrl(QStringLiteral("file://%1").arg(GeneralTargetOptionPage::targetDirectory()), QUrl::TolerantMode));
|
||||
DesktopUtils::openLocalFileOrDir(GeneralTargetOptionPage::targetDirectory());
|
||||
} else {
|
||||
QMessageBox::warning(this, windowTitle(), tr("The selected download directory doesn't exist anymore."));
|
||||
}
|
||||
|
|
|
@ -31,15 +31,25 @@ VimeoDownload::VimeoDownload(const QString &id, QObject *parent) :
|
|||
|
||||
Download *VimeoDownload::infoRequestDownload(bool &success, QString &reasonForFail)
|
||||
{
|
||||
const auto pathParts = initialUrl().path(QUrl::FullyDecoded).splitRef(QChar('/'), QString::SkipEmptyParts);
|
||||
const auto pathParts = initialUrl().path(QUrl::FullyDecoded).
|
||||
#if QT_VERSION >= 0x050400
|
||||
splitRef
|
||||
#else
|
||||
split
|
||||
#endif
|
||||
(QChar('/'), QString::SkipEmptyParts);
|
||||
if(pathParts.size() < 2) {
|
||||
const auto &id = pathParts.back();
|
||||
bool isInt;
|
||||
id.toULongLong(&isInt);
|
||||
if(isInt) {
|
||||
setId(id.toString());
|
||||
setId(id
|
||||
#if QT_VERSION >= 0x050400
|
||||
.toString()
|
||||
#endif
|
||||
);
|
||||
success = true;
|
||||
return new HttpDownload(QUrl(QStringLiteral("https://player.vimeo.com/video/%1/config").arg(id.toString())));
|
||||
return new HttpDownload(QUrl(QStringLiteral("https://player.vimeo.com/video/%1/config").arg(this->id())));
|
||||
}
|
||||
}
|
||||
success = false;
|
||||
|
|
Loading…
Reference in New Issue