summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r--src/corelib/plugin/qlibrary.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index adac2f41da..79a6cfcdf2 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -664,6 +664,11 @@ bool QLibrary::isLibrary(const QString &fileName)
#if defined(Q_OS_WIN)
return fileName.endsWith(QLatin1String(".dll"), Qt::CaseInsensitive);
#else // Generic Unix
+# if defined(Q_OS_DARWIN)
+ // On Apple platforms, dylib look like libmylib.1.0.0.dylib
+ if (fileName.endsWith(QLatin1String(".dylib")))
+ return true;
+# endif
QString completeSuffix = QFileInfo(fileName).completeSuffix();
if (completeSuffix.isEmpty())
return false;
@@ -683,10 +688,6 @@ bool QLibrary::isLibrary(const QString &fileName)
# elif defined(Q_OS_AIX)
validSuffixList << QLatin1String("a") << QLatin1String("so");
# elif defined(Q_OS_DARWIN)
- // On Apple platforms, dylib look like libmylib.1.0.0.dylib
- if (suffixes.last() == QLatin1String("dylib"))
- return true;
-
validSuffixList << QLatin1String("so") << QLatin1String("bundle");
# elif defined(Q_OS_UNIX)
validSuffixList << QLatin1String("so");