diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-28 18:31:12 +0000 |
commit | 0a80cfd57d271dd44221467efb426675fa470356 (patch) | |
tree | 6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/spaste/controller.cpp | |
parent | 3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff) | |
download | kvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip |
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/spaste/controller.cpp')
-rw-r--r-- | src/modules/spaste/controller.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/spaste/controller.cpp b/src/modules/spaste/controller.cpp index 5a132dbd..a98c8b24 100644 --- a/src/modules/spaste/controller.cpp +++ b/src/modules/spaste/controller.cpp @@ -26,9 +26,9 @@ #include "kvi_app.h" #include "kvi_options.h" -#include <qtimer.h> -#include <qstringlist.h> -#include <qclipboard.h> +#include <tqtimer.h> +#include <tqstringlist.h> +#include <tqclipboard.h> extern KviPointerList<SPasteController> * g_pControllerList; @@ -37,7 +37,7 @@ SPasteController::SPasteController(KviWindow * w,int id) { g_pControllerList->append(this); //m_pWindow = w; - m_pTimer = new QTimer(this); + m_pTimer = new TQTimer(this); } SPasteController::~SPasteController() @@ -57,13 +57,13 @@ SPasteController::~SPasteController() delete m_pClipBuff; } -bool SPasteController::pasteFileInit(QString &fileName) +bool SPasteController::pasteFileInit(TQString &fileName) { if(m_pClipBuff)return false; // can't paste a file while pasting the clipboard if(m_pFile)return false; // can't paste two files at a time - m_pFile = new QFile(fileName); + m_pFile = new TQFile(fileName); if(!m_pFile->open(IO_ReadOnly))return false; - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pasteFile())); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(pasteFile())); m_pTimer->start(KVI_OPTION_UINT(KviOption_uintPasteDelay)); return true; } @@ -71,15 +71,15 @@ bool SPasteController::pasteFileInit(QString &fileName) bool SPasteController::pasteClipboardInit(void) { if(m_pFile)return false; // can't paste clipboard while pasting a file - QString tmp(g_pApp->clipboard()->text()); + TQString tmp(g_pApp->clipboard()->text()); if(m_pClipBuff) { - (*m_pClipBuff) += QStringList::split("\n",tmp,true); + (*m_pClipBuff) += TQStringList::split("\n",tmp,true); } else { - m_pClipBuff = new QStringList(QStringList::split("\n",tmp,true)); + m_pClipBuff = new TQStringList(TQStringList::split("\n",tmp,true)); m_clipBuffIterator = m_pClipBuff->begin(); } - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(pasteClipboard())); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(pasteClipboard())); m_pTimer->start(KVI_OPTION_UINT(KviOption_uintPasteDelay)); return true; } @@ -87,11 +87,11 @@ bool SPasteController::pasteClipboardInit(void) void SPasteController::pasteFile(void) { #ifndef COMPILE_USE_QT4 - QString line; + TQString line; if(m_pFile->readLine(line,999) != -1) { if(line.isEmpty()) - line = QChar(KVI_TEXT_RESET); + line = TQChar(KVI_TEXT_RESET); if( (!g_pApp->windowExists(m_pWindow)) || m_pWindow->console()->isNotConnected() ) { m_pFile->close(); @@ -111,7 +111,7 @@ void SPasteController::pasteClipboard(void) if((!g_pApp->windowExists(m_pWindow)) || m_pWindow->console()->isNotConnected() ) delete this; else { - if((*m_clipBuffIterator).isEmpty())(*m_clipBuffIterator) = QChar(KVI_TEXT_RESET); + if((*m_clipBuffIterator).isEmpty())(*m_clipBuffIterator) = TQChar(KVI_TEXT_RESET); m_pWindow->ownMessage((*m_clipBuffIterator).ascii()); // <-- not good :/ ++m_clipBuffIterator; } |