From 9bdd91bf195fff8654d065d851ca95b201836443 Mon Sep 17 00:00:00 2001 From: Nikolaj Schlej Date: Sat, 3 May 2014 14:05:05 +0200 Subject: [PATCH] UEFIExtract 0.2 - folder names made more human-readable - no more double names in info.txt --- UEFIExtract/uefiextract_main.cpp | 2 +- ffsengine.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/UEFIExtract/uefiextract_main.cpp b/UEFIExtract/uefiextract_main.cpp index f5fb051..b63182f 100644 --- a/UEFIExtract/uefiextract_main.cpp +++ b/UEFIExtract/uefiextract_main.cpp @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) } else { result = ERR_INVALID_PARAMETER; - std::cout << "UEFIExtract 0.1.0" << std::endl << std::endl << + std::cout << "UEFIExtract 0.2" << std::endl << std::endl << "Usage: uefiextract imagefile\n" << std::endl; } diff --git a/ffsengine.cpp b/ffsengine.cpp index 113bd79..0c8d4b9 100644 --- a/ffsengine.cpp +++ b/ffsengine.cpp @@ -3175,10 +3175,10 @@ UINT8 FfsEngine::dump(const QModelIndex & index, const QString path) file.close(); } - QString info = tr("Name: %1\nType: %2\nSubtype: %3\n%4") - .arg(model->nameString(index)) + QString info = tr("Type: %1\nSubtype: %2\n%3%4") .arg(model->typeString(index)) .arg(model->subtypeString(index)) + .arg(model->textString(index).isEmpty() ? "" : tr("Text: %1\n").arg(model->textString(index))) .arg(model->info(index)); file.setFileName(tr("%1/info.txt").arg(path)); if (!file.open(QFile::Text | QFile::WriteOnly)) @@ -3189,8 +3189,8 @@ UINT8 FfsEngine::dump(const QModelIndex & index, const QString path) UINT8 result; for (int i = 0; i < model->rowCount(index); i++) { QModelIndex childIndex = index.child(i, 0); - QString childPath = tr("%1/%2 %3").arg(path).arg(i).arg(model->nameString(childIndex)); - result = dump(index.child(i, index.column()), childPath); + QString childPath = tr("%1/%2 %3").arg(path).arg(i).arg(model->textString(childIndex).isEmpty() ? model->nameString(childIndex) : model->textString(childIndex)); + result = dump(childIndex, childPath); if (result) return result; }