Fix httpwindow example.
DownloadLocation is not writable on some platforms (iOS) in Qt 5.6, and qt-project.org HTTPS does not work anymore. Change-Id: I78bfbee1472cd39cd05ec7f846d1195d4fbb1b2c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This commit is contained in:
parent
4605ca2013
commit
2ceacd5372
@ -46,9 +46,9 @@
|
|||||||
#include "ui_authenticationdialog.h"
|
#include "ui_authenticationdialog.h"
|
||||||
|
|
||||||
#ifndef QT_NO_SSL
|
#ifndef QT_NO_SSL
|
||||||
static const char defaultUrl[] = "https://qt-project.org/";
|
static const char defaultUrl[] = "https://www.qt.io/";
|
||||||
#else
|
#else
|
||||||
static const char defaultUrl[] = "http://qt-project.org/";
|
static const char defaultUrl[] = "http://www.qt.io/";
|
||||||
#endif
|
#endif
|
||||||
static const char defaultFileName[] = "index.html";
|
static const char defaultFileName[] = "index.html";
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ HttpWindow::HttpWindow(QWidget *parent)
|
|||||||
connect(urlLineEdit, &QLineEdit::textChanged,
|
connect(urlLineEdit, &QLineEdit::textChanged,
|
||||||
this, &HttpWindow::enableDownloadButton);
|
this, &HttpWindow::enableDownloadButton);
|
||||||
formLayout->addRow(tr("&URL:"), urlLineEdit);
|
formLayout->addRow(tr("&URL:"), urlLineEdit);
|
||||||
QString downloadDirectory = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
QString downloadDirectory = QStandardPaths::writableLocation(QStandardPaths::TempLocation);
|
||||||
if (downloadDirectory.isEmpty() || !QFileInfo(downloadDirectory).isDir())
|
if (downloadDirectory.isEmpty() || !QFileInfo(downloadDirectory).isDir())
|
||||||
downloadDirectory = QDir::currentPath();
|
downloadDirectory = QDir::currentPath();
|
||||||
downloadDirectoryLineEdit->setText(QDir::toNativeSeparators(downloadDirectory));
|
downloadDirectoryLineEdit->setText(QDir::toNativeSeparators(downloadDirectory));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user