Icons created from a file keep the file name of that file so it can be also used to display the file in HTML code

This commit is contained in:
Klaus Basan
2018-07-24 16:52:50 +02:00
parent 75ee43c0e1
commit 9dd9faa2d6
4 changed files with 27 additions and 14 deletions

View File

@@ -15,6 +15,7 @@
#include <QStringBuilder>
#include <QtGlobal>
#include <QDir>
namespace BlackMisc
{
@@ -26,8 +27,12 @@ namespace BlackMisc
{ }
CIcon::CIcon(const QString &resourceFilePath, const QString &descriptiveText) :
m_index(CIcons::IconIsFile), m_descriptiveText(descriptiveText), m_pixmap(CIcons::pixmapByResourceFileName(resourceFilePath))
{}
m_index(CIcons::IconIsFile), m_descriptiveText(descriptiveText)
{
QString fullPath;
m_pixmap = CIcons::pixmapByResourceFileName(QDir::cleanPath(resourceFilePath), fullPath);
m_fileResourcePath = fullPath;
}
CIcons::IconIndex CIcon::getIndex() const
{