From bed975413d03d7a3ad1b6e5b0793c98f1a89e271 Mon Sep 17 00:00:00 2001 From: nils Date: Thu, 19 Jan 2012 21:47:03 +0000 Subject: 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 --- attachmenttablemodel.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'attachmenttablemodel.cpp') 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 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); } -- cgit v1.2.3