Skip to content

Commit

Permalink
Use hasNoRecords
Browse files Browse the repository at this point in the history
  • Loading branch information
Silarn committed Oct 19, 2023
1 parent 2f5cca5 commit 1cd2f69
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions src/pluginlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,13 +1016,13 @@ bool PluginList::isOverlayFlagged(const QString& name) const
}
}

bool PluginList::isDummy(const QString& name) const
bool PluginList::hasNoRecords(const QString& name) const
{
auto iter = m_ESPsByName.find(name);
if (iter == m_ESPsByName.end()) {
return false;
} else {
return m_ESPs[iter->second].isDummy;
return m_ESPs[iter->second].hasNoRecords;
}
}

Expand Down Expand Up @@ -1245,7 +1245,7 @@ QVariant PluginList::fontData(const QModelIndex& modelIndex) const
result.setItalic(true);
}

if (m_ESPs[index].isDummy)
if (m_ESPs[index].hasNoRecords)
result.setStrikeOut(true);

return result;
Expand Down Expand Up @@ -1348,7 +1348,7 @@ QVariant PluginList::tooltipData(const QModelIndex& modelIndex) const
// "existing records in memory. It takes no memory space.");
// }

if (esp.isDummy) {
if (esp.hasNoRecords) {
toolTip += "<br><br>" + tr("This is a dummy plugin. It contains no records and is "
"typically used to load a paired archive file.");
}
Expand Down Expand Up @@ -1804,7 +1804,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn
isOverlayFlagged = overlaySupported && file.isOverlay();
isLightFlagged =
lightSupported && !isOverlayFlagged && file.isLight(overlaySupported);
isDummy = file.isDummy();
hasNoRecords = file.isDummy();

author = QString::fromLatin1(file.author().c_str());
description = QString::fromLatin1(file.description().c_str());
Expand All @@ -1819,7 +1819,7 @@ PluginList::ESPInfo::ESPInfo(const QString& name, bool forceLoaded, bool forceEn
isMasterFlagged = false;
isOverlayFlagged = false;
isLightFlagged = false;
isDummy = false;
hasNoRecords = false;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/pluginlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class PluginList : public QAbstractItemModel
bool isMasterFlagged(const QString& name) const;
bool isLightFlagged(const QString& name) const;
bool isOverlayFlagged(const QString& name) const;
bool isDummy(const QString& name) const;
bool hasNoRecords(const QString& name) const;

boost::signals2::connection onRefreshed(const std::function<void()>& callback);
boost::signals2::connection
Expand Down Expand Up @@ -335,7 +335,7 @@ public slots:
bool isMasterFlagged;
bool isLightFlagged;
bool isOverlayFlagged;
bool isDummy;
bool hasNoRecords;
bool modSelected;
QString author;
QString description;
Expand Down
4 changes: 2 additions & 2 deletions src/pluginlistproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ bool PluginListProxy::isOverlayFlagged(const QString& name) const
return m_Proxied->isOverlayFlagged(name);
}

bool PluginListProxy::isDummy(const QString& name) const
bool PluginListProxy::hasNoRecords(const QString& name) const
{
return m_Proxied->isDummy(name);
return m_Proxied->hasNoRecords(name);
}
2 changes: 1 addition & 1 deletion src/pluginlistproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PluginListProxy : public MOBase::IPluginList
bool isMasterFlagged(const QString& name) const override;
bool isLightFlagged(const QString& name) const override;
bool isOverlayFlagged(const QString& name) const override;
bool isDummy(const QString& name) const override;
bool hasNoRecords(const QString& name) const override;

private:
friend class OrganizerProxy;
Expand Down

0 comments on commit 1cd2f69

Please sign in to comment.