diff --git a/UEFITool/uefitool.cpp b/UEFITool/uefitool.cpp index d9c17bd..e0794d1 100644 --- a/UEFITool/uefitool.cpp +++ b/UEFITool/uefitool.cpp @@ -151,6 +151,8 @@ void UEFITool::init() connect(ui->finderMessagesListWidget, SIGNAL(itemEntered(QListWidgetItem*)), this, SLOT(enableMessagesCopyActions(QListWidgetItem*))); connect(ui->fitMessagesListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(scrollTreeView(QListWidgetItem*))); connect(ui->fitMessagesListWidget, SIGNAL(itemEntered(QListWidgetItem*)), this, SLOT(enableMessagesCopyActions(QListWidgetItem*))); + connect(ui->builderMessagesListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(scrollTreeView(QListWidgetItem*))); + connect(ui->builderMessagesListWidget, SIGNAL(itemEntered(QListWidgetItem*)), this, SLOT(enableMessagesCopyActions(QListWidgetItem*))); } void UEFITool::populateUi(const QModelIndex ¤t) @@ -852,7 +854,10 @@ void UEFITool::scrollTreeView(QListWidgetItem* item) void UEFITool::contextMenuEvent(QContextMenuEvent* event) { - if (ui->parserMessagesListWidget->underMouse() || ui->finderMessagesListWidget->underMouse()) { + if (ui->parserMessagesListWidget->underMouse() || + ui->fitMessagesListWidget->underMouse() || + ui->finderMessagesListWidget->underMouse() || + ui->builderMessagesListWidget->underMouse()) { ui->menuMessages->exec(event->globalPos()); return; } diff --git a/common/ffs.cpp b/common/ffs.cpp index 5d24346..b8ccf6b 100644 --- a/common/ffs.cpp +++ b/common/ffs.cpp @@ -13,7 +13,8 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include "ffs.h" -const std::vector FFSv2Volumes({ +// This is a workaround for the lack of static std::vector initializer before C++11 +const QByteArray FFSv2VolumesInt[] = { EFI_FIRMWARE_FILE_SYSTEM_GUID, EFI_FIRMWARE_FILE_SYSTEM2_GUID, EFI_APPLE_BOOT_VOLUME_FILE_SYSTEM_GUID, @@ -21,11 +22,12 @@ const std::vector FFSv2Volumes({ EFI_INTEL_FILE_SYSTEM_GUID, EFI_INTEL_FILE_SYSTEM2_GUID, EFI_SONY_FILE_SYSTEM_GUID -}); - -const std::vector FFSv3Volumes({ - EFI_FIRMWARE_FILE_SYSTEM3_GUID -}); +}; +// This number must be updated if the array above is grown +#define FFSv2VolumesIntSize 7 +const std::vector FFSv2Volumes(FFSv2VolumesInt, FFSv2VolumesInt + FFSv2VolumesIntSize); +// Luckily, FFSv3Volumes now only has 1 element +const std::vector FFSv3Volumes(1, EFI_FIRMWARE_FILE_SYSTEM3_GUID); const UINT8 ffsAlignmentTable[] = { 0, 4, 7, 9, 10, 12, 15, 16 }; diff --git a/common/ffsbuilder.cpp b/common/ffsbuilder.cpp index da930be..20528e1 100644 --- a/common/ffsbuilder.cpp +++ b/common/ffsbuilder.cpp @@ -102,7 +102,7 @@ STATUS FfsBuilder::buildCapsule(const QModelIndex & index, QByteArray & capsule) // Check image type if (model->type(imageIndex) == Types::Image) { - STATUS result; + STATUS result = ERR_SUCCESS; if (model->subtype(imageIndex) == Subtypes::IntelImage) { result = buildIntelImage(imageIndex, imageData); } diff --git a/common/ffsparser.cpp b/common/ffsparser.cpp index efb2f2f..f8bccde 100644 --- a/common/ffsparser.cpp +++ b/common/ffsparser.cpp @@ -438,7 +438,7 @@ STATUS FfsParser::parseIntelImage(const QByteArray & intelImage, const UINT32 pa region.length = regions.front().offset - FLASH_DESCRIPTOR_SIZE; region.data = intelImage.mid(region.offset, region.length); region.type = getPaddingType(region.data); - regions.insert(regions.cbegin(), region); + regions.insert(regions.begin(), region); } // Check for intersections/paddings between regions for (size_t i = 1; i < regions.size(); i++) { @@ -463,9 +463,9 @@ STATUS FfsParser::parseIntelImage(const QByteArray & intelImage, const UINT32 pa region.length = regions[i].offset - previousRegionEnd; region.data = intelImage.mid(region.offset, region.length); region.type = getPaddingType(region.data); - std::vector::const_iterator citer = regions.begin(); - std::advance(citer, i - 1); - regions.insert(citer, region); + std::vector::iterator iter = regions.begin(); + std::advance(iter, i - 1); + regions.insert(iter, region); } } // Check for padding after the last region