mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 16:52:12 +02:00
Update DomainContentBackupManager to use emplace_back where available
This commit is contained in:
parent
27c26bab86
commit
936629ec1a
2 changed files with 10 additions and 3 deletions
|
@ -333,8 +333,8 @@ std::vector<BackupItemInfo> DomainContentBackupManager::getAllBackups() {
|
|||
availabilityProgress += progress / _backupHandlers.size();
|
||||
}
|
||||
|
||||
backups.push_back(
|
||||
{ fileInfo.fileName(), name, fileInfo.absoluteFilePath(), createdAt, type == MANUAL_BACKUP_PREFIX });
|
||||
backups.emplace_back(fileInfo.fileName(), name, fileInfo.absoluteFilePath(), createdAt,
|
||||
type == MANUAL_BACKUP_PREFIX);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,7 @@ std::vector<BackupItemInfo> DomainContentBackupManager::getAllBackups() {
|
|||
|
||||
void DomainContentBackupManager::getAllBackupsAndStatus(MiniPromise::Promise promise) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "getAllBackupInformation", Q_ARG(MiniPromise::Promise, promise));
|
||||
QMetaObject::invokeMethod(this, "getAllBackupsAndStatus", Q_ARG(MiniPromise::Promise, promise));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,13 @@
|
|||
#include <shared/MiniPromises.h>
|
||||
|
||||
struct BackupItemInfo {
|
||||
BackupItemInfo(QString pId, QString pName, QString pAbsolutePath, QDateTime pCreatedAt, bool pIsManualBackup)
|
||||
: id(pId)
|
||||
, name(pName)
|
||||
, absolutePath(pAbsolutePath)
|
||||
, createdAt(pCreatedAt)
|
||||
, isManualBackup(pIsManualBackup){};
|
||||
|
||||
QString id;
|
||||
QString name;
|
||||
QString absolutePath;
|
||||
|
|
Loading…
Reference in a new issue