QElfParser: don't use int for the enum
An enum shows the proper values in the debugger... Pick-to: 6.2 Change-Id: I2de1b4dfacd443148279fffd16a3a5848196983c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
This commit is contained in:
parent
96d21faa01
commit
55e565c763
@ -63,7 +63,8 @@ const char *QElfParser::parseSectionHeader(const char *data, ElfSectionHeader *s
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library, QLibraryPrivate *lib, qsizetype *pos, qsizetype *sectionlen)
|
auto QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library,
|
||||||
|
QLibraryPrivate *lib, qsizetype *pos, qsizetype *sectionlen) -> ScanResult
|
||||||
{
|
{
|
||||||
#if defined(QELFPARSER_DEBUG)
|
#if defined(QELFPARSER_DEBUG)
|
||||||
qDebug() << "QElfParser::parse " << library;
|
qDebug() << "QElfParser::parse " << library;
|
||||||
|
@ -71,7 +71,7 @@ typedef quintptr qelfaddr_t;
|
|||||||
class QElfParser
|
class QElfParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum { QtMetaDataSection, NoQtSection, NotElf, Corrupt };
|
enum ScanResult { QtMetaDataSection, NoQtSection, NotElf, Corrupt };
|
||||||
enum { ElfLittleEndian = 0, ElfBigEndian = 1 };
|
enum { ElfLittleEndian = 0, ElfBigEndian = 1 };
|
||||||
|
|
||||||
struct ElfSectionHeader
|
struct ElfSectionHeader
|
||||||
@ -96,7 +96,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *parseSectionHeader(const char* s, ElfSectionHeader *sh);
|
const char *parseSectionHeader(const char* s, ElfSectionHeader *sh);
|
||||||
int parse(const char *m_s, ulong fdlen, const QString &library, QLibraryPrivate *lib, qsizetype *pos, qsizetype *sectionlen);
|
ScanResult parse(const char *m_s, ulong fdlen, const QString &library, QLibraryPrivate *lib, qsizetype *pos, qsizetype *sectionlen);
|
||||||
};
|
};
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -274,7 +274,7 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
|
|||||||
pattern[0] = 'Q'; // Ensure the pattern "QTMETADATA" is not found in this library should QPluginLoader ever encounter it.
|
pattern[0] = 'Q'; // Ensure the pattern "QTMETADATA" is not found in this library should QPluginLoader ever encounter it.
|
||||||
const ulong plen = ulong(qstrlen(pattern));
|
const ulong plen = ulong(qstrlen(pattern));
|
||||||
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
|
||||||
int r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen);
|
QElfParser::ScanResult r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen);
|
||||||
if (r == QElfParser::Corrupt || r == QElfParser::NotElf) {
|
if (r == QElfParser::Corrupt || r == QElfParser::NotElf) {
|
||||||
if (lib && qt_debug_component()) {
|
if (lib && qt_debug_component()) {
|
||||||
qWarning("QElfParser: %ls", qUtf16Printable(lib->errorString));
|
qWarning("QElfParser: %ls", qUtf16Printable(lib->errorString));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user