Qt: Fix building on <= 5.7.x

This commit is contained in:
spycrab 2017-09-02 03:20:20 +02:00
parent 8e9857d3cd
commit fcdd247f93
1 changed files with 4 additions and 3 deletions

View File

@ -864,13 +864,14 @@ void MainWindow::OnImportNANDBackup()
dialog->setLabelText(tr("Importing NAND backup")); dialog->setLabelText(tr("Importing NAND backup"));
dialog->setCancelButton(nullptr); dialog->setCancelButton(nullptr);
auto beginning = QDateTime::currentDateTime().toSecsSinceEpoch(); auto beginning = QDateTime::currentDateTime().toMSecsSinceEpoch();
auto result = std::async(std::launch::async, [&] { auto result = std::async(std::launch::async, [&] {
DiscIO::NANDImporter().ImportNANDBin(file.toStdString(), [&dialog, beginning] { DiscIO::NANDImporter().ImportNANDBin(file.toStdString(), [&dialog, beginning] {
QueueOnObject(dialog, [&dialog, beginning] { QueueOnObject(dialog, [&dialog, beginning] {
dialog->setLabelText(tr("Importing NAND backup\n Time elapsed: %1s") dialog->setLabelText(
.arg(QDateTime::currentDateTime().toSecsSinceEpoch() - beginning)); tr("Importing NAND backup\n Time elapsed: %1s")
.arg((QDateTime::currentDateTime().toMSecsSinceEpoch() - beginning) / 1000));
}); });
}); });
QueueOnObject(dialog, [dialog] { dialog->close(); }); QueueOnObject(dialog, [dialog] { dialog->close(); });