mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +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)
|
||||
: QObject(),
|
||||
_started(false),
|
||||
_finished(false),
|
||||
_urls(urls.toSet()),
|
||||
_started(false),
|
||||
_data() {
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ void BatchLoader::start() {
|
|||
|
||||
connect(reply, &QNetworkReply::finished, [=]() {
|
||||
if (reply->error()) {
|
||||
emit errorLoadingFile(url);
|
||||
_data.insert(url, QString());
|
||||
} else {
|
||||
_data.insert(url, reply->readAll());
|
||||
|
@ -65,7 +64,6 @@ void BatchLoader::start() {
|
|||
QTextStream in(&scriptFile);
|
||||
_data.insert(url, in.readAll());
|
||||
} else {
|
||||
emit errorLoadingFile(url);
|
||||
_data.insert(url, QString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,13 +29,12 @@ public:
|
|||
|
||||
signals:
|
||||
void finished(const QMap<QUrl, QString>& data);
|
||||
void errorLoadingFile(QUrl url);
|
||||
|
||||
private:
|
||||
void checkFinished();
|
||||
|
||||
bool _finished;
|
||||
bool _started;
|
||||
bool _finished;
|
||||
QSet<QUrl> _urls;
|
||||
QMap<QUrl, QString> _data;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue