diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 18:27:16 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 18:27:16 +0100 |
| commit | c7abae79b3042cb5a9ab1174a9955d47e6e38fb8 (patch) | |
| tree | 01776c8d57632d5c26255d76064934fd51e39bd9 | |
| parent | 45628951b647237937bed8dc9d0f4734eb633a76 (diff) | |
Minor cleaning of PluginList.
| -rw-r--r-- | src/pluginlistsortproxy.cpp | 23 | ||||
| -rw-r--r-- | src/pluginlistsortproxy.h | 2 |
2 files changed, 0 insertions, 25 deletions
diff --git a/src/pluginlistsortproxy.cpp b/src/pluginlistsortproxy.cpp index 3d13798e..44285fd1 100644 --- a/src/pluginlistsortproxy.cpp +++ b/src/pluginlistsortproxy.cpp @@ -36,10 +36,6 @@ PluginListSortProxy::PluginListSortProxy(QObject *parent) this->setDynamicSortFilter(true);
}
-
-
-
-
void PluginListSortProxy::setEnabledColumns(unsigned int columns)
{
emit layoutAboutToBeChanged();
@@ -49,33 +45,17 @@ void PluginListSortProxy::setEnabledColumns(unsigned int columns) emit layoutChanged();
}
-
-Qt::ItemFlags PluginListSortProxy::flags(const QModelIndex &modelIndex) const
-{
-/* Qt::ItemFlags flags;
- QModelIndex index = mapToSource(modelIndex);
- if (index.isValid()) {
- flags = sourceModel()->flags(index);
- }
- return flags;*/
-
- return sourceModel()->flags(mapToSource(modelIndex));
-}
-
-
void PluginListSortProxy::updateFilter(const QString &filter)
{
m_CurrentFilter = filter;
invalidateFilter();
}
-
bool PluginListSortProxy::filterAcceptsRow(int row, const QModelIndex&) const
{
return filterMatchesPlugin(sourceModel()->data(sourceModel()->index(row, 0)).toString());
}
-
bool PluginListSortProxy::lessThan(const QModelIndex &left,
const QModelIndex &right) const
{
@@ -109,7 +89,6 @@ bool PluginListSortProxy::lessThan(const QModelIndex &left, }
}
-
bool PluginListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
{
@@ -136,7 +115,6 @@ bool PluginListSortProxy::dropMimeData(const QMimeData *data, Qt::DropAction act sourceIndex.parent());
}
-
bool PluginListSortProxy::filterMatchesPlugin(const QString &plugin) const
{
if (!m_CurrentFilter.isEmpty()) {
@@ -173,4 +151,3 @@ bool PluginListSortProxy::filterMatchesPlugin(const QString &plugin) const else
return true;
}
-
diff --git a/src/pluginlistsortproxy.h b/src/pluginlistsortproxy.h index 03b079e2..2acf83b3 100644 --- a/src/pluginlistsortproxy.h +++ b/src/pluginlistsortproxy.h @@ -42,8 +42,6 @@ public: void setEnabledColumns(unsigned int columns);
- virtual Qt::ItemFlags flags(const QModelIndex &modelIndex) const;
-
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
bool filterMatchesPlugin(const QString &plugin) const;
|
