Merge pull request #6000 from spycrab/qt_fix_older

Qt: Fix building on <= 5.7.x
This commit is contained in:
Mat M 2017-09-01 22:02:18 -04:00 committed by GitHub
commit b073db51e5

View File

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