From 2bfa4b9960f283396427828deac6f194893cc811 Mon Sep 17 00:00:00 2001 From: Janne Juntunen Date: Wed, 3 Nov 2021 13:04:07 +0200 Subject: QNX: check and use elf.h from alternative location In QNX, instead of #include , we have to use #include since that file is placed in a subdirectory. Also removed the previous workaround. Fixes: QTBUG-97833 Change-Id: Id932a5eeb618a42c8778459cdfd8bb5bf903523c Reviewed-by: Thiago Macieira --- .../corelib/plugin/qpluginloader/tst_qpluginloader.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'tests/auto/corelib/plugin') diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index 8994835471..8c68cfde0d 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -94,14 +94,12 @@ # define PREFIX "lib" #endif -// Workaround for missing elf.h in QNX test environment -// TODO: this can be removed after QTBUG-97833 has been solved -#if defined(Q_OF_ELF) && defined(Q_OS_QNX) && !__has_include() -#undef Q_OF_ELF +#if defined(Q_OF_ELF) +#if __has_include() +# include +#else +# include #endif - -#if defined (Q_OF_ELF) -# include # include # include @@ -183,7 +181,7 @@ static std::unique_ptr patchElf(const QString &source, ElfPatche if (QTest::currentTestFailed()) return; \ std::move(r); \ }) -#endif +#endif // Q_OF_ELF static QString sys_qualifiedLibraryName(const QString &fileName) { @@ -395,7 +393,8 @@ void tst_QPluginLoader::deleteinstanceOnUnload() } } -#if defined (Q_OF_ELF) +#if defined(Q_OF_ELF) + void tst_QPluginLoader::loadDebugObj() { #if !defined(QT_SHARED) -- cgit v1.2.3