summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qmachparser_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-12 20:07:40 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-09-24 20:16:05 -0700
commit57960ab075b9e7a471c42ddea6a2abbc2994ec83 (patch)
treef2f6323330398e164a2ae67a887e88cc7337e6d0 /src/corelib/plugin/qmachparser_p.h
parenta03a67fbfaba28d87cccab6a7fe09ebd5da71d16 (diff)
Q{Elf,Mach}Parser: simplify the return codes
The multi-state return code was a legacy of how Arvid wrote the ELF parser code back in the day, the fact that it scanned for two different types of plugins in Qt 4 and that the metadata could exist in different places. None of that matters nowadays: who cares if the file is a corrupt binary, not a valid binary, does not have the right architecture, or has no suitable section? It's not a plugin, period. The Qt 4 plugin mechanism was removed for Qt 5.0 in commit 7443895857fdaee132c8efc643e471f02b3d0fa4 ("Remove support for Qt 4 style plugins"). Change-Id: I42eb903a916645db9900fffd16a442d800399b98 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/plugin/qmachparser_p.h')
-rw-r--r--src/corelib/plugin/qmachparser_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/plugin/qmachparser_p.h b/src/corelib/plugin/qmachparser_p.h
index 290b68876f..499c63aa94 100644
--- a/src/corelib/plugin/qmachparser_p.h
+++ b/src/corelib/plugin/qmachparser_p.h
@@ -51,8 +51,7 @@
// We mean it.
//
-#include <qendian.h>
-#include <private/qglobal_p.h>
+#include "qlibrary_p.h"
QT_REQUIRE_CONFIG(library);
@@ -66,8 +65,8 @@ class QLibraryPrivate;
class Q_AUTOTEST_EXPORT QMachOParser
{
public:
- enum { QtMetaDataSection, NoQtSection, NotSuitable };
- static int parse(const char *m_s, ulong fdlen, const QString &library, QString *errorString, qsizetype *pos, qsizetype *sectionlen);
+ static QLibraryScanResult parse(const char *m_s, ulong fdlen, const QString &library,
+ QString *errorString);
};
QT_END_NAMESPACE