X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;ds=sidebyside;f=src%2Flibs%2FPlugins%2Fpluginmanager.cpp;h=dac188f4a6a4addd612fce260fc98dee043f6c1d;hb=7e6c580d1324e48375638b5f9ccbab4bff90f049;hp=643cad217cdfc4a353e13e74a6184689150601cc;hpb=be0e791df48f5a8c9bb4c16f65b62e41e1149552;p=evaf
diff --git a/src/libs/Plugins/pluginmanager.cpp b/src/libs/Plugins/pluginmanager.cpp
index 643cad2..dac188f 100644
--- a/src/libs/Plugins/pluginmanager.cpp
+++ b/src/libs/Plugins/pluginmanager.cpp
@@ -325,7 +325,7 @@ bool PluginManagerPrivate::loadPlugins()
void PluginManagerPrivate::unloadPlugins()
{
// Finalize all the plugins
- for (int i = 0; i < mPlugins.size(); ++i)
+ for (int i = mPlugins.size() - 1; i >= 0; --i)
mPlugins.at(i)->done();
while (!mPlugins.isEmpty()) {
QExplicitlySharedDataPointer p = mPlugins.takeLast();
@@ -363,12 +363,21 @@ bool PluginManagerPrivate::loadQtPlugin(QString const & name) const
#endif
#ifdef Q_OS_WIN32
- fileName = QString("%2q%2%3").arg(Common::iApp::instance()->qtPluginsDir()).arg(name).arg("4.dll");
+ fileName = QString("%1q%2%3").arg(Common::iApp::instance()->qtPluginsDir()).arg(name).arg("4.dll");
# ifndef QT_NO_DEBUG
QString t = QString("%1q%2%3").arg(Common::iApp::instance()->qtPluginsDir()).arg(name).arg("d4.dll");
if (!QFile::exists(t))
fileName = t;
# endif
+#endif
+
+#ifdef Q_OS_CYGWIN
+ fileName = QString("%1cygq%2.dll").arg(Common::iApp::instance()->qtPluginsDir()).arg(name);
+# ifndef QT_NO_DEBUG
+ QString t = QString("%1libq%2.dll.debug").arg(Common::iApp::instance()->qtPluginsDir()).arg(name);
+ if (QFile::exists(t))
+ fileName = t;
+# endif
#endif
if (fileName.isEmpty()) {
@@ -457,7 +466,7 @@ iPlugin * Module::create(QString const & name)
// If the module is not loaded, load it now
if (!mLoader) {
if (!load())
- return false;
+ return 0;
}
iPlugin * i = 0;