diff options
| author | 2010-12-25 05:28:46 +0000 | |
|---|---|---|
| committer | 2010-12-25 05:28:46 +0000 | |
| commit | f2f47c5eaa7d284abad1f693d7c75c85c42565df (patch) | |
| tree | 2dd141a4ae4911ef3a1abf4d1910d3f7ba071c27 /src/modules/dcc | |
| parent | More work on the window popup (diff) | |
| download | KVIrc-f2f47c5eaa7d284abad1f693d7c75c85c42565df.tar.gz KVIrc-f2f47c5eaa7d284abad1f693d7c75c85c42565df.tar.bz2 KVIrc-f2f47c5eaa7d284abad1f693d7c75c85c42565df.zip | |
Beginning of 'the big rename & cleanup'. File names should match class names, when possible. Move classes to one per file. Move C functions to namespaces, if possible. Kill some abbreviations...
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5229 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/dcc')
34 files changed, 205 insertions, 205 deletions
diff --git a/src/modules/dcc/adpcmcodec.cpp b/src/modules/dcc/adpcmcodec.cpp index 28f35f948..ee1084c22 100644 --- a/src/modules/dcc/adpcmcodec.cpp +++ b/src/modules/dcc/adpcmcodec.cpp @@ -4,7 +4,7 @@ // Creation date : Wed Aug 22 19:12:46 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/adpcmcodec.h b/src/modules/dcc/adpcmcodec.h index dae0651ed..6846da72b 100644 --- a/src/modules/dcc/adpcmcodec.h +++ b/src/modules/dcc/adpcmcodec.h @@ -6,7 +6,7 @@ // Creation date : Wed Aug 22 19:12:46 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/broker.cpp b/src/modules/dcc/broker.cpp index 0b389f711..5d4c8c4f8 100644 --- a/src/modules/dcc/broker.cpp +++ b/src/modules/dcc/broker.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Sep 19 09 2000 10:21:54 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -40,14 +40,14 @@ #include "kvi_app.h" #include "kvi_frame.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_options.h" #include "kvi_console.h" -#include "kvi_fileutils.h" +#include "KviFileUtils.h" #include "kvi_out.h" -#include "kvi_mediatype.h" +#include "KviMediaType.h" #include "kvi_ircconnection.h" -#include "kvi_sharedfiles.h" +#include "KviSharedFilesManager.h" #include <QFileInfo> #include <QString> @@ -319,7 +319,7 @@ void KviDccBroker::executeChat(KviDccBox *box,KviDccDescriptor * dcc) dcc->setConsole(g_pApp->activeConsole()); } - KviStr szSubProto = dcc->szType; + KviCString szSubProto = dcc->szType; szSubProto.toLower(); QString tmp = QString("dcc: %1 %2@%3:%4").arg(szSubProto.ptr(), dcc->szNick, dcc->szIp, dcc->szPort); @@ -373,7 +373,7 @@ void KviDccBroker::activeVoiceExecute(KviDccBox *box,KviDccDescriptor * dcc) dcc->setConsole(g_pApp->activeConsole()); } - KviStr tmp(KviStr::Format,"dcc: voice %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: voice %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccVoice * v = new KviDccVoice(dcc->console()->frame(),dcc,tmp.ptr()); bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : \ @@ -393,7 +393,7 @@ void KviDccBroker::activeVoiceExecute(KviDccBox *box,KviDccDescriptor * dcc) void KviDccBroker::passiveVoiceExecute(KviDccDescriptor * dcc) { - KviStr tmp(KviStr::Format,"dcc: voice %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: voice %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccVoice * v = new KviDccVoice(dcc->console()->frame(),dcc,tmp.ptr()); //#warning "Create minimized dcc voice ?... or maybe it's too much ? :)" bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccChat); @@ -443,7 +443,7 @@ void KviDccBroker::activeVideoExecute(KviDccBox *box,KviDccDescriptor * dcc) dcc->setConsole(g_pApp->activeConsole()); } - KviStr tmp(KviStr::Format,"dcc: video %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: video %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccVideo * v = new KviDccVideo(dcc->console()->frame(),dcc,tmp.ptr()); bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : \ @@ -468,7 +468,7 @@ void KviDccBroker::activeVideoExecute(KviDccBox *,KviDccDescriptor *) #ifndef COMPILE_DISABLE_DCC_VIDEO void KviDccBroker::passiveVideoExecute(KviDccDescriptor * dcc) { - KviStr tmp(KviStr::Format,"dcc: video %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: video %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccVideo * v = new KviDccVideo(dcc->console()->frame(),dcc,tmp.ptr()); //#warning "Create minimized dcc video ?... or maybe it's too much ? :)" bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccChat); @@ -524,7 +524,7 @@ void KviDccBroker::activeCanvasExecute(KviDccBox *box,KviDccDescriptor * dcc) dcc->setConsole(g_pApp->activeConsole()); } - KviStr tmp(KviStr::Format,"dcc: canvas %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: canvas %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccCanvas * cnv = new KviDccCanvas(dcc->console()->frame(),dcc,tmp.ptr()); //#warning "This option should be dedicated to Dcc Canvas!....for now we are using the DccChat options" @@ -548,7 +548,7 @@ void KviDccBroker::activeCanvasExecute(KviDccBox *,KviDccDescriptor *) #ifdef COMPILE_DCC_CANVAS void KviDccBroker::passiveCanvasExecute(KviDccDescriptor * dcc) { - KviStr tmp(KviStr::Format,"dcc: canvas %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); + KviCString tmp(KviCString::Format,"dcc: canvas %s@%s:%s",dcc->szNick.toUtf8().data(),dcc->szIp.toUtf8().data(),dcc->szPort.toUtf8().data()); KviDccCanvas * cnv = new KviDccCanvas(dcc->console()->frame(),dcc,tmp.ptr()); //#warning "This option should be dedicated to Dcc Canvas!....for now we are using the DccChat options" bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : KVI_OPTION_BOOL(KviOption_boolCreateMinimizedDccChat); @@ -823,10 +823,10 @@ void KviDccBroker::renameDccSendFile(KviDccBox *box,KviDccDescriptor * dcc) if(QFileInfo(dcc->szLocalFileName).exists()) { - KviStr szOrig = dcc->szLocalFileName; + KviCString szOrig = dcc->szLocalFileName; int i = 1; do { - KviStr szNum; + KviCString szNum; szNum.setNum(i); int idx = szOrig.findLastIdx('.'); if(idx != -1) @@ -967,7 +967,7 @@ bool KviDccBroker::handleResumeRequest(KviDccRequest * dcc,const char * filename // ok! t->m_uResumePosition = filePos; - KviStr szBuffy; + KviCString szBuffy; KviServerParser::encodeCtcpParameter(filename,szBuffy); dcc->ctcpMsg->msg->console()->connection()->sendFmtData( diff --git a/src/modules/dcc/broker.h b/src/modules/dcc/broker.h index 338ebb853..8bd2535ff 100644 --- a/src/modules/dcc/broker.h +++ b/src/modules/dcc/broker.h @@ -6,7 +6,7 @@ // Creation date : Tue Sep 19 09 2000 10:20:01 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -27,10 +27,10 @@ #include "descriptor.h" #include "kvi_settings.h" -#include "kvi_string.h" -#include "kvi_pointerlist.h" +#include "KviCString.h" +#include "KviPointerList.h" #include "kvi_sparser.h" -#include "kvi_pointerhashtable.h" +#include "KviPointerHashTable.h" #include <QDateTime> #include <QObject> diff --git a/src/modules/dcc/canvas.cpp b/src/modules/dcc/canvas.cpp index 2d66a98a0..ee9fb4b62 100644 --- a/src/modules/dcc/canvas.cpp +++ b/src/modules/dcc/canvas.cpp @@ -4,7 +4,7 @@ // Creation date : Sun Jul 29 07 2001 20:23:13 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -38,15 +38,15 @@ #include "kvi_input.h" #include "kvi_ircview.h" #include "kvi_iconmanager.h" - #include "kvi_locale.h" + #include "KviLocale.h" #include "kvi_error.h" #include "kvi_out.h" #include "kvi_netutils.h" #include "kvi_console.h" #include "kvi_frame.h" - #include "kvi_malloc.h" + #include "KviMemory.h" #include "kvi_memmove.h" - #include "kvi_thread.h" + #include "KviThread.h" #include "kvi_ircsocket.h" #include "kvi_settings.h" #include "kvi_ircconnection.h" @@ -135,7 +135,7 @@ void KviDccCanvas::fillCaptionBuffers() { - KviStr tmp(KviStr::Format,"DCC Canvas %s@%s:%s", + KviCString tmp(KviCString::Format,"DCC Canvas %s@%s:%s", m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data()); m_szPlainTextCaption = tmp; @@ -151,14 +151,14 @@ return g_pIconManager->getSmallIcon(KVI_SMALLICON_CANVAS); } - void KviDccCanvas::getBaseLogFileName(KviStr &buffer) + void KviDccCanvas::getBaseLogFileName(KviCString &buffer) { buffer.sprintf("%s_%s_%s",m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data()); } void KviDccCanvas::ownMessage(const char * text, bool bUserFeedback) { - KviStr buf(KviStr::Format,"%s\r\n",text); + KviCString buf(KviCString::Format,"%s\r\n",text); // m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); if(bUserFeedback) @@ -169,7 +169,7 @@ void KviDccCanvas::ownAction(const char * text) { - KviStr buf(KviStr::Format,"%cACTION %s%c\r\n",text); + KviCString buf(KviCString::Format,"%cACTION %s%c\r\n",text); // m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); output(KVI_OUT_ACTION,"%Q %s",&(m_pDescriptor->szLocalNick),text); } @@ -190,7 +190,7 @@ // break; // case KVI_DCC_THREAD_EVENT_DATA: // { - // KviStr * d = ((KviThreadDataEvent<KviStr> *)e)->getData(); + // KviCString * d = ((KviThreadDataEvent<KviCString> *)e)->getData(); // if(d->firstCharIs(0x01)) // { // d->cutLeft(1); @@ -207,7 +207,7 @@ // { // if(cinf->pEngine->isCryptographicEngine() && (*(d->ptr()) == KVI_TEXT_CRYPT)) // { - // KviStr decryptedStuff; + // KviCString decryptedStuff; // if(cinf->pEngine->decrypt(d->ptr() + 1,decryptedStuff)) // { // m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_DCCCHATMSGCRYPTED, @@ -226,7 +226,7 @@ // } else { // if(!(cinf->pEngine->isCryptographicEngine())) // { - // KviStr decryptedStuff; + // KviCString decryptedStuff; // if(cinf->pEngine->decrypt(d->ptr(),decryptedStuff)) // { // m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_DCCCHATMSG, diff --git a/src/modules/dcc/canvas.h b/src/modules/dcc/canvas.h index 6447fbac9..e27a7ca59 100644 --- a/src/modules/dcc/canvas.h +++ b/src/modules/dcc/canvas.h @@ -6,7 +6,7 @@ // Creation date : Sun Jul 29 07 2001 20:17:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -32,8 +32,8 @@ #include "thread.h" #include "kvi_window.h" - #include "kvi_string.h" - #include "kvi_pointerlist.h" + #include "KviCString.h" + #include "KviPointerList.h" class KviDccMarshal; class KviCanvasWidget; @@ -53,7 +53,7 @@ protected: virtual const QString &target(); virtual void fillCaptionBuffers(); - virtual void getBaseLogFileName(KviStr &buffer); + virtual void getBaseLogFileName(KviCString &buffer); virtual QPixmap * myIconPtr(); virtual void resizeEvent(QResizeEvent *e); virtual QSize sizeHint() const; diff --git a/src/modules/dcc/canvaswidget.cpp b/src/modules/dcc/canvaswidget.cpp index 65c9678be..aa1095b34 100644 --- a/src/modules/dcc/canvaswidget.cpp +++ b/src/modules/dcc/canvaswidget.cpp @@ -4,7 +4,7 @@ // Creation date : Mon Jul 30 07 2001 04:50:50 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,8 +25,8 @@ #include "canvaswidget.h" #ifdef COMPILE_DCC_CANVAS - #include "kvi_string.h" - #include "kvi_locale.h" + #include "KviCString.h" + #include "KviLocale.h" #include "kvi_tal_popupmenu.h" #include <QCursor> @@ -1300,13 +1300,13 @@ break; case QVariant::Font: { - KviStr txt = ((QComboBox *)w)->currentText(); + KviCString txt = ((QComboBox *)w)->currentText(); if(txt.hasData()) { - KviStr fam = txt; + KviCString fam = txt; fam.cutFromFirst(',',true); fam.trimmed(); - KviStr psz = txt; + KviCString psz = txt; psz.cutToFirst(',',true); psz.trimmed(); bool bOk; diff --git a/src/modules/dcc/canvaswidget.h b/src/modules/dcc/canvaswidget.h index 5616e1729..c811ccfb6 100644 --- a/src/modules/dcc/canvaswidget.h +++ b/src/modules/dcc/canvaswidget.h @@ -6,7 +6,7 @@ // Creation date : Mon Jul 30 07 2001 04:49:49 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/chat.cpp b/src/modules/dcc/chat.cpp index c1fdc03de..3ce235aaf 100644 --- a/src/modules/dcc/chat.cpp +++ b/src/modules/dcc/chat.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Sep 20 09 2000 15:13:13 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -36,24 +36,24 @@ #include "kvi_input.h" #include "kvi_ircview.h" #include "kvi_iconmanager.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_error.h" #include "kvi_out.h" #include "kvi_netutils.h" #include "kvi_console.h" #include "kvi_frame.h" -#include "kvi_malloc.h" +#include "KviMemory.h" #include "kvi_memmove.h" -#include "kvi_thread.h" +#include "KviThread.h" #include "kvi_ircsocket.h" #include "kvi_settings.h" #include "kvi_socket.h" #include "kvi_app.h" -#include "kvi_parameterlist.h" +#include "KviParameterList.h" #include "kvi_ircconnection.h" #include "kvi_ircconnectionuserinfo.h" #include "kvi_kvs_eventtriggers.h" -#include "kvi_mirccntrl.h" +#include "KviMircCntrl.h" #include "kvi_tal_vbox.h" #include <QEvent> @@ -62,7 +62,7 @@ #include <QTextDocument> //for Qt::escape #ifdef COMPILE_CRYPT_SUPPORT - #include "kvi_crypt.h" + #include "KviCryptEngine.h" #include "kvi_cryptcontroller.h" #endif @@ -187,7 +187,7 @@ void KviDccChat::connectionInProgress() if(m_pDescriptor->bSendRequest) { - KviStr ip; + KviCString ip; if(!m_pDescriptor->szFakeIp.isEmpty()) { ip = m_pDescriptor->szFakeIp; @@ -201,7 +201,7 @@ void KviDccChat::connectionInProgress() // try to get the IP that the IRC server can see if(m_pDescriptor->console()) { - KviStr tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp().toUtf8().data() : ""; + KviCString tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp().toUtf8().data() : ""; if(tmp.hasData()) { ip = tmp; @@ -309,13 +309,13 @@ void KviDccChat::ownMessage(const QString &text, bool bUserFeedback) { if(*d != KVI_TEXT_CRYPTESCAPE) { - KviStr encrypted; + KviCString encrypted; cryptSessionInfo()->m_pEngine->setMaxEncryptLen(-1); switch(cryptSessionInfo()->m_pEngine->encrypt(d,encrypted)) { case KviCryptEngine::Encrypted: { - KviStr buf(KviStr::Format,"%s\r\n",encrypted.ptr()); + KviCString buf(KviCString::Format,"%s\r\n",encrypted.ptr()); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); if(bUserFeedback) m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSGCRYPTED, @@ -325,7 +325,7 @@ void KviDccChat::ownMessage(const QString &text, bool bUserFeedback) break; case KviCryptEngine::Encoded: { - KviStr buf(KviStr::Format,"%s\r\n",encrypted.ptr()); + KviCString buf(KviCString::Format,"%s\r\n",encrypted.ptr()); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); if(bUserFeedback) { @@ -348,7 +348,7 @@ void KviDccChat::ownMessage(const QString &text, bool bUserFeedback) return; } else { d++; //eat the escape code - KviStr buf(KviStr::Format,"%s\r\n",d); + KviCString buf(KviCString::Format,"%s\r\n",d); QString tmp = text.right(text.length() - 1); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); @@ -361,7 +361,7 @@ void KviDccChat::ownMessage(const QString &text, bool bUserFeedback) } } #endif - KviStr buf(KviStr::Format,"%s\r\n",d); + KviCString buf(KviCString::Format,"%s\r\n",d); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); if(bUserFeedback) @@ -393,7 +393,7 @@ void KviDccChat::ownAction(const QString &text) QByteArray szData = encodeText(szTmpBuffer); const char * d = szData.data(); if(!d)return; - KviStr buf(KviStr::Format,"%cACTION %s%c\r\n",0x01,d,0x01); + KviCString buf(KviCString::Format,"%cACTION %s%c\r\n",0x01,d,0x01); m_pSlaveThread->sendRawData(buf.ptr(),buf.len()); output(KVI_OUT_ACTION,"%Q %Q",&(m_pDescriptor->szLocalNick),&szTmpBuffer); } else { @@ -420,8 +420,8 @@ bool KviDccChat::event(QEvent *e) break; case KVI_DCC_THREAD_EVENT_DATA: { - KviStr * encoded = ((KviThreadDataEvent<KviStr> *)e)->getData(); - KviStr d=KviStr(decodeText(encoded->ptr())); + KviCString * encoded = ((KviThreadDataEvent<KviCString> *)e)->getData(); + KviCString d=KviCString(decodeText(encoded->ptr())); if(d.firstCharIs(0x01)) { d.cutLeft(1); @@ -452,7 +452,7 @@ bool KviDccChat::event(QEvent *e) { if(cinf->m_bDoDecrypt) { - KviStr decryptedStuff; + KviCString decryptedStuff; switch(cinf->m_pEngine->decrypt(d.ptr(),decryptedStuff)) { case KviCryptEngine::DecryptOkWasEncrypted: @@ -628,7 +628,7 @@ void KviDccChatThread::run() } if(bCanRead) { - data.buffer = (char *) kvi_realloc(data.buffer,(data.iLen + 512) * sizeof(char)); + data.buffer = (char *) KviMemory::reallocate(data.buffer,(data.iLen + 512) * sizeof(char)); int readLen; #ifdef COMPILE_SSL_SUPPORT if(m_pSSL) @@ -643,7 +643,7 @@ void KviDccChatThread::run() if(readLen > 0) { data.iLen += readLen; - data.buffer = (char *)kvi_realloc(data.buffer,data.iLen * sizeof(char)); + data.buffer = (char *)KviMemory::reallocate(data.buffer,data.iLen * sizeof(char)); if(!handleIncomingData(&data,false))break; // non critical... } else { @@ -688,9 +688,9 @@ void KviDccChatThread::run() #endif if(data.iLen > 0) { - data.buffer = (char *)kvi_realloc(data.buffer,data.iLen * sizeof(char)); + data.buffer = (char *)KviMemory::reallocate(data.buffer,data.iLen * sizeof(char)); } else { - kvi_free(data.buffer); + KviMemory::free(data.buffer); data.buffer = 0; } @@ -709,7 +709,7 @@ void KviDccChatThread::run() out_of_the_loop: - if(data.iLen)kvi_free(data.buffer); + if(data.iLen)KviMemory::free(data.buffer); #ifdef COMPILE_SSL_SUPPORT if(m_pSSL) @@ -733,12 +733,12 @@ bool KviDccChatThread::handleIncomingData(KviDccThreadIncomingData * data,bool b { if((*aux == '\n') || (*aux == '\0')) { - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_DATA); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_DATA); // The left part is len chars long int len = aux - data->buffer; // qDebug("LEN = %d, iLen = %d",len,data->iLen); //#warning "DO IT BETTER (the \r cutting)" - KviStr * s = new KviStr(data->buffer,len); + KviCString * s = new KviCString(data->buffer,len); if(s->lastCharIs('\r'))s->cutRight(1); e->setData(s); // but we cut also \n (or \0) @@ -752,13 +752,13 @@ bool KviDccChatThread::handleIncomingData(KviDccThreadIncomingData * data,bool b // memmove the remaining part to the beginning // aux points after \n or \0 kvi_memmove(data->buffer,aux,data->iLen); - data->buffer = (char *)kvi_realloc(data->buffer,data->iLen); + data->buffer = (char *)KviMemory::reallocate(data->buffer,data->iLen); end = data->buffer + data->iLen; aux = data->buffer; } else { // no more data in the buffer KVI_ASSERT(data->iLen == 0); - kvi_free(data->buffer); + KviMemory::free(data->buffer); data->buffer = end = aux = 0; } postEvent(parent(),e); @@ -772,12 +772,12 @@ bool KviDccChatThread::handleIncomingData(KviDccThreadIncomingData * data,bool b if(data->iLen > 0) { // in the last part there are no NULL and \n chars - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_DATA); - KviStr * s = new KviStr(data->buffer,data->iLen); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_DATA); + KviCString * s = new KviCString(data->buffer,data->iLen); if(s->lastCharIs('\r'))s->cutRight(1); e->setData(s); data->iLen = 0; - kvi_free(data->buffer); + KviMemory::free(data->buffer); data->buffer = 0; postEvent(parent(),e); } diff --git a/src/modules/dcc/chat.h b/src/modules/dcc/chat.h index 8d5fdde7c..cd7745782 100644 --- a/src/modules/dcc/chat.h +++ b/src/modules/dcc/chat.h @@ -6,7 +6,7 @@ // Creation date : Tue Sep 20 09 2000 15:11:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -28,10 +28,10 @@ #include "thread.h" #include "window.h" -#include "kvi_databuffer.h" -#include "kvi_pointerlist.h" +#include "KviDataBuffer.h" +#include "KviPointerList.h" #include "kvi_themedlabel.h" -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_window.h" #ifdef COMPILE_SSL_SUPPORT diff --git a/src/modules/dcc/codec.cpp b/src/modules/dcc/codec.cpp index a822fb65d..5905a4eed 100644 --- a/src/modules/dcc/codec.cpp +++ b/src/modules/dcc/codec.cpp @@ -4,7 +4,7 @@ // Creation date : Sun Aug 26 04:19:36 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/codec.h b/src/modules/dcc/codec.h index 62d5161c3..740740676 100644 --- a/src/modules/dcc/codec.h +++ b/src/modules/dcc/codec.h @@ -6,7 +6,7 @@ // Creation date : Sun Aug 26 04:19:34 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -24,9 +24,9 @@ // //============================================================================= -#include "kvi_string.h" -#include "kvi_oggtheora.h" -#include "kvi_databuffer.h" +#include "KviCString.h" +#include "KviTheoraDecoder.h" +#include "KviDataBuffer.h" class KviDccVoiceCodec { @@ -34,7 +34,7 @@ public: KviDccVoiceCodec(); virtual ~KviDccVoiceCodec(); protected: - KviStr m_szName; + KviCString m_szName; public: const char * name(); virtual void encode(KviDataBuffer * signal,KviDataBuffer * stream); @@ -61,7 +61,7 @@ public: KviDccVideoCodec(); virtual ~KviDccVideoCodec(); protected: - KviStr m_szName; + KviCString m_szName; public: const char * name(); virtual void encodeVideo(KviDataBuffer * videoSignal, KviDataBuffer * stream); diff --git a/src/modules/dcc/descriptor.cpp b/src/modules/dcc/descriptor.cpp index 237acfb5d..e3d841c37 100644 --- a/src/modules/dcc/descriptor.cpp +++ b/src/modules/dcc/descriptor.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Jul 23 01:11:54 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -26,7 +26,7 @@ #include "send.h" #include "window.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_kvs_eventtriggers.h" #include "kvi_window.h" #include "kvi_app.h" diff --git a/src/modules/dcc/descriptor.h b/src/modules/dcc/descriptor.h index d799c8658..944e063af 100644 --- a/src/modules/dcc/descriptor.h +++ b/src/modules/dcc/descriptor.h @@ -6,7 +6,7 @@ // Creation date : Tue Jul 23 01:11:52 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (oragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (oragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -24,9 +24,9 @@ // //============================================================================= -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_console.h" -#include "kvi_pointerhashtable.h" +#include "KviPointerHashTable.h" class KviDccWindow; class KviDccFileTransfer; @@ -41,7 +41,7 @@ protected: KviConsole * m_pConsole; // mIrc zero port reverse send/chat extension - KviStr m_szZeroPortRequestTag; + KviCString m_szZeroPortRequestTag; unsigned int m_uId; // this dcc session ID QString m_szId; @@ -64,7 +64,7 @@ public: // mIrc zero port reverse send/chat extension bool isZeroPortRequest() const { return m_szZeroPortRequestTag.hasData(); }; const char * zeroPortRequestTag() const { return m_szZeroPortRequestTag.ptr(); }; - void setZeroPortRequestTag(const KviStr &szTag){ m_szZeroPortRequestTag = szTag; }; + void setZeroPortRequestTag(const KviCString &szTag){ m_szZeroPortRequestTag = szTag; }; unsigned int id() const { return m_uId; }; const QString & idString() const { return m_szId; }; @@ -127,7 +127,7 @@ public: bool bIsIncomingAvatar; // It is an Incoming Avatar DCC SEND ? // DCC VOICE - KviStr szCodec; // codec name + KviCString szCodec; // codec name int iSampleRate; // Sample rate public: QString protocol() const { return szType; }; diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp index bee5618d5..da3715274 100644 --- a/src/modules/dcc/dialogs.cpp +++ b/src/modules/dcc/dialogs.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Sep 19 09 2000 15:23:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -24,7 +24,7 @@ #include "dialogs.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_iconmanager.h" #include "kvi_app.h" diff --git a/src/modules/dcc/dialogs.h b/src/modules/dcc/dialogs.h index 06e314fde..6b2115787 100644 --- a/src/modules/dcc/dialogs.h +++ b/src/modules/dcc/dialogs.h @@ -6,7 +6,7 @@ // Creation date : Tue Sep 19 09 2000 15:17:22 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/gsmcodec.cpp b/src/modules/dcc/gsmcodec.cpp index 4b9bf2f45..38b4a4142 100644 --- a/src/modules/dcc/gsmcodec.cpp +++ b/src/modules/dcc/gsmcodec.cpp @@ -4,7 +4,7 @@ // Creation date : Wed Aug 22 19:12:55 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/gsmcodec.h b/src/modules/dcc/gsmcodec.h index c18288f0e..2392e750b 100644 --- a/src/modules/dcc/gsmcodec.h +++ b/src/modules/dcc/gsmcodec.h @@ -6,7 +6,7 @@ // Creation date : Wed Aug 22 19:12:54 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp index 79f1727a9..edf0c0214 100644 --- a/src/modules/dcc/libkvidcc.cpp +++ b/src/modules/dcc/libkvidcc.cpp @@ -4,7 +4,7 @@ // Creation date : Wed Sep 09 2000 20:59:01 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -32,10 +32,10 @@ #include "kvi_debug.h" #include "kvi_settings.h" -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_module.h" #include "kvi_sparser.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_out.h" #include "kvi_console.h" #include "kvi_netutils.h" @@ -44,7 +44,7 @@ #include "kvi_error.h" #include "kvi_options.h" #include "kvi_defaults.h" -#include "kvi_mirccntrl.h" +#include "KviMircCntrl.h" #include "kvi_app.h" #include "kvi_ircconnection.h" #include "kvi_ircconnectionuserinfo.h" @@ -953,7 +953,7 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) szFileName.append('"'); } - KviStr szDCC("GET"); + KviCString szDCC("GET"); #ifdef COMPILE_SSL_SUPPORT if(c->switches()->find('s',"ssl"))szDCC.prepend('S'); #else @@ -1254,7 +1254,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) { ENTER_STACK_FRAME(c,"dcc_module_cmd_canvas"); - KviStr target; + KviCString target; if(!g_pUserParser->parseCmdFinalPart(c,target))return false; if(target.isEmpty())return c->error(KviError_notEnoughParameters,"%s",__tr_ctx("Missing target nickname","dcc")); @@ -1272,7 +1272,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) if(d->bOverrideMinimize) { - KviStr tmpVal; + KviCString tmpVal; if(!(c->getSwitchValue('m',tmpVal)))d->bShowMinimized = false; else d->bShowMinimized = kvi_strEqualCI(tmpVal.ptr(),"1"); } diff --git a/src/modules/dcc/marshal.cpp b/src/modules/dcc/marshal.cpp index 6f2327c44..b97d0ee55 100644 --- a/src/modules/dcc/marshal.cpp +++ b/src/modules/dcc/marshal.cpp @@ -4,7 +4,7 @@ // Creation date : Sun Sep 17 2000 15:59:11 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -28,10 +28,10 @@ #include "kvi_netutils.h" #include "kvi_error.h" #include "kvi_options.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_memmove.h" #include "kvi_socket.h" -#include "kvi_fileutils.h" +#include "KviFileUtils.h" #include <stdlib.h> //for exit() @@ -624,7 +624,7 @@ void KviDccMarshal::doSSLHandshake(int) break; default: { - KviStr buffer; + KviCString buffer; while(m_pSSL->getLastErrorString(buffer))emit sslError(buffer.ptr()); reset(); emit error(KviError_SSLError); diff --git a/src/modules/dcc/marshal.h b/src/modules/dcc/marshal.h index dd5471ef7..4c1259daf 100644 --- a/src/modules/dcc/marshal.h +++ b/src/modules/dcc/marshal.h @@ -6,7 +6,7 @@ // Creation date : Sun Sep 17 2000 10:44:20 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -24,7 +24,7 @@ // //============================================================================= -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_sockettype.h" #include "kvi_inttypes.h" diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp index 0d053c706..dbb8ebb93 100644 --- a/src/modules/dcc/requests.cpp +++ b/src/modules/dcc/requests.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Jul 23 02:44:38 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -37,10 +37,10 @@ #include "kvi_debug.h" #include "kvi_settings.h" -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_module.h" #include "kvi_sparser.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_out.h" #include "kvi_console.h" #include "kvi_netutils.h" @@ -49,8 +49,8 @@ #include "kvi_error.h" #include "kvi_options.h" #include "kvi_defaults.h" -#include "kvi_sharedfiles.h" -#include "kvi_mirccntrl.h" +#include "KviSharedFilesManager.h" +#include "KviMircCntrl.h" #include "kvi_app.h" #include "kvi_ircconnection.h" #include "kvi_ircconnectionuserinfo.h" @@ -154,7 +154,7 @@ static void dcc_module_set_dcc_type(KviDccDescriptor * d,const char * szBaseType if(d->bIsTdcc)d->szType.prepend('T'); } -static bool dcc_module_normalize_target_data(KviDccRequest * dcc,KviStr &ipaddr,KviStr &port) +static bool dcc_module_normalize_target_data(KviDccRequest * dcc,KviCString &ipaddr,KviCString &port) { if(!port.isUnsignedNum()) { @@ -185,7 +185,7 @@ static bool dcc_module_normalize_target_data(KviDccRequest * dcc,KviStr &ipaddr, } ipaddr = tmp; } else { - //FIXME: KviStr -> QString + //FIXME: KviCString -> QString if(!KviNetUtils::stringIpToBinaryIp(QString(ipaddr),&addr)) { #ifdef COMPILE_IPV6_SUPPORT @@ -270,7 +270,7 @@ static void dccModuleParseDccChat(KviDccRequest *dcc) } } - KviStr szExtensions = dcc->szType; + KviCString szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off CHAT #ifdef COMPILE_SSL_SUPPORT @@ -475,7 +475,7 @@ static void dccModuleParseDccSend(KviDccRequest *dcc) dcc->szParam1.cutToLast("%2F"); } - KviStr szExtensions = dcc->szType; + KviCString szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off SEND bool bTurboExtension = szExtensions.contains('T',false); @@ -626,7 +626,7 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc) dcc->szParam1.cutToLast('/'); } - KviStr szExtensions = dcc->szType; + KviCString szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off RECV bool bTurboExtension = szExtensions.contains('T',false); @@ -712,7 +712,7 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc) dcc->szParam1.ptr()); dcc->ctcpMsg->msg->console()->output(KVI_OUT_DCCMSG, __tr2qs_ctx("The remote client is listening on interface %s and port %s","dcc"),dcc->szParam2.ptr(),dcc->szParam3.ptr()); - KviStr szSwitches = "-c"; + KviCString szSwitches = "-c"; if(bTurboExtension)szSwitches.prepend("-t "); #ifdef COMPILE_SSL_SUPPORT if(bSSLExtension)szSwitches.prepend("-s "); @@ -765,7 +765,7 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc) dcc->szParam1.cutToLast('/'); } - KviStr szExtensions = dcc->szType; + KviCString szExtensions = dcc->szType; szExtensions.cutRight(4); // cut off SEND bool bTurboExtension = szExtensions.contains('T',false); @@ -848,7 +848,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) if(!dcc_module_check_limits(dcc))return; if(!dcc_module_check_concurrent_transfers_limit(dcc))return; - KviStr szExtensions = dcc->szType; + KviCString szExtensions = dcc->szType; szExtensions.cutRight(3); // cut off GET bool bTurboExtension = szExtensions.contains('T',false); @@ -888,7 +888,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc) if(KVI_OPTION_BOOL(KviOption_boolCantAcceptIncomingDccConnections)) { // we have to use DCC RSEND, otherwise it will not work - KviStr szSubproto("RSEND"); + KviCString szSubproto("RSEND"); szSubproto.prepend(szExtensions); diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp index 8d9c495c5..437890d3c 100644 --- a/src/modules/dcc/send.cpp +++ b/src/modules/dcc/send.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Sep 20 09 2000 15:14:14 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -35,20 +35,20 @@ #include "kvi_options.h" #include "kvi_ircview.h" #include "kvi_iconmanager.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_error.h" #include "kvi_out.h" #include "kvi_netutils.h" #include "kvi_console.h" #include "kvi_frame.h" -#include "kvi_malloc.h" +#include "KviMemory.h" #include "kvi_memmove.h" -#include "kvi_thread.h" +#include "KviThread.h" #include "kvi_ircsocket.h" -#include "kvi_mediatype.h" +#include "KviMediaType.h" #include "kvi_socket.h" #include "kvi_kvs_eventtriggers.h" -#include "kvi_parameterlist.h" +#include "KviParameterList.h" #include "kvi_ircconnection.h" #include "kvi_ircconnectionuserinfo.h" #include "kvi_sparser.h" @@ -87,7 +87,7 @@ extern KVIRC_API KviMediaManager * g_pMediaManager; // kvi_app.cpp static KviPointerList<KviDccFileTransfer> * g_pDccFileTransfers = 0; static QPixmap * g_pDccFileTransferIcon = 0; -//#warning "The events that have a KviStr data pointer should become real classes, that take care of deleting the data pointer!" +//#warning "The events that have a KviCString data pointer should become real classes, that take care of deleting the data pointer!" //#warning "Otherwise, when left undispatched we will be leaking memory (event class destroyed but not the data ptr)" KviDccRecvThread::KviDccRecvThread(QObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt) @@ -165,8 +165,8 @@ void KviDccRecvThread::updateStats() void KviDccRecvThread::postMessageEvent(const char * m) { - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_MESSAGE); - e->setData(new KviStr(m)); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_MESSAGE); + e->setData(new KviCString(m)); postEvent(parent(),e); } @@ -562,7 +562,7 @@ void KviDccSendThread::run() int iAckHackRounds = 0; if(m_pOpt->iPacketSize < 32)m_pOpt->iPacketSize = 32; - char * buffer = (char *)kvi_malloc(m_pOpt->iPacketSize * sizeof(char)); + char * buffer = (char *)KviMemory::allocate(m_pOpt->iPacketSize * sizeof(char)); QFile * pFile = new QFile(QString::fromUtf8(m_pOpt->szFileName.ptr())); @@ -796,8 +796,8 @@ void KviDccSendThread::run() if(!handleInvalidSocketRead(readLen))break; } else { - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_MESSAGE); - e->setData(new KviStr(__tr2qs_ctx("WARNING: Received data in a DCC TSEND, there should be no acknowledges","dcc"))); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_MESSAGE); + e->setData(new KviCString(__tr2qs_ctx("WARNING: Received data in a DCC TSEND, there should be no acknowledges","dcc"))); postEvent(parent(),e); } } @@ -967,7 +967,7 @@ handle_system_error: } exit_dcc: - kvi_free(buffer); + KviMemory::free(buffer); pFile->close(); delete pFile; pFile = 0; @@ -1430,7 +1430,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column, QRect rect) p->setPen(Qt::black); - KviStr szRemote(KviStr::Format,"dcc://%s@%s:%s/%s",m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data(), + KviCString szRemote(KviCString::Format,"dcc://%s@%s:%s/%s",m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data(), m_pDescriptor->szFileName.toUtf8().data()); p->drawText(rect.left() + 4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft, @@ -1792,7 +1792,7 @@ void KviDccFileTransfer::connectionInProgress() } } - KviStr port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); + KviCString port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); //#warning "OPTION FOR SENDING 127.0.0.1 and so on (not an unsigned nuumber)" struct in_addr a; if(KviNetUtils::stringIpToBinaryIp(ip,&a))ip.setNum(htonl(a.s_addr)); @@ -1810,7 +1810,7 @@ void KviDccFileTransfer::connectionInProgress() KviServerParser::encodeCtcpParameter(tmp.toUtf8().data(),fName); // Zero port requests want DCC SEND as back-request - KviStr szReq; + KviCString szReq; if(m_pDescriptor->isZeroPortRequest()) { @@ -1934,7 +1934,7 @@ bool KviDccFileTransfer::event(QEvent *e) break; case KVI_DCC_THREAD_EVENT_MESSAGE: { - KviStr * str = ((KviThreadDataEvent<KviStr> *)e)->getData(); + KviCString * str = ((KviThreadDataEvent<KviCString> *)e)->getData(); outputAndLog(QString(__tr_no_xgettext_ctx(str->ptr(),"dcc"))); delete str; return true; @@ -2142,7 +2142,7 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,quint6 m_pDescriptor->szFileSize.setNum(filePos); - KviStr szBuffy; + KviCString szBuffy; KviServerParser::encodeCtcpParameter(filename,szBuffy); m_pDescriptor->console()->connection()->sendFmtData("PRIVMSG %s :%cDCC ACCEPT %s %s %u%c", diff --git a/src/modules/dcc/send.h b/src/modules/dcc/send.h index e47884b6d..260a28948 100644 --- a/src/modules/dcc/send.h +++ b/src/modules/dcc/send.h @@ -6,7 +6,7 @@ // Creation date : Tue Sep 24 09 2000 15:06:12 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -29,11 +29,11 @@ #include "thread.h" #include "kvi_window.h" -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_sockettype.h" -#include "kvi_pointerlist.h" +#include "KviPointerList.h" #include "kvi_filetransfer.h" -#include "kvi_time.h" +#include "KviTimeUtils.h" #include "kvi_tal_popupmenu.h" #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" @@ -53,7 +53,7 @@ class KviTalPopupMenu; typedef struct _KviDccSendThreadOptions { - KviStr szFileName; + KviCString szFileName; quint64 uStartPosition; int iPacketSize; int iIdleStepLengthInMSec; @@ -101,7 +101,7 @@ protected: typedef struct _KviDccRecvThreadOptions { bool bResume; - KviStr szFileName; + KviCString szFileName; quint64 uTotalFileSize; int iIdleStepLengthInMSec; bool bSendZeroAck; @@ -179,8 +179,8 @@ private: KviDccDescriptor * m_pDescriptor; KviDccMarshal * m_pMarshal; - KviStr m_szTarget; - KviStr m_szDccType; + KviCString m_szTarget; + KviCString m_szDccType; QString m_szTransferIdString; QString m_szStatusString; diff --git a/src/modules/dcc/thread.cpp b/src/modules/dcc/thread.cpp index 3b78c11e8..dc712791d 100644 --- a/src/modules/dcc/thread.cpp +++ b/src/modules/dcc/thread.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Sep 20 09 2000 18:29:51 CEST Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -28,7 +28,7 @@ #include "kvi_window.h" #include "kvi_error.h" #include "kvi_memmove.h" -#include "kvi_malloc.h" +#include "KviMemory.h" #include "kvi_netutils.h" #include "kvi_socket.h" @@ -90,10 +90,10 @@ bool KviDccThread::handleInvalidSocketRead(int readLen) #ifdef COMPILE_SSL_SUPPORT void KviDccThread::raiseSSLError() { - KviStr buffer; + KviCString buffer; while(m_pSSL->getLastErrorString(buffer)) { - KviStr msg(KviStr::Format,"[SSL ERROR]: %s",buffer.ptr()); + KviCString msg(KviCString::Format,"[SSL ERROR]: %s",buffer.ptr()); postMessageEvent(msg.ptr()); } } @@ -108,7 +108,7 @@ void KviDccThread::postErrorEvent(int err) void KviDccThread::postMessageEvent(const char * message) { - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_MESSAGE); - e->setData(new KviStr(message)); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_MESSAGE); + e->setData(new KviCString(message)); postEvent(m_pParent,e); } diff --git a/src/modules/dcc/thread.h b/src/modules/dcc/thread.h index 83bb28bb4..877ea56bb 100644 --- a/src/modules/dcc/thread.h +++ b/src/modules/dcc/thread.h @@ -6,7 +6,7 @@ // Creation date : Tue Sep 20 09 2000 18:28:44 by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2000-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,9 +25,9 @@ //============================================================================= #include "kvi_settings.h" -#include "kvi_thread.h" +#include "KviThread.h" #include "kvi_sockettype.h" -#include "kvi_pointerlist.h" +#include "KviPointerList.h" #include <QObject> @@ -37,11 +37,11 @@ // KviThreadDataEvent<int> #define KVI_DCC_THREAD_EVENT_ERROR (KVI_THREAD_USER_EVENT_BASE + 1) -// KviThreadDataEvent<KviStr> +// KviThreadDataEvent<KviCString> #define KVI_DCC_THREAD_EVENT_DATA (KVI_THREAD_USER_EVENT_BASE + 2) // KviThreadEvent #define KVI_DCC_THREAD_EVENT_SUCCESS (KVI_THREAD_USER_EVENT_BASE + 3) -// KviThreadDataEvent<KviStr> +// KviThreadDataEvent<KviCString> #define KVI_DCC_THREAD_EVENT_MESSAGE (KVI_THREAD_USER_EVENT_BASE + 4) // KviThreadDataEvent<int> #define KVI_DCC_THREAD_EVENT_ACTION (KVI_THREAD_USER_EVENT_BASE + 5) diff --git a/src/modules/dcc/utils.cpp b/src/modules/dcc/utils.cpp index cc6600601..9c90fe151 100644 --- a/src/modules/dcc/utils.cpp +++ b/src/modules/dcc/utils.cpp @@ -4,7 +4,7 @@ // Creation date : Tue Jul 23 02:54:44 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -27,11 +27,11 @@ #include "utils.h" #include "kvi_options.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_netutils.h" #include "kvi_ircsocket.h" #include "kvi_irclink.h" -#include "kvi_qstring.h" +#include "KviQString.h" /* bool dcc_module_get_listen_ip_address(KviCommand *c,KviConsole * pConsole,QString &szListenIp) diff --git a/src/modules/dcc/utils.h b/src/modules/dcc/utils.h index 44d914c8e..50087c538 100644 --- a/src/modules/dcc/utils.h +++ b/src/modules/dcc/utils.h @@ -6,7 +6,7 @@ // Creation date : Tue Jul 23 02:54:45 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -25,7 +25,7 @@ //============================================================================= #include "kvi_settings.h" -#include "kvi_string.h" +#include "KviCString.h" #include "kvi_console.h" #include "kvi_kvs_moduleinterface.h" diff --git a/src/modules/dcc/video.cpp b/src/modules/dcc/video.cpp index 461a092a3..08c212e0d 100644 --- a/src/modules/dcc/video.cpp +++ b/src/modules/dcc/video.cpp @@ -31,17 +31,17 @@ #include "kvi_iconmanager.h" #include "kvi_ircview.h" #include "kvi_kvs_eventtriggers.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_out.h" #include "kvi_error.h" #include "kvi_netutils.h" #include "kvi_options.h" #include "kvi_console.h" -#include "kvi_malloc.h" +#include "KviMemory.h" #include "kvi_socket.h" #include "kvi_ircconnection.h" #include "kvi_tal_vbox.h" -#include "kvi_mirccntrl.h" +#include "KviMircCntrl.h" #include "kvi_frame.h" #include <QToolTip> @@ -50,8 +50,8 @@ #include <QTextDocument> //for Qt::escape #ifdef COMPILE_CRYPT_SUPPORT - #include "kvi_crypt.h" - #include "kvi_cryptcontroller.h" + #include "KviCryptEngine.h" + #include "KviCryptEngine.h" #endif #ifdef COMPILE_SSL_SUPPORT @@ -213,7 +213,7 @@ bool KviDccVideoThread::textStep() { KviDccThreadIncomingData data; data.iLen = m_textInSignalBuffer.size(); - data.buffer = (char*) kvi_malloc(data.iLen); + data.buffer = (char*) KviMemory::allocate(data.iLen); memcpy(data.buffer, m_textInSignalBuffer.data(), data.iLen); handleIncomingData(&data,false); @@ -249,12 +249,12 @@ bool KviDccVideoThread::handleIncomingData(KviDccThreadIncomingData * data,bool { if((*aux == '\n') || (*aux == '\0')) { - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_DATA); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_DATA); // The left part is len chars long int len = aux - data->buffer; // qDebug("LEN = %d, iLen = %d",len,data->iLen); //#warning "DO IT BETTER (the \r cutting)" - KviStr * s = new KviStr(data->buffer,len); + KviCString * s = new KviCString(data->buffer,len); if(s->lastCharIs('\r'))s->cutRight(1); e->setData(s); // but we cut also \n (or \0) @@ -268,13 +268,13 @@ bool KviDccVideoThread::handleIncomingData(KviDccThreadIncomingData * data,bool // memmove the remaining part to the beginning // aux points after \n or \0 kvi_memmove(data->buffer,aux,data->iLen); - data->buffer = (char *)kvi_realloc(data->buffer,data->iLen); + data->buffer = (char *)KviMemory::reallocate(data->buffer,data->iLen); end = data->buffer + data->iLen; aux = data->buffer; } else { // no more data in the buffer KVI_ASSERT(data->iLen == 0); - kvi_free(data->buffer); + KviMemory::free(data->buffer); data->buffer = end = aux = 0; } postEvent(parent(),e); @@ -288,12 +288,12 @@ bool KviDccVideoThread::handleIncomingData(KviDccThreadIncomingData * data,bool if(data->iLen > 0) { // in the last part there are no NULL and \n chars - KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_DATA); - KviStr * s = new KviStr(data->buffer,data->iLen); + KviThreadDataEvent<KviCString> * e = new KviThreadDataEvent<KviCString>(KVI_DCC_THREAD_EVENT_DATA); + KviCString * s = new KviCString(data->buffer,data->iLen); if(s->lastCharIs('\r'))s->cutRight(1); e->setData(s); data->iLen = 0; - kvi_free(data->buffer); + KviMemory::free(data->buffer); data->buffer = 0; postEvent(parent(),e); } @@ -612,7 +612,7 @@ void KviDccVideo::connectionInProgress() if(m_pDescriptor->bSendRequest) { QString ip = !m_pDescriptor->szFakeIp.isEmpty() ? m_pDescriptor->szFakeIp : m_pDescriptor->szListenIp; - KviStr port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); + KviCString port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); //#warning "OPTION FOR SENDING 127.0.0.1 and so on (not an unsigned nuumber)" struct in_addr a; if(KviNetUtils::stringIpToBinaryIp(ip,&a)) { @@ -646,7 +646,7 @@ void KviDccVideo::getBaseLogFileName(QString &buffer) void KviDccVideo::fillCaptionBuffers() { - KviStr tmp(KviStr::Format,"DCC Video %s@%s:%s %s", + KviCString tmp(KviCString::Format,"DCC Video %s@%s:%s %s", m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data(), m_pDescriptor->szLocalFileName.toUtf8().data()); @@ -677,13 +677,13 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback) { if(*d != KVI_TEXT_CRYPTESCAPE) { - KviStr encrypted; + KviCString encrypted; cryptSessionInfo()->m_pEngine->setMaxEncryptLen(-1); switch(cryptSessionInfo()->m_pEngine->encrypt(d,encrypted)) { case KviCryptEngine::Encrypted: { - KviStr buf(KviStr::Format,"%s\r\n",encrypted.ptr()); + KviCString buf(KviCString::Format,"%s\r\n",encrypted.ptr()); m_tmpTextDataOut.append(buf.ptr(), buf.len()); if(bUserFeedback) m_pFrm->firstConsole()->outputPrivmsg(this,KVI_OUT_OWNPRIVMSGCRYPTED, @@ -693,7 +693,7 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback) break; case KviCryptEngine::Encoded: { - KviStr buf(KviStr::Format,"%s\r\n",encrypted.ptr()); + KviCString buf(KviCString::Format,"%s\r\n",encrypted.ptr()); m_tmpTextDataOut.append(buf.ptr(), buf.len()); if(bUserFeedback) { @@ -716,7 +716,7 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback) return; } else { d++; //eat the escape code - KviStr buf(KviStr::Format,"%s\r\n",d); + KviCString buf(KviCString::Format,"%s\r\n",d); QString tmp = text.right(text.length() - 1); m_tmpTextDataOut.append(buf.ptr(), buf.len()); @@ -729,7 +729,7 @@ void KviDccVideo::ownMessage(const QString &text, bool bUserFeedback) } } #endif - KviStr buf(KviStr::Format,"%s\r\n",d); + KviCString buf(KviCString::Format,"%s\r\n",d); m_tmpTextDataOut.append(buf.ptr(), buf.len()); if(bUserFeedback) @@ -761,7 +761,7 @@ void KviDccVideo::ownAction(const QString &text) QByteArray szData = encodeText(szTmpBuffer); const char * d = szData.data(); if(!d)return; - KviStr buf(KviStr::Format,"%cACTION %s%c\r\n",0x01,d,0x01); + KviCString buf(KviCString::Format,"%cACTION %s%c\r\n",0x01,d,0x01); m_tmpTextDataOut.append(buf.ptr(), buf.len()); output(KVI_OUT_ACTION,"%Q %Q",&(m_pDescriptor->szLocalNick),&szTmpBuffer); } else { @@ -786,8 +786,8 @@ bool KviDccVideo::event(QEvent *e) break; case KVI_DCC_THREAD_EVENT_DATA: { - KviStr * encoded = ((KviThreadDataEvent<KviStr> *)e)->getData(); - KviStr d=KviStr(decodeText(encoded->ptr())); + KviCString * encoded = ((KviThreadDataEvent<KviCString> *)e)->getData(); + KviCString d=KviCString(decodeText(encoded->ptr())); if(d.firstCharIs(0x01)) { d.cutLeft(1); @@ -818,7 +818,7 @@ bool KviDccVideo::event(QEvent *e) { if(cinf->m_bDoDecrypt) { - KviStr decryptedStuff; + KviCString decryptedStuff; switch(cinf->m_pEngine->decrypt(d.ptr(),decryptedStuff)) { case KviCryptEngine::DecryptOkWasEncrypted: @@ -875,7 +875,7 @@ bool KviDccVideo::event(QEvent *e) case KVI_DCC_THREAD_EVENT_MESSAGE: { - KviStr * str = ((KviThreadDataEvent<KviStr> *)e)->getData(); + KviCString * str = ((KviThreadDataEvent<KviCString> *)e)->getData(); outputNoFmt(KVI_OUT_DCCMSG,__tr_no_xgettext_ctx(str->ptr(),"dcc")); delete str; return true; diff --git a/src/modules/dcc/video.h b/src/modules/dcc/video.h index 96250c5ee..58a92bc88 100644 --- a/src/modules/dcc/video.h +++ b/src/modules/dcc/video.h @@ -30,7 +30,7 @@ #include "window.h" #include "kvi_window.h" -#include "kvi_databuffer.h" +#include "KviDataBuffer.h" #include "kvi_sockettype.h" #include "kvi_tal_hbox.h" #include "kvi_themedlabel.h" diff --git a/src/modules/dcc/voice.cpp b/src/modules/dcc/voice.cpp index c46eb1f81..e59ad40fd 100644 --- a/src/modules/dcc/voice.cpp +++ b/src/modules/dcc/voice.cpp @@ -4,7 +4,7 @@ // Creation date : Thu Aug 23 04:08:09 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -31,13 +31,13 @@ #include "kvi_settings.h" #include "kvi_iconmanager.h" #include "kvi_ircview.h" -#include "kvi_locale.h" +#include "KviLocale.h" #include "kvi_out.h" #include "kvi_error.h" #include "kvi_netutils.h" #include "kvi_options.h" #include "kvi_console.h" -#include "kvi_malloc.h" +#include "KviMemory.h" #include "kvi_socket.h" #include "kvi_ircconnection.h" #include "kvi_tal_vbox.h" @@ -208,7 +208,7 @@ bool KviDccVoiceThread::openSoundcard(int mode) if(ioctl(m_soundFd,SNDCTL_DSP_SPEED,&speed)<0)goto exit_false; if(speed != m_pOpt->iSampleRate) { - KviStr tmp(KviStr::Format,__tr2qs_ctx("WARNING: failed to set the requested sample rate (%d): the device used closest match (%d)","dcc").toUtf8().data(), + KviCString tmp(KviCString::Format,__tr2qs_ctx("WARNING: failed to set the requested sample rate (%d): the device used closest match (%d)","dcc").toUtf8().data(), m_pOpt->iSampleRate,speed); postMessageEvent(tmp.ptr()); } @@ -761,7 +761,7 @@ void KviDccVoice::connectionInProgress() if(m_pDescriptor->bSendRequest) { QString ip = !m_pDescriptor->szFakeIp.isEmpty() ? m_pDescriptor->szFakeIp : m_pDescriptor->szListenIp; - KviStr port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); + KviCString port = !m_pDescriptor->szFakePort.isEmpty() ? m_pDescriptor->szFakePort : m_pMarshal->localPort(); //#warning "OPTION FOR SENDING 127.0.0.1 and so on (not an unsigned nuumber)" struct in_addr a; if(KviNetUtils::stringIpToBinaryIp(ip,&a)) { @@ -793,7 +793,7 @@ void KviDccVoice::getBaseLogFileName(QString &buffer) void KviDccVoice::fillCaptionBuffers() { - KviStr tmp(KviStr::Format,"DCC Voice %s@%s:%s %s", + KviCString tmp(KviCString::Format,"DCC Voice %s@%s:%s %s", m_pDescriptor->szNick.toUtf8().data(),m_pDescriptor->szIp.toUtf8().data(),m_pDescriptor->szPort.toUtf8().data(), m_pDescriptor->szLocalFileName.toUtf8().data()); @@ -827,7 +827,7 @@ bool KviDccVoice::event(QEvent *e) break; case KVI_DCC_THREAD_EVENT_MESSAGE: { - KviStr * str = ((KviThreadDataEvent<KviStr> *)e)->getData(); + KviCString * str = ((KviThreadDataEvent<KviCString> *)e)->getData(); outputNoFmt(KVI_OUT_DCCMSG,__tr_no_xgettext_ctx(str->ptr(),"dcc")); delete str; return true; @@ -873,7 +873,7 @@ void KviDccVoice::updateInfo() int iOSize = m_pSlaveThread->m_iOutputBufferSize; int iISize = m_pSlaveThread->m_iInputBufferSize; m_pSlaveThread->m_pInfoMutex->unlock(); - KviStr tmp(KviStr::Format,__tr_ctx("Input buffer: %d bytes","dcc"),iISize); + KviCString tmp(KviCString::Format,__tr_ctx("Input buffer: %d bytes","dcc"),iISize); m_pInputLabel->setText(tmp.ptr()); tmp.sprintf(__tr_ctx("Output buffer: %d bytes","dcc"),iOSize); m_pOutputLabel->setText(tmp.ptr()); diff --git a/src/modules/dcc/voice.h b/src/modules/dcc/voice.h index ab3038607..35c726d3f 100644 --- a/src/modules/dcc/voice.h +++ b/src/modules/dcc/voice.h @@ -6,7 +6,7 @@ // Creation date : Thu Aug 23 04:08:10 2001 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2001-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2001-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -30,7 +30,7 @@ #include "window.h" #include "kvi_window.h" -#include "kvi_databuffer.h" +#include "KviDataBuffer.h" #include "kvi_sockettype.h" #include "kvi_tal_hbox.h" @@ -55,7 +55,7 @@ typedef struct _KviDccVoiceThreadOptions bool bForceHalfDuplex; int iPreBufferSize; int iSampleRate; - KviStr szSoundDevice; + KviCString szSoundDevice; KviDccVoiceCodec * pCodec; } KviDccVoiceThreadOptions; diff --git a/src/modules/dcc/window.cpp b/src/modules/dcc/window.cpp index b59a13793..b08cbf2c4 100644 --- a/src/modules/dcc/window.cpp +++ b/src/modules/dcc/window.cpp @@ -4,7 +4,7 @@ // Creation date : Fri Jul 26 02:04:40 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License diff --git a/src/modules/dcc/window.h b/src/modules/dcc/window.h index 0b85ced3d..bdcc8c088 100644 --- a/src/modules/dcc/window.h +++ b/src/modules/dcc/window.h @@ -6,7 +6,7 @@ // Creation date : Fri Jul 26 02:04:39 2002 GMT by Szymon Stefanek // // This file is part of the KVirc irc client distribution -// Copyright (C) 2002-2008 Szymon Stefanek (pragma at kvirc dot net) +// Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net) // // This program is FREE software. You can redistribute it and/or // modify it under the terms of the GNU General Public License |
