diff options
-rw-r--r-- | src/corelib/plugin/qelfparser_p.cpp | 3 | ||||
-rw-r--r-- | src/corelib/plugin/qelfparser_p.h | 4 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 777eed3c34..84373795f6 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -63,7 +63,8 @@ const char *QElfParser::parseSectionHeader(const char *data, ElfSectionHeader *s 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) qDebug() << "QElfParser::parse " << library; diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 72ee30d282..796b987eb3 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -71,7 +71,7 @@ typedef quintptr qelfaddr_t; class QElfParser { public: - enum { QtMetaDataSection, NoQtSection, NotElf, Corrupt }; + enum ScanResult { QtMetaDataSection, NoQtSection, NotElf, Corrupt }; enum { ElfLittleEndian = 0, ElfBigEndian = 1 }; struct ElfSectionHeader @@ -96,7 +96,7 @@ public: } 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 diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 810cbc5a79..e3783c9cb4 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -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. const ulong plen = ulong(qstrlen(pattern)); #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 (lib && qt_debug_component()) { qWarning("QElfParser: %ls", qUtf16Printable(lib->errorString)); |