GH-1031 include icon in exported instance if it is custom
This commit is contained in:
@ -261,6 +261,24 @@ void IconList::installIcons(QStringList iconFiles)
|
||||
}
|
||||
}
|
||||
|
||||
bool IconList::iconFileExists(QString key)
|
||||
{
|
||||
auto iconEntry = icon(key);
|
||||
if(!iconEntry)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return iconEntry->has(MMCIcon::FileBased);
|
||||
}
|
||||
|
||||
const MMCIcon *IconList::icon(QString key)
|
||||
{
|
||||
int iconIdx = getIconIndex(key);
|
||||
if (iconIdx == -1)
|
||||
return nullptr;
|
||||
return &icons[iconIdx];
|
||||
}
|
||||
|
||||
bool IconList::deleteIcon(QString key)
|
||||
{
|
||||
int iconIdx = getIconIndex(key);
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
|
||||
bool addIcon(QString key, QString name, QString path, MMCIcon::Type type);
|
||||
bool deleteIcon(QString key);
|
||||
bool iconFileExists(QString key);
|
||||
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual Qt::DropActions supportedDropActions() const;
|
||||
@ -52,6 +53,8 @@ public:
|
||||
|
||||
void installIcons(QStringList iconFiles);
|
||||
|
||||
const MMCIcon * icon(QString key);
|
||||
|
||||
void startWatching();
|
||||
void stopWatching();
|
||||
|
||||
|
Reference in New Issue
Block a user