summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
diff options
context:
space:
mode:
authorJonas Rabbe <jonas.rabbe@nokia.com>2012-03-28 12:07:19 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-29 13:58:13 +0200
commit5185a28139800a9fef49dabc6c110e017f83cdd6 (patch)
treed2cf684c09969392847e07a7038a64eb91980855 /tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
parentd3c6664fb070f3a0a2ca26206478834a3810089e (diff)
Fix a crash in QFactoryLoader
The change in plugin loading has meant that different plugins in the same plugin folder will not be handled properly when loaded with different instances of QFactoryLoader. A solution is to only unload compatability plugins from QFactoryLoader::update() since they are the only plugins that are actually loaded in that method. This auto test shows the error on the current version of QFactoryLoader and passes with the fix described above. Change-Id: I12001525d51bb631d6742c5965357598322f247c Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp')
-rw-r--r--tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
new file mode 100644
index 0000000000..542b58a5bf
--- /dev/null
+++ b/tests/auto/corelib/plugin/qfactoryloader/plugin1/plugin1.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore/qstring.h>
+#include "plugin1.h"
+
+QString Plugin1::pluginName() const
+{
+ return QLatin1String("Plugin1 ok");
+}