qpluginloader: fix static build (on iOS)

Since the function locatePlugin is unused when
building Qt statically, the build fails on
iOS. This patch will ensure that we only define it
for shared builds.

Change-Id: Idf3c3246d3cac94a3c001cc261f326e9a396aa31
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Richard Moe Gustavsen 2013-09-04 14:42:09 +02:00 committed by The Qt Project
parent 9fc2c729b4
commit acdf946e63

View File

@ -278,6 +278,7 @@ bool QPluginLoader::isLoaded() const
return d && d->pHnd && d->instance; return d && d->pHnd && d->instance;
} }
#if defined(QT_SHARED)
static QString locatePlugin(const QString& fileName) static QString locatePlugin(const QString& fileName)
{ {
QStringList prefixes = QLibraryPrivate::prefixes_sys(); QStringList prefixes = QLibraryPrivate::prefixes_sys();
@ -309,6 +310,7 @@ static QString locatePlugin(const QString& fileName)
qDebug() << fileName << "not found"; qDebug() << fileName << "not found";
return QString(); return QString();
} }
#endif
/*! /*!
\property QPluginLoader::fileName \property QPluginLoader::fileName