diff options
author | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-19 21:47:03 +0000 |
---|---|---|
committer | nils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-01-19 21:47:03 +0000 |
commit | bed975413d03d7a3ad1b6e5b0793c98f1a89e271 (patch) | |
tree | fa369451996e1de275a77f8e4e8529608429249b /attachmenttablemodel.cpp | |
parent | added all icons to gpg4usb.qrc (diff) | |
download | gpg4usb-bed975413d03d7a3ad1b6e5b0793c98f1a89e271.tar.gz gpg4usb-bed975413d03d7a3ad1b6e5b0793c98f1a89e271.zip |
use ressource file for all icons and remove iconpath
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@766 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'attachmenttablemodel.cpp')
-rw-r--r-- | attachmenttablemodel.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/attachmenttablemodel.cpp b/attachmenttablemodel.cpp index fbeb50b..f0eadfc 100644 --- a/attachmenttablemodel.cpp +++ b/attachmenttablemodel.cpp @@ -35,12 +35,6 @@ AttachmentTableModel::AttachmentTableModel(QList<MimePart> mimeparts, QObject *p listOfMimeparts = mimeparts; } -AttachmentTableModel::AttachmentTableModel(QString iconpath, QObject *parent) : - QAbstractTableModel(parent) -{ - iconPath = iconpath; -} - void AttachmentTableModel::add(MimePart mp) { @@ -110,12 +104,12 @@ QVariant AttachmentTableModel::data(const QModelIndex &index, int role) const MimePart mp = listOfMimeparts.at(index.row()); QString icon; if (mp.header.getValue("Content-Type").startsWith("image")) { - icon = iconPath + "/mimetypes/image-x-generic.png"; + icon = ":mimetypes/image-x-generic.png"; } else { icon = mp.header.getValue("Content-Type").replace("/", "-"); - icon = iconPath + "/mimetypes/" + icon + ".png"; + icon = ":mimetypes/" + icon + ".png"; } - if (!QFile::exists(icon)) icon = iconPath + "/mimetypes/unknown.png"; + if (!QFile::exists(icon)) icon = ":mimetypes/unknown.png"; return QIcon(icon); } |