equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the Qt Designer of the Qt Toolkit. |
7 ** This file is part of the Qt Designer of the Qt Toolkit. |
8 ** |
8 ** |
103 |
103 |
104 if (!fileNames.isEmpty()) { |
104 if (!fileNames.isEmpty()) { |
105 QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Loaded Plugins")); |
105 QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Loaded Plugins")); |
106 QFont boldFont = topLevelItem->font(0); |
106 QFont boldFont = topLevelItem->font(0); |
107 |
107 |
108 foreach (QString fileName, fileNames) { |
108 foreach (const QString &fileName, fileNames) { |
109 QPluginLoader loader(fileName); |
109 QPluginLoader loader(fileName); |
110 const QFileInfo fileInfo(fileName); |
110 const QFileInfo fileInfo(fileName); |
111 |
111 |
112 QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, fileInfo.fileName(), boldFont); |
112 QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, fileInfo.fileName(), boldFont); |
113 |
113 |
125 |
125 |
126 const QStringList notLoadedPlugins = pluginManager->failedPlugins(); |
126 const QStringList notLoadedPlugins = pluginManager->failedPlugins(); |
127 if (!notLoadedPlugins.isEmpty()) { |
127 if (!notLoadedPlugins.isEmpty()) { |
128 QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Failed Plugins")); |
128 QTreeWidgetItem *topLevelItem = setTopLevelItem(QLatin1String("Failed Plugins")); |
129 const QFont boldFont = topLevelItem->font(0); |
129 const QFont boldFont = topLevelItem->font(0); |
130 foreach (const QString plugin, notLoadedPlugins) { |
130 foreach (const QString &plugin, notLoadedPlugins) { |
131 const QString failureReason = pluginManager->failureReason(plugin); |
131 const QString failureReason = pluginManager->failureReason(plugin); |
132 QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, plugin, boldFont); |
132 QTreeWidgetItem *pluginItem = setPluginItem(topLevelItem, plugin, boldFont); |
133 setItem(pluginItem, failureReason, failureReason, QString(), QIcon()); |
133 setItem(pluginItem, failureReason, failureReason, QString(), QIcon()); |
134 } |
134 } |
135 } |
135 } |