Commit bab7794a authored by hjk's avatar hjk

Use TreeModel in plugin dialog

Change-Id: Ifc18e9779b9841a2f08c48dcd8dad36627d6e537
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 273c3fa0
......@@ -1301,10 +1301,6 @@ void PluginManagerPrivate::resolveDependencies()
spec->d->resolveDependencies(pluginSpecs);
}
// Reset disabledIndirectly flag
foreach (PluginSpec *spec, loadQueue())
spec->d->disabledIndirectly = false;
foreach (PluginSpec *spec, loadQueue()) {
spec->d->disableIndirectlyIfDependencyDisabled();
}
......@@ -1329,11 +1325,6 @@ PluginSpec *PluginManagerPrivate::pluginForOption(const QString &option, bool *r
return 0;
}
void PluginManagerPrivate::disablePluginIndirectly(PluginSpec *spec)
{
spec->d->disabledIndirectly = true;
}
PluginSpec *PluginManagerPrivate::pluginByName(const QString &name) const
{
foreach (PluginSpec *spec, pluginSpecs)
......
......@@ -80,7 +80,6 @@ public:
void setGlobalSettings(QSettings *settings);
void readSettings();
void writeSettings();
void disablePluginIndirectly(PluginSpec *spec);
class TestSpec {
public:
......
......@@ -542,11 +542,6 @@ void PluginSpec::setDisabledByDefault(bool value)
d->disabledByDefault = value;
}
void PluginSpec::setDisabledIndirectly(bool value)
{
d->disabledIndirectly = value;
}
void PluginSpec::setForceEnabled(bool value)
{
d->forceEnabled = value;
......
......@@ -113,7 +113,6 @@ public:
void setEnabled(bool value);
void setDisabledByDefault(bool value);
void setDisabledIndirectly(bool value);
void setForceEnabled(bool value);
void setForceDisabled(bool value);
......
This diff is collapsed.
......@@ -33,21 +33,22 @@
#include "extensionsystem_global.h"
#include <QHash>
#include <QWidget>
#include <QIcon>
QT_BEGIN_NAMESPACE
class QTreeWidgetItem;
QT_END_NAMESPACE
#include <QSet>
#include <QHash>
namespace Utils { class TreeWidget; }
namespace Utils {
class TreeItem;
class TreeModel;
class TreeView;
} // namespace Utils
namespace ExtensionSystem {
class PluginManager;
class PluginSpec;
class PluginCollection;
class PluginItem;
class CollectionItem;
class EXTENSIONSYSTEM_EXPORT PluginView : public QWidget
{
......@@ -64,28 +65,16 @@ signals:
void pluginActivated(ExtensionSystem::PluginSpec *spec);
void pluginSettingsChanged(ExtensionSystem::PluginSpec *spec);
private slots:
void updatePluginSettings(QTreeWidgetItem *item, int column);
void updateList();
void selectPlugin(QTreeWidgetItem *current);
void activatePlugin(QTreeWidgetItem *item);
private:
enum ParsedState { ParsedNone = 1, ParsedPartial = 2, ParsedAll = 4, ParsedWithErrors = 8};
QIcon iconForState(int state);
void updatePluginDependencies();
int parsePluginSpecs(QTreeWidgetItem *parentItem, Qt::CheckState &groupState, QList<PluginSpec*> plugins);
Utils::TreeWidget *m_categoryWidget;
QList<QTreeWidgetItem*> m_items;
QHash<PluginSpec*, QTreeWidgetItem*> m_specToItem;
PluginSpec *pluginForIndex(const QModelIndex &index) const;
void updatePlugins();
QIcon m_okIcon;
QIcon m_errorIcon;
QIcon m_notLoadedIcon;
bool m_allowCheckStateUpdate;
Utils::TreeView *m_categoryView;
Utils::TreeModel *m_model;
const int C_LOAD;
friend class CollectionItem;
friend class PluginItem;
QHash<PluginSpec *, QSet<PluginSpec *>> m_pluginDependencies;
};
} // namespae ExtensionSystem
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment