-rw-r--r-- | noncore/net/opieirc/dcctransfer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieirc/dcctransfer.cpp b/noncore/net/opieirc/dcctransfer.cpp index cfa9f74..e97d191 100644 --- a/noncore/net/opieirc/dcctransfer.cpp +++ b/noncore/net/opieirc/dcctransfer.cpp | |||
@@ -1,41 +1,41 @@ | |||
1 | #include <qsocket.h> | 1 | #include <qsocket.h> |
2 | #include <qfile.h> | 2 | #include <qfile.h> |
3 | 3 | ||
4 | #include "dcctransfer.h" | 4 | #include "dcctransfer.h" |
5 | 5 | ||
6 | 6 | ||
7 | DCCTransfer::DCCTransfer(Q_UINT32 ip4Addr, Q_UINT16 port, const QString &filename, unsigned int size) | 7 | DCCTransfer::DCCTransfer(Q_UINT32 ip4Addr, Q_UINT16 port, const QString &filename, unsigned int size) |
8 | : m_socket(new QSocket), m_file(new QFile), m_bufSize(4096), m_buffer(new char[m_bufSize]), | 8 | : m_socket(new QSocket), m_file(new QFile), m_bufSize(4096), m_buffer(new char[m_bufSize]), |
9 | m_ip4Addr(ip4Addr), m_port(port), m_totalSize(size), m_processedSize(0) | 9 | m_ip4Addr(ip4Addr), m_port(port), m_totalSize(size), m_processedSize(0) |
10 | { | 10 | { |
11 | m_file->setName(filename); | 11 | m_file->setName(filename); |
12 | } | 12 | } |
13 | 13 | ||
14 | DCCTransfer::~DCCTransfer() | 14 | DCCTransfer::~DCCTransfer() |
15 | { | 15 | { |
16 | if(m_socket) | 16 | if(m_socket) |
17 | delete m_socket; | 17 | delete m_socket; |
18 | if(m_file) { | 18 | if(m_file) { |
19 | m_file->close(); | 19 | m_file->close(); |
20 | delete m_file; | 20 | delete m_file; |
21 | } | 21 | } |
22 | if(m_buffer) | 22 | if(m_buffer) |
23 | delete []m_buffer; | 23 | delete []m_buffer; |
24 | } | 24 | } |
25 | 25 | ||
26 | 26 | ||
27 | void DCCTransfer::cancel() | 27 | void DCCTransfer::cancel() |
28 | { | 28 | { |
29 | if(m_socket) | 29 | if(m_socket) |
30 | m_socket->close(); | 30 | m_socket->close(); |
31 | 31 | ||
32 | emit(finished(DCCTransfer::SelfAborted)); | 32 | emit(finished(this, DCCTransfer::SelfAborted)); |
33 | } | 33 | } |
34 | 34 | ||
35 | QString DCCTransfer::filename() | 35 | QString DCCTransfer::filename() |
36 | { | 36 | { |
37 | if(!m_file) | 37 | if(!m_file) |
38 | return QString::null; | 38 | return QString::null; |
39 | 39 | ||
40 | return m_file->name().mid(m_file->name().findRev('/') + 1); | 40 | return m_file->name().mid(m_file->name().findRev('/') + 1); |
41 | } | 41 | } |