mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Qt4 compatibility
This commit is contained in:
parent
02d87ae550
commit
2443560c1d
@ -138,7 +138,7 @@ STATUS FfsFinder::findGuidPattern(const QModelIndex & index, const QByteArray &
|
||||
if (hexPattern.count('.') == hexPattern.length())
|
||||
return ERR_SUCCESS;
|
||||
|
||||
QRegExp regexp = QRegExp(QString(hexPattern), Qt::CaseInsensitive);
|
||||
QRegExp regexp(QString(hexPattern), Qt::CaseInsensitive);
|
||||
INT32 offset = regexp.indexIn(hexBody);
|
||||
while (offset >= 0) {
|
||||
if (offset % 2 == 0) {
|
||||
|
@ -18,6 +18,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
#include <QModelIndex>
|
||||
#include <QPair>
|
||||
#include <QRegExp>
|
||||
#include <QVector>
|
||||
|
||||
#include "../common/basetypes.h"
|
||||
#include "../common/treemodel.h"
|
||||
|
@ -899,7 +899,7 @@ void UEFITool::showFitTable()
|
||||
|
||||
// Set up the FIT table
|
||||
ui->fitTableWidget->clear();
|
||||
ui->fitTableWidget->setRowCount(fitTable.length());
|
||||
ui->fitTableWidget->setRowCount(fitTable.size());
|
||||
ui->fitTableWidget->setColumnCount(5);
|
||||
ui->fitTableWidget->setHorizontalHeaderLabels(QStringList() << tr("Address") << tr("Size") << tr("Version") << tr("Type") << tr("Checksum"));
|
||||
ui->fitTableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
@ -908,7 +908,7 @@ void UEFITool::showFitTable()
|
||||
ui->fitTableWidget->horizontalHeader()->setStretchLastSection(true);
|
||||
|
||||
// Add all data to the table widget
|
||||
for (INT32 i = 0; i < fitTable.length(); i++) {
|
||||
for (INT32 i = 0; i < fitTable.size(); i++) {
|
||||
for (UINT8 j = 0; j < 5; j++) {
|
||||
ui->fitTableWidget->setItem(i, j, new QTableWidgetItem(fitTable[i][j]));
|
||||
}
|
||||
|
@ -1844,7 +1844,7 @@ STATUS FfsParser::parseGuidedSectionHeader(const QByteArray & section, const UIN
|
||||
|
||||
// Obtain header fields
|
||||
const EFI_COMMON_SECTION_HEADER* sectionHeader = (const EFI_COMMON_SECTION_HEADER*)(section.constData());
|
||||
const EFI_GUID_DEFINED_SECTION* guidDefinedSectionHeader = guidDefinedSectionHeader = (const EFI_GUID_DEFINED_SECTION*)sectionHeader;
|
||||
const EFI_GUID_DEFINED_SECTION* guidDefinedSectionHeader = (const EFI_GUID_DEFINED_SECTION*)sectionHeader;
|
||||
EFI_GUID guid = guidDefinedSectionHeader->SectionDefinitionGuid;
|
||||
UINT16 dataOffset = guidDefinedSectionHeader->DataOffset;
|
||||
UINT16 attributes = guidDefinedSectionHeader->Attributes;
|
||||
|
Loading…
Reference in New Issue
Block a user