diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-02-28 13:00:19 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-20 02:09:26 +0200 |
commit | 62d636a666f38fb4483e2d528f1e175c90f5272a (patch) | |
tree | 20b11b55e659585973fba46cccec808544cb9e9d /tests/auto/corelib/plugin/qpluginloader/tst/tst.pro | |
parent | 3fdf69b599457bf32a6620d66faefb940fd21c93 (diff) |
Add a Mach-O decoder to the QPluginLoader
We already had an ELF decoder, which helped us greatly to find the
metadata and that catches most Unix systems (Solaris, QNX, HP-UXi, and
all of the free Unixes). On other Unix systems, aside from Mac OS X,
we simply scanned the entire file for the signature. On Windows, even
without a COFF-PE decoder, we use a LoadLibrary trick to load the
plugin without loading the dependent libraries. In most cases, that
works.
Unfortunately, on Mac OS X we didn't have a decoder and nor could we
do the file scan: because Mac OS X binaries could be fat binaries, we
wouldn't know which architecture's signature we had found.
No more. This adds a full Mach-O decoder to QtCore. It is also capable
of finding the boundaries of the architecture's binary, but that
functionality is disabled since all Qt 5 plugins have plugin metadata
sections.
Change-Id: I2d5c04c5ecf024864b8a43f31ab6b7e6c5eae9ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/plugin/qpluginloader/tst/tst.pro')
-rw-r--r-- | tests/auto/corelib/plugin/qpluginloader/tst/tst.pro | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro index a7a9661a54..3894c90ae3 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro +++ b/tests/auto/corelib/plugin/qpluginloader/tst/tst.pro @@ -2,7 +2,8 @@ CONFIG += testcase CONFIG += parallel_test TARGET = ../tst_qpluginloader QT = core testlib -SOURCES = ../tst_qpluginloader.cpp +contains(QT_CONFIG, private_tests): QT += core-private +SOURCES = ../tst_qpluginloader.cpp ../fakeplugin.cpp HEADERS = ../theplugin/plugininterface.h CONFIG -= app_bundle @@ -14,5 +15,5 @@ win32 { } } -TESTDATA += ../elftest +TESTDATA += ../elftest ../machtest DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 |