mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +02:00
Remove BatchLoader::errorLoadingFile and reorder properties
This commit is contained in:
parent
e27db48e26
commit
22cdf1cb22
2 changed files with 2 additions and 5 deletions
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
BatchLoader::BatchLoader(const QList<QUrl>& urls)
|
BatchLoader::BatchLoader(const QList<QUrl>& urls)
|
||||||
: QObject(),
|
: QObject(),
|
||||||
|
_started(false),
|
||||||
_finished(false),
|
_finished(false),
|
||||||
_urls(urls.toSet()),
|
_urls(urls.toSet()),
|
||||||
_started(false),
|
|
||||||
_data() {
|
_data() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ void BatchLoader::start() {
|
||||||
|
|
||||||
connect(reply, &QNetworkReply::finished, [=]() {
|
connect(reply, &QNetworkReply::finished, [=]() {
|
||||||
if (reply->error()) {
|
if (reply->error()) {
|
||||||
emit errorLoadingFile(url);
|
|
||||||
_data.insert(url, QString());
|
_data.insert(url, QString());
|
||||||
} else {
|
} else {
|
||||||
_data.insert(url, reply->readAll());
|
_data.insert(url, reply->readAll());
|
||||||
|
@ -65,7 +64,6 @@ void BatchLoader::start() {
|
||||||
QTextStream in(&scriptFile);
|
QTextStream in(&scriptFile);
|
||||||
_data.insert(url, in.readAll());
|
_data.insert(url, in.readAll());
|
||||||
} else {
|
} else {
|
||||||
emit errorLoadingFile(url);
|
|
||||||
_data.insert(url, QString());
|
_data.insert(url, QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,12 @@ public:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void finished(const QMap<QUrl, QString>& data);
|
void finished(const QMap<QUrl, QString>& data);
|
||||||
void errorLoadingFile(QUrl url);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkFinished();
|
void checkFinished();
|
||||||
|
|
||||||
bool _finished;
|
|
||||||
bool _started;
|
bool _started;
|
||||||
|
bool _finished;
|
||||||
QSet<QUrl> _urls;
|
QSet<QUrl> _urls;
|
||||||
QMap<QUrl, QString> _data;
|
QMap<QUrl, QString> _data;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue