aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2010-12-28 18:45:49 +0000
committerGravatar Szymon Tomasz Stefanek2010-12-28 18:45:49 +0000
commit5dafb0d3ee7b19b3b9afa7c4a21c8322fdf18c88 (patch)
treec429a4e2a977b0de51dba66c172930b3fd167be4 /src/modules
parentupdated changelog; updated sources date (diff)
downloadKVIrc-5dafb0d3ee7b19b3b9afa7c4a21c8322fdf18c88.tar.gz
KVIrc-5dafb0d3ee7b19b3b9afa7c4a21c8322fdf18c88.tar.bz2
KVIrc-5dafb0d3ee7b19b3b9afa7c4a21c8322fdf18c88.zip
Fix loading of the http transfer icon. Also don't crash if the http icon isn't loaded.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5245 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/http/httpfiletransfer.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/modules/http/httpfiletransfer.cpp b/src/modules/http/httpfiletransfer.cpp
index 0890feffa..14cfbb9d2 100644
--- a/src/modules/http/httpfiletransfer.cpp
+++ b/src/modules/http/httpfiletransfer.cpp
@@ -128,7 +128,8 @@ void KviHttpFileTransfer::displayPaint(QPainter * p,int column, QRect rect)
case Success: offset = 96; break;
case Failure: offset = 144; break;
}
- p->drawPixmap(rect.left() + 3, rect.top() + 3,*g_pHttpIcon,offset,0,48,64);
+ if(g_pHttpIcon)
+ p->drawPixmap(rect.left() + 3, rect.top() + 3,*g_pHttpIcon,offset,0,48,64);
}
break;
case COLUMN_FILEINFO:
@@ -335,9 +336,11 @@ void KviHttpFileTransfer::init()
g_pHttpFileTransfers = new KviPointerList<KviHttpFileTransfer>;
g_pHttpFileTransfers->setAutoDelete(false);
- QPixmap * pix = g_pIconManager->getImage("KviHttpRequesticons.png", false);
- if(pix)g_pHttpIcon = new QPixmap(*pix);
- else g_pHttpIcon = 0;
+ QPixmap * pix = g_pIconManager->getImage("kvi_httpicons.png", false);
+ if(pix)
+ g_pHttpIcon = new QPixmap(*pix);
+ else
+ g_pHttpIcon = 0;
}
void KviHttpFileTransfer::done()
@@ -347,8 +350,11 @@ void KviHttpFileTransfer::done()
delete t;
delete g_pHttpFileTransfers;
g_pHttpFileTransfers = 0;
- delete g_pHttpIcon;
- g_pHttpIcon = 0;
+ if(g_pHttpIcon)
+ {
+ delete g_pHttpIcon;
+ g_pHttpIcon = 0;
+ }
}
unsigned int KviHttpFileTransfer::runningTransfers()