diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 16:44:48 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 16:44:48 +0000 |
commit | d2aa614e147d5a01987d51c53de181cd95242f4f (patch) | |
tree | 1b4193e5159fa46ddab571a44e531691d1332628 /konversation/src | |
parent | 9154a0f8aec085fd6fd1a4228d239c897223064c (diff) | |
download | konversation-d2aa614e147d5a01987d51c53de181cd95242f4f.tar.gz konversation-d2aa614e147d5a01987d51c53de181cd95242f4f.zip |
TQt4 port Konversation
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/konversation@1238519 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konversation/src')
233 files changed, 2510 insertions, 2427 deletions
diff --git a/konversation/src/alias_preferences.cpp b/konversation/src/alias_preferences.cpp index e51bb63..a569421 100644 --- a/konversation/src/alias_preferences.cpp +++ b/konversation/src/alias_preferences.cpp @@ -25,8 +25,8 @@ #include <klistview.h> -Alias_Config::Alias_Config(TQWidget* parent, const char* name) - : Alias_ConfigUI(parent, name) +Alias_Config::Alias_Config(TQWidget* tqparent, const char* name) + : Alias_ConfigUI(tqparent, name) { // reset flag to defined state (used to block signals when just selecting a new item) m_newItemSelected = false; diff --git a/konversation/src/alias_preferences.h b/konversation/src/alias_preferences.h index 4137e88..f1d28ec 100644 --- a/konversation/src/alias_preferences.h +++ b/konversation/src/alias_preferences.h @@ -19,9 +19,10 @@ class Alias_Config : public Alias_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Alias_Config(TQWidget* parent, const char* name = 0); + explicit Alias_Config(TQWidget* tqparent, const char* name = 0); ~Alias_Config(); virtual void saveSettings(); diff --git a/konversation/src/alias_preferencesui.ui b/konversation/src/alias_preferencesui.ui index 2e144cc..a2374b6 100644 --- a/konversation/src/alias_preferencesui.ui +++ b/konversation/src/alias_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Alias_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Alias_ConfigUI</cstring> </property> @@ -19,15 +19,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>aliasLabel</cstring> </property> @@ -38,7 +38,7 @@ <string>Alias:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>replacementLabel</cstring> </property> @@ -112,15 +112,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>newButton</cstring> </property> @@ -128,7 +128,7 @@ <string>&New...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeButton</cstring> </property> @@ -146,7 +146,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>350</height> @@ -164,8 +164,8 @@ <tabstop>newButton</tabstop> <tabstop>removeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/autoreplace_preferences.cpp b/konversation/src/autoreplace_preferences.cpp index 1f10b40..8e7ed9c 100644 --- a/konversation/src/autoreplace_preferences.cpp +++ b/konversation/src/autoreplace_preferences.cpp @@ -34,8 +34,8 @@ #define DIRECTION_BOTH 2 -Autoreplace_Config::Autoreplace_Config(TQWidget* parent, const char* name) - : Autoreplace_ConfigUI(parent, name) +Autoreplace_Config::Autoreplace_Config(TQWidget* tqparent, const char* name) + : Autoreplace_ConfigUI(tqparent, name) { // reset flag to defined state (used to block signals when just selecting a new item) m_newItemSelected=false; @@ -146,7 +146,7 @@ void Autoreplace_Config::saveSettings() for(unsigned int index=0;index<newList.count();index++) { // write the current entry's pattern and replacement (adds a "#" to preserve blanks at the end of the line) - config->writeEntry(TQString("Autoreplace%1").arg(index),newList[index]+'#'); + config->writeEntry(TQString("Autotqreplace%1").tqarg(index),newList[index]+'#'); } // for } // if there were no entries at all, write a dummy entry to prevent KConfigXT from "optimizing" @@ -364,7 +364,7 @@ void Autoreplace_Config::sort(int column) bool ascending = true; if (patternListView->sortColumn() != -1) - ascending = (patternListView->sortOrder() == Qt::Ascending); + ascending = (patternListView->sortOrder() == TQt::Ascending); patternListView->setSorting(column, ascending); diff --git a/konversation/src/autoreplace_preferences.h b/konversation/src/autoreplace_preferences.h index a052f8f..a8df873 100644 --- a/konversation/src/autoreplace_preferences.h +++ b/konversation/src/autoreplace_preferences.h @@ -20,9 +20,10 @@ class Autoreplace_Config : public Autoreplace_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Autoreplace_Config(TQWidget* parent, const char* name=NULL); + explicit Autoreplace_Config(TQWidget* tqparent, const char* name=NULL); ~Autoreplace_Config(); virtual void saveSettings(); diff --git a/konversation/src/autoreplace_preferencesui.ui b/konversation/src/autoreplace_preferencesui.ui index db6521c..831cfa4 100644 --- a/konversation/src/autoreplace_preferencesui.ui +++ b/konversation/src/autoreplace_preferencesui.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Autoreplace_ConfigUI</class> <author>Dario Abatianni</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Autoreplace_ConfigUI</cstring> </property> @@ -20,15 +20,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>newButton</cstring> </property> @@ -36,7 +36,7 @@ <string>Ne&w</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeButton</cstring> </property> @@ -54,7 +54,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>506</height> @@ -135,15 +135,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="2"> + <widget class="TQPushButton" row="1" column="2"> <property name="name"> <cstring>regExpEditorButton</cstring> </property> @@ -165,7 +165,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>directionLabel</cstring> </property> @@ -216,7 +216,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>patternLabel</cstring> </property> @@ -235,7 +235,7 @@ <string>Find:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>replacementLabel</cstring> </property> @@ -254,7 +254,7 @@ <string>Replace with:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>directionCombo</cstring> </property> @@ -283,7 +283,7 @@ <tabstop>newButton</tabstop> <tabstop>removeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/awaymanager.cpp b/konversation/src/awaymanager.cpp index 30b1027..f5d8202 100644 --- a/konversation/src/awaymanager.cpp +++ b/konversation/src/awaymanager.cpp @@ -25,7 +25,7 @@ #include <kdebug.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> #include <X11/Xatom.h> #include <X11/Xresource.h> @@ -46,7 +46,7 @@ struct AwayManagerPrivate int mouseX; int mouseY; unsigned int mouseMask; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Window root; Screen* screen; Time xIdleTime; @@ -55,7 +55,7 @@ struct AwayManagerPrivate bool useMit; }; -AwayManager::AwayManager(TQObject* parent) : TQObject(parent) +AwayManager::AwayManager(TQObject* tqparent) : TQObject(tqparent) { int dummy = 0; dummy = dummy; @@ -69,7 +69,7 @@ AwayManager::AwayManager(TQObject* parent) : TQObject(parent) m_connectionManager = static_cast<KonversationApplication*>(kapp)->getConnectionManager(); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Display* display = qt_xdisplay(); d->root = DefaultRootWindow(display); d->screen = ScreenOfDisplay(display, DefaultScreen (display)); @@ -122,7 +122,7 @@ void AwayManager::identityOnline(int identityId) IdentityPtr identity = Preferences::identityById(identityId); if (identity && identity->getAutomaticAway() && - !m_identitiesOnAutoAway.contains(identityId)) + !m_identitiesOnAutoAway.tqcontains(identityId)) { m_identitiesOnAutoAway.append(identityId); @@ -132,7 +132,7 @@ void AwayManager::identityOnline(int identityId) void AwayManager::identityOffline(int identityId) { - if (m_identitiesOnAutoAway.contains(identityId)) + if (m_identitiesOnAutoAway.tqcontains(identityId)) { m_identitiesOnAutoAway.remove(identityId); @@ -172,16 +172,16 @@ bool AwayManager::Xactivity() { bool activity = false; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 Display* display = qt_xdisplay(); Window dummyW; int dummyC; - unsigned int mask; + unsigned int tqmask; int rootX; int rootY; if (!XQueryPointer (display, d->root, &(d->root), &dummyW, &rootX, &rootY, - &dummyC, &dummyC, &mask)) + &dummyC, &dummyC, &tqmask)) { // Figure out which screen the pointer has moved to. for (int i = 0; i < ScreenCount(display); i++) @@ -214,7 +214,7 @@ bool AwayManager::Xactivity() #endif } - if (rootX != d->mouseX || rootY != d->mouseY || mask != d->mouseMask + if (rootX != d->mouseX || rootY != d->mouseY || tqmask != d->mouseMask || ((d->useXidle || d->useMit) && xIdleTime < d->xIdleTime + 2000)) { // Set by setManagedIdentitiesAway() to skip X-based activity checking for one @@ -224,7 +224,7 @@ bool AwayManager::Xactivity() d->mouseX = rootX; d->mouseY = rootY; - d->mouseMask = mask; + d->mouseMask = tqmask; d->xIdleTime = xIdleTime; } #endif @@ -245,7 +245,7 @@ void AwayManager::implementIdleAutoAway(bool activity) { IdentityPtr identity = server->getIdentity(); - if (m_identitiesOnAutoAway.contains(identity->id()) && identity->getAutomaticUnaway() + if (m_identitiesOnAutoAway.tqcontains(identity->id()) && identity->getAutomaticUnaway() && server->isConnected() && server->isAway()) { server->requestUnaway(); @@ -272,7 +272,7 @@ void AwayManager::implementIdleAutoAway(bool activity) { int identityId = server->getIdentity()->id(); - if (identitiesIdleTimeExceeded.contains(identityId) && server->isConnected() && !server->isAway()) + if (identitiesIdleTimeExceeded.tqcontains(identityId) && server->isConnected() && !server->isAway()) server->requestAway(); } } @@ -289,7 +289,7 @@ void AwayManager::setManagedIdentitiesAway() for (server = serverList.first(); server; server = serverList.next()) { - if (m_identitiesOnAutoAway.contains(server->getIdentity()->id()) && server->isConnected() && !server->isAway()) + if (m_identitiesOnAutoAway.tqcontains(server->getIdentity()->id()) && server->isConnected() && !server->isAway()) server->requestAway(); } } @@ -303,7 +303,7 @@ void AwayManager::setManagedIdentitiesUnaway() { IdentityPtr identity = server->getIdentity(); - if (m_identitiesOnAutoAway.contains(identity->id()) && identity->getAutomaticUnaway() + if (m_identitiesOnAutoAway.tqcontains(identity->id()) && identity->getAutomaticUnaway() && server->isConnected() && server->isAway()) { server->requestUnaway(); diff --git a/konversation/src/awaymanager.h b/konversation/src/awaymanager.h index 5be461a..d9ccd8b 100644 --- a/konversation/src/awaymanager.h +++ b/konversation/src/awaymanager.h @@ -25,12 +25,13 @@ class TQTimer; struct AwayManagerPrivate; -class AwayManager : public QObject +class AwayManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - explicit AwayManager(TQObject* parent = 0); + explicit AwayManager(TQObject* tqparent = 0); ~AwayManager(); diff --git a/konversation/src/blowfish/BlowfishCbc.cpp b/konversation/src/blowfish/BlowfishCbc.cpp index fd8ff2f..b798e29 100644 --- a/konversation/src/blowfish/BlowfishCbc.cpp +++ b/konversation/src/blowfish/BlowfishCbc.cpp @@ -15,7 +15,7 @@ //--------------------------------------------------------------------------- // Mouser 1/14/05 // I'm not sure this implementation of cbc is exactly the same as other cbc -// algorithms you may find, though the different is insignificant and just +// algorithms you may tqfind, though the different is insignificant and just // requires you to call your other algorithm slightly differently. // This blowfish cbc class basically pretends that the IV is 00000000 but // but that the first 8byte block of the plaintext to encrypt is treated diff --git a/konversation/src/blowfish/BlowfishCbc.h b/konversation/src/blowfish/BlowfishCbc.h index 2abb335..b4c1b23 100644 --- a/konversation/src/blowfish/BlowfishCbc.h +++ b/konversation/src/blowfish/BlowfishCbc.h @@ -15,7 +15,7 @@ //--------------------------------------------------------------------------- // Mouser 1/14/05 // I'm not sure this implementation of cbc is exactly the same as other cbc -// algorithms you may find, though the difference is insignificant and just +// algorithms you may tqfind, though the difference is insignificant and just // requires you to call your other algorithm slightly differently. // This blowfish cbc class basically pretends that the IV is 00000000 but // but that the first 8byte block of the plaintext to encrypt is treated diff --git a/konversation/src/blowfish/b64stuff.cpp b/konversation/src/blowfish/b64stuff.cpp index 72f0776..79d5e64 100644 --- a/konversation/src/blowfish/b64stuff.cpp +++ b/konversation/src/blowfish/b64stuff.cpp @@ -36,10 +36,10 @@ //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- -//static char b64table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" +//static char b64table[64] = "ABCDEFGHIJKLMNOPTQRSTUVWXYZ" // "abcdefghijklmnopqrstuvwxyz" // "0123456789+/"; -static char b64table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; +static char b64table[] = "ABCDEFGHIJKLMNOPTQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /* Accepts a binary buffer with an associated size. * Returns a base64-encoded, NULL-terminated string. diff --git a/konversation/src/blowfish/oldblowfish.cpp b/konversation/src/blowfish/oldblowfish.cpp index 1f274db..3eab870 100644 --- a/konversation/src/blowfish/oldblowfish.cpp +++ b/konversation/src/blowfish/oldblowfish.cpp @@ -271,7 +271,7 @@ void oldCBlowFish::Decode (BYTE * pInput, BYTE * pOutput, DWORD lSize) #define SALT2 0x23f6b095 // Convert 64-bit encrypted passphrase to text for userfile -char base64[] = "./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; +char base64[] = "./0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ"; int base64dec(char c) { diff --git a/konversation/src/channel.cpp b/konversation/src/channel.cpp index 04a4020..365ae30 100644 --- a/konversation/src/channel.cpp +++ b/konversation/src/channel.cpp @@ -65,7 +65,7 @@ #include <kwin.h> -Channel::Channel(TQWidget* parent, TQString _name) : ChatWindow(parent) +Channel::Channel(TQWidget* tqparent, TQString _name) : ChatWindow(tqparent) { // init variables @@ -139,7 +139,7 @@ Channel::Channel(TQWidget* parent, TQString _name) : ChatWindow(parent) // The box holding the channel modes modeBox = new TQHBox(topicWidget); - modeBox->setSizePolicy(hfixed); + modeBox->tqsetSizePolicy(hfixed); modeT = new ModeButton("T",modeBox,0); modeN = new ModeButton("N",modeBox,1); modeS = new ModeButton("S",modeBox,2); @@ -211,7 +211,7 @@ Channel::Channel(TQWidget* parent, TQString _name) : ChatWindow(parent) // separate LED from Text a little more nicknameListView->setColumnWidth(0, 10); - nicknameListView->setColumnAlignment(0, Qt::AlignHCenter); + nicknameListView->setColumnAlignment(0, TQt::AlignHCenter); nicknameListView->installEventFilter(this); @@ -240,33 +240,33 @@ Channel::Channel(TQWidget* parent, TQString _name) : ChatWindow(parent) channelInput->installEventFilter(this); // Set the widgets size policies - m_topicButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); - topicLine->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum)); + m_topicButton->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); + topicLine->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum)); - commandLineBox->setSizePolicy(vfixed); + commandLineBox->tqsetSizePolicy(vfixed); limit->setMaximumSize(40,100); - limit->setSizePolicy(hfixed); + limit->tqsetSizePolicy(hfixed); modeT->setMaximumSize(20,100); - modeT->setSizePolicy(hfixed); + modeT->tqsetSizePolicy(hfixed); modeN->setMaximumSize(20,100); - modeN->setSizePolicy(hfixed); + modeN->tqsetSizePolicy(hfixed); modeS->setMaximumSize(20,100); - modeS->setSizePolicy(hfixed); + modeS->tqsetSizePolicy(hfixed); modeI->setMaximumSize(20,100); - modeI->setSizePolicy(hfixed); + modeI->tqsetSizePolicy(hfixed); modeP->setMaximumSize(20,100); - modeP->setSizePolicy(hfixed); + modeP->tqsetSizePolicy(hfixed); modeM->setMaximumSize(20,100); - modeM->setSizePolicy(hfixed); + modeM->tqsetSizePolicy(hfixed); modeK->setMaximumSize(20,100); - modeK->setSizePolicy(hfixed); + modeK->tqsetSizePolicy(hfixed); modeL->setMaximumSize(20,100); - modeL->setSizePolicy(hfixed); + modeL->tqsetSizePolicy(hfixed); - getTextView()->setSizePolicy(greedy); - nicknameListView->setSizePolicy(hmodest); + getTextView()->tqsetSizePolicy(greedy); + nicknameListView->tqsetSizePolicy(hmodest); connect(channelInput,TQT_SIGNAL (submit()),this,TQT_SLOT (channelTextEntered()) ); connect(channelInput,TQT_SIGNAL (envelopeCommand()),this,TQT_SLOT (channelPassthroughCommand()) ); @@ -320,7 +320,7 @@ void Channel::setServer(Server* server) connect(server, TQT_SIGNAL(connectionStateChanged(Server*, Konversation::ConnectionState)), TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState))); ChatWindow::setServer(server); - if (server->getKeyForRecipient(getName())) + if (!server->getKeyForRecipient(getName()).isNull()) blowfishLabel->show(); topicLine->setServer(server); refreshModeButtons(); @@ -351,7 +351,7 @@ void Channel::setEncryptedOutput(bool e) //prepend two colons to make it appear to be an irc message for decryption, // \r because it won't decrypt without it, even though the message did not have a \r - // when encrypted. Bring on the QCA! + // when encrypted. Bring on the TQCA! TQCString cipher="::"+topic.utf8()+'\x0d'; Konversation::decryptTopic(getName(), cipher, m_server); topic=TQString::fromUtf8(cipher.data()+2, cipher.length()-2); @@ -568,8 +568,8 @@ void Channel::popupCommand(int id) break; case Konversation::Ping: { - unsigned int time_t = TQDateTime::currentDateTime().toTime_t(); - pattern=TQString(cc+"CTCP %u PING %1").arg(time_t); + unsigned int time_t = TQDateTime::tqcurrentDateTime().toTime_t(); + pattern=TQString(cc+"CTCP %u PING %1").tqarg(time_t); } break; case Konversation::Kick: @@ -607,7 +607,7 @@ void Channel::popupCommand(int id) pattern=cc+"KICKBAN -USERDOMAIN %u"; break; case Konversation::OpenQuery: - pattern=cc+"QUERY %u"; + pattern=cc+"TQUERY %u"; break; case Konversation::StartDccChat: pattern=cc+"DCC CHAT %u"; @@ -617,7 +617,7 @@ void Channel::popupCommand(int id) break; case Konversation::IgnoreNick: if (nickList.size() == 1) - question=i18n("Do you want to ignore %1?").arg(nickList.first()); + question=i18n("Do you want to ignore %1?").tqarg(nickList.first()); else question = i18n("Do you want to ignore the selected users?"); if (KMessageBox::warningContinueCancel(this, question, i18n("Ignore"), i18n("Ignore"), "IgnoreNick") == @@ -635,7 +635,7 @@ void Channel::popupCommand(int id) } if (selectedIgnoredNicks.count() == 1) - question=i18n("Do you want to stop ignoring %1?").arg(selectedIgnoredNicks.first()); + question=i18n("Do you want to stop ignoring %1?").tqarg(selectedIgnoredNicks.first()); else question = i18n("Do you want to stop ignoring the selected users?"); if (KMessageBox::warningContinueCancel(this, question, i18n("Unignore"), i18n("Unignore"), "UnignoreNick") == @@ -661,18 +661,18 @@ void Channel::popupCommand(int id) if (!pattern.isEmpty()) { - pattern.replace("%c",getName()); + pattern.tqreplace("%c",getName()); TQString command; - if (pattern.contains("%l")) + if (pattern.tqcontains("%l")) { TQStringList list; for (TQStringList::Iterator it=nickList.begin(); it!=nickList.end(); ++it) list.append((*it)); - command = pattern.replace("%l", list.join(" ")); + command = pattern.tqreplace("%l", list.join(" ")); if (raw) m_server->queue(command); @@ -688,7 +688,7 @@ void Channel::popupCommand(int id) for (unsigned int index = 0; index<patternList.count(); index++) { command = patternList[index]; - command.replace("%u", (*it)); + command.tqreplace("%u", (*it)); if (raw) m_server->queue(command); @@ -776,7 +776,7 @@ void Channel::completeNick() if(Preferences::nickCompletionMode() == 1) { TQString nicksFound = found.join(" "); - appendServerMessage(i18n("Completion"), i18n("Possible completions: %1.").arg(nicksFound)); + appendServerMessage(i18n("Completion"), i18n("Possible completions: %1.").tqarg(nicksFound)); } else { @@ -796,7 +796,7 @@ void Channel::completeNick() { nick = it.current(); - if(nick->getChannelNick()->getNickname().startsWith(pattern, Preferences::nickCompletionCaseSensitive()) && + if(nick->getChannelNick()->getNickname().tqstartsWith(pattern, Preferences::nickCompletionCaseSensitive()) && (nick->getChannelNick()->timeStamp() > timeStamp)) { timeStamp = nick->getChannelNick()->timeStamp(); @@ -817,12 +817,12 @@ void Channel::completeNick() { TQString lookNick = nicknameList.at(completionPosition)->getChannelNick()->getNickname(); - if(!prefixCharacter.isEmpty() && lookNick.contains(prefixCharacter)) + if(!prefixCharacter.isEmpty() && lookNick.tqcontains(prefixCharacter)) { lookNick = lookNick.section( prefixCharacter,1 ); } - if(lookNick.startsWith(pattern, Preferences::nickCompletionCaseSensitive())) + if(lookNick.tqstartsWith(pattern, Preferences::nickCompletionCaseSensitive())) { foundNick = lookNick; } @@ -904,7 +904,7 @@ bool Channel::autoJoin() Konversation::ChannelList channelList = m_server->getServerGroup()->channelList(); if (!channelList.empty()) - return channelList.find(channelSettings()) != channelList.end(); + return channelList.tqfind(channelSettings()) != channelList.end(); else return false; } @@ -1174,7 +1174,7 @@ void Channel::modeButtonClicked(int id, bool on) args=limit->text(); } // put together the mode command and send it to the server queue - m_server->queue(command.arg(getName()).arg((on) ? "+" : "-").arg(mode[id]).arg(args)); + m_server->queue(command.tqarg(getName()).tqarg((on) ? "+" : "-").tqarg(mode[id]).tqarg(args)); } void Channel::quickButtonClicked(const TQString &buttonText) @@ -1183,7 +1183,7 @@ void Channel::quickButtonClicked(const TQString &buttonText) TQString out=m_server->parseWildcards(buttonText,m_server->getNickname(),getName(),getPassword(),getSelectedNickList(),TQString()); // are there any newlines in the definition? - if(out.find('\n')!=-1) + if(out.tqfind('\n')!=-1) sendChannelText(out); // single line without newline needs to be copied into input line else @@ -1247,12 +1247,12 @@ void Channel::nickRenamed(const TQString &oldNick, const NickInfo& nickInfo) if(newNick == m_server->getNickname()) /* Check newNick because m_server->getNickname() is already updated to new nick */ { setNickname(newNick); - appendCommandMessage(i18n("Nick"),i18n("You are now known as %1.").arg(newNick), false, true, true); + appendCommandMessage(i18n("Nick"),i18n("You are now known as %1.").tqarg(newNick), false, true, true); } else { /* No, must've been someone else */ - appendCommandMessage(i18n("Nick"),i18n("%1 is now known as %2.").arg(oldNick).arg(newNick),false); + appendCommandMessage(i18n("Nick"),i18n("%1 is now known as %2.").tqarg(oldNick).tqarg(newNick),false); } nicknameListView->sort(); @@ -1265,8 +1265,8 @@ void Channel::joinNickname(ChannelNickPtr channelNick) { m_joined = true; emit joined(this); - appendCommandMessage(i18n("Join"),i18n("%1 is the channel and %2 is our hostmask", - "You have joined the channel %1 (%2).").arg(getName()).arg(channelNick->getHostmask()),false, false, true); + appendCommandMessage(i18n("Join"),i18n("%1 is the channel and %2 is our hosttqmask", + "You have joined the channel %1 (%2).").tqarg(getName()).tqarg(channelNick->getHosttqmask()),false, false, true); m_ownChannelNick = channelNick; connect(m_ownChannelNick, TQT_SIGNAL(channelNickChanged()), TQT_SLOT(refreshModeButtons())); refreshModeButtons(); @@ -1281,9 +1281,9 @@ void Channel::joinNickname(ChannelNickPtr channelNick) else { TQString nick = channelNick->getNickname(); - TQString hostname = channelNick->getHostmask(); - appendCommandMessage(i18n("Join"), i18n("%1 is the nick joining and %2 the hostmask of that nick", - "%1 has joined this channel (%2).").arg(nick).arg(hostname),false, false); + TQString hostname = channelNick->getHosttqmask(); + appendCommandMessage(i18n("Join"), i18n("%1 is the nick joining and %2 the hosttqmask of that nick", + "%1 has joined this channel (%2).").tqarg(nick).tqarg(hostname),false, false); addNickname(channelNick); } } @@ -1295,7 +1295,7 @@ void Channel::removeNick(ChannelNickPtr channelNick, const TQString &reason, boo if(!displayReason.isEmpty()) { // if the reason contains text markup characters, play it safe and reset all - if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1) + if(displayReason.tqfind(TQRegExp("[\\0000-\\0037]")) != -1) displayReason += "\017"; } @@ -1307,15 +1307,15 @@ void Channel::removeNick(ChannelNickPtr channelNick, const TQString &reason, boo if (displayReason.isEmpty()) appendCommandMessage(i18n("Quit"), i18n("You have left this server."), false); else - appendCommandMessage(i18n("Quit"), i18n("%1 adds the reason", "You have left this server (%1).").arg(displayReason), false); + appendCommandMessage(i18n("Quit"), i18n("%1 adds the reason", "You have left this server (%1).").tqarg(displayReason), false); } else { if (displayReason.isEmpty()) - appendCommandMessage(i18n("Part"), i18n("You have left channel %1.").arg(getName()), false); + appendCommandMessage(i18n("Part"), i18n("You have left channel %1.").tqarg(getName()), false); else appendCommandMessage(i18n("Part"), i18n("%1 adds the channel and %2 the reason", - "You have left channel %1 (%2).").arg(getName()).arg(displayReason), false); + "You have left channel %1 (%2).").tqarg(getName()).tqarg(displayReason), false); } @@ -1326,18 +1326,18 @@ void Channel::removeNick(ChannelNickPtr channelNick, const TQString &reason, boo if (quit) { if (displayReason.isEmpty()) - appendCommandMessage(i18n("Quit"), i18n("%1 has left this server.").arg(channelNick->getNickname()), false); + appendCommandMessage(i18n("Quit"), i18n("%1 has left this server.").tqarg(channelNick->getNickname()), false); else appendCommandMessage(i18n("Quit"), i18n("%1 adds the nick and %2 the reason", - "%1 has left this server (%2).").arg(channelNick->getNickname()).arg(displayReason), false); + "%1 has left this server (%2).").tqarg(channelNick->getNickname()).tqarg(displayReason), false); } else { if (displayReason.isEmpty()) - appendCommandMessage(i18n("Part"), i18n("%1 has left this channel.").arg(channelNick->getNickname()), false); + appendCommandMessage(i18n("Part"), i18n("%1 has left this channel.").tqarg(channelNick->getNickname()), false); else appendCommandMessage(i18n("Part"), i18n("%1 adds the nick and %2 the reason", - "%1 has left this channel (%2).").arg(channelNick->getNickname()).arg(displayReason), false); + "%1 has left this channel (%2).").tqarg(channelNick->getNickname()).tqarg(displayReason), false); } if(channelNick->isAnyTypeOfOp()) @@ -1366,7 +1366,7 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const if(!displayReason.isEmpty()) { // if the reason contains text markup characters, play it safe and reset all - if(displayReason.find(TQRegExp("[\\0000-\\0037]")) != -1) + if(displayReason.tqfind(TQRegExp("[\\0000-\\0037]")) != -1) displayReason += "\017"; } @@ -1375,10 +1375,10 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const if(kicker == m_server->getNickname()) { if (displayReason.isEmpty()) - appendCommandMessage(i18n("Kick"), i18n("You have kicked yourself from channel %1.").arg(getName())); + appendCommandMessage(i18n("Kick"), i18n("You have kicked yourself from channel %1.").tqarg(getName())); else appendCommandMessage(i18n("Kick"), i18n("%1 adds the channel and %2 the reason", - "You have kicked yourself from channel %1 (%2).").arg(getName()).arg(displayReason)); + "You have kicked yourself from channel %1 (%2).").tqarg(getName()).tqarg(displayReason)); } else { @@ -1386,13 +1386,13 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const { appendCommandMessage(i18n("Kick"), i18n("%1 adds the channel, %2 adds the kicker", "You have been kicked from channel %1 by %2.") - .arg(getName()).arg(kicker), true); + .tqarg(getName()).tqarg(kicker), true); } else { appendCommandMessage(i18n("Kick"), i18n("%1 adds the channel, %2 the kicker and %3 the reason", "You have been kicked from channel %1 by %2 (%3).") - .arg(getName()).arg(kicker).arg(displayReason), true); + .tqarg(getName()).tqarg(kicker).tqarg(displayReason), true); } KonversationApplication::instance()->notificationHandler()->kick(this,getName(), kicker); @@ -1412,10 +1412,10 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const if(kicker == m_server->getNickname()) { if (displayReason.isEmpty()) - appendCommandMessage(i18n("Kick"), i18n("You have kicked %1 from the channel.").arg(channelNick->getNickname())); + appendCommandMessage(i18n("Kick"), i18n("You have kicked %1 from the channel.").tqarg(channelNick->getNickname())); else appendCommandMessage(i18n("Kick"), i18n("%1 adds the kicked nick and %2 the reason", - "You have kicked %1 from the channel (%2).").arg(channelNick->getNickname()).arg(displayReason), true); + "You have kicked %1 from the channel (%2).").tqarg(channelNick->getNickname()).tqarg(displayReason), true); } else { @@ -1423,13 +1423,13 @@ void Channel::kickNick(ChannelNickPtr channelNick, const TQString &kicker, const { appendCommandMessage(i18n("Kick"), i18n("%1 adds the kicked nick, %2 adds the kicker", "%1 has been kicked from the channel by %2.") - .arg(channelNick->getNickname()).arg(kicker), true); + .tqarg(channelNick->getNickname()).tqarg(kicker), true); } else { appendCommandMessage(i18n("Kick"), i18n("%1 adds the kicked nick, %2 the kicker and %3 the reason", "%1 has been kicked from the channel by %2 (%3).") - .arg(channelNick->getNickname()).arg(kicker).arg(displayReason), true); + .tqarg(channelNick->getNickname()).tqarg(kicker).tqarg(displayReason), true); } } @@ -1511,7 +1511,7 @@ void Channel::emitUpdateInfo() void Channel::setTopic(const TQString &newTopic) { - appendCommandMessage(i18n("Topic"), i18n("The channel topic is \"%1\".").arg(newTopic)); + appendCommandMessage(i18n("Topic"), i18n("The channel topic is \"%1\".").tqarg(newTopic)); TQString topic = Konversation::removeIrcMarkup(newTopic); topicLine->setText(topic); topicAuthorUnknown=true; // if we only get called with a topic, it was a 332, which usually has a 333 next @@ -1521,7 +1521,7 @@ void Channel::setTopic(const TQString &newTopic) if(m_topicHistory.first().section(' ', 2) != newTopic) { - m_topicHistory.prepend(TQString("%1 "+i18n("unknown")+" %2").arg(TQDateTime::currentDateTime().toTime_t()).arg(newTopic)); + m_topicHistory.prepend(TQString("%1 "+i18n("unknown")+" %2").tqarg(TQDateTime::tqcurrentDateTime().toTime_t()).tqarg(newTopic)); emit topicHistoryChanged(); } } @@ -1530,14 +1530,14 @@ void Channel::setTopic(const TQString &nickname, const TQString &newTopic) // Ov { if(nickname == m_server->getNickname()) { - appendCommandMessage(i18n("Topic"), i18n("You set the channel topic to \"%1\".").arg(newTopic)); + appendCommandMessage(i18n("Topic"), i18n("You set the channel topic to \"%1\".").tqarg(newTopic)); } else { - appendCommandMessage(i18n("Topic"), i18n("%1 sets the channel topic to \"%2\".").arg(nickname).arg(newTopic)); + appendCommandMessage(i18n("Topic"), i18n("%1 sets the channel topic to \"%2\".").tqarg(nickname).tqarg(newTopic)); } - m_topicHistory.prepend(TQString("%1 %2 %3").arg(TQDateTime::currentDateTime().toTime_t()).arg(nickname).arg(newTopic)); + m_topicHistory.prepend(TQString("%1 %2 %3").tqarg(TQDateTime::tqcurrentDateTime().toTime_t()).tqarg(nickname).tqarg(newTopic)); TQString topic = Konversation::removeIrcMarkup(newTopic); topicLine->setText(topic); @@ -1557,11 +1557,11 @@ TQString Channel::getTopic() void Channel::setTopicAuthor(const TQString& newAuthor, TQDateTime time) { if (time.isNull() || !time.isValid()) - time=TQDateTime::currentDateTime(); + time=TQDateTime::tqcurrentDateTime(); if(topicAuthorUnknown) { - m_topicHistory[0] = TQString("%1").arg(time.toTime_t()) + ' ' + newAuthor + ' ' + m_topicHistory[0].section(' ', 2); + m_topicHistory[0] = TQString("%1").tqarg(time.toTime_t()) + ' ' + newAuthor + ' ' + m_topicHistory[0].section(' ', 2); topicAuthorUnknown = false; emit topicHistoryChanged(); @@ -1599,14 +1599,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You give channel owner privileges to yourself."); else - message=i18n("You give channel owner privileges to %1.").arg(parameter); + message=i18n("You give channel owner privileges to %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 gives channel owner privileges to you.").arg(sourceNick); + message=i18n("%1 gives channel owner privileges to you.").tqarg(sourceNick); else - message=i18n("%1 gives channel owner privileges to %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 gives channel owner privileges to %2.").tqarg(sourceNick).tqarg(parameter); } } else @@ -1616,14 +1616,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You take channel owner privileges from yourself."); else - message=i18n("You take channel owner privileges from %1.").arg(parameter); + message=i18n("You take channel owner privileges from %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 takes channel owner privileges from you.").arg(sourceNick); + message=i18n("%1 takes channel owner privileges from you.").tqarg(sourceNick); else - message=i18n("%1 takes channel owner privileges from %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 takes channel owner privileges from %2.").tqarg(sourceNick).tqarg(parameter); } } if(parameterChannelNick) @@ -1642,14 +1642,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You give channel admin privileges to yourself."); else - message=i18n("You give channel admin privileges to %1.").arg(parameter); + message=i18n("You give channel admin privileges to %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 gives channel admin privileges to you.").arg(sourceNick); + message=i18n("%1 gives channel admin privileges to you.").tqarg(sourceNick); else - message=i18n("%1 gives channel admin privileges to %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 gives channel admin privileges to %2.").tqarg(sourceNick).tqarg(parameter); } } else @@ -1659,14 +1659,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You take channel admin privileges from yourself."); else - message=i18n("You take channel admin privileges from %1.").arg(parameter); + message=i18n("You take channel admin privileges from %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 takes channel admin privileges from you.").arg(sourceNick); + message=i18n("%1 takes channel admin privileges from you.").tqarg(sourceNick); else - message=i18n("%1 takes channel admin privileges from %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 takes channel admin privileges from %2.").tqarg(sourceNick).tqarg(parameter); } } if(parameterChannelNick) @@ -1685,14 +1685,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You give channel operator privileges to yourself."); else - message=i18n("You give channel operator privileges to %1.").arg(parameter); + message=i18n("You give channel operator privileges to %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 gives channel operator privileges to you.").arg(sourceNick); + message=i18n("%1 gives channel operator privileges to you.").tqarg(sourceNick); else - message=i18n("%1 gives channel operator privileges to %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 gives channel operator privileges to %2.").tqarg(sourceNick).tqarg(parameter); } } else @@ -1702,14 +1702,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You take channel operator privileges from yourself."); else - message=i18n("You take channel operator privileges from %1.").arg(parameter); + message=i18n("You take channel operator privileges from %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 takes channel operator privileges from you.").arg(sourceNick); + message=i18n("%1 takes channel operator privileges from you.").tqarg(sourceNick); else - message=i18n("%1 takes channel operator privileges from %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 takes channel operator privileges from %2.").tqarg(sourceNick).tqarg(parameter); } } if(parameterChannelNick) @@ -1728,14 +1728,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You give channel halfop privileges to yourself."); else - message=i18n("You give channel halfop privileges to %1.").arg(parameter); + message=i18n("You give channel halfop privileges to %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 gives channel halfop privileges to you.").arg(sourceNick); + message=i18n("%1 gives channel halfop privileges to you.").tqarg(sourceNick); else - message=i18n("%1 gives channel halfop privileges to %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 gives channel halfop privileges to %2.").tqarg(sourceNick).tqarg(parameter); } } else @@ -1745,14 +1745,14 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(toMe) message=i18n("You take channel halfop privileges from yourself."); else - message=i18n("You take channel halfop privileges from %1.").arg(parameter); + message=i18n("You take channel halfop privileges from %1.").tqarg(parameter); } else { if(toMe) - message=i18n("%1 takes channel halfop privileges from you.").arg(sourceNick); + message=i18n("%1 takes channel halfop privileges from you.").tqarg(sourceNick); else - message=i18n("%1 takes channel halfop privileges from %2.").arg(sourceNick).arg(parameter); + message=i18n("%1 takes channel halfop privileges from %2.").tqarg(sourceNick).tqarg(parameter); } } if(parameterChannelNick) @@ -1771,12 +1771,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(fromMe) { if(toMe) message=i18n("You give yourself permission to talk."); - else message=i18n("You give %1 permission to talk.").arg(parameter); + else message=i18n("You give %1 permission to talk.").tqarg(parameter); } else { - if(toMe) message=i18n("%1 gives you permission to talk.").arg(sourceNick); - else message=i18n("%1 gives %2 permission to talk.").arg(sourceNick).arg(parameter); + if(toMe) message=i18n("%1 gives you permission to talk.").tqarg(sourceNick); + else message=i18n("%1 gives %2 permission to talk.").tqarg(sourceNick).tqarg(parameter); } } else @@ -1784,12 +1784,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(fromMe) { if(toMe) message=i18n("You take the permission to talk from yourself."); - else message=i18n("You take the permission to talk from %1.").arg(parameter); + else message=i18n("You take the permission to talk from %1.").tqarg(parameter); } else { - if(toMe) message=i18n("%1 takes the permission to talk from you.").arg(sourceNick); - else message=i18n("%1 takes the permission to talk from %2.").arg(sourceNick).arg(parameter); + if(toMe) message=i18n("%1 takes the permission to talk from you.").tqarg(sourceNick); + else message=i18n("%1 takes the permission to talk from %2.").tqarg(sourceNick).tqarg(parameter); } } if(parameterChannelNick) @@ -1803,12 +1803,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'no colors allowed'."); - else message=i18n("%1 sets the channel mode to 'no colors allowed'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'no colors allowed'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You set the channel mode to 'allow color codes'."); - else message=i18n("%1 sets the channel mode to 'allow color codes'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'allow color codes'.").tqarg(sourceNick); } break; @@ -1816,12 +1816,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'invite only'."); - else message=i18n("%1 sets the channel mode to 'invite only'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'invite only'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You remove the 'invite only' mode from the channel."); - else message=i18n("%1 removes the 'invite only' mode from the channel.").arg(sourceNick); + else message=i18n("%1 removes the 'invite only' mode from the channel.").tqarg(sourceNick); } modeI->setDown(plus); break; @@ -1830,12 +1830,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'moderated'."); - else message=i18n("%1 sets the channel mode to 'moderated'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'moderated'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You set the channel mode to 'unmoderated'."); - else message=i18n("%1 sets the channel mode to 'unmoderated'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'unmoderated'.").tqarg(sourceNick); } modeM->setDown(plus); break; @@ -1844,12 +1844,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'no messages from outside'."); - else message=i18n("%1 sets the channel mode to 'no messages from outside'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'no messages from outside'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You set the channel mode to 'allow messages from outside'."); - else message=i18n("%1 sets the channel mode to 'allow messages from outside'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'allow messages from outside'.").tqarg(sourceNick); } modeN->setDown(plus); break; @@ -1858,12 +1858,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'private'."); - else message=i18n("%1 sets the channel mode to 'private'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'private'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You set the channel mode to 'public'."); - else message=i18n("%1 sets the channel mode to 'public'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'public'.").tqarg(sourceNick); } modeP->setDown(plus); if(plus) modeS->setDown(false); @@ -1873,12 +1873,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You set the channel mode to 'secret'."); - else message=i18n("%1 sets the channel mode to 'secret'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'secret'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You set the channel mode to 'visible'."); - else message=i18n("%1 sets the channel mode to 'visible'.").arg(sourceNick); + else message=i18n("%1 sets the channel mode to 'visible'.").tqarg(sourceNick); } modeS->setDown(plus); if(plus) modeP->setDown(false); @@ -1890,12 +1890,12 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const if(plus) { if(fromMe) message=i18n("You switch on 'topic protection'."); - else message=i18n("%1 switches on 'topic protection'.").arg(sourceNick); + else message=i18n("%1 switches on 'topic protection'.").tqarg(sourceNick); } else { if(fromMe) message=i18n("You switch off 'topic protection'."); - else message=i18n("%1 switches off 'topic protection'.").arg(sourceNick); + else message=i18n("%1 switches off 'topic protection'.").tqarg(sourceNick); } modeT->setDown(plus); break; @@ -1903,13 +1903,13 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const case 'k': if(plus) { - if(fromMe) message=i18n("You set the channel key to '%1'.").arg(parameter); - else message=i18n("%1 sets the channel key to '%2'.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You set the channel key to '%1'.").tqarg(parameter); + else message=i18n("%1 sets the channel key to '%2'.").tqarg(sourceNick).tqarg(parameter); } else { if(fromMe) message=i18n("You remove the channel key."); - else message=i18n("%1 removes the channel key.").arg(sourceNick); + else message=i18n("%1 removes the channel key.").tqarg(sourceNick); } modeK->setDown(plus); break; @@ -1917,13 +1917,13 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const case 'l': if(plus) { - if(fromMe) message=i18n("You set the channel limit to %1 nicks.").arg(parameter); - else message=i18n("%1 sets the channel limit to %2 nicks.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You set the channel limit to %1 nicks.").tqarg(parameter); + else message=i18n("%1 sets the channel limit to %2 nicks.").tqarg(sourceNick).tqarg(parameter); } else { if(fromMe) message=i18n("You remove the channel limit."); - else message=i18n("%1 removes the channel limit.").arg(sourceNick); + else message=i18n("%1 removes the channel limit.").tqarg(sourceNick); } modeL->setDown(plus); if(plus) limit->setText(parameter); @@ -1933,51 +1933,51 @@ void Channel::updateMode(const TQString& sourceNick, char mode, bool plus, const case 'b': if(plus) { - if(fromMe) message=i18n("You set a ban on %1.").arg(parameter); - else message=i18n("%1 sets a ban on %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You set a ban on %1.").tqarg(parameter); + else message=i18n("%1 sets a ban on %2.").tqarg(sourceNick).tqarg(parameter); } else { - if(fromMe) message=i18n("You remove the ban on %1.").arg(parameter); - else message=i18n("%1 removes the ban on %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You remove the ban on %1.").tqarg(parameter); + else message=i18n("%1 removes the ban on %2.").tqarg(sourceNick).tqarg(parameter); } break; case 'e': if(plus) { - if(fromMe) message=i18n("You set a ban exception on %1.").arg(parameter); - else message=i18n("%1 sets a ban exception on %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You set a ban exception on %1.").tqarg(parameter); + else message=i18n("%1 sets a ban exception on %2.").tqarg(sourceNick).tqarg(parameter); } else { - if(fromMe) message=i18n("You remove the ban exception on %1.").arg(parameter); - else message=i18n("%1 removes the ban exception on %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You remove the ban exception on %1.").tqarg(parameter); + else message=i18n("%1 removes the ban exception on %2.").tqarg(sourceNick).tqarg(parameter); } break; case 'I': if(plus) { - if(fromMe) message=i18n("You set invitation mask %1.").arg(parameter); - else message=i18n("%1 sets invitation mask %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You set invitation tqmask %1.").tqarg(parameter); + else message=i18n("%1 sets invitation tqmask %2.").tqarg(sourceNick).tqarg(parameter); } else { - if(fromMe) message=i18n("You remove the invitation mask %1.").arg(parameter); - else message=i18n("%1 removes the invitation mask %2.").arg(sourceNick).arg(parameter); + if(fromMe) message=i18n("You remove the invitation tqmask %1.").tqarg(parameter); + else message=i18n("%1 removes the invitation tqmask %2.").tqarg(sourceNick).tqarg(parameter); } break; default: if(plus) { - if(fromMe) message=i18n("You set channel mode +%1").arg(mode); - else message=i18n("%1 sets channel mode +%2").arg(sourceNick).arg(mode); + if(fromMe) message=i18n("You set channel mode +%1").tqarg(mode); + else message=i18n("%1 sets channel mode +%2").tqarg(sourceNick).tqarg(mode); } else { - if (fromMe) message=i18n("You set channel mode -%1").arg(mode); - else message= i18n("%1 sets channel mode -%2").arg(sourceNick).arg(mode); + if (fromMe) message=i18n("You set channel mode -%1").tqarg(mode); + else message= i18n("%1 sets channel mode -%2").tqarg(sourceNick).tqarg(mode); } } @@ -2067,11 +2067,11 @@ void Channel::updateModeWidgets(char mode, bool plus, const TQString ¶meter) } else { - TQStringList removable = m_modeList.grep(TQRegExp(TQString("^%1.*").arg(mode))); + TQStringList removable = m_modeList.grep(TQRegExp(TQString("^%1.*").tqarg(mode))); for(TQStringList::iterator it = removable.begin(); it != removable.end(); ++it) { - m_modeList.remove(m_modeList.find((*it))); + m_modeList.remove(m_modeList.tqfind((*it))); } } emit modesChanged(); @@ -2114,9 +2114,9 @@ void Channel::updateQuickButtons(const TQStringList &newButtonList) quickButton->setDefinition(buttonText); // Add tool tips - TQString toolTip=buttonText.replace("&","&"). - replace("<","<"). - replace(">",">"); + TQString toolTip=buttonText.tqreplace("&","&"). + tqreplace("<","<"). + tqreplace(">",">"); TQToolTip::add(quickButton,toolTip); @@ -2129,7 +2129,7 @@ void Channel::updateQuickButtons(const TQStringList &newButtonList) void Channel::showQuickButtons(bool show) { - // Qt does not redraw the buttons properly when they are not on screen + // TQt does not redraw the buttons properly when they are not on screen // while getting hidden, so we remember the "soon to be" state here. if(isHidden() || !buttonsGrid) { @@ -2147,7 +2147,7 @@ void Channel::showQuickButtons(bool show) void Channel::showModeButtons(bool show) { - // Qt does not redraw the buttons properly when they are not on screen + // TQt does not redraw the buttons properly when they are not on screen // while getting hidden, so we remember the "soon to be" state here. if(isHidden()) { @@ -2160,7 +2160,7 @@ void Channel::showModeButtons(bool show) { topicSplitterHidden = false; modeBox->show(); - modeBox->parentWidget()->show(); + modeBox->tqparentWidget()->show(); } else { @@ -2169,7 +2169,7 @@ void Channel::showModeButtons(bool show) if(topicLine->isHidden()) { topicSplitterHidden = true; - modeBox->parentWidget()->hide(); + modeBox->tqparentWidget()->hide(); } } } @@ -2177,7 +2177,7 @@ void Channel::showModeButtons(bool show) void Channel::indicateAway(bool show) { - // Qt does not redraw the label properly when they are not on screen + // TQt does not redraw the label properly when they are not on screen // while getting hidden, so we remember the "soon to be" state here. if(isHidden()) { @@ -2253,8 +2253,8 @@ void Channel::updateAppearance() } else { - fg=colorGroup().foreground(); - bg=colorGroup().base(); + fg=tqcolorGroup().foreground(); + bg=tqcolorGroup().base(); abg=KGlobalSettings::alternateBackgroundColor(); } @@ -2393,12 +2393,12 @@ void Channel::refreshModeButtons() TQString opOnly; if(!enable) opOnly = i18n("You have to be an operator to change this."); - TQToolTip::add(modeT, i18n("Topic can be changed by channel operator only. %1").arg(opOnly)); - TQToolTip::add(modeN, i18n("No messages to channel from clients on the outside. %1").arg(opOnly)); - TQToolTip::add(modeS, i18n("Secret channel. %1").arg(opOnly)); - TQToolTip::add(modeI, i18n("Invite only channel. %1").arg(opOnly)); - TQToolTip::add(modeP, i18n("Private channel. %1").arg(opOnly)); - TQToolTip::add(modeM, i18n("Moderated channel. %1").arg(opOnly)); + TQToolTip::add(modeT, i18n("Topic can be changed by channel operator only. %1").tqarg(opOnly)); + TQToolTip::add(modeN, i18n("No messages to channel from clients on the outside. %1").tqarg(opOnly)); + TQToolTip::add(modeS, i18n("Secret channel. %1").tqarg(opOnly)); + TQToolTip::add(modeI, i18n("Invite only channel. %1").tqarg(opOnly)); + TQToolTip::add(modeP, i18n("Private channel. %1").tqarg(opOnly)); + TQToolTip::add(modeM, i18n("Moderated channel. %1").tqarg(opOnly)); TQToolTip::add(modeK, i18n("Protect channel with a password.")); TQToolTip::add(modeL, i18n("Set user limit to channel.")); @@ -2423,7 +2423,7 @@ void Channel::autoUserhost() while((nick = it.current()) != 0) { - if(nick->getChannelNick()->getHostmask().isEmpty()) + if(nick->getChannelNick()->getHosttqmask().isEmpty()) { if(limit--) nickString = nickString + nick->getChannelNick()->getNickname() + ' '; else break; @@ -2448,17 +2448,17 @@ void Channel::setAutoUserhost(bool state) // if the column was actually gone (just to be sure) ... if(nicknameListView->columns()==2) { - // re-add the hostmask column + // re-add the hosttqmask column nicknameListView->addColumn(TQString()); nicknameListView->setColumnWidthMode(2,KListView::Maximum); nicknameListView->setResizeMode(TQListView::NoColumn); - // re-add already known hostmasks + // re-add already known hosttqmasks TQListViewItem* item=nicknameListView->itemAtIndex(0); while(item) { Nick* lookNick=getNickByName(item->text(1)); - if(lookNick) item->setText(2,lookNick->getChannelNick()->getHostmask()); + if(lookNick) item->setText(2,lookNick->getChannelNick()->getHosttqmask()); item=item->itemBelow(); } } @@ -2538,7 +2538,7 @@ bool Channel::closeYourself(bool confirm) { int result=KMessageBox::Continue; if (confirm) - result = KMessageBox::warningContinueCancel(this, i18n("Do you want to leave %1?").arg(getName()), + result = KMessageBox::warningContinueCancel(this, i18n("Do you want to leave %1?").tqarg(getName()), i18n("Leave Channel"), i18n("Leave"), "QuitChannelTab"); if (result==KMessageBox::Continue) @@ -2570,7 +2570,7 @@ void Channel::setActive(bool active) purgeNicks(); getTextView()->setNickAndChannelContextMenusEnabled(false); nicknameCombobox->setEnabled(false); - topicLine->setText(TQString::null); + topicLine->setText(TQString()); clearModeList(); clearBanList(); } @@ -2583,7 +2583,7 @@ void Channel::showTopic(bool show) topicSplitterHidden = false; topicLine->show(); m_topicButton->show(); - topicLine->parentWidget()->show(); + topicLine->tqparentWidget()->show(); } else { @@ -2593,7 +2593,7 @@ void Channel::showTopic(bool show) if(modeBox->isHidden()) { topicSplitterHidden = true; - topicLine->parentWidget()->hide(); + topicLine->tqparentWidget()->hide(); } } } @@ -2668,7 +2668,7 @@ TQString Channel::getChannelEncoding() // virtual TQString Channel::getChannelEncodingDefaultDesc() // virtual { - return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName()); + return i18n("Identity Default ( %1 )").tqarg(getServer()->getIdentity()->getCodecName()); } void Channel::showNicknameBox(bool show) @@ -2733,7 +2733,7 @@ void Channel::setIdentity(const IdentityPtr identity) bool Channel::eventFilter(TQObject* watched, TQEvent* e) { - if((watched == nicknameListView) && (e->type() == TQEvent::Resize) && splittersInitialized && isShown()) + if((TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(nicknameListView)) && (e->type() == TQEvent::Resize) && splittersInitialized && isShown()) { if (!topicSplitterHidden && !channelSplitterHidden) { @@ -2797,7 +2797,7 @@ void Channel::append(const TQString& nickname, const TQString& message) Nick* nick = getNickByName(nickname); if(nick) { - nick->getChannelNick()->setTimeStamp(TQDateTime::currentDateTime().toTime_t()); + nick->getChannelNick()->setTimeStamp(TQDateTime::tqcurrentDateTime().toTime_t()); } } @@ -2811,7 +2811,7 @@ void Channel::appendAction(const TQString& nickname, const TQString& message) Nick* nick = getNickByName(nickname); if(nick) { - nick->getChannelNick()->setTimeStamp(TQDateTime::currentDateTime().toTime_t()); + nick->getChannelNick()->setTimeStamp(TQDateTime::tqcurrentDateTime().toTime_t()); } } @@ -2871,7 +2871,7 @@ TQString NickList::completeNick(const TQString& pattern, bool& complete, TQStrin NickList foundNicks; foundNicks.setCompareMethod(NickList::TimeStamp); - if((pattern.find(TQRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum) + if((pattern.tqfind(TQRegExp("^(\\d|\\w)")) != -1) && skipNonAlfaNum) { prefix = "^([^\\d\\w]|[\\_]){0,}"; } @@ -2884,12 +2884,12 @@ TQString NickList::completeNick(const TQString& pattern, bool& complete, TQStrin { newNick = it.current()->getChannelNick()->getNickname(); - if(!prefix.isEmpty() && newNick.contains(prefixCharacter)) + if(!prefix.isEmpty() && newNick.tqcontains(prefixCharacter)) { newNick = newNick.section( prefixCharacter,1 ); } - if(newNick.find(regexp) != -1) + if(newNick.tqfind(regexp) != -1) { foundNicks.append(it.current()); } @@ -2956,5 +2956,5 @@ bool NickList::containsNick(const TQString& nickname) #include "channel.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/channel.h b/konversation/src/channel.h index 1fd6ff5..9d436ef 100644 --- a/konversation/src/channel.h +++ b/konversation/src/channel.h @@ -74,9 +74,10 @@ class NickList : public TQPtrList<Nick> class Channel : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit Channel(TQWidget* parent, TQString name); + explicit Channel(TQWidget* tqparent, TQString name); ~Channel(); //META virtual bool canBeFrontView(); diff --git a/konversation/src/channeldialog.cpp b/konversation/src/channeldialog.cpp index f6cc746..c539cee 100644 --- a/konversation/src/channeldialog.cpp +++ b/konversation/src/channeldialog.cpp @@ -23,8 +23,8 @@ namespace Konversation { - ChannelDialog::ChannelDialog(const TQString& title, TQWidget *parent, const char *name) - : KDialogBase(Plain, title, Ok|Cancel, Ok, parent, name) + ChannelDialog::ChannelDialog(const TQString& title, TQWidget *tqparent, const char *name) + : KDialogBase(Plain, title, Ok|Cancel, Ok, tqparent, name) { TQFrame* mainWidget = plainPage(); TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 2, 0, spacingHint()); diff --git a/konversation/src/channeldialog.h b/konversation/src/channeldialog.h index 1b57a76..a832fb1 100644 --- a/konversation/src/channeldialog.h +++ b/konversation/src/channeldialog.h @@ -25,9 +25,10 @@ namespace Konversation class ChannelDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit ChannelDialog(const TQString& title, TQWidget *parent = 0, const char *name = 0); + explicit ChannelDialog(const TQString& title, TQWidget *tqparent = 0, const char *name = 0); ~ChannelDialog(); void setChannelSettings(const ChannelSettings& channel); diff --git a/konversation/src/channellistpanel.cpp b/konversation/src/channellistpanel.cpp index d55ead5..671ce61 100644 --- a/konversation/src/channellistpanel.cpp +++ b/konversation/src/channellistpanel.cpp @@ -41,7 +41,7 @@ #include <kdeversion.h> -ChannelListPanel::ChannelListPanel(TQWidget* parent) : ChatWindow(parent) +ChannelListPanel::ChannelListPanel(TQWidget* tqparent) : ChatWindow(tqparent) { setType(ChatWindow::ChannelList); setName(i18n("Channel List")); @@ -192,7 +192,7 @@ void ChannelListPanel::saveList() if(!fileName.isEmpty()) { - // first find the longest channel name and nick number for clean table layouting + // first find the longest channel name and nick number for clean table tqlayouting unsigned int maxChannelWidth=0; unsigned int maxNicksWidth=0; @@ -222,8 +222,8 @@ void ChannelListPanel::saveList() TQTextStream stream(&listFile); TQString header(i18n("Konversation Channel List: %1 - %2\n\n") - .arg(m_server->getServerName()) - .arg(TQDateTime::currentDateTime().toString())); + .tqarg(m_server->getServerName()) + .tqarg(TQDateTime::tqcurrentDateTime().toString())); // send header to stream stream << header; @@ -236,7 +236,7 @@ void ChannelListPanel::saveList() { TQString channelName; channelName.fill(' ',maxChannelWidth); - channelName.replace(0,item->text(0).length(),item->text(0)); + channelName.tqreplace(0,item->text(0).length(),item->text(0)); TQString nicksPad; nicksPad.fill(' ',maxNicksWidth); @@ -440,12 +440,12 @@ void ChannelListPanel::applyFilterToItem(TQListViewItem* item) { if(getChannelTarget()) { - if(item->text(0).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false; + if(item->text(0).tqfind(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false; } if(getTopicTarget()) { - if(item->text(2).find(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false; + if(item->text(2).tqfind(TQRegExp(getFilterText(),false,!getRegExp()))==-1) visible=false; } } @@ -483,8 +483,8 @@ void ChannelListPanel::applyFilterClicked() void ChannelListPanel::updateUsersChannels() { - emit updateNumChannels(i18n("Channels: %1 (%2 shown)").arg(getNumChannels()).arg(getVisibleChannels())); - emit updateNumUsers(i18n("Non-unique users: %1 (%2 shown)").arg(getNumUsers()).arg(getVisibleUsers())); + emit updateNumChannels(i18n("Channels: %1 (%2 shown)").tqarg(getNumChannels()).tqarg(getVisibleChannels())); + emit updateNumUsers(i18n("Non-unique users: %1 (%2 shown)").tqarg(getNumUsers()).tqarg(getVisibleUsers())); } bool ChannelListPanel::closeYourself() @@ -537,8 +537,8 @@ void ChannelListPanel::contextMenu (KListView* /* l */, TQListViewItem* i, const else if(href.startsWith("ftp.")) href="ftp://"+href; // Replace all spaces with %20 in href - href.replace(' ', "%20"); - href.replace('&', "&&"); + href.tqreplace(' ', "%20"); + href.tqreplace('&', "&&"); // next search begins right after the link pos+=url.length(); @@ -561,8 +561,8 @@ void ChannelListPanel::contextMenu (KListView* /* l */, TQListViewItem* i, const int selected = showURLmenu->exec(p); if (selected!=-1) { - TQMenuItem* item = showURLmenu->findItem( selected ); - new KRun(KURL(item->text().replace("&&","&"))); + TQMenuItem* item = showURLmenu->tqfindItem( selected ); + new KRun(KURL(item->text().tqreplace("&&","&"))); } delete showURLmenu; @@ -585,7 +585,7 @@ void ChannelListPanel::serverOnline(bool online) void ChannelListPanel::emitUpdateInfo() { TQString info; - info = i18n("Channel List for %1").arg(m_server->getDisplayName()); + info = i18n("Channel List for %1").tqarg(m_server->getDisplayName()); emit updateInfo(info); } diff --git a/konversation/src/channellistpanel.h b/konversation/src/channellistpanel.h index 7f82f16..9c72524 100644 --- a/konversation/src/channellistpanel.h +++ b/konversation/src/channellistpanel.h @@ -34,9 +34,10 @@ class ChannelListViewItem; class ChannelListPanel : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit ChannelListPanel(TQWidget* parent); + explicit ChannelListPanel(TQWidget* tqparent); ~ChannelListPanel(); virtual bool closeYourself(); diff --git a/konversation/src/channellistviewitem.cpp b/konversation/src/channellistviewitem.cpp index 4a6b0f5..2d79c4b 100644 --- a/konversation/src/channellistviewitem.cpp +++ b/konversation/src/channellistviewitem.cpp @@ -15,8 +15,8 @@ #include "channellistviewitem.h" -ChannelListViewItem::ChannelListViewItem(KListView* parent, const TQString& channel, const TQString& users, const TQString& topic) -: KListViewItem(parent,channel,users,topic) +ChannelListViewItem::ChannelListViewItem(KListView* tqparent, const TQString& channel, const TQString& users, const TQString& topic) +: KListViewItem(tqparent,channel,users,topic) { } diff --git a/konversation/src/channellistviewitem.h b/konversation/src/channellistviewitem.h index c44f9e0..99dcf3b 100644 --- a/konversation/src/channellistviewitem.h +++ b/konversation/src/channellistviewitem.h @@ -23,7 +23,7 @@ class ChannelListViewItem : public KListViewItem { public: - ChannelListViewItem(KListView* parent, const TQString& channel, const TQString& users, const TQString& topic); + ChannelListViewItem(KListView* tqparent, const TQString& channel, const TQString& users, const TQString& topic); ~ChannelListViewItem(); int compare(TQListViewItem* item, int col, bool ascending) const; diff --git a/konversation/src/channelnick.cpp b/konversation/src/channelnick.cpp index f158550..181bdbf 100644 --- a/konversation/src/channelnick.cpp +++ b/konversation/src/channelnick.cpp @@ -187,10 +187,10 @@ TQString ChannelNick::getNickname() const return TQString(); } -TQString ChannelNick::getHostmask() const +TQString ChannelNick::getHosttqmask() const { if ( this ) - return nickInfo->getHostmask(); + return nickInfo->getHosttqmask(); else return TQString(); } diff --git a/konversation/src/channelnick.h b/konversation/src/channelnick.h index f07b2bc..fe3e110 100644 --- a/konversation/src/channelnick.h +++ b/konversation/src/channelnick.h @@ -23,6 +23,7 @@ class ChannelNick : public TQObject, public KShared { Q_OBJECT + TQ_OBJECT public: ChannelNick(const NickInfoPtr& nickInfo, const bool& isop, const bool& isadmin, @@ -57,7 +58,7 @@ class ChannelNick : public TQObject, public KShared //Just calls nickInfo->getNickname() etc TQString getNickname() const; TQString loweredNickname() const; - TQString getHostmask() const; + TQString getHosttqmask() const; TQString tooltip(); private: NickInfoPtr nickInfo; diff --git a/konversation/src/channeloptionsdialog.cpp b/konversation/src/channeloptionsdialog.cpp index 5681872..e6a6ed6 100644 --- a/konversation/src/channeloptionsdialog.cpp +++ b/konversation/src/channeloptionsdialog.cpp @@ -35,7 +35,7 @@ namespace Konversation { ChannelOptionsDialog::ChannelOptionsDialog(Channel *channel) - : KDialogBase(channel, "channelOptions", false, i18n("Channel Settings for %1").arg(channel->getName()), Ok|Cancel, Ok) + : KDialogBase(channel, "channelOptions", false, i18n("Channel Settings for %1").tqarg(channel->getName()), Ok|Cancel, Ok) { Q_ASSERT(channel); m_widget = new ChannelOptionsUI(this); @@ -124,16 +124,16 @@ namespace Konversation if(tmp.isEmpty() && plus) { - m_channel->getServer()->queue(command.arg(m_channel->getName()).arg("+").arg(modeString[0]).arg(modeString.mid(1))); + m_channel->getServer()->queue(command.tqarg(m_channel->getName()).tqarg("+").tqarg(modeString[0]).tqarg(modeString.mid(1))); } else if(!tmp.isEmpty() && !plus) { //FIXME: Bahamuth requires the key parameter for -k, but ircd breaks on -l with limit number. //Hence two versions of this. if (modeString[0] == 'k') - m_channel->getServer()->queue(command.arg(m_channel->getName()).arg("-").arg(modeString[0]).arg(modeString.mid(1))); + m_channel->getServer()->queue(command.tqarg(m_channel->getName()).tqarg("-").tqarg(modeString[0]).tqarg(modeString.mid(1))); else - m_channel->getServer()->queue(command.arg(m_channel->getName()).arg("-").arg(modeString[0]).arg("")); + m_channel->getServer()->queue(command.tqarg(m_channel->getName()).tqarg("-").tqarg(modeString[0]).tqarg("")); } } hide(); @@ -160,7 +160,7 @@ namespace Konversation TQString ChannelOptionsDialog::topic() { - return m_widget->topicEdit->text().replace("\n"," "); + return m_widget->topicEdit->text().tqreplace("\n"," "); } void ChannelOptionsDialog::refreshTopicHistory() @@ -388,7 +388,7 @@ namespace Konversation void ChannelOptionsDialog::removeBan(const TQString& ban) { - delete m_widget->banList->findItem(ban, 0); + delete m_widget->banList->tqfindItem(ban, 0); } void ChannelOptionsDialog::banEdited(TQListViewItem *edited) @@ -423,7 +423,7 @@ namespace Konversation // We delete the existing item because it's possible the server may // Modify the ban causing us not to catch it. If that happens we'll be - // stuck with a stale item and a new item with the modified hostmask. + // stuck with a stale item and a new item with the modified hosttqmask. delete new_edited; } } @@ -446,7 +446,7 @@ namespace Konversation { if (m_widget->banList->renameLineEdit()->isShown()) { - TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Escape, 27, Qt::NoButton); + TQKeyEvent e(TQEvent::KeyPress, TQt::Key_Escape, 27, Qt::NoButton); KApplication::sendEvent(m_widget->banList->renameLineEdit(), &e); } @@ -459,7 +459,7 @@ namespace Konversation { if (m_widget->banList->renameLineEdit()->isShown()) { - TQKeyEvent e(TQEvent::KeyPress, Qt::Key_Return, 13, Qt::NoButton); + TQKeyEvent e(TQEvent::KeyPress, TQt::Key_Return, 13, Qt::NoButton); KApplication::sendEvent(m_widget->banList->renameLineEdit(), &e); } @@ -467,27 +467,27 @@ namespace Konversation // This is our implementation of BanListViewItem - BanListViewItem::BanListViewItem(TQListView *parent) - : KListViewItem(parent) + BanListViewItem::BanListViewItem(TQListView *tqparent) + : KListViewItem(tqparent) { m_isNewBan = 0; } - BanListViewItem::BanListViewItem(TQListView *parent, bool isNew) - : KListViewItem(parent) + BanListViewItem::BanListViewItem(TQListView *tqparent, bool isNew) + : KListViewItem(tqparent) { m_isNewBan = isNew; } - BanListViewItem::BanListViewItem (TQListView *parent, const TQString& label1, const TQString& label2, - uint timestamp) : KListViewItem(parent, label1, label2) + BanListViewItem::BanListViewItem (TQListView *tqparent, const TQString& label1, const TQString& label2, + uint timestamp) : KListViewItem(tqparent, label1, label2) { m_isNewBan = 0; m_timestamp.setTime_t(timestamp); } - BanListViewItem::BanListViewItem (TQListView *parent, bool isNew, const TQString& label1, const TQString& label2, - uint timestamp) : KListViewItem(parent, label1, label2) + BanListViewItem::BanListViewItem (TQListView *tqparent, bool isNew, const TQString& label1, const TQString& label2, + uint timestamp) : KListViewItem(tqparent, label1, label2) { m_isNewBan = isNew; m_timestamp.setTime_t(timestamp); diff --git a/konversation/src/channeloptionsdialog.h b/konversation/src/channeloptionsdialog.h index d848e1b..aa65391 100644 --- a/konversation/src/channeloptionsdialog.h +++ b/konversation/src/channeloptionsdialog.h @@ -27,6 +27,7 @@ namespace Konversation class ChannelOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: explicit ChannelOptionsDialog(Channel *channel); ~ChannelOptionsDialog(); @@ -77,10 +78,10 @@ namespace Konversation class BanListViewItem : public KListViewItem { public: - explicit BanListViewItem( TQListView *parent ); - BanListViewItem(TQListView *parent, bool isNew); - BanListViewItem(TQListView *parent, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0); - BanListViewItem (TQListView *parent, bool isNew, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0); + explicit BanListViewItem( TQListView *tqparent ); + BanListViewItem(TQListView *tqparent, bool isNew); + BanListViewItem(TQListView *tqparent, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0); + BanListViewItem (TQListView *tqparent, bool isNew, const TQString& label1, const TQString& label2 = TQString(), uint timestamp = 0); TQString getOldValue() { return m_oldValue; } TQDateTime timestamp() { return m_timestamp; } diff --git a/konversation/src/channeloptionsui.ui b/konversation/src/channeloptionsui.ui index 2c2f062..43c14df 100644 --- a/konversation/src/channeloptionsui.ui +++ b/konversation/src/channeloptionsui.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Konversation::ChannelOptionsUI</cstring> </property> @@ -25,11 +25,11 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>channelTabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>topicTab</cstring> </property> @@ -40,7 +40,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter4</cstring> </property> @@ -147,7 +147,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>modesPage</cstring> </property> @@ -158,7 +158,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>topicModeChBox</cstring> </property> @@ -169,7 +169,7 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>The <b>T</b>opic mode means that only the channel operator can change the topic for the channel.</qt></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>messageModeChBox</cstring> </property> @@ -180,7 +180,7 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p><b>N</b>o messages from outside means that users that are not in the channel cannot send messages that everybody in the channel can see. Almost all channels have this set to prevent nuisance messages.</qt></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>secretModeChBox</cstring> </property> @@ -191,7 +191,7 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>S</b>ecret channel will not show up in the channel list, nor will any user be able to see that you are in the channel with the <em>WHOIS</em> command or anything similar. Only the people that are in the same channel will know that you are in this channel, if this mode is set.</qt></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>inviteModeChBox</cstring> </property> @@ -202,7 +202,7 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>An <b>I</b>nvite only channel means that people can only join the channel if they are invited. To invite someone, a channel operator needs to issue the command<em>/invite nick</em> from within the channel.</qt></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>moderatedModeChBox</cstring> </property> @@ -213,15 +213,15 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A <b>M</b>oderated channel is one where only operators, half-operators and those with voice can talk.</qt></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>keyModeChBox</cstring> </property> @@ -246,7 +246,7 @@ the Free Software Foundation; either version 2 of the License, or <string><qt>These control the <em>mode</em> of the channel. Only an operator can change these.<p>A channel that has a user <b>L</b>imit means that only that many users can be in the channel at any one time. Some channels have a bot that sits in the channel and changes this automatically depending on how busy the channel is.</qt></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>userLimitChBox</cstring> </property> @@ -267,7 +267,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>211</width> <height>20</height> @@ -287,15 +287,15 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>toggleAdvancedModes</cstring> </property> @@ -319,7 +319,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>301</width> <height>31</height> @@ -383,7 +383,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -392,7 +392,7 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -403,7 +403,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQPushButton" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>removeBan</cstring> </property> @@ -419,7 +419,7 @@ the Free Software Foundation; either version 2 of the License, or <string>&Remove Ban</string> </property> </widget> - <widget class="QPushButton" row="2" column="3"> + <widget class="TQPushButton" row="2" column="3"> <property name="name"> <cstring>addBan</cstring> </property> @@ -438,7 +438,7 @@ the Free Software Foundation; either version 2 of the License, or <widget class="KListView" row="1" column="0" rowspan="1" colspan="4"> <column> <property name="text"> - <string>Hostmask</string> + <string>Hosttqmask</string> </property> <property name="clickable"> <bool>true</bool> @@ -479,7 +479,7 @@ the Free Software Foundation; either version 2 of the License, or <bool>true</bool> </property> </widget> - <widget class="QToolButton" row="0" column="0"> + <widget class="TQToolButton" row="0" column="0"> <property name="name"> <cstring>clearButton</cstring> </property> @@ -495,7 +495,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -543,8 +543,8 @@ the Free Software Foundation; either version 2 of the License, or <slot>clear()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistview.h</includehint> <includehint>ktextedit.h</includehint> diff --git a/konversation/src/chatwindow.cpp b/konversation/src/chatwindow.cpp index 6349576..db810f6 100644 --- a/konversation/src/chatwindow.cpp +++ b/konversation/src/chatwindow.cpp @@ -31,11 +31,11 @@ #include <kaction.h> -ChatWindow::ChatWindow(TQWidget* parent) : TQVBox(parent) +ChatWindow::ChatWindow(TQWidget* tqparent) : TQVBox(tqparent) { setName("ChatWindowObject"); setTextView(0); - parentWidget=parent; + tqparentWidget=tqparent; firstLog=true; m_server=0; m_notificationsEnabled = true; @@ -219,14 +219,14 @@ void ChatWindow::setLogfileName(const TQString& name) if(firstLog) { // status panels get special treatment here, since they have no server at the beginning - if (getType() == Status || getType() == DccChat) + if (getType() == tqStatus || getType() == DccChat) { logName = name + ".log"; } else if (m_server) { // make sure that no path delimiters are in the name - logName = TQString(m_server->getDisplayName().lower()).append('_').append(name).append(".log").replace('/','_'); + logName = TQString(TQString(m_server->getDisplayName().lower()).append('_').append(name).append(".log")).tqreplace('/','_'); } // load backlog to show @@ -236,7 +236,7 @@ void ChatWindow::setLogfileName(const TQString& name) cdIntoLogPath(); // Show last log lines. This idea was stole ... um ... inspired by PMP :) // Don't do this for the server status windows, though - if((getType() != Status) && logfile.open(IO_ReadOnly)) + if((getType() != tqStatus) && logfile.open(IO_ReadOnly)) { unsigned long filePosition; @@ -247,9 +247,9 @@ void ChatWindow::setLogfileName(const TQString& name) TQStringList firstColumns; TQStringList messages; int offset = 0; - unsigned int lastPacketHeadPosition = backlog.device()->size(); + unsigned int lastPacketHeadPosition = backlog.tqdevice()->size(); const unsigned int packetSize = 4096; - while(messages.count() < (unsigned int)Preferences::backlogLines() && backlog.device()->size() > packetSize * offset) + while(messages.count() < (unsigned int)Preferences::backlogLines() && backlog.tqdevice()->size() > packetSize * offset) { TQStringList firstColumnsInPacket; TQStringList messagesInPacket; @@ -257,38 +257,38 @@ void ChatWindow::setLogfileName(const TQString& name) // packetSize * offset < size <= packetSize * ( offset + 1 ) // Check if the log is bigger than packetSize * ( offset + 1 ) - if(backlog.device()->size() > packetSize * ( offset + 1 )) + if(backlog.tqdevice()->size() > packetSize * ( offset + 1 )) { // Set file pointer to the packet size above the offset - backlog.device()->at(backlog.device()->size() - packetSize * ( offset + 1 )); + backlog.tqdevice()->at(backlog.tqdevice()->size() - packetSize * ( offset + 1 )); // Skip first line, since it may be incomplete backlog.readLine(); } else { // Set file pointer to the head - backlog.device()->reset(); + backlog.tqdevice()->reset(); } - unsigned int currentPacketHeadPosition = backlog.device()->at(); + unsigned int currentPacketHeadPosition = backlog.tqdevice()->at(); // Loop until end of file reached - while(!backlog.atEnd() && backlog.device()->at() < lastPacketHeadPosition) + while(!backlog.atEnd() && backlog.tqdevice()->at() < lastPacketHeadPosition) { // remember actual file position to check for deadlocks - filePosition = backlog.device()->at(); + filePosition = backlog.tqdevice()->at(); backlogLine = backlog.readLine(); // check for deadlocks - if(backlog.device()->at() == filePosition) backlog.device()->at(filePosition + 1); + if(backlog.tqdevice()->at() == filePosition) backlog.tqdevice()->at(filePosition + 1); // if a tab character is present in the line - if(backlogLine.find('\t') != -1) + if(backlogLine.tqfind('\t') != -1) { // extract first column from log - TQString backlogFirst = backlogLine.left(backlogLine.find('\t')); + TQString backlogFirst = backlogLine.left(backlogLine.tqfind('\t')); // cut first column from line - backlogLine = backlogLine.mid(backlogLine.find('\t') + 1); + backlogLine = backlogLine.mid(backlogLine.tqfind('\t') + 1); // Logfile is in utf8 so we don't need to do encoding stuff here // append backlog with time and first column to text view firstColumnsInPacket << backlogFirst; @@ -343,14 +343,14 @@ void ChatWindow::logText(const TQString& text) if(firstLog) { - TQString intro(i18n("\n*** Logfile started\n*** on %1\n\n").arg(TQDateTime::currentDateTime().toString())); + TQString intro(i18n("\n*** Logfile started\n*** on %1\n\n").tqarg(TQDateTime::tqcurrentDateTime().toString())); logStream << intro; firstLog=false; } TQTime time=TQTime::currentTime(); - TQString logLine(TQString("[%1] [%2] %3\n").arg(TQDate::currentDate(Qt::LocalTime).toString()). - arg(time.toString("hh:mm:ss")).arg(text)); + TQString logLine(TQString("[%1] [%2] %3\n").tqarg(TQDate::tqcurrentDate(Qt::LocalTime).toString()). + tqarg(time.toString("hh:mm:ss")).tqarg(text)); logStream << logLine; @@ -439,11 +439,11 @@ bool ChatWindow::eventFilter(TQObject* watched, TQEvent* e) { if(e->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); + TQKeyEvent* ke = TQT_TQKEYEVENT(e); - bool scrollMod = (Preferences::useMultiRowInputBox() ? false : (ke->state() == Qt::ShiftButton)); + bool scrollMod = (Preferences::useMultiRowInputBox() ? false : (ke->state() == TQt::ShiftButton)); - if(ke->key() == Qt::Key_Up && scrollMod) + if(ke->key() == TQt::Key_Up && scrollMod) { if(textView) { @@ -453,7 +453,7 @@ bool ChatWindow::eventFilter(TQObject* watched, TQEvent* e) return true; } - else if(ke->key() == Qt::Key_Down && scrollMod) + else if(ke->key() == TQt::Key_Down && scrollMod) { if(textView) { @@ -463,7 +463,7 @@ bool ChatWindow::eventFilter(TQObject* watched, TQEvent* e) return true; } - else if(ke->key() == Qt::Key_Prior) + else if(ke->key() == TQt::Key_Prior) { if(textView) { @@ -473,7 +473,7 @@ bool ChatWindow::eventFilter(TQObject* watched, TQEvent* e) return true; } - else if(ke->key() == Qt::Key_Next) + else if(ke->key() == TQt::Key_Next) { if(textView) { diff --git a/konversation/src/chatwindow.h b/konversation/src/chatwindow.h index b063970..ae2f116 100644 --- a/konversation/src/chatwindow.h +++ b/konversation/src/chatwindow.h @@ -24,17 +24,18 @@ class IRCView; class Server; class KonversationMainWindow; -class ChatWindow : public QVBox +class ChatWindow : public TQVBox { Q_OBJECT + TQ_OBJECT public: - explicit ChatWindow(TQWidget* parent); + explicit ChatWindow(TQWidget* tqparent); ~ChatWindow(); enum WindowType { - Status=0, + tqStatus=0, Channel, Query, DccChat, @@ -81,7 +82,7 @@ class ChatWindow : public QVBox bool parseURL = true, bool self = false); virtual void appendBacklogMessage(const TQString& firstColumn,const TQString& message); - TQWidget* parentWidget; + TQWidget* tqparentWidget; virtual TQString getTextInLine(); /** Clean up and close this tab. Return false if you want to cancel the close. */ @@ -164,7 +165,7 @@ class ChatWindow : public QVBox protected: - /** Some children may handle the name themselves, and not want this public. + /** Some tqchildren may handle the name themselves, and not want this public. * Increase the visibility in the subclass if you want outsiders to call this. * The name is the string that is shown in the tab. * @param newName The name to show in the tab diff --git a/konversation/src/chatwindowappearance_preferences.ui b/konversation/src/chatwindowappearance_preferences.ui index 5a90533..b651af8 100644 --- a/konversation/src/chatwindowappearance_preferences.ui +++ b/konversation/src/chatwindowappearance_preferences.ui @@ -4,7 +4,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</comment> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ChatWindowAppearance_Config</cstring> </property> @@ -23,7 +23,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_Timestamping</cstring> </property> @@ -37,7 +37,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_ShowDate</cstring> </property> @@ -45,7 +45,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Sho&w dates</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -56,7 +56,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_TimestampFormat</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>kcfg_TimestampFormat</cstring> </property> @@ -74,7 +74,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>191</width> <height>20</height> @@ -83,7 +83,7 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ShowBacklog</cstring> </property> @@ -97,7 +97,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -129,7 +129,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>251</width> <height>20</height> @@ -138,7 +138,7 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -149,7 +149,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowTopic</cstring> </property> @@ -157,7 +157,7 @@ the Free Software Foundation; either version 2 of the License, or <string>&Show channel topic</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowModeButtons</cstring> </property> @@ -165,7 +165,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show channel &mode buttons</string> </property> </widget> - <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowIRCViewScrollBar</cstring> </property> @@ -176,7 +176,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowNicknameBox</cstring> </property> @@ -184,7 +184,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show bo&x to change own nickname</string> </property> </widget> - <widget class="QCheckBox" row="6" column="1"> + <widget class="TQCheckBox" row="6" column="1"> <property name="name"> <cstring>kcfg_ShowQuickButtons</cstring> </property> @@ -205,14 +205,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="5" column="1"> + <widget class="TQCheckBox" row="5" column="1"> <property name="name"> <cstring>kcfg_ShowRealNames</cstring> </property> @@ -233,14 +233,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_ShowNickList</cstring> </property> @@ -248,7 +248,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show channel &nick list and quick buttons</string> </property> </widget> - <widget class="QCheckBox" row="3" column="1" rowspan="2" colspan="1"> + <widget class="TQCheckBox" row="3" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>kcfg_AutoUserhost</cstring> </property> @@ -269,7 +269,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -278,7 +278,7 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ShowBackgroundImage</cstring> </property> @@ -292,7 +292,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -320,7 +320,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -368,7 +368,7 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_Timestamping</tabstop> <tabstop>kcfg_ShowBacklog</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/konversation/src/chatwindowbehaviour_preferences.ui b/konversation/src/chatwindowbehaviour_preferences.ui index b142b1e..754974d 100644 --- a/konversation/src/chatwindowbehaviour_preferences.ui +++ b/konversation/src/chatwindowbehaviour_preferences.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ChatwindowBehaviour_Config</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ChatwindowBehaviour_Config</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_Beep</cstring> </property> @@ -41,7 +41,7 @@ <string>Sounds the system bell when you receive an ASCII BEL (0x07) control character</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_HideUnimportantEvents</cstring> </property> @@ -49,7 +49,7 @@ <string>Hide &Join/Part/Nick events</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_DisableExpansion</cstring> </property> @@ -60,7 +60,7 @@ <string>Do not expand variables when sending text to the server. A variable starts with '%'; for example, %B will expand to the characters needed to make a text bold.</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_RedirectServerAndAppMsgToStatusPane</cstring> </property> @@ -68,7 +68,7 @@ <string>&Redirect status messages to the server status window</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -92,14 +92,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>410</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_UseLiteralModes</cstring> </property> @@ -110,7 +110,7 @@ <string>Keep channel mode string as a combination of characters instead of translating them into human readable words. E.g. '*** Channel modes: no messages from outside' will become '*** Channel modes: n'</string> </property> </widget> - <widget class="QSpinBox" row="6" column="1"> + <widget class="TQSpinBox" row="6" column="1"> <property name="name"> <cstring>kcfg_ScrollbackMax</cstring> </property> @@ -137,7 +137,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>230</width> <height>20</height> @@ -146,7 +146,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3_2</cstring> </property> @@ -157,7 +157,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_MarkerLineInAllViews</cstring> </property> @@ -165,7 +165,7 @@ <string>Show manually inserted lines in all chat windows</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_AutomaticRememberLine</cstring> </property> @@ -179,7 +179,7 @@ <string>Inserts a remember line into the chat window when you switch to another chat window or minimize the application.</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>kcfg_AutomaticRememberLineOnlyOnTextChange</cstring> </property> @@ -200,7 +200,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -209,7 +209,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_AutoWhoContinuousEnabled</cstring> </property> @@ -236,7 +236,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>170</width> <height>20</height> @@ -253,14 +253,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>190</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -271,7 +271,7 @@ <cstring>kcfg_AutoWhoNicksLimit</cstring> </property> </widget> - <widget class="QSpinBox" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQSpinBox" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>kcfg_AutoWhoNicksLimit</cstring> </property> @@ -288,7 +288,7 @@ <number>300</number> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>kcfg_AutoWhoContinuousInterval</cstring> </property> @@ -308,7 +308,7 @@ <number>30</number> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="2" colspan="1"> + <widget class="TQLabel" row="1" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>whoIntervalLbl</cstring> </property> @@ -331,7 +331,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -369,6 +369,6 @@ <tabstop>kcfg_AutoWhoContinuousEnabled</tabstop> <tabstop>kcfg_AutoWhoContinuousEnabled</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/konversation/src/colorsappearance_preferences.ui b/konversation/src/colorsappearance_preferences.ui index e089ade..717c7a8 100644 --- a/konversation/src/colorsappearance_preferences.ui +++ b/konversation/src/colorsappearance_preferences.ui @@ -5,7 +5,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</comment> <author>İsmail Dönmez</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ColorsAppearance_Config</cstring> </property> @@ -24,7 +24,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -43,7 +43,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="5"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="5"> <property name="name"> <cstring>kcfg_InputFieldsBackgroundColor</cstring> </property> @@ -141,7 +141,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -158,7 +158,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -175,7 +175,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -192,7 +192,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -209,7 +209,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -226,7 +226,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -243,7 +243,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -260,7 +260,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -277,7 +277,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -294,14 +294,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -312,7 +312,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_TextViewBackgroundColor</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -323,7 +323,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_ServerMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -334,7 +334,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_HyperlinkColor</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -345,7 +345,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_ChannelMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -356,7 +356,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_ActionMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -367,7 +367,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_BacklogMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -378,7 +378,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_CommandMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="3"> + <widget class="TQLabel" row="2" column="3"> <property name="name"> <cstring>textLabel1_8</cstring> </property> @@ -389,7 +389,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_QueryMessageColor</cstring> </property> </widget> - <widget class="QLabel" row="3" column="3"> + <widget class="TQLabel" row="3" column="3"> <property name="name"> <cstring>textLabel1_9</cstring> </property> @@ -400,7 +400,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_TimeColor</cstring> </property> </widget> - <widget class="QLabel" row="4" column="3"> + <widget class="TQLabel" row="4" column="3"> <property name="name"> <cstring>textLabel1_10</cstring> </property> @@ -413,7 +413,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>kcfg_UseColoredNicks</cstring> </property> @@ -430,7 +430,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="6"> + <widget class="TQLabel" row="1" column="6"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -454,7 +454,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="6"> + <widget class="TQLabel" row="0" column="6"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -478,7 +478,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -510,7 +510,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -536,7 +536,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -553,7 +553,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -570,7 +570,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -587,7 +587,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -602,7 +602,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -626,7 +626,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -652,7 +652,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -669,7 +669,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -692,7 +692,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="1" column="9"> + <widget class="TQLabel" row="1" column="9"> <property name="name"> <cstring>textLabel11</cstring> </property> @@ -708,7 +708,7 @@ the Free Software Foundation; either version 2 of the License, or <string>7:</string> </property> </widget> - <widget class="QLabel" row="0" column="9"> + <widget class="TQLabel" row="0" column="9"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -724,15 +724,15 @@ the Free Software Foundation; either version 2 of the License, or <string>6:</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="12"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="12"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -761,7 +761,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>271</width> <height>20</height> @@ -772,7 +772,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>kcfg_AllowColorCodes</cstring> </property> @@ -792,7 +792,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel12_2</cstring> </property> @@ -808,7 +808,7 @@ the Free Software Foundation; either version 2 of the License, or <string>1:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel12_3</cstring> </property> @@ -824,7 +824,7 @@ the Free Software Foundation; either version 2 of the License, or <string>2:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel12_4</cstring> </property> @@ -872,7 +872,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel12_14</cstring> </property> @@ -888,7 +888,7 @@ the Free Software Foundation; either version 2 of the License, or <string>0:</string> </property> </widget> - <widget class="QLabel" row="3" column="3"> + <widget class="TQLabel" row="3" column="3"> <property name="name"> <cstring>textLabel12_8</cstring> </property> @@ -896,7 +896,7 @@ the Free Software Foundation; either version 2 of the License, or <string>7:</string> </property> </widget> - <widget class="QLabel" row="2" column="3"> + <widget class="TQLabel" row="2" column="3"> <property name="name"> <cstring>textLabel12_7</cstring> </property> @@ -904,7 +904,7 @@ the Free Software Foundation; either version 2 of the License, or <string>6:</string> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>textLabel12_6</cstring> </property> @@ -912,7 +912,7 @@ the Free Software Foundation; either version 2 of the License, or <string>5:</string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel12_5</cstring> </property> @@ -962,7 +962,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -979,7 +979,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -996,7 +996,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1013,7 +1013,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1030,7 +1030,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1047,7 +1047,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1064,7 +1064,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1081,7 +1081,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1096,7 +1096,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="3" column="6"> + <widget class="TQLabel" row="3" column="6"> <property name="name"> <cstring>textLabel12_12</cstring> </property> @@ -1128,7 +1128,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="1" column="6"> + <widget class="TQLabel" row="1" column="6"> <property name="name"> <cstring>textLabel12_10</cstring> </property> @@ -1136,7 +1136,7 @@ the Free Software Foundation; either version 2 of the License, or <string>9:</string> </property> </widget> - <widget class="QLabel" row="0" column="6"> + <widget class="TQLabel" row="0" column="6"> <property name="name"> <cstring>textLabel12_9</cstring> </property> @@ -1144,7 +1144,7 @@ the Free Software Foundation; either version 2 of the License, or <string>8:</string> </property> </widget> - <widget class="QLabel" row="2" column="6"> + <widget class="TQLabel" row="2" column="6"> <property name="name"> <cstring>textLabel12_11</cstring> </property> @@ -1162,7 +1162,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1179,7 +1179,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1196,7 +1196,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1213,7 +1213,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -1228,7 +1228,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="0" column="9"> + <widget class="TQLabel" row="0" column="9"> <property name="name"> <cstring>textLabel12_13</cstring> </property> @@ -1244,7 +1244,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="3" column="9"> + <widget class="TQLabel" row="3" column="9"> <property name="name"> <cstring>textLabel12_16</cstring> </property> @@ -1268,7 +1268,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QLabel" row="2" column="9"> + <widget class="TQLabel" row="2" column="9"> <property name="name"> <cstring>textLabel12_15</cstring> </property> @@ -1276,7 +1276,7 @@ the Free Software Foundation; either version 2 of the License, or <string>14:</string> </property> </widget> - <widget class="QLabel" row="1" column="9"> + <widget class="TQLabel" row="1" column="9"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -1296,7 +1296,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> @@ -1345,8 +1345,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_IrcColorCode14</tabstop> <tabstop>kcfg_IrcColorCode15</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/konversation/src/common.cpp b/konversation/src/common.cpp index 12e8554..1141799 100644 --- a/konversation/src/common.cpp +++ b/konversation/src/common.cpp @@ -68,7 +68,7 @@ namespace Konversation link = "<a href=\"#%1\">%2</a>"; } - if(filteredLine.contains("#")) + if(filteredLine.tqcontains("#")) { TQRegExp chanExp("(^|\\s|^\"|\\s\"|,|'|\\(|\\:|!|@|%|\\+)(#[^,\\s;\\)\\:\\/\\(\\<\\>]*[^.,\\s;\\)\\:\\/\\(\"\''\\<\\>])"); while((pos = chanExp.search(filteredLine, pos)) >= 0) @@ -77,9 +77,9 @@ namespace Konversation urlLen = href.length(); pos += chanExp.cap(1).length(); - // HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit - insertText = link.arg(TQString(href).replace('\\', " "), href); - filteredLine.replace(pos, urlLen, insertText); + // HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit + insertText = link.tqarg(TQString(href).tqreplace('\\', " "), href); + filteredLine.tqreplace(pos, urlLen, insertText); pos += insertText.length(); } } @@ -104,7 +104,7 @@ namespace Konversation TQString append; // check if the matched text is already replaced as a channel - if ( filteredLine.findRev( "<a", pos ) > filteredLine.findRev( "</a>", pos ) ) + if ( filteredLine.tqfindRev( "<a", pos ) > filteredLine.tqfindRev( "</a>", pos ) ) { ++pos; continue; @@ -128,38 +128,38 @@ namespace Konversation append = ';'; } - // Don't consider trailing closing parenthesis part of link when - // there's an opening parenthesis preceding the beginning of the - // URL or there is no opening parenthesis in the URL at all. - if (href.right(1) == ")" && (filteredLine.mid(pos-1,1) == "(" || !href.contains("("))) + // Don't consider trailing closing tqparenthesis part of link when + // there's an opening tqparenthesis preceding the beginning of the + // URL or there is no opening tqparenthesis in the URL at all. + if (href.right(1) == ")" && (filteredLine.mid(pos-1,1) == "(" || !href.tqcontains("("))) { href.truncate(href.length()-1); append.prepend(")"); } - // Qt doesn't support (?<=pattern) so we do it here + // TQt doesn't support (?<=pattern) so we do it here if((pos > 0) && filteredLine[pos-1].isLetterOrNumber()) { pos++; continue; } - if (urlPattern.cap(1).startsWith("www.", false)) + if (urlPattern.cap(1).tqstartsWith("www.", false)) protocol = "http://"; else if (urlPattern.cap(1).isEmpty()) protocol = "mailto:"; // Use \x0b as a placeholder for & so we can readd them after changing all & in the normal text to & - // HACK Replace % with \x03 in the url to keep Qt from doing stupid things - insertText = link.arg(protocol, TQString(href).replace('&', "\x0b").replace('%', "\x03"), href) + append; - filteredLine.replace(pos, urlLen, insertText); + // HACK Replace % with \x03 in the url to keep TQt from doing stupid things + insertText = link.tqarg(protocol, TQString(href).tqreplace('&', "\x0b").tqreplace('%', "\x03"), href) + append; + filteredLine.tqreplace(pos, urlLen, insertText); pos += insertText.length(); KonversationApplication::instance()->storeUrl(fromNick, href); } // Change & to & to prevent html entities to do strange things to the text - filteredLine.replace('&', "&"); - filteredLine.replace("\x0b", "&"); + filteredLine.tqreplace('&', "&"); + filteredLine.tqreplace("\x0b", "&"); // kdDebug() << "Took (msecs) : " << timer.elapsed() << " for " << filteredLine << endl; @@ -176,7 +176,7 @@ namespace Konversation if ( !over ) return *under; TQBitmap result = *under; - bitBlt( &result, 0, 0, over, 0, 0, over->width(), over->height(), Qt::OrROP ); + bitBlt( &result, 0, 0, over, 0, 0, over->width(), over->height(), TQt::OrROP ); return result; } diff --git a/konversation/src/config/konversation.kcfg b/konversation/src/config/konversation.kcfg index 9346e18..a2a2582 100644 --- a/konversation/src/config/konversation.kcfg +++ b/konversation/src/config/konversation.kcfg @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" > - <include>qfont.h</include> - <include>qsize.h</include> + <include>tqfont.h</include> + <include>tqsize.h</include> <include>kdialog.h</include> <include>kuser.h</include> <include>kglobalsettings.h</include> @@ -965,20 +965,20 @@ <group name="QueueRates"> <entry name="queueRate$(QueueIndex)" type="IntList" key="EmptyingRate $(QueueIndex)"> <!-- kconfig_compiler really should do this for me... --> - <code> QValueList< QValueList<int> > defaultRate; - QValueList< QValueList<int> >::iterator defaultRateInitIter; + <code> TQValueList< TQValueList<int> > defaultRate; + TQValueList< TQValueList<int> >::iterator defaultRateInitIter; - defaultRateInitIter = defaultRate.append(QValueList<int>()); + defaultRateInitIter = defaultRate.append(TQValueList<int>()); (*defaultRateInitIter).append( 15 ); (*defaultRateInitIter).append( 60 ); (*defaultRateInitIter).append( 0 ); - defaultRateInitIter = defaultRate.append(QValueList<int>()); + defaultRateInitIter = defaultRate.append(TQValueList<int>()); (*defaultRateInitIter).append( 40 ); (*defaultRateInitIter).append( 60 ); (*defaultRateInitIter).append( 0 ); - defaultRateInitIter = defaultRate.append(QValueList<int>()); + defaultRateInitIter = defaultRate.append(TQValueList<int>()); (*defaultRateInitIter).append( 1 ); (*defaultRateInitIter).append( 1 ); (*defaultRateInitIter).append( 0 ); diff --git a/konversation/src/config/preferences.cpp b/konversation/src/config/preferences.cpp index 5534ac8..37b1a70 100644 --- a/konversation/src/config/preferences.cpp +++ b/konversation/src/config/preferences.cpp @@ -105,7 +105,7 @@ const TQStringList Preferences::defaultQuickButtonList() << "Kick,/KICK %u%n" << "Ban,/BAN %u%n" << "Part,/PART %c Leaving...%n" - << "Quit,/QUIT Leaving...%n"; + << "Quit,/TQUIT Leaving...%n"; } const TQStringList Preferences::quickButtonList() @@ -330,7 +330,7 @@ const TQMap<int, TQStringList> Preferences::notifyList() { return self()->mNotif const TQStringList Preferences::notifyListByGroupName(const TQString& groupName) { int id=serverGroupIdByName(groupName); - if (id && self()->mNotifyList.find(id) != self()->mNotifyList.end()) + if (id && self()->mNotifyList.tqfind(id) != self()->mNotifyList.end()) return self()->mNotifyList[id]; else return TQStringList(); @@ -343,7 +343,7 @@ const TQString Preferences::notifyStringByGroupName(const TQString& groupName) bool Preferences::addNotify(int serverGroupId, const TQString& newPattern) { - if (!self()->mNotifyList[serverGroupId].contains(newPattern)) + if (!self()->mNotifyList[serverGroupId].tqcontains(newPattern)) { TQStringList nicknameList = self()->mNotifyList[serverGroupId]; nicknameList.append(newPattern); @@ -358,7 +358,7 @@ bool Preferences::removeNotify(const TQString& groupName, const TQString& patter int id=serverGroupIdByName(groupName); if(!id) return false; - if (self()->mNotifyList.find(id) != self()->mNotifyList.end()) + if (self()->mNotifyList.tqfind(id) != self()->mNotifyList.end()) { TQStringList nicknameList = self()->mNotifyList[id]; nicknameList.remove(pattern); @@ -373,18 +373,18 @@ bool Preferences::removeNotify(const TQString& groupName, const TQString& patter bool Preferences::isNotify(int serverGroupId, const TQString& pattern) { - if (self()->mNotifyList.find(serverGroupId) != self()->mNotifyList.end()) + if (self()->mNotifyList.tqfind(serverGroupId) != self()->mNotifyList.end()) { TQStringList nicknameList = self()->mNotifyList[serverGroupId]; - if (nicknameList.contains(pattern)) return true; + if (nicknameList.tqcontains(pattern)) return true; } return false; } bool Preferences::hasNotifyList(int serverGroupId) { - if (self()->mNotifyList.find(serverGroupId) != self()->mNotifyList.end()) + if (self()->mNotifyList.tqfind(serverGroupId) != self()->mNotifyList.end()) return true; else return false; @@ -562,8 +562,8 @@ const TQString Preferences::channelEncoding(const TQString& server,const TQStrin const TQString Preferences::channelEncoding(int serverGroupId,const TQString& channel) { - if(self()->mChannelEncodingsMap.contains(serverGroupId)) - if(self()->mChannelEncodingsMap[serverGroupId].contains(channel.lower())) + if(self()->mChannelEncodingsMap.tqcontains(serverGroupId)) + if(self()->mChannelEncodingsMap[serverGroupId].tqcontains(channel.lower())) return self()->mChannelEncodingsMap[serverGroupId][channel.lower()]; return TQString(); } @@ -598,7 +598,7 @@ TQString Preferences::webBrowserCmd() { // add %u to command if it's not in there TQString cmd=self()->mWebBrowserCmd; - if(cmd.find("%u")==-1) cmd+=" %u"; + if(cmd.tqfind("%u")==-1) cmd+=" %u"; return cmd; } diff --git a/konversation/src/config/preferences.h b/konversation/src/config/preferences.h index 5ee6bda..4fcbc73 100644 --- a/konversation/src/config/preferences.h +++ b/konversation/src/config/preferences.h @@ -47,6 +47,7 @@ class Highlight; class Preferences : public TQObject, public PreferencesBase { Q_OBJECT + TQ_OBJECT protected: Preferences(); diff --git a/konversation/src/connectionbehavior_preferences.ui b/konversation/src/connectionbehavior_preferences.ui index c1489ca..526de9a 100644 --- a/konversation/src/connectionbehavior_preferences.ui +++ b/konversation/src/connectionbehavior_preferences.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Copyright (C) 2005 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConnectionBehavior_Config</cstring> </property> @@ -25,7 +25,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>kcfg_AutoReconnect</cstring> </property> @@ -39,7 +39,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>reconnectDelayLabel</cstring> </property> @@ -60,14 +60,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>278</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -119,7 +119,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>280</width> <height>20</height> @@ -138,14 +138,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>60</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>debugGBox</cstring> </property> @@ -156,7 +156,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_RawLog</cstring> </property> @@ -176,8 +176,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_ReconnectCount</tabstop> <tabstop>kcfg_RawLog</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/konversation/src/connectionmanager.cpp b/konversation/src/connectionmanager.cpp index 294adec..1942f88 100644 --- a/konversation/src/connectionmanager.cpp +++ b/konversation/src/connectionmanager.cpp @@ -24,7 +24,7 @@ #include <kmessagebox.h> -ConnectionManager::ConnectionManager(TQObject* parent) : TQObject(parent) +ConnectionManager::ConnectionManager(TQObject* tqparent) : TQObject(tqparent) { connect(this, TQT_SIGNAL(requestReconnect(Server*)), this, TQT_SLOT(handleReconnect(Server*))); } @@ -146,7 +146,7 @@ void ConnectionManager::handleConnectionStateChange(Server* server, Konversation if (state == Konversation::SSConnected) { - if (!m_activeIdentities.contains(identityId)) + if (!m_activeIdentities.tqcontains(identityId)) { m_activeIdentities.append(identityId); @@ -155,7 +155,7 @@ void ConnectionManager::handleConnectionStateChange(Server* server, Konversation } else if (state != Konversation::SSConnecting) { - if (m_activeIdentities.contains(identityId)) + if (m_activeIdentities.tqcontains(identityId)) { m_activeIdentities.remove(identityId); @@ -191,7 +191,7 @@ void ConnectionManager::handleReconnect(Server* server) { Konversation::ServerList serverList = settings.serverGroup()->serverList(); - int index = serverList.findIndex(settings.server()); + int index = serverList.tqfindIndex(settings.server()); int size = serverList.size(); if (index == size - 1 || index == -1) @@ -203,15 +203,15 @@ void ConnectionManager::handleReconnect(Server* server) server->getStatusView()->appendServerMessage(i18n("Info"), i18n("Trying to connect to %1 in %2 seconds.") - .arg(settings.server().host()) - .arg(Preferences::reconnectDelay())); + .tqarg(settings.server().host()) + .tqarg(Preferences::reconnectDelay())); } else { server->getStatusView()->appendServerMessage(i18n("Info"), i18n("Trying to reconnect to %1 in %2 seconds.") - .arg(settings.server().host()) - .arg(Preferences::reconnectDelay())); + .tqarg(settings.server().host()) + .tqarg(Preferences::reconnectDelay())); } server->getConnectionSettings().incrementReconnectCount(); @@ -246,7 +246,7 @@ void ConnectionManager::decodeIrcUrl(const TQString& url, ConnectionSettings& se mangledUrlSegments = TQStringList::split('/', mangledUrl, false); // Check for ",isserver". - if (mangledUrlSegments[0].contains(',')) + if (mangledUrlSegments[0].tqcontains(',')) { TQStringList addressSegments; bool checkIfServerGroup = true; @@ -271,7 +271,7 @@ void ConnectionManager::decodeIrcUrl(const TQString& url, ConnectionSettings& se if (!channel.isEmpty()) { // Add default prefix to channel if necessary. - if (!channel.contains(TQRegExp("^[#+&]{1}"))) + if (!channel.tqcontains(TQRegExp("^[#+&]{1}"))) channel = '#' + channel; channelSettings.setName(channel); @@ -321,7 +321,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting // Full-length IPv6 address with port // Example: RFC 2732 notation: [2001:0DB8:0000:0000:0000:0000:1428:57ab]:6666 // Example: Non-RFC 2732 notation: 2001:0DB8:0000:0000:0000:0000:1428:57ab:6666 - if (address.contains(':')==8) + if (address.tqcontains(':')==8) { host = address.section(':',0,-2).remove("[").remove("]"); port = address.section(':',-1); @@ -330,7 +330,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting // Example: Without port, RFC 2732 notation: [2001:0DB8:0000:0000:0000:0000:1428:57ab] // Example: Without port, Non-RFC 2732 notation: 2001:0DB8:0000:0000:0000:0000:1428:57ab // Example: With port, RFC 2732 notation: [2001:0DB8::1428:57ab]:6666 - else if (address.contains(':')>=4) + else if (address.tqcontains(':')>=4) { // Last segment does not end with ], but the next to last does; // Assume not-full-length IPv6 address with port @@ -349,7 +349,7 @@ void ConnectionManager::decodeAddress(const TQString& address, ConnectionSetting // IPv4 address or ordinary hostname with port // Example: IPv4 address with port: 123.123.123.123:6666 // Example: Hostname with port: irc.bla.org:6666 - else if (address.contains(':')==1) + else if (address.tqcontains(':')==1) { host = address.section(':',0,-2); port = address.section(':',-1); @@ -437,8 +437,8 @@ bool ConnectionManager::reuseExistingConnection(ConnectionSettings& settings, bo int result = KMessageBox::warningContinueCancel( mainWindow, i18n("You are already connected to %1. Do you want to open another connection?") - .arg(dupe->getDisplayName()), - i18n("Already connected to %1").arg(dupe->getDisplayName()), + .tqarg(dupe->getDisplayName()), + i18n("Already connected to %1").tqarg(dupe->getDisplayName()), i18n("Create connection"), "ReuseExistingConnection"); @@ -453,12 +453,12 @@ bool ConnectionManager::reuseExistingConnection(ConnectionSettings& settings, bo int result = KMessageBox::warningContinueCancel( mainWindow, i18n("You are presently connected to %1 via '%2' (port %3). Do you want to switch to '%4' (port %5) instead?") - .arg(dupe->getDisplayName()) - .arg(dupe->getServerName()) - .arg(dupe->getPort()) - .arg(settings.server().host()) - .arg(settings.server().port()), - i18n("Already connected to %1").arg(dupe->getDisplayName()), + .tqarg(dupe->getDisplayName()) + .tqarg(dupe->getServerName()) + .tqarg(dupe->getPort()) + .tqarg(settings.server().host()) + .tqarg(settings.server().port()), + i18n("Already connected to %1").tqarg(dupe->getDisplayName()), i18n("Switch Server"), "ReconnectWithDifferentServer"); @@ -513,7 +513,7 @@ bool ConnectionManager::validateIdentity(IdentityPtr identity, bool interactive) { int result = KMessageBox::warningContinueCancel(mainWindow, i18n("<qt>Your identity \"%1\" is not set up correctly:<br>%2</qt>") - .arg(identity->getName()).arg(errors), + .tqarg(identity->getName()).tqarg(errors), i18n("Identity Settings"), i18n("Edit Identity...")); @@ -550,7 +550,7 @@ TQPtrList<Server> ConnectionManager::getServerList() Server* ConnectionManager::getServerByConnectionId(int connectionId) { - if (m_connectionList.contains(connectionId)) + if (m_connectionList.tqcontains(connectionId)) return m_connectionList[connectionId]; else return 0; diff --git a/konversation/src/connectionmanager.h b/konversation/src/connectionmanager.h index 77495b7..eb2dfa4 100644 --- a/konversation/src/connectionmanager.h +++ b/konversation/src/connectionmanager.h @@ -20,12 +20,13 @@ class ConnectionSettings; -class ConnectionManager : public QObject +class ConnectionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - explicit ConnectionManager(TQObject* parent = 0); + explicit ConnectionManager(TQObject* tqparent = 0); ~ConnectionManager(); uint connectionCount() const { return m_connectionList.count(); } diff --git a/konversation/src/dcc_preferences.cpp b/konversation/src/dcc_preferences.cpp index 8dd652a..138df92 100644 --- a/konversation/src/dcc_preferences.cpp +++ b/konversation/src/dcc_preferences.cpp @@ -17,8 +17,8 @@ #include <klocale.h> -DCC_Config::DCC_Config(TQWidget *parent, const char* name) : - DCC_ConfigUI(parent,name) +DCC_Config::DCC_Config(TQWidget *tqparent, const char* name) : + DCC_ConfigUI(tqparent,name) { languageChange(); connect(kcfg_DccMethodToGetOwnIp, TQT_SIGNAL(activated(int)), this, TQT_SLOT(dccMethodChanged(int))); dccMethodChanged(kcfg_DccMethodToGetOwnIp->currentItem()); diff --git a/konversation/src/dcc_preferences.h b/konversation/src/dcc_preferences.h index 2b6cdaa..7e8f6a5 100644 --- a/konversation/src/dcc_preferences.h +++ b/konversation/src/dcc_preferences.h @@ -21,9 +21,10 @@ class TQComboBox; class DCC_Config : public DCC_ConfigUI { Q_OBJECT + TQ_OBJECT public: - DCC_Config(TQWidget* parent, const char* name); + DCC_Config(TQWidget* tqparent, const char* name); ~DCC_Config(); public slots: diff --git a/konversation/src/dcc_preferencesui.ui b/konversation/src/dcc_preferencesui.ui index 9bfdfcb..c66936c 100644 --- a/konversation/src/dcc_preferencesui.ui +++ b/konversation/src/dcc_preferencesui.ui @@ -4,7 +4,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</comment> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DCC_ConfigUI</cstring> </property> @@ -26,7 +26,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>dccPathLbl</cstring> </property> @@ -53,7 +53,7 @@ the Free Software Foundation; either version 2 of the License, or <number>2</number> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccAddPartner</cstring> </property> @@ -61,7 +61,7 @@ the Free Software Foundation; either version 2 of the License, or <string>&Add sender to file name</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccCreateFolder</cstring> </property> @@ -69,7 +69,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Cr&eate folder for sender</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccSpaceToUnderscore</cstring> </property> @@ -80,7 +80,7 @@ the Free Software Foundation; either version 2 of the License, or <string></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccAutoGet</cstring> </property> @@ -88,7 +88,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Automaticall&y accept download offer</string> </property> </widget> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccAutoResume</cstring> </property> @@ -96,7 +96,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Au&tomatically resume download</string> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>kcfg_DccFastSend</cstring> </property> @@ -114,14 +114,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="10" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="10" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -132,7 +132,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_DccBufferSize</cstring> </property> </widget> - <widget class="QLabel" row="9" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="9" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -143,7 +143,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_DccSendTimeout</cstring> </property> </widget> - <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_DccIPv4Fallback</cstring> </property> @@ -154,7 +154,7 @@ the Free Software Foundation; either version 2 of the License, or <string>If this option enabled dcc transfers for IPv6 connections will be done over IPv4 interface set here</string> </property> </widget> - <widget class="QSpinBox" row="10" column="2"> + <widget class="TQSpinBox" row="10" column="2"> <property name="name"> <cstring>kcfg_DccBufferSize</cstring> </property> @@ -171,7 +171,7 @@ the Free Software Foundation; either version 2 of the License, or <number>128</number> </property> </widget> - <widget class="QSpinBox" row="9" column="2"> + <widget class="TQSpinBox" row="9" column="2"> <property name="name"> <cstring>kcfg_DccSendTimeout</cstring> </property> @@ -193,7 +193,7 @@ the Free Software Foundation; either version 2 of the License, or <bool>false</bool> </property> </widget> - <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_DccPassiveSend</cstring> </property> @@ -214,7 +214,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Maximum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> @@ -231,7 +231,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> @@ -248,14 +248,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>20</height> </size> </property> </spacer> - <widget class="QGroupBox" row="11" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="11" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -266,12 +266,12 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>kcfg_DccSpecificOwnIp</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -282,7 +282,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_DccMethodToGetOwnIp</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>ownIP</cstring> </property> @@ -293,14 +293,14 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_DccSpecificOwnIp</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>kcfg_DccMethodToGetOwnIp</cstring> </property> </widget> </grid> </widget> - <widget class="QGroupBox" row="12" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="12" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -311,7 +311,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_DccSpecificChatPorts</cstring> </property> @@ -329,14 +329,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> </size> </property> </spacer> - <widget class="QSpinBox" row="1" column="2"> + <widget class="TQSpinBox" row="1" column="2"> <property name="name"> <cstring>kcfg_DccChatPortsFirst</cstring> </property> @@ -350,7 +350,7 @@ the Free Software Foundation; either version 2 of the License, or <number>1026</number> </property> </widget> - <widget class="QLabel" row="1" column="3"> + <widget class="TQLabel" row="1" column="3"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -360,11 +360,11 @@ the Free Software Foundation; either version 2 of the License, or <property name="text"> <string>to</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QSpinBox" row="1" column="4"> + <widget class="TQSpinBox" row="1" column="4"> <property name="name"> <cstring>kcfg_DccChatPortsLast</cstring> </property> @@ -378,7 +378,7 @@ the Free Software Foundation; either version 2 of the License, or <number>1027</number> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_DccSpecificSendPorts</cstring> </property> @@ -396,14 +396,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> </size> </property> </spacer> - <widget class="QSpinBox" row="0" column="2"> + <widget class="TQSpinBox" row="0" column="2"> <property name="name"> <cstring>kcfg_DccSendPortsFirst</cstring> </property> @@ -417,7 +417,7 @@ the Free Software Foundation; either version 2 of the License, or <number>1026</number> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -427,11 +427,11 @@ the Free Software Foundation; either version 2 of the License, or <property name="text"> <string>to</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QSpinBox" row="0" column="4"> + <widget class="TQSpinBox" row="0" column="4"> <property name="name"> <cstring>kcfg_DccSendPortsLast</cstring> </property> @@ -517,7 +517,7 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_DccChatPortsFirst</tabstop> <tabstop>kcfg_DccChatPortsLast</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/dccchat.cpp b/konversation/src/dccchat.cpp index 71b3946..c1e5b68 100644 --- a/konversation/src/dccchat.cpp +++ b/konversation/src/dccchat.cpp @@ -45,8 +45,8 @@ #define DCCCHAT_BUFFER_SIZE 1024 -DccChat::DccChat(TQWidget* parent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost, int partnerPort) - : ChatWindow(parent) +DccChat::DccChat(TQWidget* tqparent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost, int partnerPort) + : ChatWindow(tqparent) { kdDebug() << "DccChat::DccChat() [BEGIN]" << endl; @@ -129,12 +129,12 @@ void DccChat::listenForPartner() // Set up server socket TQString failedReason; if ( Preferences::dccSpecificChatPorts() ) - m_listenSocket = DccCommon::createServerSocketAndListen( this, &failedReason, Preferences::dccChatPortsFirst(), Preferences::dccChatPortsLast() ); + m_listenSocket = DccCommon::createServerSocketAndListen( TQT_TQOBJECT(this), &failedReason, Preferences::dccChatPortsFirst(), Preferences::dccChatPortsLast() ); else - m_listenSocket = DccCommon::createServerSocketAndListen( this, &failedReason ); + m_listenSocket = DccCommon::createServerSocketAndListen( TQT_TQOBJECT(this), &failedReason ); if ( !m_listenSocket ) { - getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Could not open a socket for listening: %1" ).arg( failedReason ) ); + getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Could not open a socket for listening: %1" ).tqarg( failedReason ) ); return; } @@ -144,8 +144,8 @@ void DccChat::listenForPartner() m_ownPort = DccCommon::getServerSocketPort( m_listenSocket ); kdDebug() << "DccChat::listenForPartner(): using port " << m_ownPort << endl; - getTextView()->appendServerMessage( i18n("DCC"), i18n("Offering DCC Chat connection to %1 on port %2...").arg( m_partnerNick ).arg( m_ownPort ) ); - m_sourceLine->setText(i18n( "DCC chat with %1 on port %2." ).arg( m_partnerNick ).arg( m_ownPort ) ); + getTextView()->appendServerMessage( i18n("DCC"), i18n("Offering DCC Chat connection to %1 on port %2...").tqarg( m_partnerNick ).tqarg( m_ownPort ) ); + m_sourceLine->setText(i18n( "DCC chat with %1 on port %2." ).tqarg( m_partnerNick ).tqarg( m_ownPort ) ); kdDebug() << "DccChat::listenForPartner() [END]" << endl; } @@ -157,11 +157,11 @@ void DccChat::connectToPartner() m_partnerHost=ip.toString(); getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "%1 = nickname, %2 = IP, %3 = port", - "Establishing DCC Chat connection to %1 (%2:%3)..." ).arg( m_partnerNick ).arg( m_partnerHost ).arg( m_partnerPort ) ); + "Establishing DCC Chat connection to %1 (%2:%3)..." ).tqarg( m_partnerNick ).tqarg( m_partnerHost ).tqarg( m_partnerPort ) ); - m_sourceLine->setText( i18n( "%1 = nickname, %2 = IP, %3 = port", "DCC chat with %1 on %2:%3." ).arg( m_partnerNick ).arg( host ).arg( m_partnerPort ) ); + m_sourceLine->setText( i18n( "%1 = nickname, %2 = IP, %3 = port", "DCC chat with %1 on %2:%3." ).tqarg( m_partnerNick ).tqarg( host ).tqarg( m_partnerPort ) ); - m_dccSocket = new KNetwork::KStreamSocket( m_partnerHost, TQString::number( m_partnerPort ), this ); + m_dccSocket = new KNetwork::KStreamSocket( m_partnerHost, TQString::number( m_partnerPort ), TQT_TQOBJECT(this) ); m_dccSocket->setBlocking(false); m_dccSocket->setFamily(KNetwork::KResolver::InetFamily); @@ -179,7 +179,7 @@ void DccChat::connectToPartner() m_dccSocket->connect(); #if 0 - //getTextView()->appendServerMessage(i18n("DCC"),i18n("Looking for host %1...").arg(host)); + //getTextView()->appendServerMessage(i18n("DCC"),i18n("Looking for host %1...").tqarg(host)); #endif } @@ -195,14 +195,14 @@ void DccChat::lookupFinished() void DccChat::dccChatConnectionSuccess() { - getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Established DCC Chat connection to %1." ).arg( m_partnerNick ) ); + getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Established DCC Chat connection to %1." ).tqarg( m_partnerNick ) ); m_dccSocket->enableRead(true); m_dccChatInput->setEnabled(true); } void DccChat::dccChatBroken(int error) { - getTextView()->appendServerMessage(i18n("Error"),i18n("Connection broken, error code %1.").arg(error)); + getTextView()->appendServerMessage(i18n("Error"),i18n("Connection broken, error code %1.").tqarg(error)); m_dccSocket->enableRead(false); m_dccSocket->blockSignals(true); m_dccSocket->close(); @@ -233,7 +233,7 @@ void DccChat::readData() if( (*itLine).startsWith( "\x01" ) ) { // cut out the CTCP command - TQString ctcp = (*itLine).mid( 1, (*itLine).find( 1, 1 ) - 1 ); + TQString ctcp = (*itLine).mid( 1, (*itLine).tqfind( 1, 1 ) - 1 ); TQString ctcpCommand = ctcp.section( " ", 0, 0 ); TQString ctcpArgument = ctcp.section( " ", 1 ); @@ -241,7 +241,7 @@ void DccChat::readData() if( ctcpCommand.lower() == "action" ) appendAction( m_partnerNick, ctcpArgument ); else - getTextView()->appendServerMessage( i18n( "CTCP" ), i18n( "Received unknown CTCP-%1 request from %2" ).arg( ctcp ).arg( m_partnerNick ) ); + getTextView()->appendServerMessage( i18n( "CTCP" ), i18n( "Received unknown CTCP-%1 request from %2" ).tqarg( ctcp ).tqarg( m_partnerNick ) ); } else getTextView()->append( m_partnerNick, *itLine ); } // endfor @@ -286,7 +286,7 @@ void DccChat::sendDccChatText(const TQString& sendLine) TQString line( *itLine ); // replace aliases and wildcards - // if(filter.replaceAliases(line)) line=server->parseWildcards(line,nick,getName(),TQString::null,TQString::null,TQString::null); + // if(filter.replaceAliases(line)) line=server->parseWildcards(line,nick,getName(),TQString(),TQString(),TQString()); // line=filter.parse(nick,line,getName()); @@ -295,7 +295,7 @@ void DccChat::sendDccChatText(const TQString& sendLine) if (cmd == cc+"me") { appendAction( m_ownNick, line.section( " ", 1 ) ); - line=TQString("\x01%1 %2\x01").arg("ACTION").arg(line.section(" ",1)); + line=TQString("\x01%1 %2\x01").tqarg("ACTION").tqarg(line.section(" ",1)); } else if (cmd == cc+"close") { @@ -336,7 +336,7 @@ void DccChat::heardPartner() m_dccSocket->enableRead(true); m_dccChatInput->setEnabled(true); - getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Established DCC Chat connection to %1." ).arg( m_partnerNick ) ); + getTextView()->appendServerMessage( i18n( "DCC" ), i18n( "Established DCC Chat connection to %1." ).tqarg( m_partnerNick ) ); } void DccChat::socketClosed() @@ -410,7 +410,7 @@ TQString DccChat::getChannelEncoding() // virtual TQString DccChat::getChannelEncodingDefaultDesc() // virtual { - return i18n("Default ( %1 )").arg(Konversation::IRCCharsets::self()->encodingForLocale()); + return i18n("Default ( %1 )").tqarg(Konversation::IRCCharsets::self()->encodingForLocale()); } void DccChat::showEvent(TQShowEvent* /* event */) @@ -418,7 +418,7 @@ void DccChat::showEvent(TQShowEvent* /* event */) if(m_initialShow) { m_initialShow = false; TQValueList<int> sizes; - sizes << m_sourceLine->sizeHint().height() << (height() - m_sourceLine->sizeHint().height()); + sizes << m_sourceLine->tqsizeHint().height() << (height() - m_sourceLine->tqsizeHint().height()); m_headerSplitter->setSizes(sizes); } } @@ -435,8 +435,8 @@ void DccChat::updateAppearance() } else { - fg=colorGroup().foreground(); - bg=colorGroup().base(); + fg=tqcolorGroup().foreground(); + bg=tqcolorGroup().base(); } m_dccChatInput->unsetPalette(); diff --git a/konversation/src/dccchat.h b/konversation/src/dccchat.h index 438df98..da4d424 100644 --- a/konversation/src/dccchat.h +++ b/konversation/src/dccchat.h @@ -36,9 +36,10 @@ namespace Konversation class DccChat : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - DccChat(TQWidget* parent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost = TQString(), int partnerPort = 0); + DccChat(TQWidget* tqparent, bool listen, Server* server, const TQString& ownNick, const TQString& partnerNick, const TQString& partnerHost = TQString(), int partnerPort = 0); ~DccChat(); virtual TQString getTextInLine(); diff --git a/konversation/src/dcccommon.cpp b/konversation/src/dcccommon.cpp index 7af67c2..1ca8a5b 100644 --- a/konversation/src/dcccommon.cpp +++ b/konversation/src/dcccommon.cpp @@ -69,9 +69,9 @@ TQString DccCommon::getOwnIp( Server* server ) return ownIp; } -KNetwork::KServerSocket* DccCommon::createServerSocketAndListen( TQObject* parent, TQString* failedReason, int minPort, int maxPort ) +KNetwork::KServerSocket* DccCommon::createServerSocketAndListen( TQObject* tqparent, TQString* failedReason, int minPort, int maxPort ) { - KNetwork::KServerSocket* socket = new KNetwork::KServerSocket( parent ); + KNetwork::KServerSocket* socket = new KNetwork::KServerSocket( tqparent ); socket->setFamily( KNetwork::KResolver::InetFamily ); if ( minPort > 0 && maxPort >= minPort ) // ports are configured manually diff --git a/konversation/src/dcccommon.h b/konversation/src/dcccommon.h index b556524..9901178 100644 --- a/konversation/src/dcccommon.h +++ b/konversation/src/dcccommon.h @@ -36,7 +36,7 @@ class DccCommon static TQString getOwnIp( Server* server = 0 ); // creates an instance of KNetwork::ServerSocket following the DCC settings - static KNetwork::KServerSocket* createServerSocketAndListen( TQObject* parent = 0, TQString* failedReason = 0, int minPort = 0, int maxPort = 0 ); + static KNetwork::KServerSocket* createServerSocketAndListen( TQObject* tqparent = 0, TQString* failedReason = 0, int minPort = 0, int maxPort = 0 ); // returns the port number from a server socket static int getServerSocketPort( KNetwork::KServerSocket* serverSocket ); diff --git a/konversation/src/dccrecipientdialog.cpp b/konversation/src/dccrecipientdialog.cpp index bb5d334..913227d 100644 --- a/konversation/src/dccrecipientdialog.cpp +++ b/konversation/src/dccrecipientdialog.cpp @@ -23,14 +23,14 @@ TQString DccRecipientDialog::selectedNickname; // static -DccRecipientDialog::DccRecipientDialog(TQWidget* parent, const TQStringList &list,const TQSize &size) : - KDialogBase(parent,"dcc_recipient_dialog",true,i18n("Select Recipient"), +DccRecipientDialog::DccRecipientDialog(TQWidget* tqparent, const TQStringList &list,const TQSize &size) : + KDialogBase(tqparent,"dcc_recipient_dialog",true,i18n("Select Recipient"), KDialogBase::Ok | KDialogBase::Cancel,KDialogBase::Ok,true) { // Create the top level widget TQWidget* page=new TQWidget(this); setMainWidget(page); - // Add the layout to the widget + // Add the tqlayout to the widget TQVBoxLayout* dialogLayout=new TQVBoxLayout(page); dialogLayout->setSpacing(spacingHint()); // Add the nickname list widget @@ -88,10 +88,10 @@ void DccRecipientDialog::slotOk() KDialogBase::slotOk(); } -TQString DccRecipientDialog::getNickname(TQWidget* parent, const TQStringList& list) +TQString DccRecipientDialog::getNickname(TQWidget* tqparent, const TQStringList& list) { TQSize size; // TODO: get it from Preferences - DccRecipientDialog dlg(parent,list,size); + DccRecipientDialog dlg(tqparent,list,size); dlg.exec(); return dlg.getSelectedNickname(); diff --git a/konversation/src/dccrecipientdialog.h b/konversation/src/dccrecipientdialog.h index 5964612..aeb01b0 100644 --- a/konversation/src/dccrecipientdialog.h +++ b/konversation/src/dccrecipientdialog.h @@ -23,12 +23,13 @@ class KLineEdit; class DccRecipientDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DccRecipientDialog(TQWidget* parent, const TQStringList &list, const TQSize &size); + DccRecipientDialog(TQWidget* tqparent, const TQStringList &list, const TQSize &size); ~DccRecipientDialog(); - static TQString getNickname(TQWidget* parent, const TQStringList& list); + static TQString getNickname(TQWidget* tqparent, const TQStringList& list); protected slots: void newNicknameSelected(TQListBoxItem* item); diff --git a/konversation/src/dccresumedialog.cpp b/konversation/src/dccresumedialog.cpp index 30b687b..7568569 100644 --- a/konversation/src/dccresumedialog.cpp +++ b/konversation/src/dccresumedialog.cpp @@ -97,7 +97,7 @@ DccResumeDialog::DccResumeDialog(DccTransferRecv* item, const TQString& caption, } updateDialogButtons(); - setInitialSize(TQSize(500, sizeHint().height())); + setInitialSize(TQSize(500, tqsizeHint().height())); } @@ -150,14 +150,14 @@ void DccResumeDialog::suggestNewName() // slot TQString basename = m_urlreqFileURL->url().section("/", -1); KURL baseURL(m_urlreqFileURL->url().section("/", 0, -2)); - int index = basename.find( '.' ); + int index = basename.tqfind( '.' ); if ( index != -1 ) { dotSuffix = basename.mid( index ); basename.truncate( index ); } - int pos = basename.findRev( '_' ); + int pos = basename.tqfindRev( '_' ); if(pos != -1 ) { TQString tmp = basename.mid( pos+1 ); @@ -170,7 +170,7 @@ void DccResumeDialog::suggestNewName() // slot else { // yes there's already a number behind the _ so increment it by one - basename.replace( pos+1, tmp.length(), TQString::number(number+1) ); + basename.tqreplace( pos+1, tmp.length(), TQString::number(number+1) ); suggestedName = basename + dotSuffix; } } diff --git a/konversation/src/dccresumedialog.h b/konversation/src/dccresumedialog.h index 418f923..62e3a9a 100644 --- a/konversation/src/dccresumedialog.h +++ b/konversation/src/dccresumedialog.h @@ -22,6 +22,7 @@ class DccTransferRecv; class DccResumeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum ReceiveAction diff --git a/konversation/src/dcctransfer.cpp b/konversation/src/dcctransfer.cpp index c12147f..042175a 100644 --- a/konversation/src/dcctransfer.cpp +++ b/konversation/src/dcctransfer.cpp @@ -20,7 +20,7 @@ #include <kdebug.h> -DccTransfer::DccTransfer( DccType dccType, TQObject* parent ) : TQObject(parent) +DccTransfer::DccTransfer( DccType dccType, TQObject* tqparent ) : TQObject(tqparent) { kdDebug() << "DccTransfer::DccTransfer()" << endl; @@ -43,7 +43,7 @@ DccTransfer::DccTransfer( DccType dccType, TQObject* parent ) : TQObject(parent) connect( &m_loggerTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( logTransfer() ) ); - m_timeOffer = TQDateTime::currentDateTime(); + m_timeOffer = TQDateTime::tqcurrentDateTime(); } DccTransfer::~DccTransfer() @@ -60,7 +60,7 @@ DccTransfer::DccTransfer( const DccTransfer& obj ) m_bufferSize = 0; m_averageSpeed = obj.getAverageSpeed(); m_currentSpeed = obj.getCurrentSpeed(); - m_status = obj.getStatus(); + m_status = obj.gettqStatus(); m_statusDetail = obj.getStatusDetail(); m_type = obj.getType(); m_fileName = obj.getFileName(); @@ -88,20 +88,20 @@ DccTransfer::DccTransfer( const DccTransfer& obj ) void DccTransfer::setConnectionId( int id ) { - if ( getStatus() == Configuring || getStatus() == Queued ) + if ( gettqStatus() == Configuring || gettqStatus() == Queued ) m_connectionId = id; } void DccTransfer::setPartnerNick( const TQString& nick ) { - if ( getStatus() == Configuring || getStatus() == Queued ) + if ( gettqStatus() == Configuring || gettqStatus() == Queued ) m_partnerNick = nick; } bool DccTransfer::queue() { kdDebug() << "DccTransfer::queue()" << endl; - if ( getStatus() != Configuring ) + if ( gettqStatus() != Configuring ) return false; if ( m_fileName.isEmpty() ) @@ -110,13 +110,13 @@ bool DccTransfer::queue() if ( m_connectionId == -1 || m_partnerNick.isEmpty() ) return false; - setStatus( Queued ); + settqStatus( Queued ); return true; } void DccTransfer::startTransferLogger() { - m_timeTransferStarted = TQDateTime::currentDateTime(); + m_timeTransferStarted = TQDateTime::tqcurrentDateTime(); m_loggerBaseTime.start(); m_loggerTimer.start( 100 ); } @@ -124,7 +124,7 @@ void DccTransfer::startTransferLogger() void DccTransfer::finishTransferLogger() { if ( m_timeTransferFinished.isNull() ) - m_timeTransferFinished = TQDateTime::currentDateTime(); + m_timeTransferFinished = TQDateTime::tqcurrentDateTime(); m_loggerTimer.stop(); updateTransferMeters(); } @@ -137,21 +137,21 @@ void DccTransfer::logTransfer() updateTransferMeters(); } -void DccTransfer::setStatus( DccStatus status, const TQString& statusDetail ) +void DccTransfer::settqStatus( DcctqStatus status, const TQString& statusDetail ) { bool changed = ( status != m_status ); - DccStatus oldStatus = m_status; + DcctqStatus oldtqStatus = m_status; m_status = status; m_statusDetail = statusDetail; if ( changed ) - emit statusChanged( this, m_status, oldStatus ); + emit statusChanged( this, m_status, oldtqStatus ); } void DccTransfer::updateTransferMeters() { const int timeToCalc = 5; - if ( getStatus() == Transferring ) + if ( gettqStatus() == Transferring ) { // update CurrentSpeed @@ -174,7 +174,7 @@ void DccTransfer::updateTransferMeters() if ( m_transferLogTime.count() >= 2 ) { // FIXME: precision of average speed is too bad - m_averageSpeed = (double)( m_transferringPosition - m_transferStartPosition ) / (double)m_timeTransferStarted.secsTo( TQDateTime::currentDateTime() ); + m_averageSpeed = (double)( m_transferringPosition - m_transferStartPosition ) / (double)m_timeTransferStarted.secsTo( TQDateTime::tqcurrentDateTime() ); m_currentSpeed = (double)( m_transferLogPosition.last() - m_transferLogPosition.front() ) / (double)( m_transferLogTime.last() - m_transferLogTime.front() ) * 1000; } else // avoid zero devision @@ -210,7 +210,7 @@ TQString DccTransfer::sanitizeFileName( const TQString& fileName ) { TQString fileNameTmp = TQFileInfo( fileName ).fileName(); if ( fileNameTmp.startsWith( "." ) ) - fileNameTmp.replace( 0, 1, '_' ); // Don't create hidden files + fileNameTmp.tqreplace( 0, 1, '_' ); // Don't create hidden files if ( fileNameTmp.isEmpty() ) fileNameTmp = "unnamed"; return fileNameTmp; @@ -240,7 +240,7 @@ DccTransfer::DccType DccTransfer::getType() const return m_type; } -DccTransfer::DccStatus DccTransfer::getStatus() const +DccTransfer::DcctqStatus DccTransfer::gettqStatus() const { return m_status; } diff --git a/konversation/src/dcctransfer.h b/konversation/src/dcctransfer.h index f558fa4..ea412bf 100644 --- a/konversation/src/dcctransfer.h +++ b/konversation/src/dcctransfer.h @@ -27,9 +27,10 @@ typedef double transferspeed_t; -class DccTransfer : public QObject +class DccTransfer : public TQObject { Q_OBJECT + TQ_OBJECT public: enum DccType @@ -38,7 +39,7 @@ class DccTransfer : public QObject Send }; - enum DccStatus + enum DcctqStatus { Configuring = 0, // Not queud yet (this means that user can't see the item at this time) Queued, // Newly added DCC, waiting user's response @@ -51,21 +52,21 @@ class DccTransfer : public QObject Aborted }; - enum UnavailableStatus + enum UnavailabletqStatus { Calculating = -1, NotInTransfer = -2, InfiniteValue = -3 }; - DccTransfer( DccType dccType, TQObject* parent ); + DccTransfer( DccType dccType, TQObject* tqparent ); virtual ~DccTransfer(); // info of DccTransfer can be copied with this constructor. DccTransfer( const DccTransfer& obj ); DccType getType() const; - DccStatus getStatus() const; + DcctqStatus gettqStatus() const; const TQString& getStatusDetail() const; TQDateTime getTimeOffer() const; int getConnectionId() const; @@ -91,15 +92,15 @@ class DccTransfer : public QObject // common settings for DccTransferRecv / DccTransferSend - // REQUIRED + // RETQUIRED void setConnectionId( int connectionId ); - // REQUIRED + // RETQUIRED void setPartnerNick( const TQString& nick ); signals: void transferStarted( DccTransfer* item ); void done( DccTransfer* item ); - void statusChanged( DccTransfer* item, int newStatus, int oldStatus ); + void statusChanged( DccTransfer* item, int newtqStatus, int oldtqStatus ); public slots: virtual bool queue(); @@ -107,7 +108,7 @@ class DccTransfer : public QObject virtual void abort() {}; protected: - void setStatus( DccStatus status, const TQString& statusDetail = TQString() ); + void settqStatus( DcctqStatus status, const TQString& statusDetail = TQString() ); void startTransferLogger(); void finishTransferLogger(); @@ -121,7 +122,7 @@ class DccTransfer : public QObject protected: // transfer information DccType m_type; - DccStatus m_status; + DcctqStatus m_status; TQString m_statusDetail; bool m_resumed; bool m_reverse; diff --git a/konversation/src/dcctransferdetailedinfopanel.cpp b/konversation/src/dcctransferdetailedinfopanel.cpp index 8aec7d0..8a904db 100644 --- a/konversation/src/dcctransferdetailedinfopanel.cpp +++ b/konversation/src/dcctransferdetailedinfopanel.cpp @@ -30,8 +30,8 @@ #include <ksqueezedtextlabel.h> -DccTransferDetailedInfoPanel::DccTransferDetailedInfoPanel( TQWidget* parent, const char* name ) - : DccTransferDetailedInfoPanelUI( parent, name ) +DccTransferDetailedInfoPanel::DccTransferDetailedInfoPanel( TQWidget* tqparent, const char* name ) + : DccTransferDetailedInfoPanelUI( tqparent, name ) { m_autoViewUpdateTimer = new TQTimer( this ); @@ -61,7 +61,7 @@ void DccTransferDetailedInfoPanel::setItem( DccTransferPanelItem* item ) // If the file is already being transferred, the timer must be started here, // otherwise the information will not be updated every 0.5sec - if (m_item->transfer()->getStatus() == DccTransfer::Transferring) + if (m_item->transfer()->gettqStatus() == DccTransfer::Transferring) m_autoViewUpdateTimer->start(500, false); connect( m_item->transfer(), TQT_SIGNAL( statusChanged( DccTransfer*, int, int ) ), this, TQT_SLOT( slotTransferStatusChanged( DccTransfer*, int, int ) ) ); @@ -83,10 +83,10 @@ void DccTransferDetailedInfoPanel::updateView() // Location: m_urlreqLocation->setURL( transfer->getFileURL().prettyURL() ); - //m_urlreqLocation->lineEdit()->setFocusPolicy( transfer->getStatus() == DccTransfer::Queued ? StrongFocus : ClickFocus ); - m_urlreqLocation->lineEdit()->setReadOnly( transfer->getStatus() != DccTransfer::Queued ); - m_urlreqLocation->lineEdit()->setFrame( transfer->getStatus() == DccTransfer::Queued ); - m_urlreqLocation->button()->setEnabled( transfer->getStatus() == DccTransfer::Queued ); + //m_urlreqLocation->lineEdit()->setFocusPolicy( transfer->gettqStatus() == DccTransfer::Queued ? StrongFocus : ClickFocus ); + m_urlreqLocation->lineEdit()->setReadOnly( transfer->gettqStatus() != DccTransfer::Queued ); + m_urlreqLocation->lineEdit()->setFrame( transfer->gettqStatus() == DccTransfer::Queued ); + m_urlreqLocation->button()->setEnabled( transfer->gettqStatus() == DccTransfer::Queued ); m_buttonOpenFolder->setEnabled( !m_urlreqLocation->lineEdit()->text().isEmpty() ); // Partner: @@ -98,23 +98,23 @@ void DccTransferDetailedInfoPanel::updateView() else partnerInfoServerName = i18n( "Unknown server" ); TQString partnerInfo( i18n( "%1 on %2" ) - .arg( transfer->getPartnerNick().isEmpty() ? "?" : transfer->getPartnerNick() ) - .arg( partnerInfoServerName ) ); + .tqarg( transfer->getPartnerNick().isEmpty() ? "?" : transfer->getPartnerNick() ) + .tqarg( partnerInfoServerName ) ); if ( !transfer->getPartnerIp().isEmpty() ) - partnerInfo += i18n( ", %1 (port %2)" ).arg( transfer->getPartnerIp() ).arg( transfer->getPartnerPort() ); + partnerInfo += i18n( ", %1 (port %2)" ).tqarg( transfer->getPartnerIp() ).tqarg( transfer->getPartnerPort() ); m_labelPartner->setText( partnerInfo ); // Self: if ( transfer->getOwnIp().isEmpty() ) m_labelSelf->setText( "" ); else - m_labelSelf->setText( i18n( "%1 (port %2)" ).arg( transfer->getOwnIp() ).arg( transfer->getOwnPort() ) ); + m_labelSelf->setText( i18n( "%1 (port %2)" ).tqarg( transfer->getOwnIp() ).tqarg( transfer->getOwnPort() ) ); - // Status: - if ( transfer->getStatus() == DccTransfer::Transferring ) - m_labelStatus->setText( m_item->getStatusText() + " ( " + m_item->getCurrentSpeedPrettyText() + " )" ); + // tqStatus: + if ( transfer->gettqStatus() == DccTransfer::Transferring ) + m_labeltqStatus->setText( m_item->getStatusText() + " ( " + m_item->getCurrentSpeedPrettyText() + " )" ); else - m_labelStatus->setText( transfer->getStatusDetail().isEmpty() ? m_item->getStatusText() : m_item->getStatusText() + " (" + transfer->getStatusDetail() + ')' ); + m_labeltqStatus->setText( transfer->getStatusDetail().isEmpty() ? m_item->getStatusText() : m_item->getStatusText() + " (" + transfer->getStatusDetail() + ')' ); // Progress: m_progress->setProgress( transfer->getProgress() ); @@ -133,7 +133,7 @@ void DccTransferDetailedInfoPanel::updateView() // Resumed: if ( transfer->isResumed() ) - m_labelIsResumed->setText( i18n( "Yes, %1" ).arg( KGlobal::locale()->formatNumber( transfer->getTransferStartPosition(), 0 ) ) ); + m_labelIsResumed->setText( i18n( "Yes, %1" ).tqarg( KGlobal::locale()->formatNumber( transfer->getTransferStartPosition(), 0 ) ) ); else m_labelIsResumed->setText( i18n( "No" ) ); @@ -146,7 +146,7 @@ void DccTransferDetailedInfoPanel::updateView() // The transfer is still in progress if ( transfer->getTimeTransferFinished().isNull() ) - transferringTime = transfer->getTimeTransferStarted().secsTo( TQDateTime::currentDateTime() ); + transferringTime = transfer->getTimeTransferStarted().secsTo( TQDateTime::tqcurrentDateTime() ); // The transfer has finished else transferringTime = transfer->getTimeTransferStarted().secsTo( transfer->getTimeTransferFinished() ); @@ -176,15 +176,15 @@ void DccTransferDetailedInfoPanel::updateView() m_labelTimeFinished->setText( "" ); } -void DccTransferDetailedInfoPanel::slotTransferStatusChanged( DccTransfer* /* transfer */, int newStatus, int oldStatus ) +void DccTransferDetailedInfoPanel::slotTransferStatusChanged( DccTransfer* /* transfer */, int newtqStatus, int oldtqStatus ) { updateView(); - if ( newStatus == DccTransfer::Transferring ) + if ( newtqStatus == DccTransfer::Transferring ) { // start auto view-update timer m_autoViewUpdateTimer->start( 500, false ); } - else if ( oldStatus == DccTransfer::Transferring ) + else if ( oldtqStatus == DccTransfer::Transferring ) { // stop auto view-update timer m_autoViewUpdateTimer->stop(); diff --git a/konversation/src/dcctransferdetailedinfopanel.h b/konversation/src/dcctransferdetailedinfopanel.h index a5358a4..9a3d706 100644 --- a/konversation/src/dcctransferdetailedinfopanel.h +++ b/konversation/src/dcctransferdetailedinfopanel.h @@ -23,16 +23,17 @@ class DccTransferPanelItem; class DccTransferDetailedInfoPanel : public DccTransferDetailedInfoPanelUI { Q_OBJECT + TQ_OBJECT public: - explicit DccTransferDetailedInfoPanel( TQWidget* parent = 0, const char* name = 0 ); + explicit DccTransferDetailedInfoPanel( TQWidget* tqparent = 0, const char* name = 0 ); virtual ~DccTransferDetailedInfoPanel(); void setItem( DccTransferPanelItem* item ); private slots: void updateView(); - void slotTransferStatusChanged( DccTransfer* transfer, int newStatus, int oldStatus ); + void slotTransferStatusChanged( DccTransfer* transfer, int newtqStatus, int oldtqStatus ); void slotLocationChanged( const TQString& url ); void slotOpenFolderButtonClicked(); diff --git a/konversation/src/dcctransferdetailedinfopanelui.ui b/konversation/src/dcctransferdetailedinfopanelui.ui index 9c3f136..a7dae6a 100644 --- a/konversation/src/dcctransferdetailedinfopanelui.ui +++ b/konversation/src/dcctransferdetailedinfopanelui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>DccTransferDetailedInfoPanelUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DccTransferDetailedInfoPanelUI</cstring> </property> @@ -24,9 +24,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> @@ -37,12 +37,12 @@ <cstring>m_labelFilename</cstring> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_labelDccType</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -50,7 +50,7 @@ <string>Filename:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -58,7 +58,7 @@ <string>Self:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -66,15 +66,15 @@ <string>Type:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> <property name="text"> - <string>Status:</string> + <string>tqStatus:</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -82,7 +82,7 @@ <string>Location:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel18</cstring> </property> @@ -90,12 +90,12 @@ <string>Progress:</string> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> - <cstring>m_labelStatus</cstring> + <cstring>m_labeltqStatus</cstring> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_labelPartner</cstring> </property> @@ -105,7 +105,7 @@ <cstring>m_progress</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel23</cstring> </property> @@ -113,9 +113,9 @@ <string>Partner:</string> </property> </widget> - <widget class="QLayoutWidget" row="6" column="1"> + <widget class="TQLayoutWidget" row="6" column="1"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -126,7 +126,7 @@ <cstring>m_urlreqLocation</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_buttonOpenFolder</cstring> </property> @@ -139,7 +139,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_labelSelf</cstring> </property> @@ -160,23 +160,23 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout26</cstring> + <cstring>tqlayout26</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_labelCurrentSpeed</cstring> </property> @@ -188,17 +188,17 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel21</cstring> </property> @@ -206,7 +206,7 @@ <string>File Size:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_labelIsResumed</cstring> </property> @@ -218,17 +218,17 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_labelFileSize</cstring> </property> @@ -240,17 +240,17 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -258,7 +258,7 @@ <string>Average Speed:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel14</cstring> </property> @@ -266,7 +266,7 @@ <string>Resumed:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_labelCurrentPosition</cstring> </property> @@ -278,17 +278,17 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -296,7 +296,7 @@ <string>Current Speed:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel19</cstring> </property> @@ -304,7 +304,7 @@ <string>Current Position:</string> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_labelAverageSpeed</cstring> </property> @@ -316,13 +316,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -342,15 +342,15 @@ <enum>Vertical</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -358,7 +358,7 @@ <string>Estimated Time Left:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -366,15 +366,15 @@ <string>Offered at:</string> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_labelTimeFinished</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_labelTransferringTime</cstring> </property> @@ -386,17 +386,17 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -404,7 +404,7 @@ <string>Finished at:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel6_2</cstring> </property> @@ -412,7 +412,7 @@ <string>Started at:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_labelTimeLeft</cstring> </property> @@ -424,25 +424,25 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> </size> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_labelTimeOffered</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -450,11 +450,11 @@ <string>Transferring Time:</string> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_labelTimeStarted</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -470,7 +470,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>20</height> @@ -481,7 +481,7 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kprogress.h</includehint> <includehint>kurlrequester.h</includehint> diff --git a/konversation/src/dcctransfermanager.cpp b/konversation/src/dcctransfermanager.cpp index ec36840..fd26fcf 100644 --- a/konversation/src/dcctransfermanager.cpp +++ b/konversation/src/dcctransfermanager.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> -DccTransferManager::DccTransferManager( TQObject* parent ) - : TQObject( parent ) +DccTransferManager::DccTransferManager( TQObject* tqparent ) + : TQObject( tqparent ) { // initial number m_nextReverseTokenNumber = 1001; @@ -62,7 +62,7 @@ DccTransferRecv* DccTransferManager::resumeDownload( int connectionId, const TQS TQValueListConstIterator< DccTransferRecv* > it; for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it ) { - if ( ( (*it)->getStatus() == DccTransfer::Queued || (*it)->getStatus() == DccTransfer::WaitingRemote ) && + if ( ( (*it)->gettqStatus() == DccTransfer::Queued || (*it)->gettqStatus() == DccTransfer::WaitingRemote ) && (*it)->getConnectionId() == connectionId && (*it)->getPartnerNick() == partnerNick && (*it)->getFileName() == fileName && @@ -92,7 +92,7 @@ DccTransferSend* DccTransferManager::resumeUpload( int connectionId, const TQStr TQValueListConstIterator< DccTransferSend* > it; for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it ) { - if ( ( (*it)->getStatus() == DccTransfer::Queued || (*it)->getStatus() == DccTransfer::WaitingRemote ) && + if ( ( (*it)->gettqStatus() == DccTransfer::Queued || (*it)->gettqStatus() == DccTransfer::WaitingRemote ) && (*it)->getConnectionId() == connectionId && (*it)->getPartnerNick() == partnerNick && (*it)->getFileName() == fileName && @@ -124,7 +124,7 @@ DccTransferSend* DccTransferManager::startReverseSending( int connectionId, cons for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it ) { if ( - (*it)->getStatus() == DccTransfer::WaitingRemote && + (*it)->gettqStatus() == DccTransfer::WaitingRemote && (*it)->getConnectionId() == connectionId && (*it)->getPartnerNick() == partnerNick && (*it)->getFileName() == fileName && @@ -155,8 +155,8 @@ bool DccTransferManager::isLocalFileInWritingProcess( const KURL& url ) const TQValueListConstIterator< DccTransferRecv* > it; for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it ) { - if ( ( (*it)->getStatus() == DccTransfer::Connecting || - (*it)->getStatus() == DccTransfer::Transferring ) && + if ( ( (*it)->gettqStatus() == DccTransfer::Connecting || + (*it)->gettqStatus() == DccTransfer::Transferring ) && (*it)->getFileURL() == url ) { return true; @@ -175,25 +175,25 @@ bool DccTransferManager::hasActiveTransfers() TQValueListConstIterator< DccTransferSend* > it; for ( it = m_sendItems.begin() ; it != m_sendItems.end() ; ++it ) { - if ((*it)->getStatus() == DccTransfer::Transferring) + if ((*it)->gettqStatus() == DccTransfer::Transferring) return true; } TQValueListConstIterator< DccTransferRecv* > it2; for ( it2 = m_recvItems.begin() ; it2 != m_recvItems.end() ; ++it2 ) { - if ((*it2)->getStatus() == DccTransfer::Transferring) + if ((*it2)->gettqStatus() == DccTransfer::Transferring) return true; } return false; } -void DccTransferManager::slotTransferStatusChanged( DccTransfer* item, int newStatus, int oldStatus ) +void DccTransferManager::slotTransferStatusChanged( DccTransfer* item, int newtqStatus, int oldtqStatus ) { - kdDebug() << "DccTransferManager::slotTransferStatusChanged(): " << oldStatus << " -> " << newStatus << " " << item->getFileName() << " (" << item->getType() << ")" << endl; + kdDebug() << "DccTransferManager::slotTransferStatusChanged(): " << oldtqStatus << " -> " << newtqStatus << " " << item->getFileName() << " (" << item->getType() << ")" << endl; - if ( newStatus == DccTransfer::Queued ) + if ( newtqStatus == DccTransfer::Queued ) emit newTransferQueued( item ); } @@ -205,7 +205,7 @@ void DccTransferManager::slotSettingsChanged() TQValueListConstIterator< DccTransferRecv* > it; for ( it = m_recvItems.begin() ; it != m_recvItems.end() ; ++it ) { - if ( (*it)->getStatus() == DccTransfer::Queued && + if ( (*it)->gettqStatus() == DccTransfer::Queued && (*it)->getFileURL().directory() == m_defaultIncomingFolder ) { KURL url; diff --git a/konversation/src/dcctransfermanager.h b/konversation/src/dcctransfermanager.h index 7aad8b8..5c810a4 100644 --- a/konversation/src/dcctransfermanager.h +++ b/konversation/src/dcctransfermanager.h @@ -29,12 +29,13 @@ class KURL; class DccTransferRecv; class DccTransferSend; -class DccTransferManager : public QObject +class DccTransferManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - DccTransferManager( TQObject* parent = 0 ); + DccTransferManager( TQObject* tqparent = 0 ); ~DccTransferManager(); signals: @@ -78,7 +79,7 @@ class DccTransferManager : public QObject void initTransfer( DccTransfer* transfer ); private slots: - void slotTransferStatusChanged( DccTransfer* item, int newStatus, int oldStatus ); + void slotTransferStatusChanged( DccTransfer* item, int newtqStatus, int oldtqStatus ); void removeSendItem( DccTransfer* item ); void removeRecvItem( DccTransfer* item ); diff --git a/konversation/src/dcctransferpanel.cpp b/konversation/src/dcctransferpanel.cpp index 9420545..fe35bec 100644 --- a/konversation/src/dcctransferpanel.cpp +++ b/konversation/src/dcctransferpanel.cpp @@ -40,10 +40,10 @@ #include <kapplication.h> -DccTransferPanel::DccTransferPanel(TQWidget* parent) : ChatWindow(parent) +DccTransferPanel::DccTransferPanel(TQWidget* tqparent) : ChatWindow(tqparent) { setType(ChatWindow::DccTransferPanel); - setName(i18n("DCC Status")); + setName(i18n("DCC tqStatus")); initGUI(); @@ -76,7 +76,7 @@ void DccTransferPanel::initGUI() //m_listView->setColumnText(Column::TypeIcon, ""); m_listView->setColumnText(Column::OfferDate, i18n("Started at")); - m_listView->setColumnText(Column::Status, i18n("Status")); + m_listView->setColumnText(Column::tqStatus, i18n("tqStatus")); m_listView->setColumnText(Column::FileName, i18n("File")); m_listView->setColumnText(Column::PartnerNick, i18n("Partner")); m_listView->setColumnText(Column::Progress, i18n("Progress")); @@ -201,7 +201,7 @@ void DccTransferPanel::updateButton() DccTransferPanelItem* item = static_cast<DccTransferPanelItem*>( it.current() ); DccTransfer::DccType type = item->transfer()->getType(); - DccTransfer::DccStatus status = item->transfer()->getStatus(); + DccTransfer::DcctqStatus status = item->transfer()->gettqStatus(); selectAll = true; selectAllCompleted |= ( status >= DccTransfer::Done ); @@ -276,7 +276,7 @@ void DccTransferPanel::acceptDcc() { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); DccTransfer* transfer = item->transfer(); - if( transfer->getType() == DccTransfer::Receive && transfer->getStatus() == DccTransfer::Queued ) + if( transfer->getType() == DccTransfer::Receive && transfer->gettqStatus() == DccTransfer::Queued ) transfer->start(); } ++it; @@ -292,7 +292,7 @@ void DccTransferPanel::abortDcc() { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); DccTransfer* transfer = item->transfer(); - if( transfer->getStatus() < DccTransfer::Done ) + if( transfer->gettqStatus() < DccTransfer::Done ) transfer->abort(); } ++it; @@ -308,7 +308,7 @@ void DccTransferPanel::resendFile() { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); DccTransfer* transfer = item->transfer(); - if( transfer->getType() == DccTransfer::Send && transfer->getStatus() >= DccTransfer::Done ) + if( transfer->getType() == DccTransfer::Send && transfer->gettqStatus() >= DccTransfer::Done ) { DccTransferSend* newTransfer = KonversationApplication::instance()->getDccTransferManager()->newUpload(); @@ -335,7 +335,7 @@ void DccTransferPanel::clearDcc() { DccTransferPanelItem* item = static_cast<DccTransferPanelItem*>( it.current() ); // should we check that [item] is not null? - if( it.current()->isSelected() && item->transfer()->getStatus() >= DccTransfer::Done ) + if( it.current()->isSelected() && item->transfer()->gettqStatus() >= DccTransfer::Done ) lst.append( it.current() ); ++it; } @@ -346,7 +346,7 @@ void DccTransferPanel::clearDcc() bool itemSelected = false; while( selected.current() ) { - if (selected.current()->itemBelow() && !lst.containsRef(selected.current()->itemBelow())) + if (selected.current()->itemBelow() && !lst.tqcontainsRef(selected.current()->itemBelow())) { m_listView->setSelected(selected.current()->itemBelow(),true); m_listView->setCurrentItem(selected.current()->itemBelow()); @@ -377,7 +377,7 @@ void DccTransferPanel::runDcc() { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); DccTransfer* transfer = item->transfer(); - if( transfer->getType() == DccTransfer::Send || transfer->getStatus() == DccTransfer::Done ) + if( transfer->getType() == DccTransfer::Send || transfer->gettqStatus() == DccTransfer::Done ) item->runFile(); } ++it; @@ -392,7 +392,7 @@ void DccTransferPanel::showFileInfo() if( it.current()->isSelected() ) { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); - if( item->transfer()->getType() == DccTransfer::Send || item->transfer()->getStatus() == DccTransfer::Done ) + if( item->transfer()->getType() == DccTransfer::Send || item->transfer()->gettqStatus() == DccTransfer::Done ) item->openFileInfoDialog(); } ++it; @@ -416,7 +416,7 @@ void DccTransferPanel::selectAllCompleted() while ( it.current() ) { DccTransferPanelItem* item=static_cast<DccTransferPanelItem*>( it.current() ); - m_listView->setSelected( *it, item->transfer()->getStatus() >= DccTransfer::Done ); + m_listView->setSelected( *it, item->transfer()->gettqStatus() >= DccTransfer::Done ); ++it; } updateButton(); diff --git a/konversation/src/dcctransferpanel.h b/konversation/src/dcctransferpanel.h index 3a9c1a7..8628d77 100644 --- a/konversation/src/dcctransferpanel.h +++ b/konversation/src/dcctransferpanel.h @@ -29,6 +29,7 @@ class DccTransferDetailedInfoPanel; class DccTransferPanel : public ChatWindow { Q_OBJECT + TQ_OBJECT public: class Column @@ -38,7 +39,7 @@ class DccTransferPanel : public ChatWindow { TypeIcon, OfferDate, - Status, + tqStatus, FileName, PartnerNick, Progress, @@ -66,7 +67,7 @@ class DccTransferPanel : public ChatWindow }; }; - DccTransferPanel(TQWidget* parent); + DccTransferPanel(TQWidget* tqparent); ~DccTransferPanel(); KListView* getListView(); diff --git a/konversation/src/dcctransferpanelitem.cpp b/konversation/src/dcctransferpanelitem.cpp index e0ebc49..8737a3b 100644 --- a/konversation/src/dcctransferpanelitem.cpp +++ b/konversation/src/dcctransferpanelitem.cpp @@ -67,10 +67,10 @@ DccTransferPanelItem::~DccTransferPanelItem() void DccTransferPanelItem::updateView() { setPixmap( DccTransferPanel::Column::TypeIcon, getTypeIcon() ); - setPixmap( DccTransferPanel::Column::Status, getStatusIcon() ); + setPixmap( DccTransferPanel::Column::tqStatus, getStatusIcon() ); setText( DccTransferPanel::Column::OfferDate, m_transfer->getTimeOffer().toString( "hh:mm:ss" ) ); - setText( DccTransferPanel::Column::Status, getStatusText() ); + setText( DccTransferPanel::Column::tqStatus, getStatusText() ); setText( DccTransferPanel::Column::FileName, m_transfer->getFileName() ); setText( DccTransferPanel::Column::PartnerNick, m_transfer->getPartnerNick() ); setText( DccTransferPanel::Column::Position, getPositionPrettyText() ); @@ -104,9 +104,9 @@ int DccTransferPanelItem::compare( TQListViewItem* i, int col, bool ascending ) if ( m_transfer->getTimeOffer() < item->transfer()->getTimeOffer() ) return -1; return 0; break; - case DccTransferPanel::Column::Status: - if ( m_transfer->getStatus() > item->transfer()->getStatus() ) return 1; - if ( m_transfer->getStatus() < item->transfer()->getStatus() ) return -1; + case DccTransferPanel::Column::tqStatus: + if ( m_transfer->gettqStatus() > item->transfer()->gettqStatus() ) return 1; + if ( m_transfer->gettqStatus() < item->transfer()->gettqStatus() ) return -1; return 0; break; case DccTransferPanel::Column::Position: @@ -130,11 +130,11 @@ int DccTransferPanelItem::compare( TQListViewItem* i, int col, bool ascending ) return TQListViewItem::compare( i, col, ascending ); } -void DccTransferPanelItem::slotStatusChanged( DccTransfer* /* transfer */, int newStatus, int /* oldStatus */ ) +void DccTransferPanelItem::slotStatusChanged( DccTransfer* /* transfer */, int newtqStatus, int /* oldtqStatus */ ) { updateView(); - if ( newStatus == DccTransfer::Transferring ) + if ( newtqStatus == DccTransfer::Transferring ) startAutoViewUpdate(); } @@ -156,9 +156,9 @@ void DccTransferPanelItem::stopAutoViewUpdate() } } -void DccTransferPanelItem::paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int alignment ) // virtual public +void DccTransferPanelItem::paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int tqalignment ) // virtual public { - KListViewItem::paintCell( painter, colorgroup, column, width, alignment ); + KListViewItem::paintCell( painter, colorgroup, column, width, tqalignment ); if ( column == DccTransferPanel::Column::Progress ) showProgressBar(); } @@ -167,7 +167,7 @@ void DccTransferPanelItem::showProgressBar() { if ( m_transfer->getFileSize() ) { - TQRect rect = listView()->itemRect( this ); + TQRect rect = listView()->tqitemRect( this ); TQHeader *head = listView()->header(); rect.setLeft( head->sectionPos( DccTransferPanel::Column::Progress ) - head->offset() ); rect.setWidth( head->sectionSize( DccTransferPanel::Column::Progress ) ); @@ -178,13 +178,13 @@ void DccTransferPanelItem::showProgressBar() void DccTransferPanelItem::runFile() { - if ( m_transfer->getType() == DccTransfer::Send || m_transfer->getStatus() == DccTransfer::Done ) + if ( m_transfer->getType() == DccTransfer::Send || m_transfer->gettqStatus() == DccTransfer::Done ) new KRun( m_transfer->getFileURL(), listView() ); } void DccTransferPanelItem::openFileInfoDialog() { - if ( m_transfer->getType() == DccTransfer::Send || m_transfer->getStatus() == DccTransfer::Done ) + if ( m_transfer->getType() == DccTransfer::Send || m_transfer->gettqStatus() == DccTransfer::Done ) { TQStringList infoList; @@ -229,7 +229,7 @@ void DccTransferPanelItem::openFileInfoDialog() #ifdef USE_INFOLIST KMessageBox::informationList( listView(), - i18n("Available information for file %1:").arg(path), + i18n("Available information for file %1:").tqarg(path), infoList, i18n("File Information") ); @@ -278,7 +278,7 @@ TQPixmap DccTransferPanelItem::getTypeIcon() const TQPixmap DccTransferPanelItem::getStatusIcon() const { TQString icon; - switch ( m_transfer->getStatus() ) + switch ( m_transfer->gettqStatus() ) { case DccTransfer::Queued: icon = "player_stop"; @@ -306,7 +306,7 @@ TQPixmap DccTransferPanelItem::getStatusIcon() const TQString DccTransferPanelItem::getStatusText() const { - DccTransfer::DccStatus status = m_transfer->getStatus(); + DccTransfer::DcctqStatus status = m_transfer->gettqStatus(); DccTransfer::DccType type = m_transfer->getType(); if ( status == DccTransfer::Queued ) @@ -372,9 +372,9 @@ TQString DccTransferPanelItem::getCurrentSpeedPrettyText() const TQString DccTransferPanelItem::getSenderAddressPrettyText() const { if ( m_transfer->getType() == DccTransfer::Send ) - return TQString( "%1:%2" ).arg( m_transfer->getOwnIp() ).arg( m_transfer->getOwnPort() ); + return TQString( "%1:%2" ).tqarg( m_transfer->getOwnIp() ).tqarg( m_transfer->getOwnPort() ); else - return TQString( "%1:%2" ).arg( m_transfer->getPartnerIp() ).arg( m_transfer->getPartnerPort() ); + return TQString( "%1:%2" ).tqarg( m_transfer->getPartnerIp() ).tqarg( m_transfer->getPartnerPort() ); } TQString DccTransferPanelItem::getSpeedPrettyText( transferspeed_t speed ) @@ -384,7 +384,7 @@ TQString DccTransferPanelItem::getSpeedPrettyText( transferspeed_t speed ) else if ( speed == DccTransfer::NotInTransfer ) return TQString(); else - return i18n("%1/sec").arg( KIO::convertSize( (KIO::fileoffset_t)speed ) ); + return i18n("%1/sec").tqarg( KIO::convertSize( (KIO::fileoffset_t)speed ) ); } TQString DccTransferPanelItem::secToHMS( long sec ) @@ -395,9 +395,9 @@ TQString DccTransferPanelItem::secToHMS( long sec ) // remHour can be more than 25, so we can't use TQTime here. return TQString( "%1:%2:%3" ) - .arg( TQString::number( remHour ).rightJustify( 2, '0', false ) ) - .arg( TQString::number( remMin ).rightJustify( 2, '0' ) ) - .arg( TQString::number( remSec ).rightJustify( 2, '0' ) ); + .tqarg( TQString::number( remHour ).rightJustify( 2, '0', false ) ) + .tqarg( TQString::number( remMin ).rightJustify( 2, '0' ) ) + .tqarg( TQString::number( remSec ).rightJustify( 2, '0' ) ); } #include "dcctransferpanelitem.moc" diff --git a/konversation/src/dcctransferpanelitem.h b/konversation/src/dcctransferpanelitem.h index 051de88..7e1b113 100644 --- a/konversation/src/dcctransferpanelitem.h +++ b/konversation/src/dcctransferpanelitem.h @@ -40,12 +40,13 @@ class DccTransferPanel; class DccTransferPanelItem : public TQObject, public KListViewItem { Q_OBJECT + TQ_OBJECT public: DccTransferPanelItem( DccTransferPanel* panel, DccTransfer* transfer ); virtual ~DccTransferPanelItem(); - virtual void paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int alignment ); + virtual void paintCell( TQPainter* painter, const TQColorGroup& colorgroup, int column, int width, int tqalignment ); virtual int compare( TQListViewItem* i, int col, bool ascending ) const; @@ -70,7 +71,7 @@ class DccTransferPanelItem : public TQObject, public KListViewItem static TQString secToHMS( long sec ); private slots: - void slotStatusChanged( DccTransfer* transfer, int newStatus, int oldStatus ); + void slotStatusChanged( DccTransfer* transfer, int newtqStatus, int oldtqStatus ); void updateView(); private: diff --git a/konversation/src/dcctransferrecv.cpp b/konversation/src/dcctransferrecv.cpp index a5ff971..5ae2de8 100644 --- a/konversation/src/dcctransferrecv.cpp +++ b/konversation/src/dcctransferrecv.cpp @@ -57,8 +57,8 @@ connectionSuccess() : called by recvSocket */ -DccTransferRecv::DccTransferRecv(TQObject* parent) - : DccTransfer( DccTransfer::Receive, parent ) +DccTransferRecv::DccTransferRecv(TQObject* tqparent) + : DccTransfer( DccTransfer::Receive, tqparent ) { kdDebug() << "DccTransferRecv::DccTransferRecv()" << endl; @@ -100,7 +100,7 @@ void DccTransferRecv::cleanUp() if ( m_recvSocket ) { m_recvSocket->close(); - m_recvSocket = 0; // the instance will be deleted automatically by its parent + m_recvSocket = 0; // the instance will be deleted automatically by its tqparent } if ( m_writeCacheHandler ) { @@ -113,44 +113,44 @@ void DccTransferRecv::cleanUp() // just for convenience void DccTransferRecv::failed( const TQString& errorMessage ) { - setStatus( Failed, errorMessage ); + settqStatus( Failed, errorMessage ); cleanUp(); emit done( this ); } void DccTransferRecv::setPartnerIp( const TQString& ip ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_partnerIp = ip; } void DccTransferRecv::setPartnerPort( const TQString& port ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_partnerPort = port; } void DccTransferRecv::setFileSize( unsigned long fileSize ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_fileSize = fileSize; } void DccTransferRecv::setFileName( const TQString& fileName ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_fileName = fileName; } void DccTransferRecv::setFileURL( const KURL& url ) { - if ( getStatus() == Configuring || getStatus() == Queued ) + if ( gettqStatus() == Configuring || gettqStatus() == Queued ) m_fileURL = url; } void DccTransferRecv::setReverse( bool reverse, const TQString& reverseToken ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) { m_reverse = reverse; if ( reverse ) @@ -165,7 +165,7 @@ bool DccTransferRecv::queue() { kdDebug() << "DccTransferRecv::queue()" << endl; - if ( getStatus() != Configuring ) + if ( gettqStatus() != Configuring ) return false; if ( m_partnerIp.isEmpty() || m_partnerPort.isEmpty() ) @@ -182,7 +182,7 @@ bool DccTransferRecv::queue() // check if the sender IP is valid if ( m_partnerIp == "0.0.0.0" ) { - failed( i18n( "Invalid sender address (%1)" ).arg( m_partnerIp ) ); + failed( i18n( "Invalid sender address (%1)" ).tqarg( m_partnerIp ) ); return false; } @@ -237,7 +237,7 @@ void DccTransferRecv::abort() // public slot m_writeCacheHandler->write( true ); // flush } - setStatus( Aborted ); + settqStatus( Aborted ); cleanUp(); emit done( this ); } @@ -246,10 +246,10 @@ void DccTransferRecv::start() // public slot { kdDebug() << "DccTransferRecv::start() [BEGIN]" << endl; - if ( getStatus() != Queued ) + if ( gettqStatus() != Queued ) return; - setStatus( Preparing ); + settqStatus( Preparing ); prepareLocalKio( false, false ); @@ -270,7 +270,7 @@ void DccTransferRecv::prepareLocalKio( bool overwrite, bool resume, KIO::fileoff { askAndPrepareLocalKio( i18n( "<b>Cannot create the folder.</b><br>" "Folder: %1<br>" ) - .arg( m_fileURL.upURL().prettyURL() ), + .tqarg( m_fileURL.upURL().prettyURL() ), DccResumeDialog::RA_Rename | DccResumeDialog::RA_Cancel, DccResumeDialog::RA_Rename ); return; @@ -305,7 +305,7 @@ void DccTransferRecv::askAndPrepareLocalKio( const TQString& message, int enable break; case DccResumeDialog::RA_Cancel: default: - setStatus( Queued ); + settqStatus( Queued ); } } @@ -352,7 +352,7 @@ void DccTransferRecv::slotLocalCanResume( KIO::Job* job, KIO::filesize_t size ) { askAndPrepareLocalKio( i18n( "<b>The file is used by another transfer.</b><br>" "%1<br>" ) - .arg( m_fileURL.prettyURL() ), + .tqarg( m_fileURL.prettyURL() ), DccResumeDialog::RA_Rename | DccResumeDialog::RA_Cancel, DccResumeDialog::RA_Rename ); } @@ -365,8 +365,8 @@ void DccTransferRecv::slotLocalCanResume( KIO::Job* job, KIO::filesize_t size ) askAndPrepareLocalKio( i18n( "<b>A partial file exists.</b><br>" "%1<br>" "Size of the partial file: %2 bytes<br>" ) - .arg( m_fileURL.prettyURL() ) - .arg( KGlobal::locale()->formatNumber( size, 0 ) ), + .tqarg( m_fileURL.prettyURL() ) + .tqarg( KGlobal::locale()->formatNumber( size, 0 ) ), DccResumeDialog::RA_Resume | DccResumeDialog::RA_Overwrite | DccResumeDialog::RA_Rename | DccResumeDialog::RA_Cancel, DccResumeDialog::RA_Resume, size ); @@ -392,7 +392,7 @@ void DccTransferRecv::slotLocalGotResult( KIO::Job* job ) case KIO::ERR_FILE_ALREADY_EXIST: askAndPrepareLocalKio( i18n( "<b>The file already exists.</b><br>" "%1<br>" ) - .arg( m_fileURL.prettyURL() ), + .tqarg( m_fileURL.prettyURL() ), DccResumeDialog::RA_Overwrite | DccResumeDialog::RA_Rename | DccResumeDialog::RA_Cancel, DccResumeDialog::RA_Overwrite ); break; @@ -400,8 +400,8 @@ void DccTransferRecv::slotLocalGotResult( KIO::Job* job ) askAndPrepareLocalKio( i18n( "<b>Could not open the file.<br>" "Error: %1</b><br>" "%2<br>" ) - .arg( transferJob->error() ) - .arg( m_fileURL.prettyURL() ), + .tqarg( transferJob->error() ) + .tqarg( m_fileURL.prettyURL() ), DccResumeDialog::RA_Rename | DccResumeDialog::RA_Cancel, DccResumeDialog::RA_Rename ); } @@ -444,7 +444,7 @@ void DccTransferRecv::connectWithSender() m_ownIp = DccCommon::getOwnIp( server ); m_ownPort = TQString::number( DccCommon::getServerSocketPort( m_serverSocket ) ); - setStatus( WaitingRemote, i18n( "Waiting for connection" ) ); + settqStatus( WaitingRemote, i18n( "Waiting for connection" ) ); server->dccReverseSendAck( m_partnerNick, m_fileName, DccCommon::textIpToNumericalIp( m_ownIp ), m_ownPort, m_fileSize, m_reverseToken ); @@ -460,7 +460,7 @@ void DccTransferRecv::requestResume() { kdDebug() << "DccTransferRecv::requestResume()" << endl; - setStatus( WaitingRemote, i18n( "Waiting for remote host's acceptance" ) ); + settqStatus( WaitingRemote, i18n( "Waiting for remote host's acceptance" ) ); startConnectionTimer( 30 ); @@ -503,7 +503,7 @@ void DccTransferRecv::connectToSendServer() // connect to sender - setStatus( Connecting ); + settqStatus( Connecting ); m_recvSocket = new KNetwork::KStreamSocket( m_partnerIp, m_partnerPort, this); @@ -564,7 +564,7 @@ void DccTransferRecv::slotServerSocketReadyAccept() void DccTransferRecv::slotServerSocketGotError( int /* errorCode*/ ) { - failed( i18n( "Socket error: %1" ).arg( m_serverSocket->errorString() ) ); + failed( i18n( "Socket error: %1" ).tqarg( m_serverSocket->errorString() ) ); } void DccTransferRecv::startReceiving() @@ -577,7 +577,7 @@ void DccTransferRecv::startReceiving() connect( m_recvSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( sendAck() ) ); connect( m_recvSocket, TQT_SIGNAL( closed() ), this, TQT_SLOT( slotSocketClosed() ) ); - setStatus( Transferring ); + settqStatus( Transferring ); m_transferStartPosition = m_transferringPosition; @@ -590,8 +590,8 @@ void DccTransferRecv::startReceiving() // slot void DccTransferRecv::connectionFailed( int errorCode ) { - kdDebug() << "DccTransferRecv::connectionFailed(): code = " << errorCode << ", string = " << m_recvSocket->errorString() << endl; - failed( i18n( "Connection failure: %1" ).arg( m_recvSocket->errorString() ) ); + kdDebug() << "DccTransferRecv::connectionFailed(): code = " << errorCode << ", string = " << m_recvSocket->KSocketBase::errorString() << endl; + failed( i18n( "Connection failure: %1" ).tqarg( m_recvSocket->KSocketBase::errorString() ) ); } void DccTransferRecv::readData() // slot @@ -633,7 +633,7 @@ void DccTransferRecv::sendAck() // slot void DccTransferRecv::slotLocalWriteDone() // <-WriteCacheHandler::done() { kdDebug() << "DccTransferRecv::slotLocalWriteDone()" << endl; - setStatus( Done ); + settqStatus( Done ); cleanUp(); emit done( this ); } @@ -642,7 +642,7 @@ void DccTransferRecv::slotLocalWriteDone() // <-WriteCacheHandler::done() void DccTransferRecv::slotLocalGotWriteError( const TQString& errorString ) { kdDebug() << "DccTransferRecv::slotLocalGotWriteError()" << endl; - failed( i18n( "KIO error: %1" ).arg( errorString ) ); + failed( i18n( "KIO error: %1" ).tqarg( errorString ) ); } void DccTransferRecv::startConnectionTimer( int sec ) @@ -670,7 +670,7 @@ void DccTransferRecv::connectionTimeout() // slot void DccTransferRecv::slotSocketClosed() { finishTransferLogger(); - if ( getStatus() == Transferring ) + if ( gettqStatus() == Transferring ) failed( i18n( "Remote user disconnected" ) ); } diff --git a/konversation/src/dcctransferrecv.h b/konversation/src/dcctransferrecv.h index b0add72..62a20e7 100644 --- a/konversation/src/dcctransferrecv.h +++ b/konversation/src/dcctransferrecv.h @@ -44,16 +44,17 @@ class DccTransferRecvWriteCacheHandler; class DccTransferRecv : public DccTransfer { Q_OBJECT + TQ_OBJECT public: - DccTransferRecv(TQObject* parent); + DccTransferRecv(TQObject* tqparent); virtual ~DccTransferRecv(); - // REQUIRED + // RETQUIRED void setPartnerIp( const TQString& ip ); - // REQUIRED + // RETQUIRED void setPartnerPort( const TQString& port ); - // REQUIRED + // RETQUIRED void setFileSize( unsigned long fileSize ); // OPTIONAL, if not specified, "unnamed_file" // TODO: "$sendername-$receiveddate" is better @@ -148,9 +149,10 @@ class DccTransferRecv : public DccTransfer virtual TQPixmap getTypeIcon() const; }; -class DccTransferRecvWriteCacheHandler : public QObject +class DccTransferRecvWriteCacheHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: explicit DccTransferRecvWriteCacheHandler( KIO::TransferJob* transferJob ); diff --git a/konversation/src/dcctransfersend.cpp b/konversation/src/dcctransfersend.cpp index 3663a1d..87e0539 100644 --- a/konversation/src/dcctransfersend.cpp +++ b/konversation/src/dcctransfersend.cpp @@ -47,8 +47,8 @@ using namespace KNetwork; -DccTransferSend::DccTransferSend(TQObject* parent) - : DccTransfer( DccTransfer::Send, parent ) +DccTransferSend::DccTransferSend(TQObject* tqparent) + : DccTransfer( DccTransfer::Send, tqparent ) { kdDebug() << "DccTransferSend::DccTransferSend()" << endl; @@ -79,50 +79,50 @@ void DccTransferSend::cleanUp() if ( m_sendSocket ) { m_sendSocket->close(); - m_sendSocket = 0; // the instance will be deleted automatically by its parent + m_sendSocket = 0; // the instance will be deleted automatically by its tqparent } if ( m_serverSocket ) { m_serverSocket->close(); - m_serverSocket = 0; // the instance will be deleted automatically by its parent + m_serverSocket = 0; // the instance will be deleted automatically by its tqparent } } // just for convenience void DccTransferSend::failed( const TQString& errorMessage ) { - setStatus( Failed, errorMessage ); + settqStatus( Failed, errorMessage ); cleanUp(); emit done( this ); } void DccTransferSend::setFileURL( const KURL& url ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_fileURL = url; } void DccTransferSend::setFileName( const TQString& fileName ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_fileName = fileName; } void DccTransferSend::setOwnIp( const TQString& ownIp ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_ownIp = ownIp; } void DccTransferSend::setFileSize( KIO::filesize_t fileSize ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_fileSize = fileSize; } void DccTransferSend::setReverse( bool reverse ) { - if ( getStatus() == Configuring ) + if ( gettqStatus() == Configuring ) m_reverse = reverse; } @@ -130,7 +130,7 @@ bool DccTransferSend::queue() { kdDebug() << "DccTransferSend::queue()" << endl; - if ( getStatus() != Configuring ) + if ( gettqStatus() != Configuring ) return false; if ( m_ownIp.isEmpty() ) @@ -170,7 +170,7 @@ bool DccTransferSend::queue() //Check the file exists if ( !KIO::NetAccess::exists( m_fileURL, true, NULL ) ) { - failed( i18n( "The url \"%1\" does not exist" ).arg( m_fileURL.prettyURL() ) ); + failed( i18n( "The url \"%1\" does not exist" ).tqarg( m_fileURL.prettyURL() ) ); return false; } @@ -178,7 +178,7 @@ bool DccTransferSend::queue() //Download the file. Does nothing if it's local (file:/) if ( !KIO::NetAccess::download( m_fileURL, m_tmpFile, NULL ) ) { - failed( i18n( "Could not retrieve \"%1\"" ).arg( m_fileURL.prettyURL() ) ); + failed( i18n( "Could not retrieve \"%1\"" ).tqarg( m_fileURL.prettyURL() ) ); kdDebug() << "DccTransferSend::DccTransferSend(): KIO::NetAccess::download() failed. reason: " << KIO::NetAccess::lastErrorString() << endl; return false; } @@ -187,7 +187,7 @@ bool DccTransferSend::queue() if ( m_fileName.isEmpty() ) { bool pressedOk; - m_fileName = KInputDialog::getText( i18n( "Enter Filename" ), i18n( "<qt>The file that you are sending to <i>%1</i> does not have a filename.<br>Please enter a filename to be presented to the receiver, or cancel the dcc transfer</qt>" ).arg( getPartnerNick() ), "unknown", &pressedOk, NULL ); + m_fileName = KInputDialog::getText( i18n( "Enter Filename" ), i18n( "<qt>The file that you are sending to <i>%1</i> does not have a filename.<br>Please enter a filename to be presented to the receiver, or cancel the dcc transfer</qt>" ).tqarg( getPartnerNick() ), "unknown", &pressedOk, NULL ); if ( !pressedOk ) { @@ -196,12 +196,12 @@ bool DccTransferSend::queue() } } - //FIXME: if "\\\"" works well on other IRC clients, replace "\"" with "\\\"" - m_fileName.replace( "\"", "_" ); + //FIXME: if "\\\"" works well on other IRC clients, tqreplace "\"" with "\\\"" + m_fileName.tqreplace( "\"", "_" ); if (Preferences::dccSpaceToUnderscore()) - m_fileName.replace( " ", "_" ); + m_fileName.tqreplace( " ", "_" ); else { - if (m_fileName.contains(" ") > 0) + if (m_fileName.tqcontains(" ") > 0) m_fileName = "\"" + m_fileName + "\""; } @@ -217,7 +217,7 @@ void DccTransferSend::abort() // public slot { kdDebug() << "DccTransferSend::abort()" << endl; - setStatus( Aborted ); + settqStatus( Aborted ); cleanUp(); emit done( this ); } @@ -226,7 +226,7 @@ void DccTransferSend::start() // public slot { kdDebug() << "DccTransferSend::start()" << endl; - if ( getStatus() != Queued ) + if ( gettqStatus() != Queued ) return; // common procedure @@ -283,7 +283,7 @@ void DccTransferSend::start() // public slot server->dccPassiveSendRequest( m_partnerNick, m_fileName, getNumericalIpText( m_ownIp ), m_fileSize, m_reverseToken ); } - setStatus( WaitingRemote, i18n( "Waiting remote user's acceptance" ) ); + settqStatus( WaitingRemote, i18n( "Waiting remote user's acceptance" ) ); } void DccTransferSend::connectToReceiver( const TQString& partnerHost, const TQString& partnerPort ) @@ -300,7 +300,7 @@ void DccTransferSend::connectToReceiver( const TQString& partnerHost, const TQSt connect( m_sendSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( startSending() ) ); connect( m_sendSocket, TQT_SIGNAL( gotError( int ) ), this, TQT_SLOT( slotConnectionFailed( int ) ) ); - setStatus( Connecting ); + settqStatus( Connecting ); m_sendSocket->connect(); } @@ -309,7 +309,7 @@ bool DccTransferSend::setResume( unsigned long position ) { kdDebug() << "DccTransferSend::setResume(): position=" << position << endl; - if ( getStatus() > WaitingRemote ) + if ( gettqStatus() > WaitingRemote ) return false; if ( position >= m_fileSize ) @@ -359,13 +359,13 @@ void DccTransferSend::startSending() m_file.at( m_transferringPosition ); m_transferStartPosition = m_transferringPosition; - setStatus( Transferring ); + settqStatus( Transferring ); m_sendSocket->enableWrite( true ); m_sendSocket->enableRead( m_fastSend ); startTransferLogger(); // initialize CPS counter, ETA counter, etc... } else - failed( i18n( "Could not open the file: %1" ).arg( getQFileErrorString( m_file.status() ) ) ); + failed( i18n( "Could not open the file: %1" ).tqarg( getTQFileErrorString( m_file.status() ) ) ); } void DccTransferSend::writeData() // slot @@ -407,7 +407,7 @@ void DccTransferSend::getAck() // slot { kdDebug() << "DccTransferSend::getAck(): Received final ACK." << endl; finishTransferLogger(); - setStatus( Done ); + settqStatus( Done ); cleanUp(); emit done( this ); break; // for safe @@ -418,7 +418,7 @@ void DccTransferSend::getAck() // slot void DccTransferSend::slotGotSocketError( int errorCode ) { kdDebug() << "DccTransferSend::slotGotSocketError(): code = " << errorCode << " string = " << m_serverSocket->errorString() << endl; - failed( i18n( "Socket error: %1" ).arg( m_serverSocket->errorString() ) ); + failed( i18n( "Socket error: %1" ).tqarg( m_serverSocket->errorString() ) ); } void DccTransferSend::startConnectionTimer( int sec ) @@ -445,7 +445,7 @@ void DccTransferSend::slotConnectionTimeout() // slot void DccTransferSend::slotConnectionFailed( int /* errorCode */ ) { - failed( i18n( "Connection failure: %1" ).arg( m_sendSocket->errorString() ) ); + failed( i18n( "Connection failure: %1" ).tqarg( m_sendSocket->KSocketBase::errorString() ) ); } void DccTransferSend::slotServerSocketClosed() @@ -457,12 +457,12 @@ void DccTransferSend::slotSendSocketClosed() { kdDebug() << "DccTransferSend::slotSendSocketClosed()" << endl; finishTransferLogger(); - if ( getStatus() == Transferring && m_transferringPosition < (KIO::fileoffset_t)m_fileSize ) + if ( gettqStatus() == Transferring && m_transferringPosition < (KIO::fileoffset_t)m_fileSize ) failed( i18n( "Remote user disconnected" ) ); } // protected, static -TQString DccTransferSend::getQFileErrorString( int code ) +TQString DccTransferSend::getTQFileErrorString( int code ) { TQString errorString; @@ -472,16 +472,16 @@ TQString DccTransferSend::getQFileErrorString( int code ) errorString=i18n("The operation was successful. Should never happen in an error dialog."); break; case IO_ReadError: - errorString=i18n("Could not read from file \"%1\".").arg( m_fileName ); + errorString=i18n("Could not read from file \"%1\".").tqarg( m_fileName ); break; case IO_WriteError: - errorString=i18n("Could not write to file \"%1\".").arg( m_fileName ); + errorString=i18n("Could not write to file \"%1\".").tqarg( m_fileName ); break; case IO_FatalError: errorString=i18n("A fatal unrecoverable error occurred."); break; case IO_OpenError: - errorString=i18n("Could not open file \"%1\".").arg( m_fileName ); + errorString=i18n("Could not open file \"%1\".").tqarg( m_fileName ); break; // Same case value? Damn! @@ -499,7 +499,7 @@ TQString DccTransferSend::getQFileErrorString( int code ) errorString=i18n("An unspecified error happened on close."); break; default: - errorString=i18n("Unknown error. Code %1").arg(code); + errorString=i18n("Unknown error. Code %1").tqarg(code); break; } diff --git a/konversation/src/dcctransfersend.h b/konversation/src/dcctransfersend.h index a0a9ec5..ebb7237 100644 --- a/konversation/src/dcctransfersend.h +++ b/konversation/src/dcctransfersend.h @@ -33,16 +33,17 @@ namespace KNetwork class DccTransferSend : public DccTransfer { Q_OBJECT + TQ_OBJECT public: - DccTransferSend(TQObject* parent); + DccTransferSend(TQObject* tqparent); virtual ~DccTransferSend(); - // REQUIRED + // RETQUIRED void setFileURL( const KURL& url ); // OPTIONAL void setFileName( const TQString& fileName ); - // REQUIED + // RETQUIED // FIXME: this setting should be an optional one or be removed: make DccTransferSend itself read the configuration void setOwnIp( const TQString& ownIp ); // OPTIONAL @@ -79,7 +80,7 @@ class DccTransferSend : public DccTransfer void startConnectionTimer( int sec ); void stopConnectionTimer(); - TQString getQFileErrorString( int code ); + TQString getTQFileErrorString( int code ); TQFile m_file; diff --git a/konversation/src/editnotifydialog.cpp b/konversation/src/editnotifydialog.cpp index 8874463..b804a09 100644 --- a/konversation/src/editnotifydialog.cpp +++ b/konversation/src/editnotifydialog.cpp @@ -25,11 +25,11 @@ #include <klocale.h> -EditNotifyDialog::EditNotifyDialog(TQWidget* parent, +EditNotifyDialog::EditNotifyDialog(TQWidget* tqparent, const TQString& network, const TQString& nickname): -KDialogBase(parent,"editnotify",true,i18n("Edit Watched Nickname"), +KDialogBase(tqparent,"editnotify",true,i18n("Edit Watched Nickname"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,true) @@ -37,8 +37,8 @@ KDialogBase::Ok,true) TQWidget* page=new TQWidget(this); setMainWidget(page); - TQHBoxLayout* layout = new TQHBoxLayout(page); - layout->setSpacing(spacingHint()); + TQHBoxLayout* tqlayout = new TQHBoxLayout(page); + tqlayout->setSpacing(spacingHint()); TQLabel* networkNameLabel=new TQLabel(i18n("&Network name:"),page); TQString networkNameWT = i18n( @@ -66,7 +66,7 @@ KDialogBase::Ok,true) { TQString name = (*it)->name(); - if (!networkNames.contains(name)) + if (!networkNames.tqcontains(name)) { networkNames.append(name); } @@ -80,10 +80,10 @@ KDialogBase::Ok,true) if(*it == network) m_networkNameCombo->setCurrentItem(m_networkNameCombo->count()-1); } - layout->addWidget(networkNameLabel); - layout->addWidget(m_networkNameCombo); - layout->addWidget(nicknameLabel); - layout->addWidget(m_nicknameInput); + tqlayout->addWidget(networkNameLabel); + tqlayout->addWidget(m_networkNameCombo); + tqlayout->addWidget(nicknameLabel); + tqlayout->addWidget(m_nicknameInput); setButtonOK(KGuiItem(i18n("&OK"),"button_ok",i18n("Change notify information"))); setButtonCancel(KGuiItem(i18n("&Cancel"),"button_cancel",i18n("Discards all changes made"))); diff --git a/konversation/src/editnotifydialog.h b/konversation/src/editnotifydialog.h index b96b8a2..8b74511 100644 --- a/konversation/src/editnotifydialog.h +++ b/konversation/src/editnotifydialog.h @@ -31,9 +31,10 @@ class KComboBox; class EditNotifyDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit EditNotifyDialog(TQWidget* parent=0,const TQString& network=TQString(), + explicit EditNotifyDialog(TQWidget* tqparent=0,const TQString& network=TQString(), const TQString& nickname=TQString()); ~EditNotifyDialog(); diff --git a/konversation/src/emoticon.cpp b/konversation/src/emoticon.cpp index aad7082..e47d0fa 100644 --- a/konversation/src/emoticon.cpp +++ b/konversation/src/emoticon.cpp @@ -159,8 +159,8 @@ namespace Konversation for(EmotIconMap::iterator it = self()->m_emotIconMap.begin(); it != self()->m_emotIconMap.end(); ++it) { - TQRegExp regExp(TQString("(^|\\s)%1($|\\s)").arg(it.data())); - filteredTxt.replace(regExp, " <img width=\"" + TQString::number(fm.height()) + "\" height=\"" + TQString::number(fm.height()) + TQRegExp regExp(TQString("(^|\\s)%1($|\\s)").tqarg(it.data())); + filteredTxt.tqreplace(regExp, " <img width=\"" + TQString::number(fm.height()) + "\" height=\"" + TQString::number(fm.height()) + "\" src=\"" + it.key() + "\" alt=\"" + it.data() + "\"> "); } diff --git a/konversation/src/fontappearance_preferences.ui b/konversation/src/fontappearance_preferences.ui index a59c3f7..75c9a03 100644 --- a/konversation/src/fontappearance_preferences.ui +++ b/konversation/src/fontappearance_preferences.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Copyright (C) 2005 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FontAppearance_Config</cstring> </property> @@ -25,7 +25,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_FixedMOTD</cstring> </property> @@ -36,7 +36,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show MOTD (Message Of The Day) message in fixed font</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_UseBoldNicks</cstring> </property> @@ -54,14 +54,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>161</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_CustomTextFont</cstring> </property> @@ -96,7 +96,7 @@ the Free Software Foundation; either version 2 of the License, or <bool>false</bool> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_CustomListFont</cstring> </property> @@ -107,7 +107,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Nickname list:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_CustomTabFont</cstring> </property> @@ -150,8 +150,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_FixedMOTD</tabstop> <tabstop>kcfg_UseBoldNicks</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kfontrequester.h</includehint> <includehint>kfontrequester.h</includehint> diff --git a/konversation/src/generalbehavior_preferences.ui b/konversation/src/generalbehavior_preferences.ui index 2ef5829..36e3fd8 100644 --- a/konversation/src/generalbehavior_preferences.ui +++ b/konversation/src/generalbehavior_preferences.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Copyright (C) 2005 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>GeneralBehavior_Config</cstring> </property> @@ -25,7 +25,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>kcfg_ShowTrayIcon</cstring> </property> @@ -42,7 +42,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_TrayNotify</cstring> </property> @@ -60,14 +60,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>kcfg_TrayNotifyOnlyOwnNick</cstring> </property> @@ -88,14 +88,14 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="1"> + <widget class="TQCheckBox" row="2" column="1"> <property name="name"> <cstring>kcfg_TrayNotifyBlink</cstring> </property> @@ -103,7 +103,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Blin&k the icon</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_HideToTrayOnStartup</cstring> </property> @@ -113,7 +113,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>middleLabel</cstring> </property> @@ -124,7 +124,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>modeLbl</cstring> </property> @@ -135,7 +135,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_NickCompletionMode</cstring> </property> </widget> - <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="3"> + <widget class="TQComboBox" row="0" column="1" rowspan="1" colspan="3"> <item> <property name="text"> <string>Cycle NickList</string> @@ -160,7 +160,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_NickCompleteSuffixStart</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>startOfLineLabel</cstring> </property> @@ -176,7 +176,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_NickCompleteSuffixMiddle</cstring> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -187,7 +187,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_NickCompleteSuffixMiddle</cstring> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_NickCompletionCaseSensitive</cstring> </property> @@ -200,7 +200,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>miscGBox</cstring> </property> @@ -211,7 +211,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_DisableNotifyWhileAway</cstring> </property> @@ -219,7 +219,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Disable notifications while &away</string> </property> </widget> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>kcfg_CustomVersionReplyEnabled</cstring> </property> @@ -254,7 +254,7 @@ the Free Software Foundation; either version 2 of the License, or <number>1</number> </property> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_UseMultiRowInputBox</cstring> </property> @@ -270,7 +270,7 @@ the Free Software Foundation; either version 2 of the License, or <bool>false</bool> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>commandCharLabel</cstring> </property> @@ -281,7 +281,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_CommandChar</cstring> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>kcfg_UseCustomBrowser</cstring> </property> @@ -301,7 +301,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -348,8 +348,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_CustomVersionReply</tabstop> <tabstop>kcfg_UseMultiRowInputBox</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/highlight_preferences.cpp b/konversation/src/highlight_preferences.cpp index 4c782a3..e3efff5 100644 --- a/konversation/src/highlight_preferences.cpp +++ b/konversation/src/highlight_preferences.cpp @@ -35,8 +35,8 @@ #include <kiconloader.h> -Highlight_Config::Highlight_Config(TQWidget* parent, const char* name) - : Highlight_ConfigUI(parent,name) +Highlight_Config::Highlight_Config(TQWidget* tqparent, const char* name) + : Highlight_ConfigUI(tqparent,name) { // reset flag to defined state (used to block signals when just selecting a new item) newItemSelected=false; @@ -228,7 +228,7 @@ void Highlight_Config::highlightColorChanged(const TQColor& newColor) if(!newItemSelected && item) { item->setColor(newColor); - item->repaint(); + item->tqrepaint(); emit modified(); } } @@ -327,7 +327,7 @@ void Highlight_Config::saveSettings() int i = 0; for(Highlight* hl = hiList.first(); hl; hl = hiList.next()) { - config->setGroup(TQString("Highlight%1").arg(i)); + config->setGroup(TQString("Highlight%1").tqarg(i)); config->writeEntry("Pattern", hl->getPattern()); config->writeEntry("RegExp", hl->getRegExp()); config->writeEntry("Color", hl->getColor()); @@ -339,9 +339,9 @@ void Highlight_Config::saveSettings() Preferences::setHighlightList(hiList); // Remove unused entries... - while(config->hasGroup(TQString("Highlight%1").arg(i))) + while(config->hasGroup(TQString("Highlight%1").tqarg(i))) { - config->deleteGroup(TQString("Highlight%1").arg(i)); + config->deleteGroup(TQString("Highlight%1").tqarg(i)); i++; } diff --git a/konversation/src/highlight_preferences.h b/konversation/src/highlight_preferences.h index d479056..aadc25b 100644 --- a/konversation/src/highlight_preferences.h +++ b/konversation/src/highlight_preferences.h @@ -25,9 +25,10 @@ class Highlight; class Highlight_Config : public Highlight_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Highlight_Config(TQWidget *parent = 0, const char *name = 0); + explicit Highlight_Config(TQWidget *tqparent = 0, const char *name = 0); ~Highlight_Config(); public: diff --git a/konversation/src/highlight_preferencesui.ui b/konversation/src/highlight_preferencesui.ui index 3e617d6..abc3d48 100644 --- a/konversation/src/highlight_preferencesui.ui +++ b/konversation/src/highlight_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Highlight_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Highlight_ConfigUI</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -91,9 +91,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="0" column="4" rowspan="5" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="4" rowspan="5" colspan="1"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> @@ -141,7 +141,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>250</height> @@ -175,7 +175,7 @@ <string>Click to run Regular Expression Editor (KRegExpEditor)</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>patternLabel</cstring> </property> @@ -205,7 +205,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>colorLabel</cstring> </property> @@ -227,7 +227,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>soundLabel</cstring> </property> @@ -260,7 +260,7 @@ <string>audio/x-wav audio/x-mp3 application/ogg audio/x-adpcm</string> </property> </widget> - <widget class="QToolButton" row="3" column="3"> + <widget class="TQToolButton" row="3" column="3"> <property name="name"> <cstring>soundPlayBtn</cstring> </property> @@ -282,7 +282,7 @@ <string>Test sound</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>autoTextLabel</cstring> </property> @@ -306,7 +306,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_HighlightSoundsEnabled</cstring> </property> @@ -336,7 +336,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_HighlightNick</cstring> </property> @@ -344,7 +344,7 @@ <string>Alwa&ys highlight own current nick:</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>kcfg_HighlightOwnLines</cstring> </property> @@ -362,7 +362,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>120</width> <height>20</height> @@ -379,7 +379,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -396,7 +396,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> @@ -435,7 +435,7 @@ <tabstop>newButton</tabstop> <tabstop>removeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/konversation/src/highlightviewitem.cpp b/konversation/src/highlightviewitem.cpp index f6784a6..811a7d8 100644 --- a/konversation/src/highlightviewitem.cpp +++ b/konversation/src/highlightviewitem.cpp @@ -19,8 +19,8 @@ #include <klistview.h> -HighlightViewItem::HighlightViewItem(KListView* parent, Highlight* passed_Highlight) -: TQCheckListItem(parent, TQString(), TQCheckListItem::CheckBox) +HighlightViewItem::HighlightViewItem(KListView* tqparent, Highlight* passed_Highlight) +: TQCheckListItem(tqparent, TQString(), TQCheckListItem::CheckBox) { setText(1,passed_Highlight->getPattern()); itemColor = passed_Highlight->getColor(); @@ -35,12 +35,12 @@ HighlightViewItem::~HighlightViewItem() { } -void HighlightViewItem::paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int alignment) +void HighlightViewItem::paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int tqalignment) { // copy all colors from cg and only then change needed colors itemColorGroup=cg; itemColorGroup.setColor(TQColorGroup::Text, itemColor); - TQCheckListItem::paintCell(p, itemColorGroup, column, width, alignment); + TQCheckListItem::paintCell(p, itemColorGroup, column, width, tqalignment); } HighlightViewItem* HighlightViewItem::itemBelow() diff --git a/konversation/src/highlightviewitem.h b/konversation/src/highlightviewitem.h index a443604..0ab6a80 100644 --- a/konversation/src/highlightviewitem.h +++ b/konversation/src/highlightviewitem.h @@ -24,10 +24,10 @@ class KURL; class KListView; -class HighlightViewItem : public QCheckListItem +class HighlightViewItem : public TQCheckListItem { public: - HighlightViewItem(KListView* parent, Highlight* passed_Highlight); + HighlightViewItem(KListView* tqparent, Highlight* passed_Highlight); ~HighlightViewItem(); TQString getPattern(); @@ -67,6 +67,6 @@ class HighlightViewItem : public QCheckListItem bool m_changed; // true if the checkbox has been changed void stateChange(bool newState); // reimplemented to store changed value - void paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int tqalignment); }; #endif diff --git a/konversation/src/identitydialog.cpp b/konversation/src/identitydialog.cpp index cfa592a..c4c707d 100644 --- a/konversation/src/identitydialog.cpp +++ b/konversation/src/identitydialog.cpp @@ -39,8 +39,8 @@ namespace Konversation { - IdentityDialog::IdentityDialog(TQWidget *parent, const char *name) - : KDialogBase(Plain, i18n("Identities"), Ok|Cancel, Ok, parent, name) + IdentityDialog::IdentityDialog(TQWidget *tqparent, const char *name) + : KDialogBase(Plain, i18n("Identities"), Ok|Cancel, Ok, tqparent, name) { TQFrame* mainWidget = plainPage(); TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 2, 0, spacingHint()); @@ -85,12 +85,12 @@ namespace Konversation TQLabel* realNameLabel = new TQLabel(i18n("&Real name:"), generalWidget); m_realNameEdit = new KLineEdit(generalWidget); - TQWhatsThis::add(m_realNameEdit, i18n("Enter your real name here. IRC is not intended to keep you hidden from your friends or enemies. Keep this in mind if you are tempted to behave maliciously. A fake \"real name\" can be a good way to mask your gender from all the nerds out there, but the PC you use can always be traced so you will never be truly anonymous.")); + TQWhatsThis::add(m_realNameEdit, i18n("Enter your real name here. IRC is not intended to keep you hidden from your friends or enemies. Keep this in mind if you are tempted to behave maliciously. A fake \"real name\" can be a good way to tqmask your gender from all the nerds out there, but the PC you use can always be traced so you will never be truly anonymous.")); realNameLabel->setBuddy(m_realNameEdit); TQGroupBox* nicknameGBox = new TQGroupBox(0, Qt::Horizontal, i18n("Nickname"), generalWidget); nicknameGBox->setMargin(marginHint()); - TQGridLayout* nicknameLayout = new TQGridLayout(nicknameGBox->layout(), 1, 2, spacingHint()); + TQGridLayout* nicknameLayout = new TQGridLayout(nicknameGBox->tqlayout(), 1, 2, spacingHint()); m_nicknameLBox = new TQListBox(nicknameGBox); TQWhatsThis::add(m_nicknameLBox, i18n("This is your list of nicknames. A nickname is the name that other users will know you by. You may use any name you desire. The first character must be a letter.\n\nSince nicknames must be unique across an entire IRC network, your desired name may be rejected by the server because someone else is already using that nickname. Enter alternate nicknames for yourself. If your first choice is rejected by the server, Konversation will try the alternate nicknames.")); @@ -126,7 +126,7 @@ namespace Konversation TQGroupBox* autoIdentifyGBox = new TQGroupBox(0, Qt::Horizontal, i18n("Auto Identify"), generalWidget); autoIdentifyGBox->setMargin(marginHint()); - TQGridLayout* autoIdentifyLayout = new TQGridLayout(autoIdentifyGBox->layout(), 1, 2, spacingHint()); + TQGridLayout* autoIdentifyLayout = new TQGridLayout(autoIdentifyGBox->tqlayout(), 1, 2, spacingHint()); TQLabel* botLabel=new TQLabel(i18n("Ser&vice:"), autoIdentifyGBox); TQWhatsThis::add(botLabel,i18n("Service name can be <b><i>nickserv</i></b> or a network dependant name like <b><i>nickserv@services.dal.net</i></b>")); @@ -167,7 +167,7 @@ namespace Konversation m_automaticAwayGBox->setCheckable(true); m_automaticAwayGBox->setColumnLayout(0, Qt::Horizontal); m_automaticAwayGBox->setMargin(marginHint()); - TQGridLayout* automaticAwayLayout = new TQGridLayout(m_automaticAwayGBox->layout(), 1, 2, spacingHint()); + TQGridLayout* automaticAwayLayout = new TQGridLayout(m_automaticAwayGBox->tqlayout(), 1, 2, spacingHint()); TQWhatsThis::add(m_automaticAwayGBox, i18n("If you check this box, Konversation will automatically set all connections using this Identity away when the screensaver starts or after a period of user inactivity configured below.")); @@ -198,7 +198,7 @@ namespace Konversation m_awayMessageGBox->setCheckable(true); m_awayMessageGBox->setColumnLayout(0, Qt::Horizontal); m_awayMessageGBox->setMargin(marginHint()); - TQGridLayout* messagesLayout = new TQGridLayout(m_awayMessageGBox->layout(), 1, 2, spacingHint()); + TQGridLayout* messagesLayout = new TQGridLayout(m_awayMessageGBox->tqlayout(), 1, 2, spacingHint()); TQWhatsThis::add(m_awayMessageGBox, i18n("If you check this box, Konversation will automatically send the Away message to all channels joined with this Identity. <b>%s</b> is replaced with <b>msg</b>. Whenever you perform an <b>/away</b> command, the Return message will be displayed in all channels joined with this Identity.")); @@ -627,7 +627,7 @@ namespace Konversation IdentityPtr IdentityDialog::setCurrentIdentity(IdentityPtr identity) { - int index = Preferences::identityList().findIndex(identity); + int index = Preferences::identityList().tqfindIndex(identity); setCurrentIdentity(index); return m_currentIdentity; diff --git a/konversation/src/identitydialog.h b/konversation/src/identitydialog.h index 168265a..84d746d 100644 --- a/konversation/src/identitydialog.h +++ b/konversation/src/identitydialog.h @@ -31,8 +31,9 @@ namespace Konversation class IdentityDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit IdentityDialog(TQWidget *parent = 0, const char *name = 0); + explicit IdentityDialog(TQWidget *tqparent = 0, const char *name = 0); ~IdentityDialog(); void setCurrentIdentity(int index); IdentityPtr setCurrentIdentity(IdentityPtr identity); diff --git a/konversation/src/ignore_preferences.cpp b/konversation/src/ignore_preferences.cpp index 26a5a0a..2cff96c 100644 --- a/konversation/src/ignore_preferences.cpp +++ b/konversation/src/ignore_preferences.cpp @@ -28,8 +28,8 @@ #include <tqcheckbox.h> -Ignore_Config::Ignore_Config( TQWidget* parent, const char* name, WFlags fl ) - : Ignore_ConfigUI( parent, name, fl ) +Ignore_Config::Ignore_Config( TQWidget* tqparent, const char* name, WFlags fl ) + : Ignore_ConfigUI( tqparent, name, fl ) { connect(newButton,TQT_SIGNAL(clicked()), this,TQT_SLOT(newIgnore())); diff --git a/konversation/src/ignore_preferences.h b/konversation/src/ignore_preferences.h index 424ba6d..00a22dc 100644 --- a/konversation/src/ignore_preferences.h +++ b/konversation/src/ignore_preferences.h @@ -23,9 +23,10 @@ class Ignore; class Ignore_Config : public Ignore_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Ignore_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + explicit Ignore_Config( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~Ignore_Config(); TQString flagNames; diff --git a/konversation/src/ignore_preferencesui.ui b/konversation/src/ignore_preferencesui.ui index bc33198..a4a37d3 100644 --- a/konversation/src/ignore_preferencesui.ui +++ b/konversation/src/ignore_preferencesui.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Copyright (C) 2005 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Ignore_ConfigUI</cstring> </property> @@ -69,7 +69,7 @@ the Free Software Foundation; either version 2 of the License, or <bool>true</bool> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -77,12 +77,12 @@ the Free Software Foundation; either version 2 of the License, or <string>Pattern:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>txtPattern</cstring> </property> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>grpMessageTypes</cstring> </property> @@ -101,7 +101,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>chkCTCP</cstring> </property> @@ -109,7 +109,7 @@ the Free Software Foundation; either version 2 of the License, or <string>CTCP</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>chkChannel</cstring> </property> @@ -117,7 +117,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Channel</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>chkDCC</cstring> </property> @@ -125,7 +125,7 @@ the Free Software Foundation; either version 2 of the License, or <string>DCC</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>chkNotice</cstring> </property> @@ -133,7 +133,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Notice</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>chkQuery</cstring> </property> @@ -143,9 +143,9 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="2" rowspan="3" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="2" rowspan="3" colspan="1"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <vbox> <property name="name"> @@ -185,7 +185,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -208,8 +208,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>removeButton</tabstop> <tabstop>removeAllButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistview.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/konversation/src/ignorelistviewitem.cpp b/konversation/src/ignorelistviewitem.cpp index 7bae577..ce9315e 100644 --- a/konversation/src/ignorelistviewitem.cpp +++ b/konversation/src/ignorelistviewitem.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> -IgnoreListViewItem::IgnoreListViewItem(TQListView* parent,const TQString& name,int newFlags): -KListViewItem(parent,name) +IgnoreListViewItem::IgnoreListViewItem(TQListView* tqparent,const TQString& name,int newFlags): +KListViewItem(tqparent,name) { setFlags(newFlags); } diff --git a/konversation/src/ignorelistviewitem.h b/konversation/src/ignorelistviewitem.h index c892c54..21fa085 100644 --- a/konversation/src/ignorelistviewitem.h +++ b/konversation/src/ignorelistviewitem.h @@ -22,7 +22,7 @@ class IgnoreListViewItem : public KListViewItem { public: - IgnoreListViewItem(TQListView* parent,const TQString& name,int flags); + IgnoreListViewItem(TQListView* tqparent,const TQString& name,int flags); ~IgnoreListViewItem(); void setFlag(int flag,bool active); diff --git a/konversation/src/images.cpp b/konversation/src/images.cpp index 9c38bd7..fa1d7f0 100644 --- a/konversation/src/images.cpp +++ b/konversation/src/images.cpp @@ -129,9 +129,9 @@ void Images::initializeNickIcons() /* // why doesn't it work? nickIcons[Op][0] = elementNormal; - bitBlt( &nickIcons[Op][0], 0, 0, &elementOp, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt( &nickIcons[Op][0], 0, 0, &elementOp, 0, 0, -1, -1, TQt::CopyROP ); nickIcons[Op][1] = nickIcons[Op][0]; - bitBlt( &nickIcons[Op][1], 0, 0, &elementAway, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt( &nickIcons[Op][1], 0, 0, &elementAway, 0, 0, -1, -1, TQt::CopyROP ); */ } @@ -165,7 +165,7 @@ TQIconSet Images::getLed(TQColor col,bool state) // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( TQBrush::SolidPattern ); + brush.setStyle( Qt::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); @@ -208,7 +208,7 @@ TQIconSet Images::getLed(TQColor col,bool state) color = TQColor("#7D7D7D"); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing - brush.setStyle( TQBrush::NoBrush ); // Switch off the brush + brush.setStyle( Qt::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse paint.drawEllipse( 2, 2, width, width ); paint.end(); diff --git a/konversation/src/images.h b/konversation/src/images.h index c9f49fa..4688592 100644 --- a/konversation/src/images.h +++ b/konversation/src/images.h @@ -23,9 +23,10 @@ * use KonversationApplication::instance()->images(). */ -class Images : public QObject +class Images : public TQObject { Q_OBJECT + TQ_OBJECT public: enum NickPrivilege diff --git a/konversation/src/inputfilter.cpp b/konversation/src/inputfilter.cpp index 1a2f2df..dcb306b 100644 --- a/konversation/src/inputfilter.cpp +++ b/konversation/src/inputfilter.cpp @@ -57,7 +57,7 @@ void InputFilter::parseLine(const TQString& a_newLine) // Remove white spaces at the end and beginning newLine = newLine.stripWhiteSpace(); // Find end of middle parameter list - int pos = newLine.find(" :"); + int pos = newLine.tqfind(" :"); // Was there a trailing parameter? if(pos != -1) { @@ -75,7 +75,7 @@ void InputFilter::parseLine(const TQString& a_newLine) if(newLine[0] == ':') { // Find end of prefix - pos = newLine.find(' '); + pos = newLine.tqfind(' '); // Copy prefix prefix = newLine.mid(1, pos - 1); // Remove prefix from line @@ -83,7 +83,7 @@ void InputFilter::parseLine(const TQString& a_newLine) } // Find end of command - pos = newLine.find(' '); + pos = newLine.tqfind(' '); // Copy command (all lowercase to make parsing easier) TQString command = newLine.left(pos).lower(); // Are there parameters left in the string? @@ -100,7 +100,7 @@ void InputFilter::parseLine(const TQString& a_newLine) Q_ASSERT(server); // Server command, if no "!" was found in prefix - if((prefix.find('!') == -1) && (prefix != server->getNickname())) + if((prefix.tqfind('!') == -1) && (prefix != server->getNickname())) { parseServerCommand(prefix, command, parameterList, trailing); @@ -117,11 +117,11 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com Q_ASSERT(konv_app); Q_ASSERT(server); // Extract nickname from prefix - int pos = prefix.find("!"); + int pos = prefix.tqfind("!"); TQString sourceNick = prefix.left(pos); - TQString sourceHostmask = prefix.mid(pos + 1); - // remember hostmask for this nick, it could have changed - server->addHostmaskToNick(sourceNick,sourceHostmask); + TQString sourceHosttqmask = prefix.mid(pos + 1); + // remember hosttqmask for this nick, it could have changed + server->addHosttqmaskToNick(sourceNick,sourceHosttqmask); TQString trailing = _trailing; if(command=="privmsg") @@ -135,11 +135,11 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com if(trailing.at(0)==TQChar(0x01)) { // cut out the CTCP command - TQString ctcp = trailing.mid(1,trailing.find(1,1)-1); + TQString ctcp = trailing.mid(1,trailing.tqfind(1,1)-1); - TQString ctcpCommand=ctcp.left(ctcp.find(" ")).lower(); - TQString ctcpArgument=ctcp.mid(ctcp.find(" ")+1); - ctcpArgument=static_cast<KonversationApplication*>(kapp)->doAutoreplace(ctcpArgument,false); + TQString ctcpCommand=ctcp.left(ctcp.tqfind(" ")).lower(); + TQString ctcpArgument=ctcp.mid(ctcp.tqfind(" ")+1); + ctcpArgument=static_cast<KonversationApplication*>(kapp)->doAutotqreplace(ctcpArgument,false); // If it was a ctcp action, build an action string if(ctcpCommand=="action" && isChan) @@ -157,7 +157,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com if(sourceNick != server->getNickname()) { - if(ctcpArgument.lower().find(TQRegExp("(^|[^\\d\\w])" + if(ctcpArgument.lower().tqfind(TQRegExp("(^|[^\\d\\w])" + TQRegExp::escape(server->loweredNickname()) + "([^\\d\\w]|$)")) !=-1 ) { @@ -177,7 +177,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com if(!isIgnore(prefix,Ignore::Query)) { NickInfoPtr nickinfo = server->obtainNickInfo(sourceNick); - nickinfo->setHostmask(sourceHostmask); + nickinfo->setHosttqmask(sourceHosttqmask); // create new query (server will check for dupes) query = server->addQuery(nickinfo, false /* we didn't initiate this*/ ); @@ -201,17 +201,17 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-PING request from %1 to channel %2, sending answer.") - .arg(sourceNick).arg(parameterList[0]) + .tqarg(sourceNick).tqarg(parameterList[0]) ); } else { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-%1 request from %2, sending answer.") - .arg("PING").arg(sourceNick) + .tqarg("PING").tqarg(sourceNick) ); } - server->ctcpReply(sourceNick,TQString("PING %1").arg(ctcpArgument)); + server->ctcpReply(sourceNick,TQString("PING %1").tqarg(ctcpArgument)); } } @@ -224,14 +224,14 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received Version request from %1 to channel %2.") - .arg(sourceNick).arg(parameterList[0]) + .tqarg(sourceNick).tqarg(parameterList[0]) ); } else { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received Version request from %1.") - .arg(sourceNick) + .tqarg(sourceNick) ); } @@ -244,7 +244,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { // Do not internationalize the below version string reply = TQString("Konversation %1 (C) 2002-2008 by the Konversation team") - .arg(TQString(KONVI_VERSION)); + .tqarg(TQString(KONVI_VERSION)); } server->ctcpReply(sourceNick,"VERSION "+reply); } @@ -258,11 +258,11 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com TQString dccType=ctcpArgument.lower().section(' ',0,0); // Support file names with spaces - TQString dccArguments = ctcpArgument.mid(ctcpArgument.find(" ")+1); + TQString dccArguments = ctcpArgument.mid(ctcpArgument.tqfind(" ")+1); TQStringList dccArgumentList; - if ((dccArguments.contains('\"') >= 2) && (dccArguments.startsWith("\""))) { - int lastQuotePos = dccArguments.findRev("\""); + if ((dccArguments.tqcontains('\"') >= 2) && (dccArguments.startsWith("\""))) { + int lastQuotePos = dccArguments.tqfindRev("\""); if (dccArguments[lastQuotePos+1] == ' ') { TQString fileName = dccArguments.mid(1, lastQuotePos-1); dccArguments = dccArguments.mid(lastQuotePos+2); @@ -298,7 +298,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("DCC"), i18n("Received invalid DCC SEND request from %1.") - .arg(sourceNick) + .tqarg(sourceNick) ); } } @@ -313,7 +313,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("DCC"), i18n("Received invalid DCC ACCEPT request from %1.") - .arg(sourceNick) + .tqarg(sourceNick) ); } } @@ -328,7 +328,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("DCC"), i18n("Received invalid DCC RESUME request from %1.") - .arg(sourceNick) + .tqarg(sourceNick) ); } } @@ -344,7 +344,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("DCC"), i18n("Received invalid DCC CHAT request from %1.") - .arg(sourceNick) + .tqarg(sourceNick) ); } } @@ -352,7 +352,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("DCC"), i18n("Unknown DCC command %1 received from %2.") - .arg(ctcpArgument).arg(sourceNick) + .tqarg(ctcpArgument).tqarg(sourceNick) ); } } @@ -361,7 +361,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-%1 request from %2, sending answer.") - .arg("CLIENTINFO").arg(sourceNick) + .tqarg("CLIENTINFO").tqarg(sourceNick) ); server->ctcpReply(sourceNick,TQString("CLIENTINFO ACTION CLIENTINFO DCC PING TIME VERSION")); } @@ -369,9 +369,9 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-%1 request from %2, sending answer.") - .arg("TIME").arg(sourceNick) + .tqarg("TIME").tqarg(sourceNick) ); - server->ctcpReply(sourceNick,TQString("TIME ")+TQDateTime::currentDateTime().toString()); + server->ctcpReply(sourceNick,TQString("TIME ")+TQDateTime::tqcurrentDateTime().toString()); } // No known CTCP request, give a general message @@ -384,12 +384,12 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com parameterList[0], "CTCP", i18n("Received unknown CTCP-%1 request from %2 to Channel %3.") - .arg(ctcp).arg(sourceNick).arg(parameterList[0]) + .tqarg(ctcp).tqarg(sourceNick).tqarg(parameterList[0]) ); else server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received unknown CTCP-%1 request from %2.") - .arg(ctcp).arg(sourceNick) + .tqarg(ctcp).tqarg(sourceNick) ); } } @@ -414,7 +414,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com server->appendServerMessageToChannel(parameterList[0], i18n("Notice"), i18n("-%1 to %2- %3") - .arg(sourceNick).arg(parameterList[0]).arg(trailing) + .tqarg(sourceNick).tqarg(parameterList[0]).tqarg(trailing) ); } // Private notice @@ -431,7 +431,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com // pong reply, calculate turnaround time if(replyReason.lower()=="ping") { - int dateArrived=TQDateTime::currentDateTime().toTime_t(); + int dateArrived=TQDateTime::tqcurrentDateTime().toTime_t(); int dateSent=reply.toInt(); int time = dateArrived-dateSent; TQString unit = "seconds"; @@ -441,9 +441,9 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-PING reply from %1: %2 %3.") - .arg(sourceNick) - .arg(time) - .arg(unit) + .tqarg(sourceNick) + .tqarg(time) + .tqarg(unit) ); } // all other ctcp replies get a general message @@ -451,7 +451,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("CTCP"), i18n("Received CTCP-%1 reply from %2: %3.") - .arg(replyReason).arg(sourceNick).arg(reply) + .tqarg(replyReason).tqarg(sourceNick).tqarg(reply) ); } } @@ -474,7 +474,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com if(nickInfo) nickInfo->setIdentified(true); } - server->appendMessageToFrontmost(i18n("Notice"), i18n("-%1- %2").arg(sourceNick).arg(trailing)); + server->appendMessageToFrontmost(i18n("Notice"), i18n("-%1- %2").tqarg(sourceNick).tqarg(trailing)); } } } @@ -494,7 +494,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com // TODO: Try to remember channel keys for autojoins and manual joins, so // we can get %k to work - if(channelName.find(' ')!=-1) + if(channelName.tqfind(' ')!=-1) { key=channelName.section(' ',1,1); channelName=channelName.section(' ',0,0); @@ -502,7 +502,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com */ // Join the channel - server->joinChannel(channelName, sourceHostmask); + server->joinChannel(channelName, sourceHosttqmask); server->resetNickList(channelName); @@ -522,7 +522,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com } else { - Channel* channel = server->nickJoinsChannel(channelName,sourceNick,sourceHostmask); + Channel* channel = server->nickJoinsChannel(channelName,sourceNick,sourceHosttqmask); konv_app->notificationHandler()->join(channel, sourceNick); } } @@ -608,7 +608,7 @@ void InputFilter::parseClientCommand(const TQString &prefix, const TQString &com server->appendMessageToFrontmost(i18n("Invite"), i18n("%1 invited you to channel %2.") - .arg(sourceNick).arg(channel) + .tqarg(sourceNick).tqarg(channel) ); emit invitation(sourceNick,channel); } @@ -668,7 +668,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } else if(command=="notice") { - server->appendStatusMessage(i18n("Notice"),i18n("-%1- %2").arg(prefix).arg(trailing)); + server->appendStatusMessage(i18n("Notice"),i18n("-%1- %2").tqarg(prefix).tqarg(trailing)); } else if(command=="kick") { @@ -696,7 +696,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { TQString host; - if(trailing.contains("@")) + if(trailing.tqcontains("@")) host = trailing.section("@",1); // re-set nickname, since the server may have truncated it @@ -714,10 +714,10 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendStatusMessage(i18n("Welcome"), i18n("Server %1 (Version %2), User modes: %3, Channel modes: %4") - .arg(parameterList[1]) - .arg(parameterList[2]) - .arg(parameterList[3]) - .arg(parameterList[4]) + .tqarg(parameterList[1]) + .tqarg(parameterList[2]) + .tqarg(parameterList[3]) + .tqarg(parameterList[4]) ); server->setAllowedChannelModes(parameterList[4]); break; @@ -739,7 +739,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { TQString property, value; int pos; - if ((pos=(*it).find( '=' )) !=-1) + if ((pos=(*it).tqfind( '=' )) !=-1) { property = (*it).left(pos); value = (*it).mid(pos+1); @@ -750,7 +750,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } if (property=="PREFIX") { - pos = value.find(')',1); + pos = value.tqfind(')',1); if(pos==-1) { server->setPrefixes(TQString(), value); @@ -781,7 +781,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case RPL_UMODEIS: { - TQString message=TQString("%1 %2").arg(i18n("Your personal modes are:")).arg(parameterList.join(" ").section(' ',1) + ' '+trailing); + TQString message=TQString("%1 %2").tqarg(i18n("Your personal modes are:")).tqarg(parameterList.join(" ").section(' ',1) + ' '+trailing); server->appendMessageToFrontmost("Info", message); break; } @@ -853,7 +853,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com case RPL_CHANNELURLIS: {// :niven.freenode.net 328 argonel #channel :http://www.buggeroff.com/ server->appendCommandMessageToChannel(parameterList[1], i18n("URL"), - i18n("Channel URL: %1").arg(trailing)); + i18n("Channel URL: %1").tqarg(trailing)); break; } case RPL_CHANNELCREATED: @@ -862,7 +862,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com when.setTime_t(parameterList[2].toUInt()); server->appendCommandMessageToChannel(parameterList[1],i18n("Created"), i18n("This channel was created on %1.") - .arg(when.toString(Qt::LocalDate)) + .tqarg(when.toString(Qt::LocalDate)) ); if(Preferences::autoWhoContinuousEnabled()) @@ -877,7 +877,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // Display message only if this was not an automatic request. if(getAutomaticRequest("WHOIS",parameterList[1])==0) { - server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is logged in as %2.").arg(parameterList[1]).arg(parameterList[2])); + server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is logged in as %2.").tqarg(parameterList[1]).tqarg(parameterList[2])); } break; } @@ -927,7 +927,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // Topic set messages case RPL_NOTOPIC: { - server->appendMessageToFrontmost(i18n("TOPIC"),i18n("The channel %1 has no topic set.").arg(parameterList[1]) /*.arg(parameterList[2])*/); //FIXME ok, whats the second parameter supposed to be? + server->appendMessageToFrontmost(i18n("TOPIC"),i18n("The channel %1 has no topic set.").tqarg(parameterList[1]) /*.tqarg(parameterList[2])*/); //FIXME ok, whats the second parameter supposed to be? break; } @@ -946,7 +946,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } else { - server->appendMessageToFrontmost(i18n("Topic"),i18n("The channel topic for %1 is: \"%2\"").arg(parameterList[1]).arg(topic)); + server->appendMessageToFrontmost(i18n("Topic"),i18n("The channel topic for %1 is: \"%2\"").tqarg(parameterList[1]).tqarg(topic)); } break; @@ -962,15 +962,15 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendCommandMessageToChannel(parameterList[1],i18n("Topic"), i18n("The topic was set by %1 on %2.") - .arg(parameterList[2]).arg(when.toString(Qt::LocalDate)), + .tqarg(parameterList[2]).tqarg(when.toString(Qt::LocalDate)), false); } else { server->appendMessageToFrontmost(i18n("Topic"),i18n("The topic for %1 was set by %2 on %3.") - .arg(parameterList[1]) - .arg(parameterList[2]) - .arg(when.toString(Qt::LocalDate)) + .tqarg(parameterList[1]) + .tqarg(parameterList[2]) + .tqarg(when.toString(Qt::LocalDate)) ); setAutomaticRequest("TOPIC",parameterList[1],false); } @@ -983,7 +983,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // Display message only if this was not an automatic request. if(getAutomaticRequest("WHOIS",parameterList[1])==0) { - server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is actually using the host %2.").arg(parameterList[1]).arg(parameterList[2])); + server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is actually using the host %2.").tqarg(parameterList[1]).tqarg(parameterList[2])); } break; } @@ -993,11 +993,11 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // IP resolve purposes, and clear it from the automaticRequest list if(getAutomaticRequest("DNS",parameterList[1])==0) { - server->appendMessageToFrontmost(i18n("Error"),i18n("%1: No such nick/channel.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("%1: No such nick/channel.").tqarg(parameterList[1])); } else if(getAutomaticRequest("WHOIS",parameterList[1])==0) //Display message only if this was not an automatic request. { - server->appendMessageToFrontmost(i18n("Error"),i18n("No such nick: %1.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("No such nick: %1.").tqarg(parameterList[1])); setAutomaticRequest("DNS", parameterList[1], false); } @@ -1008,7 +1008,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // Display message only if this was not an automatic request. if(getAutomaticRequest("WHOIS",parameterList[1])==0) { - server->appendMessageToFrontmost(i18n("Error"),i18n("%1: No such channel.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("%1: No such channel.").tqarg(parameterList[1])); } break; } @@ -1036,7 +1036,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com server->obtainNickInfo(server->getNickname()) ; server->renameNick(server->getNickname(), newNick); // Show message - server->appendMessageToFrontmost(i18n("Nick"), i18n("Nickname already in use. Trying %1.").arg(newNick)); + server->appendMessageToFrontmost(i18n("Nick"), i18n("Nickname already in use. Trying %1.").tqarg(newNick)); // Send nickchange request to the server server->queue("NICK "+newNick); } @@ -1062,7 +1062,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->obtainNickInfo(server->getNickname()) ; server->renameNick(server->getNickname(), newNick); - server->appendMessageToFrontmost(i18n("Nick"), i18n("Erroneus nickname. Changing nick to %1." ).arg(newNick)) ; + server->appendMessageToFrontmost(i18n("Nick"), i18n("Erroneus nickname. Changing nick to %1." ).tqarg(newNick)) ; server->queue("NICK "+newNick); } } @@ -1070,7 +1070,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case ERR_NOTONCHANNEL: { - server->appendMessageToFrontmost(i18n("Error"),i18n("You are not on %1.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("You are not on %1.").tqarg(parameterList[1])); break; } @@ -1115,14 +1115,14 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { TQString current(trailing.section(' ',3)); //TQString max(trailing.section(' ',5,5)); - server->appendStatusMessage(i18n("Users"),i18n("Current users on the network: %1").arg(current)); + server->appendStatusMessage(i18n("Users"),i18n("Current users on the network: %1").tqarg(current)); break; } case RPL_LOCALUSERS: // Current local users: 589 Max: 845 { TQString current(trailing.section(' ',3)); //TQString max(trailing.section(' ',5,5)); - server->appendStatusMessage(i18n("Users"),i18n("Current users on %1: %2.").arg(prefix).arg(current)); + server->appendStatusMessage(i18n("Users"),i18n("Current users on %1: %2.").tqarg(prefix).tqarg(current)); break; } case RPL_ISON: @@ -1145,7 +1145,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com if(getAutomaticRequest("WHOIS",parameterList[1])==0) { server->appendMessageToFrontmost(i18n("Away"),i18n("%1 is away: %2") - .arg(parameterList[1]).arg(trailing) + .tqarg(parameterList[1]).tqarg(trailing) ); } @@ -1155,7 +1155,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Invite"), i18n("You invited %1 to channel %2.") - .arg(parameterList[1]).arg(parameterList[2]) + .tqarg(parameterList[1]).tqarg(parameterList[2]) ); break; } @@ -1173,7 +1173,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com NickInfo* nickInfo = server->getNickInfo(parameterList[1]); if(nickInfo) { - nickInfo->setHostmask(i18n("%1@%2").arg(parameterList[2]).arg(parameterList[3])); + nickInfo->setHosttqmask(i18n("%1@%2").tqarg(parameterList[2]).tqarg(parameterList[3])); nickInfo->setRealName(trailing); } // Display message only if this was not an automatic request. @@ -1181,13 +1181,13 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { // escape html tags TQString escapedRealName(trailing); - escapedRealName.replace("<","<").replace(">",">"); + escapedRealName.tqreplace("<","<").tqreplace(">",">"); server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is %2@%3 (%4)") - .arg(parameterList[1]) - .arg(parameterList[2]) - .arg(parameterList[3]) - .arg(escapedRealName), false); // Don't parse any urls + .tqarg(parameterList[1]) + .tqarg(parameterList[2]) + .tqarg(parameterList[3]) + .tqarg(escapedRealName), false); // Don't parse any urls } else { @@ -1200,17 +1200,17 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com TQString ip = resolved.first().address().nodeName(); server->appendMessageToFrontmost(i18n("DNS"), i18n("Resolved %1 (%2) to address: %3") - .arg(parameterList[1]) - .arg(parameterList[3]) - .arg(ip) + .tqarg(parameterList[1]) + .tqarg(parameterList[3]) + .tqarg(ip) ); } else { server->appendMessageToFrontmost(i18n("Error"), i18n("Unable to resolve address for %1 (%2)") - .arg(parameterList[1]) - .arg(parameterList[3]) + .tqarg(parameterList[1]) + .tqarg(parameterList[3]) ); } @@ -1235,7 +1235,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com // Prints "psn is an identified user" //server->appendStatusMessage(i18n("Whois"),parameterList.join(" ").section(' ',1)+' '+trailing); // The above line works fine, but can't be i18n'ised. So use the below instead.. I hope this is okay. - server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is an identified user.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is an identified user.").tqarg(parameterList[1])); } break; } @@ -1250,7 +1250,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com bool bAway = parameterList[6].upper().startsWith("G"); if(nickInfo) { - nickInfo->setHostmask(i18n("%1@%2").arg(parameterList[2]).arg(parameterList[3])); + nickInfo->setHosttqmask(i18n("%1@%2").tqarg(parameterList[2]).tqarg(parameterList[3])); //Strip off the "0 " nickInfo->setRealName(trailing.section(" ", 1)); nickInfo->setAway(bAway); @@ -1265,11 +1265,11 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com if(getAutomaticRequest("WHO",whoRequestList.front())==0) { server->appendMessageToFrontmost(i18n("Who"), - i18n("%1 is %2@%3 (%4)%5").arg(parameterList[5]) - .arg(parameterList[2]) - .arg(parameterList[3]) - .arg(trailing.section(" ", 1)) - .arg(bAway?i18n(" (Away)"):TQString()) + i18n("%1 is %2@%3 (%4)%5").tqarg(parameterList[5]) + .tqarg(parameterList[2]) + .tqarg(parameterList[3]) + .tqarg(trailing.section(" ", 1)) + .tqarg(bAway?i18n(" (Away)"):TQString()) , false); // Don't parse as url } } @@ -1279,7 +1279,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { if(!whoRequestList.isEmpty()) { // for safety - TQStringList::iterator it = whoRequestList.find(parameterList[1].lower()); + TQStringList::iterator it = whoRequestList.tqfind(parameterList[1].lower()); if(it != whoRequestList.end()) { @@ -1287,7 +1287,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Who"), i18n("End of /WHO list for %1") - .arg(parameterList[1])); + .tqarg(parameterList[1])); } else { @@ -1372,43 +1372,43 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is a user on channels: %2") - .arg(parameterList[1]) - .arg(userChannels.join(" ")) + .tqarg(parameterList[1]) + .tqarg(userChannels.join(" ")) ); } if(voiceChannels.count()) { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 has voice on channels: %2") - .arg(parameterList[1]).arg(voiceChannels.join(" ")) + .tqarg(parameterList[1]).tqarg(voiceChannels.join(" ")) ); } if(halfopChannels.count()) { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is a halfop on channels: %2") - .arg(parameterList[1]).arg(halfopChannels.join(" ")) + .tqarg(parameterList[1]).tqarg(halfopChannels.join(" ")) ); } if(opChannels.count()) { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is an operator on channels: %2") - .arg(parameterList[1]).arg(opChannels.join(" ")) + .tqarg(parameterList[1]).tqarg(opChannels.join(" ")) ); } if(ownerChannels.count()) { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is owner of channels: %2") - .arg(parameterList[1]).arg(ownerChannels.join(" ")) + .tqarg(parameterList[1]).tqarg(ownerChannels.join(" ")) ); } if(adminChannels.count()) { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is admin on channels: %2") - .arg(parameterList[1]).arg(adminChannels.join(" ")) + .tqarg(parameterList[1]).tqarg(adminChannels.join(" ")) ); } } @@ -1430,8 +1430,8 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com if(getAutomaticRequest("WHOIS",parameterList[1])==0) { server->appendMessageToFrontmost(i18n("Whois"), - i18n("%1 is online via %2 (%3).").arg(parameterList[1]) - .arg(parameterList[2]).arg(trailing) + i18n("%1 is online via %2 (%3).").tqarg(parameterList[1]) + .tqarg(parameterList[2]).tqarg(trailing) ); } break; @@ -1443,7 +1443,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 is available for help.") - .arg(parameterList[1]) + .tqarg(parameterList[1]) ); } break; @@ -1454,9 +1454,9 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com if(getAutomaticRequest("WHOIS",parameterList[1])==0) { if (trailing.lower().simplifyWhiteSpace().startsWith("is an irc operator")) - server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is an IRC Operator.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Whois"),i18n("%1 is an IRC Operator.").tqarg(parameterList[1])); else - server->appendMessageToFrontmost(i18n("Whois"),TQString("%1 %2").arg(parameterList[1]).arg(trailing)); + server->appendMessageToFrontmost(i18n("Whois"),TQString("%1 %2").tqarg(parameterList[1]).tqarg(trailing)); } break; } @@ -1482,8 +1482,8 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 = name of person, %2 = (x days), %3 = (x hours), %4 = (x minutes), %5 = (x seconds)", "%1 has been idle for %2, %3, %4, and %5.") - .arg(parameterList[1]) - .arg(daysString).arg(hoursString).arg(minutesString).arg(secondsString) + .tqarg(parameterList[1]) + .tqarg(daysString).tqarg(hoursString).tqarg(minutesString).tqarg(secondsString) ); // or longer than an hour } @@ -1495,8 +1495,8 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 = name of person, %2 = (x hours), %3 = (x minutes), %4 = (x seconds)", "%1 has been idle for %2, %3, and %4.") - .arg(parameterList[1]) - .arg(hoursString).arg(minutesString).arg(secondsString) + .tqarg(parameterList[1]) + .tqarg(hoursString).tqarg(minutesString).tqarg(secondsString) ); // or longer than a minute } @@ -1507,8 +1507,8 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 = name of person, %2 = (x minutes), %3 = (x seconds)", "%1 has been idle for %2 and %3.") - .arg(parameterList[1]) - .arg(minutesString).arg(secondsString) + .tqarg(parameterList[1]) + .tqarg(minutesString).tqarg(secondsString) ); // or just some seconds } @@ -1516,7 +1516,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 has been idle for 1 second.", "%1 has been idle for %n seconds.", seconds) - .arg(parameterList[1]) + .tqarg(parameterList[1]) ); } } @@ -1535,7 +1535,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { server->appendMessageToFrontmost(i18n("Whois"), i18n("%1 has been online since %2.") - .arg(parameterList[1]).arg(when.toString(Qt::LocalDate)) + .tqarg(parameterList[1]).tqarg(when.toString(Qt::LocalDate)) ); } } @@ -1558,38 +1558,38 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case RPL_USERHOST: { - // iterate over all nick/masks in reply + // iterate over all nick/tqmasks in reply TQStringList uhosts=TQStringList::split(" ",trailing); for(unsigned int index=0;index<uhosts.count();index++) { - // extract nickname and hostmask from reply + // extract nickname and hosttqmask from reply TQString nick(uhosts[index].section('=',0,0)); - TQString mask(uhosts[index].section('=',1)); + TQString tqmask(uhosts[index].section('=',1)); // get away and IRC operator flags - bool away=(mask[0]=='-'); + bool away=(tqmask[0]=='-'); bool ircOp=(nick[nick.length()-1]=='*'); - // cut flags from nick/hostmask - mask=mask.mid(1); + // cut flags from nick/hosttqmask + tqmask=tqmask.mid(1); if(ircOp) { nick=nick.left(nick.length()-1); } // inform server of this user's data - emit userhost(nick,mask,away,ircOp); + emit userhost(nick,tqmask,away,ircOp); // display message only if this was no automatic request if(getAutomaticRequest("USERHOST",nick)==0) { server->appendMessageToFrontmost(i18n("Userhost"), - i18n("%1 = nick, %2 = shows if nick is op, %3 = hostmask, %4 = shows away", "%1%2 is %3%4.") - .arg(nick) - .arg((ircOp) ? i18n(" (IRC Operator)") : TQString()) - .arg(mask) - .arg((away) ? i18n(" (away)") : TQString())); + i18n("%1 = nick, %2 = shows if nick is op, %3 = hosttqmask, %4 = shows away", "%1%2 is %3%4.") + .tqarg(nick) + .tqarg((ircOp) ? i18n(" (IRC Operator)") : TQString()) + .tqarg(tqmask) + .tqarg((away) ? i18n(" (away)") : TQString())); } // was this an automatic request? @@ -1614,7 +1614,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { TQString message; message=i18n("%1 (%n user): %2", "%1 (%n users): %2", parameterList[2].toInt()); - server->appendMessageToFrontmost(i18n("List"),message.arg(parameterList[1]).arg(trailing)); + server->appendMessageToFrontmost(i18n("List"),message.tqarg(parameterList[1]).tqarg(trailing)); } else // send them to /LIST window { @@ -1668,7 +1668,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com TQDateTime when; when.setTime_t(parameterList[4].toUInt()); - server->appendMessageToFrontmost(i18n("BanList:%1").arg(parameterList[1]), i18n("BanList message: e.g. *!*@aol.com set by MrGrim on <date>", "%1 set by %2 on %3").arg(parameterList[2]).arg(parameterList[3].section('!', 0, 0)).arg(when.toString(Qt::LocalDate))); + server->appendMessageToFrontmost(i18n("BanList:%1").tqarg(parameterList[1]), i18n("BanList message: e.g. *!*@aol.com set by MrGrim on <date>", "%1 set by %2 on %3").tqarg(parameterList[2]).tqarg(parameterList[3].section('!', 0, 0)).tqarg(when.toString(Qt::LocalDate))); } break; } @@ -1678,7 +1678,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com { setAutomaticRequest("BANLIST", parameterList[1], false); } else { - server->appendMessageToFrontmost(i18n("BanList:%1").arg(parameterList[1]), i18n("End of Ban List.")); + server->appendMessageToFrontmost(i18n("BanList:%1").tqarg(parameterList[1]), i18n("End of Ban List.")); } break; } @@ -1706,7 +1706,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case ERR_UNAVAILRESOURCE: { - server->appendMessageToFrontmost(i18n("Error"),i18n("%1 is currently unavailable.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("%1 is currently unavailable.").tqarg(parameterList[1])); break; } @@ -1722,7 +1722,7 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case ERR_UNKNOWNCOMMAND: { - server->appendMessageToFrontmost(i18n("Error"),i18n("%1: Unknown command.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("%1: Unknown command.").tqarg(parameterList[1])); break; } @@ -1734,14 +1734,14 @@ void InputFilter::parseServerCommand(const TQString &prefix, const TQString &com } case ERR_NEEDMOREPARAMS: { - server->appendMessageToFrontmost(i18n("Error"),i18n("%1: This command requires more parameters.").arg(parameterList[1])); + server->appendMessageToFrontmost(i18n("Error"),i18n("%1: This command requires more parameters.").tqarg(parameterList[1])); break; } case RPL_CAPAB: // Special freenode reply afaik { // Disable as we don't use this for anything yet - if(trailing.contains("IDENTIFY-MSG")) + if(trailing.tqcontains("IDENTIFY-MSG")) { server->enableIdentifyMsg(true); break; @@ -1776,7 +1776,7 @@ void InputFilter::parseModes(const TQString &sourceNick, const TQStringList &par } else { //XXX someone might care about the potentially unnecessary plural here - message = TQString("%1 %2 %3").arg(sourceNick).arg(i18n("has changed your personal modes:")).arg(modestring); + message = TQString("%1 %2 %3").tqarg(sourceNick).tqarg(i18n("has changed your personal modes:")).tqarg(modestring); } } if (!message.isEmpty()) @@ -1805,7 +1805,7 @@ void InputFilter::parseModes(const TQString &sourceNick, const TQStringList &par else { // Check if this was a parameter mode - if(parameterModes.find(mode)!=-1) + if(parameterModes.tqfind(mode)!=-1) { // Check if the mode actually wants a parameter. -k and -l do not! if(plus || (!plus && (mode!='k') && (mode!='l'))) @@ -1841,7 +1841,7 @@ bool InputFilter::isAChannel(const TQString &check) { Q_ASSERT(server); // if we ever see the assert, we need the ternary - return server? server->isAChannel(check) : TQString("#&").contains(check.at(0)); + return server? server->isAChannel(check) : TQString("#&").tqcontains(check.at(0)); } bool InputFilter::isIgnore(const TQString &sender, Ignore::Type type) @@ -1853,7 +1853,7 @@ bool InputFilter::isIgnore(const TQString &sender, Ignore::Type type) for(unsigned int index =0; index<list.count(); index++) { Ignore* item = list.at(index); - TQRegExp ignoreItem(TQRegExp::escape(item->getName()).replace("\\*", "(.*)"),false); + TQRegExp ignoreItem(TQString(TQRegExp::escape(item->getName())).tqreplace("\\*", "(.*)"),false); if (ignoreItem.exactMatch(sender) && (item->getFlags() & type)) doIgnore = true; if (ignoreItem.exactMatch(sender) && (item->getFlags() & Ignore::Exception)) @@ -1888,7 +1888,7 @@ int InputFilter::getAutomaticRequest(const TQString& command, const TQString& na void InputFilter::addWhoRequest(const TQString& name) { whoRequestList << name.lower(); } -bool InputFilter::isWhoRequestUnderProcess(const TQString& name) { return (whoRequestList.contains(name.lower())>0); } +bool InputFilter::isWhoRequestUnderProcess(const TQString& name) { return (whoRequestList.tqcontains(name.lower())>0); } void InputFilter::setLagMeasuring(bool state) { lagMeasuring=state; } @@ -1898,15 +1898,15 @@ void InputFilter::parsePrivMsg(const TQString& prefix, const TQStringList& parameterList, const TQString& trailing) { - int pos = prefix.find("!"); + int pos = prefix.tqfind("!"); TQString source; - TQString sourceHostmask; + TQString sourceHosttqmask; TQString message(trailing); if(pos > 0) { source = prefix.left(pos); - sourceHostmask = prefix.mid(pos + 1); + sourceHosttqmask = prefix.mid(pos + 1); } else { @@ -1914,7 +1914,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix, } KonversationApplication* konv_app = static_cast<KonversationApplication*>(kapp); - message = konv_app->doAutoreplace(message, false); + message = konv_app->doAutotqreplace(message, false); if(isAChannel(parameterList[0])) { @@ -1931,7 +1931,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix, TQRegExp::escape(server->loweredNickname()) + "([^\\d\\w]|$)"); regexp.setCaseSensitive(false); - if(message.find(regexp) !=-1 ) + if(message.tqfind(regexp) !=-1 ) { konv_app->notificationHandler()->nick(channel, source, message); @@ -1950,7 +1950,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix, if(!isIgnore(prefix,Ignore::Query)) { NickInfoPtr nickinfo = server->obtainNickInfo(source); - nickinfo->setHostmask(sourceHostmask); + nickinfo->setHosttqmask(sourceHosttqmask); // Create a new query (server will check for dupes) query = server->addQuery(nickinfo, false /*we didn't initiate this*/ ); @@ -1964,7 +1964,7 @@ void InputFilter::parsePrivMsg(const TQString& prefix, TQRegExp::escape(server->loweredNickname()) + "([^\\d\\w]|$)"); regexp.setCaseSensitive(false); - if(message.find(regexp) !=-1 ) + if(message.tqfind(regexp) !=-1 ) { konv_app->notificationHandler()->nick(query, source, message); @@ -1981,5 +1981,5 @@ void InputFilter::parsePrivMsg(const TQString& prefix, #include "inputfilter.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/inputfilter.h b/konversation/src/inputfilter.h index ef99b54..fae0834 100644 --- a/konversation/src/inputfilter.h +++ b/konversation/src/inputfilter.h @@ -25,9 +25,10 @@ class TQWidget; class Query; class TQDateTime; -class InputFilter : public QObject +class InputFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: InputFilter(); @@ -38,7 +39,7 @@ class InputFilter : public QObject void reset(); // reset AutomaticRequest, WhoRequestList - // use this when the client does automatics, like userhost for finding hostmasks + // use this when the client does automatics, like userhost for finding hosttqmasks void setAutomaticRequest(const TQString& command, const TQString& name, bool yes); int getAutomaticRequest(const TQString& command, const TQString& name); void addWhoRequest(const TQString& name); // called from Server::send() @@ -59,7 +60,7 @@ class InputFilter : public QObject // will be connected to Server::resumeDccSendTransfer() void resumeDccSendTransfer(const TQString &sourceNick, const TQStringList &dccArgument); // will be connected to Server::userhost() - void userhost(const TQString& nick,const TQString& hostmask,bool away,bool ircOp); + void userhost(const TQString& nick,const TQString& hosttqmask,bool away,bool ircOp); // will be connected to Server::setTopicAuthor() void topicAuthor(const TQString& channel, const TQString& author, TQDateTime t); void endOfWho(const TQString& target); // for scheduling auto /WHO diff --git a/konversation/src/insertchardialog.cpp b/konversation/src/insertchardialog.cpp index 1d5147b..b321549 100644 --- a/konversation/src/insertchardialog.cpp +++ b/konversation/src/insertchardialog.cpp @@ -19,8 +19,8 @@ namespace Konversation { - InsertCharDialog::InsertCharDialog(const TQString& font, TQWidget *parent, const char *name) - : KDialogBase(parent, name, false, i18n("Insert Character"), + InsertCharDialog::InsertCharDialog(const TQString& font, TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, false, i18n("Insert Character"), KDialogBase::Ok | KDialogBase::Close, KDialogBase::Ok, false) { @@ -39,7 +39,7 @@ namespace Konversation void InsertCharDialog::setFont(const TQFont &font) { - m_charTable->setFont(font.family()); + m_charTable->setFont(TQString(font.family())); } TQChar InsertCharDialog::chr() diff --git a/konversation/src/insertchardialog.h b/konversation/src/insertchardialog.h index 93a161b..5358e1b 100644 --- a/konversation/src/insertchardialog.h +++ b/konversation/src/insertchardialog.h @@ -24,9 +24,10 @@ namespace Konversation class InsertCharDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit InsertCharDialog(const TQString& font = TQString(), TQWidget *parent = 0, const char *name = 0); + explicit InsertCharDialog(const TQString& font = TQString(), TQWidget *tqparent = 0, const char *name = 0); ~InsertCharDialog(); void setFont(const TQFont &font); diff --git a/konversation/src/irccharsets.cpp b/konversation/src/irccharsets.cpp index cd887b8..458ad1e 100644 --- a/konversation/src/irccharsets.cpp +++ b/konversation/src/irccharsets.cpp @@ -18,11 +18,7 @@ #include <kglobal.h> #include <kstaticdeleter.h> -#if QT_VERSION < 0x030300 -#include <klocale.h> -#else #include <tqlocale.h> -#endif namespace Konversation @@ -67,7 +63,7 @@ namespace Konversation { // simplify ambiguousName TQString simplifiedAmbiguousName( ambiguousName.lower() ); - simplifiedAmbiguousName.replace( TQRegExp( "[^a-z0-9]" ), "" ); + simplifiedAmbiguousName.tqreplace( TQRegExp( "[^a-z0-9]" ), "" ); // search m_simplifiedShortNames int index = 0; @@ -79,7 +75,7 @@ namespace Konversation } // search m_shortNameAliases - if ( m_shortNameAliases.contains( simplifiedAmbiguousName ) ) + if ( m_shortNameAliases.tqcontains( simplifiedAmbiguousName ) ) return m_shortNameAliases[ simplifiedAmbiguousName ]; // failed @@ -100,16 +96,12 @@ namespace Konversation bool IRCCharsets::isValidEncoding( const TQString& shortName ) { - return ( m_shortNames.contains( shortName ) > 0 ); + return ( m_shortNames.tqcontains( shortName ) > 0 ); } TQString IRCCharsets::encodingForLocale() { - #if QT_VERSION < 0x030300 - TQString locale = KLocale::defaultLanguage(); - #else TQString locale = TQLocale::system().name(); - #endif // Special cases // don't add conditions for the languages for which TQTextCodec::codecForLocale() returns a correct codec. @@ -138,7 +130,7 @@ namespace Konversation // setup m_shortNameAliases // use only [a-z0-9] for keys! - m_shortNameAliases["unicode"] = "utf8"; + m_shortNameAliases["tqunicode"] = "utf8"; m_shortNameAliases["latin1"] = "iso-8859-1"; // setup m_shortNames, m_descriptiveNames, m_simplifiedShortNames @@ -159,9 +151,9 @@ namespace Konversation else { m_shortNames.append( encodingName ); - m_simplifiedShortNames.append( encodingName.replace( reSimplify, "" ) ); + m_simplifiedShortNames.append( encodingName.tqreplace( reSimplify, "" ) ); - if(encodingName == "jis7") // Add iso-2022-jp which is same as jis7 but not in Qt + if(encodingName == "jis7") // Add iso-2022-jp which is same as jis7 but not in TQt { it = m_descriptiveNames.insert(it, "Japanese ( iso-2022-jp )"); m_shortNames.append( "iso-2022-jp" ); diff --git a/konversation/src/irccharsets.h b/konversation/src/irccharsets.h index c07de11..04cfb2a 100644 --- a/konversation/src/irccharsets.h +++ b/konversation/src/irccharsets.h @@ -50,7 +50,7 @@ namespace Konversation * Converts the ambiguous encoding name to a short encoding name * Like : iso8859-9 -> iso 8859-9, iso-8859-9 -> iso 8859-9 * If the ambiguous name is invalid, returns TQString:null. - * @return a short encoding name or TQString::null + * @return a short encoding name or TQString() */ TQString ambiguousNameToShortName( const TQString& ambiguousName ); diff --git a/konversation/src/irccolorchooser.cpp b/konversation/src/irccolorchooser.cpp index 00fcdb0..c7b093b 100644 --- a/konversation/src/irccolorchooser.cpp +++ b/konversation/src/irccolorchooser.cpp @@ -23,8 +23,8 @@ #include <kcombobox.h> -IRCColorChooser::IRCColorChooser(TQWidget* parent, const char* name) -: KDialogBase(parent, name, true, i18n("IRC Color Chooser"), Ok|Cancel, Ok) +IRCColorChooser::IRCColorChooser(TQWidget* tqparent, const char* name) +: KDialogBase(tqparent, name, true, i18n("IRC Color Chooser"), Ok|Cancel, Ok) { m_view = new IRCColorChooserUI(this); setMainWidget(m_view); diff --git a/konversation/src/irccolorchooser.h b/konversation/src/irccolorchooser.h index 8d0fc20..9b045a5 100644 --- a/konversation/src/irccolorchooser.h +++ b/konversation/src/irccolorchooser.h @@ -25,8 +25,9 @@ class Preferences; class IRCColorChooser : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit IRCColorChooser(TQWidget* parent, const char* name = 0); + explicit IRCColorChooser(TQWidget* tqparent, const char* name = 0); TQString color(); protected slots: diff --git a/konversation/src/irccolorchooserui.ui b/konversation/src/irccolorchooserui.ui index 386824c..aa4bb5f 100644 --- a/konversation/src/irccolorchooserui.ui +++ b/konversation/src/irccolorchooserui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>IRCColorChooserUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>IRCColorChooserUI</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_previewLbl</cstring> </property> @@ -32,7 +32,7 @@ <property name="text"> <string>Preview</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> @@ -64,7 +64,7 @@ <b>Note: Not all users turn on the option to see this.</b></qt></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_fgColorLbl</cstring> </property> @@ -116,7 +116,7 @@ Choosing the default "<i>None</i>" will not change the background co <b>Note: Not all clients support this, and not all users turn on the option to see this.</b></qt></string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_bgColorLbl</cstring> </property> @@ -139,8 +139,8 @@ Choosing the default "<i>None</i>" will not change the background co </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcombobox.h</includehint> diff --git a/konversation/src/ircinput.cpp b/konversation/src/ircinput.cpp index 628d5d1..dbe4243 100644 --- a/konversation/src/ircinput.cpp +++ b/konversation/src/ircinput.cpp @@ -18,7 +18,7 @@ #include "chatwindow.h" #include "ircview.h" -#include <private/qrichtext_p.h> +#include <private/tqrichtext_p.h> #include <tqclipboard.h> #include <tqregexp.h> #include <tqdom.h> @@ -36,7 +36,7 @@ #define RICHTEXT 0 -IRCInput::IRCInput(TQWidget* parent) : KTextEdit(parent) +IRCInput::IRCInput(TQWidget* tqparent) : KTextEdit(tqparent) { m_lastHeight=document()->height(); @@ -61,7 +61,7 @@ IRCInput::IRCInput(TQWidget* parent) : KTextEdit(parent) connect(completionBox, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(insertCompletion(const TQString&))); // widget may not be resized vertically - setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,TQSizePolicy::Fixed)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,TQSizePolicy::Fixed)); //NoWrap coupled with the size policy constrains the line edit to be one row high setWordWrap(m_multiRow ? WidgetWidth : NoWrap); @@ -130,7 +130,7 @@ void IRCInput::updateAppearance() { m_multiRow = Preferences::useMultiRowInputBox(); setWordWrap(m_multiRow ? WidgetWidth : NoWrap); - m_lastHeight=heightForWidth(sizeHint().width()); + m_lastHeight=heightForWidth(tqsizeHint().width()); ensureCursorVisible(); //appears to trigger updateGeometry } @@ -144,7 +144,7 @@ void IRCInput::resizeContents( int w, int h ) } // widget must be only one line high - luckily QT will enforce this via wrappping policy -TQSize IRCInput::sizeHint() const +TQSize IRCInput::tqsizeHint() const { constPolish(); @@ -199,14 +199,14 @@ bool IRCInput::eventFilter(TQObject *object,TQEvent *event) { if (event->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = static_cast<TQKeyEvent*>(event); + TQKeyEvent* ke = TQT_TQKEYEVENT(event); // Allow tab to be handled naturally by the widget. // Once it runs out of links it goes to the next control. - if (ke->key() == Key_Tab && (ke->state() == 0 || ke->state() == Qt::ShiftButton)) + if (ke->key() == Key_Tab && (ke->state() == 0 || ke->state() == TQt::ShiftButton)) return false; - if (!ke->text().isEmpty() && ((ke->state() & (Qt::ShiftButton|Qt::Keypad)) || ke->state() == 0)) + if (!ke->text().isEmpty() && ((ke->state() & (TQt::ShiftButton|TQt::Keypad)) || ke->state() == 0)) { setFocus(); KonversationApplication::sendEvent(this,event); @@ -229,14 +229,14 @@ void IRCInput::keyPressEvent(TQKeyEvent* e) break; case Key_Up: - if (m_multiRow && (e->state() != (Qt::ShiftButton|Qt::ControlButton))) + if (m_multiRow && (e->state() != (TQt::ShiftButton|TQt::ControlButton))) break; emit history(true); return; break; case Key_Down: - if (m_multiRow && (e->state() != (Qt::ShiftButton|Qt::ControlButton))) + if (m_multiRow && (e->state() != (TQt::ShiftButton|TQt::ControlButton))) break; emit history(false); return; @@ -258,7 +258,7 @@ void IRCInput::keyPressEvent(TQKeyEvent* e) } else { - setText(static_cast<KonversationApplication*>(kapp)->doAutoreplace(text(),true)); + setText(static_cast<KonversationApplication*>(kapp)->doAutotqreplace(text(),true)); emit submit(); } } @@ -274,7 +274,7 @@ void IRCInput::keyPressEvent(TQKeyEvent* e) default: // Check if the keystroke actually produced text. If not it was just a qualifier. - if(!e->text().isEmpty() || ((e->key() >= Qt::Key_Home) && (e->key() <= Qt::Key_Down))) + if(!e->text().isEmpty() || ((e->key() >= TQt::Key_Home) && (e->key() <= TQt::Key_Down))) { if(getCompletionMode()!='\0') { @@ -371,18 +371,18 @@ void IRCInput::paste(bool useSelection) void IRCInput::paste() { - QClipboard *cb = KApplication::kApplication()->clipboard(); + TQClipboard *cb = KApplication::kApplication()->tqclipboard(); setFocus(); // Copy text from the clipboard (paste) TQString pasteText; if(m_useSelection) { - pasteText = cb->text( QClipboard::Selection); + pasteText = cb->text( TQClipboard::Selection); } else { - pasteText = cb->text( QClipboard::Clipboard); + pasteText = cb->text( TQClipboard::Clipboard); } // is there any text in the clipboard? @@ -394,32 +394,32 @@ void IRCInput::paste() bool signal=false; - // replace \r with \n to make xterm pastes happy - pasteText.replace("\r","\n"); + // tqreplace \r with \n to make xterm pastes happy + pasteText.tqreplace("\r","\n"); // remove blank lines - while(pasteText.contains("\n\n")) - pasteText.replace("\n\n","\n"); + while(pasteText.tqcontains("\n\n")) + pasteText.tqreplace("\n\n","\n"); TQRegExp reTopSpace("^ *\n"); - while(pasteText.contains(reTopSpace)) + while(pasteText.tqcontains(reTopSpace)) pasteText.remove(reTopSpace); TQRegExp reBottomSpace("\n *$"); - while(pasteText.contains(reBottomSpace)) + while(pasteText.tqcontains(reBottomSpace)) pasteText.remove(reBottomSpace); // Escape % when var expansion is enabled if (!Preferences::disableExpansion()) { - pasteText.replace ('%', "%%"); + pasteText.tqreplace ('%', "%%"); } // does the text contain at least one newline character? - if(pasteText.find('\n')!=-1) + if(pasteText.tqfind('\n')!=-1) { // make comparisons easier (avoid signed / unsigned warnings) - unsigned int pos=pasteText.find('\n'); - unsigned int rpos=pasteText.findRev('\n'); + unsigned int pos=pasteText.tqfind('\n'); + unsigned int rpos=pasteText.tqfindRev('\n'); // emit the signal if there's a line break in the middle of the text if(pos>0 && pos!=(pasteText.length()-1)) @@ -468,7 +468,7 @@ bool IRCInput::checkPaste(TQString& text) int doPaste=KMessageBox::Yes; //text is now preconditioned when you get here - int lines=text.contains('\n'); + int lines=text.tqcontains('\n'); if(text.length()>256 || lines) { @@ -476,7 +476,7 @@ bool IRCInput::checkPaste(TQString& text) (this, i18n("<qt>You are attempting to paste a large portion of text (%1 bytes or %2 lines) into " "the chat. This can cause connection resets or flood kills. " - "Do you really want to continue?</qt>").arg(text.length()).arg(lines+1), + "Do you really want to continue?</qt>").tqarg(text.length()).tqarg(lines+1), i18n("Large Paste Warning"), i18n("Paste"), i18n("&Edit..."), diff --git a/konversation/src/ircinput.h b/konversation/src/ircinput.h index a878d4b..c44d492 100644 --- a/konversation/src/ircinput.h +++ b/konversation/src/ircinput.h @@ -26,9 +26,10 @@ class TQMouseEvent; class IRCInput : public KTextEdit { Q_OBJECT + TQ_OBJECT public: - explicit IRCInput(TQWidget* parent); + explicit IRCInput(TQWidget* tqparent); ~IRCInput(); void setCompletionMode(char mode); @@ -37,7 +38,7 @@ class IRCInput : public KTextEdit int getOldCursorPosition(); TQString lastCompletion() const { return m_lastCompletion; } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; TQString text() const; signals: diff --git a/konversation/src/ircqueue.h b/konversation/src/ircqueue.h index 58b90ff..a263ba5 100644 --- a/konversation/src/ircqueue.h +++ b/konversation/src/ircqueue.h @@ -10,8 +10,8 @@ */ -#ifndef IRCQUEUE_H -#define IRCQUEUE_H +#ifndef IRCTQUEUE_H +#define IRCTQUEUE_H class Server; @@ -59,9 +59,10 @@ private: * The server and the emptying rates cannot be changed, if you want to do that construct a new queue. */ -class IRCQueue: public QObject +class IRCQueue: public TQObject { Q_OBJECT + TQ_OBJECT public: struct EmptyingRate diff --git a/konversation/src/ircview.cpp b/konversation/src/ircview.cpp index 35611f0..ad52db2 100644 --- a/konversation/src/ircview.cpp +++ b/konversation/src/ircview.cpp @@ -27,7 +27,7 @@ #include "emoticon.h" #include "notificationhandler.h" -#include <private/qrichtext_p.h> +#include <private/tqrichtext_p.h> #include <tqstylesheet.h> #include <tqstringlist.h> #include <tqregexp.h> @@ -68,7 +68,7 @@ #include <kglobal.h> -IRCView::IRCView(TQWidget* parent, Server* newServer) : KTextBrowser(parent) +IRCView::IRCView(TQWidget* tqparent, Server* newServer) : KTextBrowser(tqparent) { m_copyUrlMenu = false; m_resetScrollbar = true; @@ -95,10 +95,10 @@ IRCView::IRCView(TQWidget* parent, Server* newServer) : KTextBrowser(parent) setHScrollBarMode(AlwaysOff); setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); setNotifyClick(true); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); // set basic style sheet for <p> to make paragraph spacing possible - TQStyleSheet* sheet=new TQStyleSheet(this,"ircview_style_sheet"); + TQStyleSheet* sheet=new TQStyleSheet(TQT_TQOBJECT(this),"ircview_style_sheet"); new TQStyleSheetItem(sheet,"p"); setStyleSheet(sheet); @@ -109,7 +109,7 @@ IRCView::IRCView(TQWidget* parent, Server* newServer) : KTextBrowser(parent) m_popup->setItemVisible(copyUrlMenuSeparator, false); m_popup->insertItem(SmallIconSet("editcopy"),i18n("&Copy"),Copy); m_popup->insertItem(i18n("Select All"),SelectAll); - m_popup->insertItem(SmallIcon("find"),i18n("Find Text..."),Search); + m_popup->insertItem(SmallIcon("tqfind"),i18n("Find Text..."),Search); setServer(newServer); @@ -204,22 +204,22 @@ void IRCView::clear() void IRCView::highlightedSlot(const TQString& _link) { TQString link = _link; - // HACK Replace % with \x03 in the url to keep Qt from doing stupid things - link = link.replace ('\x03', "%"); + // HACK Replace % with \x03 in the url to keep TQt from doing stupid things + link = link.tqreplace ('\x03', "%"); //Hack to handle the fact that we get a decoded url link = KURL::fromPathOrURL(link).url(); - // HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit + // HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit if(link.startsWith("#")) { - link = link.replace(' ', "\\"); + link = link.tqreplace(' ', "\\"); } //we just saw this a second ago. no need to reemit. if (link == m_lastStatusText && !link.isEmpty()) return; - // remember current URL to overcome link clicking problems in QTextBrowser + // remember current URL to overcome link clicking problems in TQTextBrowser m_highlightedURL = link; if (link.isEmpty()) @@ -267,7 +267,7 @@ void IRCView::highlightedSlot(const TQString& _link) m_currentNick = link.mid(1); m_nickPopup->changeTitle(m_nickPopupId,m_currentNick); m_isOnNick = true; - emit setStatusBarTempText(i18n("Open a query with %1").arg(m_currentNick)); + emit setStatusBarTempText(i18n("Open a query with %1").tqarg(m_currentNick)); } else { @@ -284,7 +284,7 @@ void IRCView::highlightedSlot(const TQString& _link) m_channelPopup->changeTitle(m_channelPopupId,prettyId); m_isOnChannel = true; - emit setStatusBarTempText(i18n("Join the channel %1").arg(m_currentChannel)); + emit setStatusBarTempText(i18n("Join the channel %1").tqarg(m_currentChannel)); } } @@ -317,7 +317,7 @@ void IRCView::openLink(const TQString& url, bool newTab) else { TQString cmd = Preferences::webBrowserCmd(); - cmd.replace("%u", url); + cmd.tqreplace("%u", url); KProcess *proc = new KProcess; TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; @@ -333,7 +333,7 @@ void IRCView::openLink(const TQString& url, bool newTab) else if (url.startsWith("##") && m_server && m_server->isConnected()) { TQString channel(url); - channel.replace("##", "#"); + channel.tqreplace("##", "#"); m_server->sendJoinCommand(channel); } //FIXME: Don't do user links in DCC Chats to begin with since they don't have a server. @@ -351,9 +351,9 @@ void IRCView::replaceDecoration(TQString& line, char decoration, char replacemen int pos; bool decorated = false; - while((pos=line.find(decoration))!=-1) + while((pos=line.tqfind(decoration))!=-1) { - line.replace(pos,1,(decorated) ? TQString("</%1>").arg(replacement) : TQString("<%1>").arg(replacement)); + line.tqreplace(pos,1,(decorated) ? TQString("</%1>").tqarg(replacement) : TQString("<%1>").tqarg(replacement)); decorated = !decorated; } } @@ -373,9 +373,9 @@ bool doHighlight, bool parseURL, bool self) // TODO: Use TQStyleSheet::escape() here // Replace all < with < - filteredLine.replace("<","\x0blt;"); + filteredLine.tqreplace("<","\x0blt;"); // Replace all > with > - filteredLine.replace(">", "\x0bgt;"); + filteredLine.tqreplace(">", "\x0bgt;"); #if 0 if(!Preferences::disableExpansion()) @@ -392,7 +392,7 @@ bool doHighlight, bool parseURL, bool self) { replacement = boldRe.cap(1); replacement = "\x02"+replacement+"\x02"; - filteredLine.replace(position,replacement.length()+2,replacement); + filteredLine.tqreplace(position,replacement.length()+2,replacement); } position += boldRe.matchedLength(); } @@ -405,14 +405,14 @@ bool doHighlight, bool parseURL, bool self) { replacement = underRe.cap(1); replacement = "\x1f"+replacement+"\x1f"; - filteredLine.replace(position,replacement.length()+2,replacement); + filteredLine.tqreplace(position,replacement.length()+2,replacement); } position += underRe.matchedLength(); } } #endif - if(filteredLine.find("\x07") != -1) + if(filteredLine.tqfind("\x07") != -1) { if(Preferences::beep()) { @@ -420,7 +420,7 @@ bool doHighlight, bool parseURL, bool self) } } - // replace \003 and \017 codes with rich text color codes + // tqreplace \003 and \017 codes with rich text color codes // captures 1 2 23 4 4 3 1 TQRegExp colorRegExp("(\003([0-9]|0[0-9]|1[0-5]|)(,([0-9]|0[0-9]|1[0-5])|,|)|\017)"); @@ -437,7 +437,7 @@ bool doHighlight, bool parseURL, bool self) } else { - colorString = (firstColor) ? TQString::null : TQString("</font>"); + colorString = (firstColor) ? TQString() : TQString("</font>"); // reset colors on \017 to default value if(colorRegExp.cap(1) == "\017") @@ -458,7 +458,7 @@ bool doHighlight, bool parseURL, bool self) firstColor = false; } - filteredLine.replace(pos, colorRegExp.cap(0).length(), colorString); + filteredLine.tqreplace(pos, colorRegExp.cap(0).length(), colorString); } if(!firstColor) @@ -480,8 +480,8 @@ bool doHighlight, bool parseURL, bool self) else { // Change & to & to prevent html entities to do strange things to the text - filteredLine.replace('&', "&"); - filteredLine.replace("\x0b", "&"); + filteredLine.tqreplace('&', "&"); + filteredLine.tqreplace("\x0b", "&"); } filteredLine = Konversation::EmotIcon::filter(filteredLine, fontMetrics()); @@ -503,7 +503,7 @@ bool doHighlight, bool parseURL, bool self) TQString highlightColor; if(Preferences::highlightNick() && - filteredLine.lower().find(TQRegExp("(^|[^\\d\\w])" + + filteredLine.lower().tqfind(TQRegExp("(^|[^\\d\\w])" + TQRegExp::escape(ownNick.lower()) + "([^\\d\\w]|$)")) != -1) { @@ -527,21 +527,21 @@ bool doHighlight, bool parseURL, bool self) TQRegExp needleReg=highlight->getPattern(); needleReg.setCaseSensitive(false); // highlight regexp in text - patternFound = ((filteredLine.find(needleReg) != -1) || + patternFound = ((filteredLine.tqfind(needleReg) != -1) || // highlight regexp in nickname - (whoSent.find(needleReg) != -1)); + (whoSent.tqfind(needleReg) != -1)); // remember captured patterns for later - captures=needleReg.capturedTexts(); + captures=needleReg.tqcapturedTexts(); } else { TQString needle=highlight->getPattern(); // highlight patterns in text - patternFound = ((filteredLine.find(needle, 0, false) != -1) || + patternFound = ((filteredLine.tqfind(needle, 0, false) != -1) || // highlight patterns in nickname - (whoSent.find(needle, 0, false) != -1)); + (whoSent.tqfind(needle, 0, false) != -1)); } if(!patternFound) @@ -570,12 +570,12 @@ bool doHighlight, bool parseURL, bool self) konvApp->notificationHandler()->highlight(m_chatWin, whoSent, line); m_autoTextToSend = highlight->getAutoText(); - // replace %0 - %9 in regex groups + // tqreplace %0 - %9 in regex groups for(unsigned int capture=0;capture<captures.count();capture++) { - m_autoTextToSend.replace(TQString("%%1").arg(capture),captures[capture]); + m_autoTextToSend.tqreplace(TQString("%%1").tqarg(capture),captures[capture]); } - m_autoTextToSend.replace(TQRegExp("%[0-9]"),TQString()); + m_autoTextToSend.tqreplace(TQRegExp("%[0-9]"),TQString()); } } @@ -593,7 +593,7 @@ bool doHighlight, bool parseURL, bool self) } // Replace pairs of spaces with "<space> " to preserve some semblance of text wrapping - filteredLine.replace(" "," \xA0"); + filteredLine.tqreplace(" "," \xA0"); return filteredLine; } @@ -603,8 +603,8 @@ TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, boo if(Preferences::useClickableNicks()) { - // HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit - nickLine = "<a href=\"#" + TQString(nick).replace('\\', " ") + "\">%2</a>"; + // HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit + nickLine = "<a href=\"#" + TQString(nick).tqreplace('\\', " ") + "\">%2</a>"; } if(privMsg) @@ -626,7 +626,7 @@ TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, boo if(nickColor == "#000000") { - nickColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring + nickColor = "#000001"; // HACK Working around TQTextBrowser's auto link coloring } nickLine = "<font color=\"" + nickColor + "\">"+nickLine+"</font>"; @@ -645,7 +645,7 @@ TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, boo for (uint index = 0; index < nick.length(); index++) { - nickvalue += nick[index].unicode(); + nickvalue += nick[index].tqunicode(); } nickColor = Preferences::nickColor((nickvalue % 8)).name(); @@ -655,7 +655,7 @@ TQString IRCView::createNickLine(const TQString& nick, bool encapsulateNick, boo if(nickColor == "#000000") { - nickColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring + nickColor = "#000001"; // HACK Working around TQTextBrowser's auto link coloring } nickLine = "<font color=\"" + nickColor + "\">"+nickLine+"</font>"; @@ -673,7 +673,7 @@ void IRCView::append(const TQString& nick,const TQString& message) if(channelColor == "#000000") { - channelColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring + channelColor = "#000001"; // HACK Working around TQTextBrowser's auto link coloring } TQString line; @@ -692,9 +692,9 @@ void IRCView::append(const TQString& nick,const TQString& message) line = "<p><font color=\"" + channelColor + "\">%1" + nickLine + " %3</font></p>\n"; } - line = line.arg(timeStamp(), nick, filter(message, channelColor, nick, true)); + line = line.tqarg(timeStamp(), nick, filter(message, channelColor, nick, true)); - emit textToLog(TQString("<%1>\t%2").arg(nick).arg(message)); + emit textToLog(TQString("<%1>\t%2").tqarg(nick).tqarg(message)); doAppend(line); } @@ -737,7 +737,7 @@ void IRCView::appendRememberLine() m_markerLineParagraphs = newList; } - repaintChanged(); + tqrepaintChanged(); appendLine(Preferences::color(Preferences::CommandMessage).name()); @@ -790,7 +790,7 @@ void IRCView::clearLines() wipeLineParagraphs(); - repaintChanged(); + tqrepaintChanged(); } } @@ -855,7 +855,7 @@ void IRCView::appendQuery(const TQString& nick, const TQString& message, bool in if(queryColor == "#000000") { - queryColor = "#000001"; // HACK Working around QTextBrowser's auto link coloring + queryColor = "#000001"; // HACK Working around TQTextBrowser's auto link coloring } TQString line; @@ -874,9 +874,9 @@ void IRCView::appendQuery(const TQString& nick, const TQString& message, bool in line = "<p><font color=\"" + queryColor + "\">%1 " + nickLine + " %3</font></p>\n"; } - line = line.arg(timeStamp(), nick, filter(message, queryColor, nick, true)); + line = line.tqarg(timeStamp(), nick, filter(message, queryColor, nick, true)); - emit textToLog(TQString("<%1>\t%2").arg(nick).arg(message)); + emit textToLog(TQString("<%1>\t%2").tqarg(nick).tqarg(message)); doAppend(line); } @@ -900,7 +900,7 @@ void IRCView::appendAction(const TQString& nick,const TQString& message) { TQString actionColor=Preferences::color(Preferences::ActionMessage).name(); - // HACK Working around QTextBrowser's auto link coloring + // HACK Working around TQTextBrowser's auto link coloring if (actionColor == "#000000") actionColor = "#000001"; TQString line; @@ -917,9 +917,9 @@ void IRCView::appendAction(const TQString& nick,const TQString& message) line = "<p><font color=\"" + actionColor + "\">%1 * " + nickLine + " %3</font></p>\n"; } - line = line.arg(timeStamp(), nick, filter(message, actionColor, nick, true)); + line = line.tqarg(timeStamp(), nick, filter(message, actionColor, nick, true)); - emit textToLog(TQString("\t * %1 %2").arg(nick).arg(message)); + emit textToLog(TQString("\t * %1 %2").tqarg(nick).tqarg(message)); doAppend(line); } @@ -951,11 +951,11 @@ void IRCView::appendServerMessage(const TQString& type, const TQString& message, } if(type != i18n("Notify")) - line = line.arg(timeStamp(), type, filter(message, serverColor, 0 , true, parseURL)); + line = line.tqarg(timeStamp(), type, filter(message, serverColor, 0 , true, parseURL)); else - line = "<font color=\"" + serverColor + "\">"+line.arg(timeStamp(), type, message)+"</font>"; + line = "<font color=\"" + serverColor + "\">"+line.tqarg(timeStamp(), type, message)+"</font>"; - emit textToLog(TQString("%1\t%2").arg(type).arg(message)); + emit textToLog(TQString("%1\t%2").tqarg(type).tqarg(message)); doAppend(line); } @@ -993,9 +993,9 @@ void IRCView::appendCommandMessage(const TQString& type,const TQString& message, line = "<p><font color=\"" + commandColor + "\">%1 %2 %3</font></p>\n"; } - line = line.arg(timeStamp(), prefix, filter(message, commandColor, 0, true, parseURL, self)); + line = line.tqarg(timeStamp(), prefix, filter(message, commandColor, 0, true, parseURL, self)); - emit textToLog(TQString("%1\t%2").arg(type).arg(message)); + emit textToLog(TQString("%1\t%2").tqarg(type).tqarg(message)); doAppend(line, self); } @@ -1017,8 +1017,8 @@ void IRCView::appendBacklogMessage(const TQString& firstColumn,const TQString& r } // Nicks are in "<nick>" format so replace the "<>" - nick.replace("<","<"); - nick.replace(">",">"); + nick.tqreplace("<","<"); + nick.tqreplace(">",">"); TQString line; @@ -1031,7 +1031,7 @@ void IRCView::appendBacklogMessage(const TQString& firstColumn,const TQString& r line = "<p><font color=\"" + backlogColor + "\">%1 %2 %3</font></p>\n"; } - line = line.arg(time, nick, filter(message, backlogColor, NULL, false, false)); + line = line.tqarg(time, nick, filter(message, backlogColor, NULL, false, false)); doAppend(line); } @@ -1039,7 +1039,7 @@ void IRCView::appendBacklogMessage(const TQString& firstColumn,const TQString& r //without any display update stuff that freaks out the scrollview void IRCView::removeSelectedText( int selNum ) { - QTextDocument* doc=document(); + TQTextDocument* doc=document(); for ( int i = 0; i < (int)doc->numSelections(); ++i ) { @@ -1206,11 +1206,11 @@ void IRCView::contentsMouseReleaseEvent(TQMouseEvent *ev) } } - if (ev->button() == TQMouseEvent::LeftButton) + if (ev->button() == Qt::LeftButton) { if (m_mousePressed) { - if (ev->state() == (Qt::LeftButton|Qt::ShiftButton)) + if (ev->state() == (Qt::LeftButton|TQt::ShiftButton)) saveLinkAs(m_highlightedURL); else openLink(m_highlightedURL); @@ -1225,7 +1225,7 @@ void IRCView::contentsMouseReleaseEvent(TQMouseEvent *ev) void IRCView::contentsMousePressEvent(TQMouseEvent* ev) { - if (ev->button() == TQMouseEvent::LeftButton) + if (ev->button() == Qt::LeftButton) { m_urlToDrag = m_highlightedURL; @@ -1251,7 +1251,7 @@ void IRCView::contentsMouseMoveEvent(TQMouseEvent* ev) if (m_server && m_urlToDrag.startsWith("##")) { //FIXME consistent IRC URL serialization - ux = TQString("irc://%1:%2/%3").arg(m_server->getServerName()).arg(m_server->getPort()).arg(m_urlToDrag.mid(2)); + ux = TQString("irc://%1:%2/%3").tqarg(m_server->getServerName()).tqarg(m_server->getPort()).tqarg(m_urlToDrag.mid(2)); } else if (m_urlToDrag.startsWith("#")) { @@ -1270,18 +1270,18 @@ void IRCView::contentsContextMenuEvent(TQContextMenuEvent* ev) { bool block = contextMenu(ev); - // HACK Replace % with \x03 in the url to keep Qt from doing stupid things + // HACK Replace % with \x03 in the url to keep TQt from doing stupid things m_highlightedURL = anchorAt(viewportToContents(mapFromGlobal(TQCursor::pos()))); - m_highlightedURL = m_highlightedURL.replace('\x03', "%"); + m_highlightedURL = m_highlightedURL.tqreplace('\x03', "%"); // Hack to counter the fact that we're given an decoded url m_highlightedURL = KURL::fromPathOrURL(m_highlightedURL).url(); - if (m_highlightedURL.isEmpty()) viewport()->setCursor(Qt::ArrowCursor); + if (m_highlightedURL.isEmpty()) viewport()->setCursor(TQt::ArrowCursor); if(m_highlightedURL.startsWith("#")) { - // HACK:Use space as a placeholder for \ as Qt tries to be clever and does a replace to / in urls in QTextEdit - m_highlightedURL = m_highlightedURL.replace(' ', "\\"); + // HACK:Use space as a placeholder for \ as TQt tries to be clever and does a replace to / in urls in TQTextEdit + m_highlightedURL = m_highlightedURL.tqreplace(' ', "\\"); } if (!block) @@ -1344,9 +1344,9 @@ bool IRCView::contextMenu(TQContextMenuEvent* ce) break; case CopyUrl: { - QClipboard *cb = KApplication::kApplication()->clipboard(); - cb->setText(m_urlToCopy,QClipboard::Selection); - cb->setText(m_urlToCopy,QClipboard::Clipboard); + TQClipboard *cb = KApplication::kApplication()->tqclipboard(); + cb->setText(m_urlToCopy,TQClipboard::Selection); + cb->setText(m_urlToCopy,TQClipboard::Clipboard); break; } case SelectAll: @@ -1543,9 +1543,9 @@ void IRCView::searchAgain() } } - if(!find(m_pattern, m_caseSensitive, m_wholeWords, m_forward, &m_findParagraph, &m_findIndex)) + if(!tqfind(m_pattern, m_caseSensitive, m_wholeWords, m_forward, &m_findParagraph, &m_findIndex)) { - KMessageBox::information(this,i18n("No matches found for \"%1\".").arg(m_pattern),i18n("Information")); + KMessageBox::information(this,i18n("No matches found for \"%1\".").tqarg(m_pattern),i18n("Information")); } } @@ -1610,7 +1610,7 @@ bool IRCView::searchNext(bool reversed) } } - return find(m_pattern, m_caseSensitive, m_wholeWords, fwd, + return tqfind(m_pattern, m_caseSensitive, m_wholeWords, fwd, &m_findParagraph, &m_findIndex); } @@ -1621,8 +1621,8 @@ TQPopupMenu* IRCView::getPopup() const } // for more information about these RTFM -// http://www.unicode.org/reports/tr9/ -// http://www.w3.org/TR/unicode-xml/ +// http://www.tqunicode.org/reports/tr9/ +// http://www.w3.org/TR/tqunicode-xml/ TQChar IRCView::LRM = (ushort)0x200e; // Right-to-Left Mark TQChar IRCView::RLM = (ushort)0x200f; // Left-to-Right Mark TQChar IRCView::LRE = (ushort)0x202a; // Left-to-Right Embedding @@ -1705,14 +1705,14 @@ TQString IRCView::timeStamp() if(!Preferences::showDate()) { - timeString = TQString("<font color=\"" + timeColor + "\">[%1]</font> ").arg(time.toString(timeFormat)); + timeString = TQString("<font color=\"" + timeColor + "\">[%1]</font> ").tqarg(time.toString(timeFormat)); } else { - TQDate date = TQDate::currentDate(); + TQDate date = TQDate::tqcurrentDate(); timeString = TQString("<font color=\"" + timeColor + "\">[%1 %2]</font> ") - .arg(KGlobal::locale()->formatDate(date, true /*short format*/), + .tqarg(KGlobal::locale()->formatDate(date, true /*short format*/), time.toString(timeFormat)); } @@ -1768,7 +1768,7 @@ void IRCView::resizeEvent(TQResizeEvent* e) void IRCView::updateScrollBarPos() { ensureVisible(contentsX(), contentsHeight()); - repaintContents(false); + tqrepaintContents(false); } void IRCView::saveLinkAs(const TQString& url) @@ -1787,5 +1787,5 @@ void IRCView::saveLinkAs(const TQString& url) #include "ircview.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/ircview.h b/konversation/src/ircview.h index 85b4f74..50b7bce 100644 --- a/konversation/src/ircview.h +++ b/konversation/src/ircview.h @@ -37,9 +37,10 @@ class SearchBar; class IRCView : public KTextBrowser { Q_OBJECT + TQ_OBJECT public: - IRCView(TQWidget* parent,Server* newServer); + IRCView(TQWidget* tqparent,Server* newServer); ~IRCView(); void clear(); @@ -158,7 +159,7 @@ class IRCView : public KTextBrowser TQChar::Direction basicDirection(const TQString &string); - /// Returns a formated timestamp if timestamps are enabled else it returns TQString::null + /// Returns a formated timestamp if timestamps are enabled else it returns TQString() TQString timeStamp(); /// Returns a formated nick string @@ -230,7 +231,7 @@ class IRCView : public KTextBrowser TQFontDatabase m_fontDataBase; - // Provide ability to disable parent ensureCursorVisible() call + // Provide ability to disable tqparent ensureCursorVisible() call bool m_disableEnsureCursorVisible; // If this widget was painted at least once. Needed for scrollbar // reset HACK as a precaution. diff --git a/konversation/src/ircviewbox.cpp b/konversation/src/ircviewbox.cpp index 24401dd..5752287 100644 --- a/konversation/src/ircviewbox.cpp +++ b/konversation/src/ircviewbox.cpp @@ -25,8 +25,8 @@ static TQPixmap getIcon(const TQString& name) return iconLoader->loadIcon(name, KIcon::Toolbar, 16); } -IRCViewBox::IRCViewBox(TQWidget* parent, Server* newServer) -: TQVBox(parent) +IRCViewBox::IRCViewBox(TQWidget* tqparent, Server* newServer) +: TQVBox(tqparent) { m_ircView = new IRCView(this, newServer); m_searchBar = new SearchBar(this); @@ -84,14 +84,14 @@ void IRCViewBox::searchNext(bool reversed) if (match) { m_searchBar->setHasMatch(true); - m_searchBar->setStatus(TQPixmap(), ""); + m_searchBar->settqStatus(TQPixmap(), ""); return; } if (!m_matchedOnce) { m_searchBar->setHasMatch(false); - m_searchBar->setStatus(getIcon("messagebox_warning"), + m_searchBar->settqStatus(getIcon("messagebox_warning"), i18n("Phrase not found")); return; } @@ -105,13 +105,13 @@ void IRCViewBox::searchNext(bool reversed) if (!match) { m_searchBar->setHasMatch(false); - m_searchBar->setStatus(getIcon("messagebox_warning"), + m_searchBar->settqStatus(getIcon("messagebox_warning"), i18n("Phrase not found")); return; } m_searchBar->setHasMatch(true); - m_searchBar->setStatus(getIcon("messagebox_info"), + m_searchBar->settqStatus(getIcon("messagebox_info"), i18n("Wrapped search")); } @@ -126,12 +126,12 @@ void IRCViewBox::slotSearchChanged(const TQString& pattern) if (match) { m_searchBar->setHasMatch(true); - m_searchBar->setStatus(TQPixmap(), ""); + m_searchBar->settqStatus(TQPixmap(), ""); } else { m_searchBar->setHasMatch(false); - m_searchBar->setStatus(getIcon("messagebox_warning"), + m_searchBar->settqStatus(getIcon("messagebox_warning"), i18n("Phrase not found")); } diff --git a/konversation/src/ircviewbox.h b/konversation/src/ircviewbox.h index e9b12f3..48d2385 100644 --- a/konversation/src/ircviewbox.h +++ b/konversation/src/ircviewbox.h @@ -19,13 +19,14 @@ class IRCView; class SearchBar; class Server; -class IRCViewBox : public QVBox +class IRCViewBox : public TQVBox { Q_OBJECT + TQ_OBJECT public: - IRCViewBox(TQWidget* parent, Server* newServer); + IRCViewBox(TQWidget* tqparent, Server* newServer); ~IRCViewBox(); IRCView* ircView() const; diff --git a/konversation/src/joinchanneldialog.cpp b/konversation/src/joinchanneldialog.cpp index d50eb8c..b7c7862 100644 --- a/konversation/src/joinchanneldialog.cpp +++ b/konversation/src/joinchanneldialog.cpp @@ -25,8 +25,8 @@ namespace Konversation { - JoinChannelDialog::JoinChannelDialog(Server* server, TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n("Join Channel on %1").arg(server->getDisplayName()), Ok|Cancel, Ok) + JoinChannelDialog::JoinChannelDialog(Server* server, TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n("Join Channel on %1").tqarg(server->getDisplayName()), Ok|Cancel, Ok) { m_server = server; m_widget = new JoinChannelUI(this); diff --git a/konversation/src/joinchanneldialog.h b/konversation/src/joinchanneldialog.h index e997f34..b56d4c4 100644 --- a/konversation/src/joinchanneldialog.h +++ b/konversation/src/joinchanneldialog.h @@ -25,8 +25,9 @@ namespace Konversation class JoinChannelDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit JoinChannelDialog(Server* server, TQWidget *parent = 0, const char *name = 0); + explicit JoinChannelDialog(Server* server, TQWidget *tqparent = 0, const char *name = 0); ~JoinChannelDialog(); TQString channel() const; diff --git a/konversation/src/joinchannelui.ui b/konversation/src/joinchannelui.ui index 7863331..bcb8750 100644 --- a/konversation/src/joinchannelui.ui +++ b/konversation/src/joinchannelui.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>(C) 2004 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Konversation::JoinChannelUI</cstring> </property> @@ -25,7 +25,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>channelLabel</cstring> </property> @@ -55,7 +55,7 @@ the Free Software Foundation; either version 2 of the License, or <enum>Password</enum> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>passwordLabel</cstring> </property> @@ -66,7 +66,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>passwordEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -82,7 +82,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Server:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>serverLbl</cstring> </property> @@ -100,8 +100,8 @@ the Free Software Foundation; either version 2 of the License, or </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/konsolepanel.cpp b/konversation/src/konsolepanel.cpp index 5238e11..80270b6 100644 --- a/konversation/src/konsolepanel.cpp +++ b/konversation/src/konsolepanel.cpp @@ -25,10 +25,10 @@ KonsolePanel::KonsolePanel(TQWidget *p) : ChatWindow( p ), k_part (0) KLibFactory *fact = KLibLoader::self()->factory("libkonsolepart"); if (!fact) return; - k_part = (KParts::ReadOnlyPart *) fact->create(this); + k_part = (KParts::ReadOnlyPart *) fact->create(TQT_TQOBJECT(this)); if (!k_part) return; - k_part->widget()->setFocusPolicy(TQWidget::WheelFocus); + k_part->widget()->setFocusPolicy(TQ_WheelFocus); setFocusProxy(k_part->widget()); k_part->widget()->setFocus(); diff --git a/konversation/src/konsolepanel.h b/konversation/src/konsolepanel.h index 3852291..bd358c8 100644 --- a/konversation/src/konsolepanel.h +++ b/konversation/src/konsolepanel.h @@ -20,6 +20,7 @@ class KonsolePanel : public ChatWindow { Q_OBJECT + TQ_OBJECT public: explicit KonsolePanel(TQWidget *p); diff --git a/konversation/src/konvdcop.cpp b/konversation/src/konvdcop.cpp index e0054af..e8384c9 100644 --- a/konversation/src/konvdcop.cpp +++ b/konversation/src/konvdcop.cpp @@ -99,17 +99,17 @@ void KonvDCOP::actionToAll(const TQString &message) void KonvDCOP::say(const TQString& _server,const TQString& _target,const TQString& _command) { - //Sadly, copy on write doesn't exist with TQString::replace + //Sadly, copy on write doesn't exist with TQString::tqreplace TQString server(_server), target(_target), command(_command); - // TODO: this just masks a greater problem - Server::addQuery will return a query for '' --argonel + // TODO: this just tqmasks a greater problem - Server::addQuery will return a query for '' --argonel // TODO: other DCOP calls need argument checking too --argonel if (server.isEmpty() || target.isEmpty() || command.isEmpty()) kdDebug() << "KonvDCOP::say() requires 3 arguments." << endl; else { - command.replace('\n',"\\n"); - command.replace('\r',"\\r"); + command.tqreplace('\n',"\\n"); + command.tqreplace('\r',"\\r"); target.remove('\n'); target.remove('\r'); server.remove('\n'); @@ -128,13 +128,13 @@ void KonvDCOP::info(const TQString& string) void KonvDCOP::debug(const TQString& string) { kdDebug() << "KonvDCOP::debug()" << endl; - emit dcopInfo(TQString("Debug: %1").arg(string)); + emit dcopInfo(TQString("Debug: %1").tqarg(string)); } void KonvDCOP::error(const TQString& string) { kdDebug() << "KonvDCOP::error()" << endl; - emit dcopInfo(TQString("Error: %1").arg(string)); + emit dcopInfo(TQString("Error: %1").tqarg(string)); } void KonvDCOP::insertMarkerLine() @@ -153,7 +153,7 @@ TQString KonvDCOP::getNickname(const TQString& serverName) if (!server) { - error( i18n( "getNickname: Server %1 is not found." ).arg( serverName ) ); + error( i18n( "getNickname: Server %1 is not found." ).tqarg( serverName ) ); return TQString(); } diff --git a/konversation/src/konvdcop.h b/konversation/src/konvdcop.h index 7cb49a5..c1ab02f 100644 --- a/konversation/src/konvdcop.h +++ b/konversation/src/konvdcop.h @@ -25,6 +25,7 @@ class KonvDCOP : public TQObject, virtual public KonvIface { Q_OBJECT + TQ_OBJECT public: KonvDCOP(); @@ -70,6 +71,7 @@ class KonvDCOP : public TQObject, virtual public KonvIface class KonvIdentDCOP : public TQObject, virtual public KonvIdentityIface { Q_OBJECT + TQ_OBJECT public: KonvIdentDCOP(); diff --git a/konversation/src/konversationapplication.cpp b/konversation/src/konversationapplication.cpp index 46f7ee2..b5f6a58 100644 --- a/konversation/src/konversationapplication.cpp +++ b/konversation/src/konversationapplication.cpp @@ -81,9 +81,9 @@ int KonversationApplication::newInstance() { connect(this, TQT_SIGNAL(shutDown()), this, TQT_SLOT(prepareShutdown())); - m_connectionManager = new ConnectionManager(this); + m_connectionManager = new ConnectionManager(TQT_TQOBJECT(this)); - m_awayManager = new AwayManager(this); + m_awayManager = new AwayManager(TQT_TQOBJECT(this)); connect(m_connectionManager, TQT_SIGNAL(identityOnline(int)), m_awayManager, TQT_SLOT(identityOnline(int))); connect(m_connectionManager, TQT_SIGNAL(identityOffline(int)), m_awayManager, TQT_SLOT(identityOffline(int))); @@ -91,13 +91,13 @@ int KonversationApplication::newInstance() connect(m_connectionManager, TQT_SIGNAL(connectionChangedAwayState(bool)), m_awayManager, TQT_SLOT(updateGlobalAwayAction(bool))); // an instance of DccTransferManager needs to be created before GUI class instances' creation. - m_dccTransferManager = new DccTransferManager(this); + m_dccTransferManager = new DccTransferManager(TQT_TQOBJECT(this)); // make sure all vars are initialized properly quickConnectDialog = 0; // Sound object used to play sound... - m_sound = new Konversation::Sound(this); + m_sound = new Konversation::Sound(TQT_TQOBJECT(this)); // initialize OSD display here, so we can read the Preferences::properly osd = new OSDWidget( "Konversation" ); @@ -115,7 +115,7 @@ int KonversationApplication::newInstance() bool changed = false; for ( TQStringList::ConstIterator it = scripts.begin(); it != scripts.end(); ++it ) { - if(!aliasList.contains(*it)) { + if(!aliasList.tqcontains(*it)) { changed = true; aliasList.append(*it); } @@ -190,7 +190,7 @@ int KonversationApplication::newInstance() } if (!url.isEmpty()) - getConnectionManager()->connectTo(Konversation::SilentlyReuseConnection, url); + getConnectionManager()->connectTo(Konversation::SilentlyReuseConnection, TQString(url)); else if (args->isSet("server")) { getConnectionManager()->connectTo(Konversation::SilentlyReuseConnection, @@ -343,7 +343,7 @@ void KonversationApplication::readOptions() osd->setShadow(Preferences::oSDDrawShadow()); osd->setOffset(Preferences::oSDOffsetX(), Preferences::oSDOffsetY()); - osd->setAlignment((OSDWidget::Alignment)Preferences::oSDAlignment()); + osd->tqsetAlignment((OSDWidget::Alignment)Preferences::oSDAlignment()); if(Preferences::oSDUseCustomColors()) { @@ -446,9 +446,9 @@ void KonversationApplication::readOptions() TQStringList buttonList(Preferences::quickButtonList()); // Read all quick buttons int index=0; - while(config->hasKey(TQString("Button%1").arg(index))) + while(config->hasKey(TQString("Button%1").tqarg(index))) { - buttonList.append(config->readEntry(TQString("Button%1").arg(index++))); + buttonList.append(config->readEntry(TQString("Button%1").tqarg(index++))); } // while // Put back the changed button list Preferences::setQuickButtonList(buttonList); @@ -462,10 +462,10 @@ void KonversationApplication::readOptions() TQStringList autoreplaceList(Preferences::autoreplaceList()); // Read all entries index=0; - while(config->hasKey(TQString("Autoreplace%1").arg(index))) + while(config->hasKey(TQString("Autotqreplace%1").tqarg(index))) { // read entry and get length of the string - TQString entry=config->readEntry(TQString("Autoreplace%1").arg(index++)); + TQString entry=config->readEntry(TQString("Autotqreplace%1").tqarg(index++)); unsigned int length=entry.length()-1; // if there's a "#" in the end, strip it (used to preserve blanks at the end of the replacement text) // there should always be one, but older versions did not do it, so we check first @@ -494,9 +494,9 @@ void KonversationApplication::readOptions() { int i = 0; - while(config->hasGroup(TQString("Highlight%1").arg(i))) + while(config->hasGroup(TQString("Highlight%1").tqarg(i))) { - config->setGroup(TQString("Highlight%1").arg(i)); + config->setGroup(TQString("Highlight%1").tqarg(i)); Preferences::addHighlight(config->readEntry("Pattern"), config->readBoolEntry("RegExp"), config->readColorEntry("Color"), @@ -512,9 +512,9 @@ void KonversationApplication::readOptions() if(config->hasKey("Ignore0")) Preferences::clearIgnoreList(); // Read all ignores index=0; - while(config->hasKey(TQString("Ignore%1").arg(index))) + while(config->hasKey(TQString("Ignore%1").tqarg(index))) { - Preferences::addIgnore(config->readEntry(TQString("Ignore%1").arg(index++))); + Preferences::addIgnore(config->readEntry(TQString("Ignore%1").tqarg(index++))); } // Aliases @@ -563,7 +563,7 @@ void KonversationApplication::saveOptions(bool updateGUI) for(IdentityList::ConstIterator it = identityList.begin(); it != identityList.end(); ++it) { IdentityPtr identity = (*it); - config->setGroup(TQString("Identity %1").arg(index)); + config->setGroup(TQString("Identity %1").tqarg(index)); config->writeEntry("Name",identity->getName()); config->writeEntry("Ident",identity->getIdent()); @@ -643,7 +643,7 @@ void KonversationApplication::saveOptions(bool updateGUI) for(it2 = serverlist.begin(); it2 != serverlist.end(); ++it2) { - groupName = TQString("Server %1").arg(index2); + groupName = TQString("Server %1").tqarg(index2); servers.append(groupName); config->setGroup(groupName); config->writeEntry("Server", (*it2).host()); @@ -658,7 +658,7 @@ void KonversationApplication::saveOptions(bool updateGUI) for(it3 = channelList.begin(); it3 != channelList.end(); ++it3) { - groupName = TQString("Channel %1").arg(index3); + groupName = TQString("Channel %1").tqarg(index3); channels.append(groupName); config->setGroup(groupName); config->writeEntry("Name", (*it3).name()); @@ -671,7 +671,7 @@ void KonversationApplication::saveOptions(bool updateGUI) for(it3 = channelList.begin(); it3 != channelList.end(); ++it3) { - groupName = TQString("Channel %1").arg(index3); + groupName = TQString("Channel %1").tqarg(index3); channelHistory.append(groupName); config->setGroup(groupName); config->writeEntry("Name", (*it3).name()); @@ -680,7 +680,7 @@ void KonversationApplication::saveOptions(bool updateGUI) index3++; } - config->setGroup(TQString("ServerGroup %1").arg(TQString::number(index).rightJustify(width,'0'))); + config->setGroup(TQString("ServerGroup %1").tqarg(TQString::number(index).rightJustify(width,'0'))); config->writeEntry("Name", (*it)->name()); config->writeEntry("Identity", (*it)->identity()->getName()); config->writeEntry("ServerList", servers); @@ -704,7 +704,7 @@ void KonversationApplication::saveOptions(bool updateGUI) index=0; while(item) { - config->writeEntry(TQString("Ignore%1").arg(index),TQString("%1,%2").arg(item->getName()).arg(item->getFlags())); + config->writeEntry(TQString("Ignore%1").tqarg(index),TQString("%1,%2").tqarg(item->getName()).tqarg(item->getFlags())); item=ignoreList.next(); index++; } @@ -747,7 +747,7 @@ void KonversationApplication::storeUrl(const TQString& who,const TQString& newUr if(url.startsWith("www.")) url="http://"+url; else if(url.startsWith("ftp.")) url="ftp://"+url; - url=url.replace("&","&"); + url=url.tqreplace("&","&"); // check that we don't add the same URL twice deleteUrl(who,url); @@ -792,7 +792,7 @@ void KonversationApplication::splitNick_Server(const TQString& nick_server, TQSt { //kaddresbook uses the utf separator 0xE120, so treat that as a separator as well TQString nickServer = nick_server; - nickServer.replace(TQChar(0xE120), "@"); + nickServer.tqreplace(TQChar(0xE120), "@"); ircnick = nickServer.section("@",0,0); serverOrGroup = nickServer.section("@",1); } @@ -816,7 +816,7 @@ NickInfoPtr KonversationApplication::getNickInfo(const TQString &ircnick, const } // auto replace on input/output -TQString KonversationApplication::doAutoreplace(const TQString& text,bool output) +TQString KonversationApplication::doAutotqreplace(const TQString& text,bool output) { // get autoreplace list TQStringList autoreplaceList=Preferences::autoreplaceList(); @@ -851,21 +851,21 @@ TQString KonversationApplication::doAutoreplace(const TQString& text,bool output do { replacement = definition.section(',',3); // find matches - index = line.find(needleReg, index); + index = line.tqfind(needleReg, index); if(index != -1) { // remember captured patterns - TQStringList captures = needleReg.capturedTexts(); + TQStringList captures = needleReg.tqcapturedTexts(); - // replace %0 - %9 in regex groups + // tqreplace %0 - %9 in regex groups for(unsigned int capture=0;capture<captures.count();capture++) { - replacement.replace(TQString("%%1").arg(capture),captures[capture]); + replacement.tqreplace(TQString("%%1").tqarg(capture),captures[capture]); } - replacement.replace(TQRegExp("%[0-9]"),TQString()); + replacement.tqreplace(TQRegExp("%[0-9]"),TQString()); // replace input with replacement - line.replace(index, captures[0].length(), replacement); + line.tqreplace(index, captures[0].length(), replacement); index += replacement.length(); } } while(index >= 0 && index < (int)line.length()); @@ -874,7 +874,7 @@ TQString KonversationApplication::doAutoreplace(const TQString& text,bool output { TQRegExp needleReg("\\b" + TQRegExp::escape(pattern) + "\\b"); needleReg.setCaseSensitive(false); - line.replace(needleReg,replacement); + line.tqreplace(needleReg,replacement); } } } @@ -884,5 +884,5 @@ TQString KonversationApplication::doAutoreplace(const TQString& text,bool output #include "konversationapplication.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/konversationapplication.h b/konversation/src/konversationapplication.h index 72be6fd..b410d09 100644 --- a/konversation/src/konversationapplication.h +++ b/konversation/src/konversationapplication.h @@ -59,6 +59,7 @@ namespace Konversation class KonversationApplication : public KUniqueApplication { Q_OBJECT + TQ_OBJECT public: /** This function in general shouldn't be called, because in the future there @@ -88,7 +89,7 @@ class KonversationApplication : public KUniqueApplication static KonversationApplication* instance(); /** For dcop and addressbook, a user can be specified as user@irc.server.net - * or user\@servergroup or using the unicode separator symbol 0xE120 instead + * or user\@servergroup or using the tqunicode separator symbol 0xE120 instead * of the "@". This function takes a string like the above examples, and * modifies ircnick and serverOrGroup to contain the split up string. If * the string doesn't have an @ or 0xE120, ircnick is set to the @@ -116,7 +117,7 @@ class KonversationApplication : public KUniqueApplication Konversation::NotificationHandler* notificationHandler() const { return m_notificationHandler; } // auto replacement for input or output lines - TQString doAutoreplace(const TQString& text,bool output); + TQString doAutotqreplace(const TQString& text,bool output); int newInstance(); @@ -165,5 +166,5 @@ class KonversationApplication : public KUniqueApplication #endif -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/konversationmainwindow.cpp b/konversation/src/konversationmainwindow.cpp index 76d1393..2c2e3f2 100644 --- a/konversation/src/konversationmainwindow.cpp +++ b/konversation/src/konversationmainwindow.cpp @@ -71,8 +71,8 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", setCentralWidget(m_viewContainer->getWidget()); //used for event compression. See header file for resetHasDirtySettings() - connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(resetHasDirtySettings())); - connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), this, TQT_SLOT(updateTrayIcon())); + connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), TQT_TQOBJECT(this), TQT_SLOT(resetHasDirtySettings())); + connect(KonversationApplication::instance(), TQT_SIGNAL(appearanceChanged()), TQT_TQOBJECT(this), TQT_SLOT(updateTrayIcon())); // Set up view container @@ -82,14 +82,14 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", m_viewContainer, TQT_SLOT(updateViews(const Konversation::ServerGroupSettings*))); connect(m_viewContainer, TQT_SIGNAL(autoJoinToggled(const Konversation::ServerGroupSettings*)), KonversationApplication::instance(), TQT_SIGNAL(serverGroupsChanged(const Konversation::ServerGroupSettings*))); - connect(m_viewContainer, TQT_SIGNAL(setWindowCaption(const TQString&)), this, TQT_SLOT(setCaption(const TQString&))); + connect(m_viewContainer, TQT_SIGNAL(setWindowCaption(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(setCaption(const TQString&))); connect(KonversationApplication::instance()->getConnectionManager(), TQT_SIGNAL(connectionChangedState(Server*, Konversation::ConnectionState)), m_viewContainer, TQT_SLOT(connectionStateChanged(Server*, Konversation::ConnectionState))); - connect(this, TQT_SIGNAL(triggerRememberLine()), m_viewContainer, TQT_SLOT(insertRememberLine())); - connect(this, TQT_SIGNAL(triggerRememberLines(Server*)), m_viewContainer, TQT_SLOT(insertRememberLines(Server*))); - connect(this, TQT_SIGNAL(cancelRememberLine()), m_viewContainer, TQT_SLOT(cancelRememberLine())); - connect(this, TQT_SIGNAL(insertMarkerLine()), m_viewContainer, TQT_SLOT(insertMarkerLine())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(triggerRememberLine()), m_viewContainer, TQT_SLOT(insertRememberLine())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(triggerRememberLines(Server*)), m_viewContainer, TQT_SLOT(insertRememberLines(Server*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(cancelRememberLine()), m_viewContainer, TQT_SLOT(cancelRememberLine())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(insertMarkerLine()), m_viewContainer, TQT_SLOT(insertMarkerLine())); // Set up status bar m_statusBar = new KonversationStatusBar(this); @@ -115,25 +115,25 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", // Actions - KStdAction::quit(this,TQT_SLOT(quitProgram()),actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this),TQT_SLOT(quitProgram()),actionCollection()); - hideMenuBarAction = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection()); + hideMenuBarAction = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); setStandardToolBarMenuEnabled(true); - KStdAction::configureToolbars(this, TQT_SLOT(configureToolbar()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configureToolbar()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(openKeyBindings()), actionCollection()); - KAction *preferencesAction = KStdAction::preferences(this, TQT_SLOT(openPrefsDialog()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(openKeyBindings()), actionCollection()); + KAction *preferencesAction = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(openPrefsDialog()), actionCollection()); #ifdef USE_KNOTIFY // options_configure_notifications - KAction *configureNotificationsAction = KStdAction::configureNotifications(this,TQT_SLOT(openNotifications()), actionCollection()); + KAction *configureNotificationsAction = KStdAction::configureNotifications(TQT_TQOBJECT(this),TQT_SLOT(openNotifications()), actionCollection()); #endif KAction* action; - (new KAction(i18n("&Server List..."), "server", KShortcut("F2"), this, TQT_SLOT(openServerList()), + (new KAction(i18n("&Server List..."), "server", KShortcut("F2"), TQT_TQOBJECT(this), TQT_SLOT(openServerList()), actionCollection(), "open_server_list"))->setToolTip(i18n("Manage networks and servers")); - (new KAction(i18n("Quick &Connect..."), "connect_creating", KShortcut("F7"), this, TQT_SLOT(openQuickConnectDialog()), + (new KAction(i18n("Quick &Connect..."), "connect_creating", KShortcut("F7"), TQT_TQOBJECT(this), TQT_SLOT(openQuickConnectDialog()), actionCollection(), "quick_connect_dialog"))->setToolTip(i18n("Type in the address of a new IRC server to connect to")); action = new KAction(i18n("&Reconnect"), "connect_creating", 0, m_viewContainer, TQT_SLOT(reconnectFrontServer()), actionCollection(), "reconnect_server"); @@ -144,11 +144,11 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", action->setEnabled(false); action->setToolTip(i18n("Disconnect from the current server.")); - (new KAction(i18n("&Identities..."), "identity", KShortcut("F8"), this, TQT_SLOT(openIdentitiesDialog()), + (new KAction(i18n("&Identities..."), "identity", KShortcut("F8"), TQT_TQOBJECT(this), TQT_SLOT(openIdentitiesDialog()), actionCollection(), "identities_dialog"))->setToolTip(i18n("Manage your nick, away and other identity settings")); new KToggleAction(i18n("&Watched Nicks Online"), "kontact_contacts", KShortcut("F4"), m_viewContainer, TQT_SLOT(openNicksOnlinePanel()), actionCollection(), "open_nicksonline_window"); - new KToggleAction(i18n("&DCC Status"), "2rightarrow", KShortcut("F9"), m_viewContainer, TQT_SLOT(toggleDccPanel()), actionCollection(), "open_dccstatus_window"); + new KToggleAction(i18n("&DCC tqStatus"), "2rightarrow", KShortcut("F9"), m_viewContainer, TQT_SLOT(toggleDccPanel()), actionCollection(), "open_dccstatus_window"); action = new KAction(i18n("&Open Logfile"), "history", KShortcut("Ctrl+O"), m_viewContainer, TQT_SLOT(openLogFile()), actionCollection(), "open_logfile"); action->setEnabled(false); action->setToolTip(i18n("Open the known history for this channel in a new tab")); @@ -189,7 +189,7 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", actionCollection(), "next_active_tab"); action->setEnabled(false); - if (Preferences::tabPlacement()==Preferences::Left) + if (Preferences::tabPlacement()==PreferencesBase::Left) { action = new KAction(i18n("Move Tab Up"), "1uparrow", KShortcut("Alt+Shift+Left"), m_viewContainer, TQT_SLOT(moveViewLeft()), actionCollection(), "move_tab_left"); @@ -241,13 +241,13 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", selectAction->setEnabled(false); connect(selectAction, TQT_SIGNAL(activated(int)), m_viewContainer, TQT_SLOT(changeViewCharset(int))); - TQSignalMapper* tabSelectionMapper = new TQSignalMapper(this); + TQSignalMapper* tabSelectionMapper = new TQSignalMapper(TQT_TQOBJECT(this)); connect(tabSelectionMapper, TQT_SIGNAL(mapped(int)), m_viewContainer, TQT_SLOT(goToView(int))); for (uint i = 1; i <= 10; ++i) { - KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").arg(i), 0, KShortcut(TQString("Alt+%1").arg(i%10)), - tabSelectionMapper, TQT_SLOT(map()), actionCollection(), TQString("go_to_tab_%1").arg(i).local8Bit()); + KAction* tabSelectionAction = new KAction(i18n("Go to Tab %1").tqarg(i), 0, KShortcut(TQString("Alt+%1").tqarg(i%10)), + tabSelectionMapper, TQT_SLOT(map()), actionCollection(), TQString("go_to_tab_%1").tqarg(i).local8Bit()); tabSelectionMapper->setMapping( tabSelectionAction, i-1); } @@ -296,9 +296,9 @@ KonversationMainWindow::KonversationMainWindow() : KMainWindow(0,"main_window", // set up system tray m_trayIcon = new Konversation::TrayIcon(this); - connect(this, TQT_SIGNAL(endNotification()), m_trayIcon, TQT_SLOT(endNotification())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(endNotification()), m_trayIcon, TQT_SLOT(endNotification())); connect(KonversationApplication::instance(), TQT_SIGNAL(iconChanged(int)), m_trayIcon, TQT_SLOT(updateAppearance())); - connect(m_trayIcon, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitProgram())); + connect(m_trayIcon, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(quitProgram())); KPopupMenu *trayMenu = m_trayIcon->contextMenu(); #ifdef USE_KNOTIFY configureNotificationsAction->plug(trayMenu); @@ -487,7 +487,7 @@ void KonversationMainWindow::toggleMenubar(bool dontShowWarning) { TQString accel = hideMenuBarAction->shortcut().toString(); KMessageBox::information(this, - i18n("<qt>This will hide the menu bar completely. You can show it again by typing %1.</qt>").arg(accel), + i18n("<qt>This will hide the menu bar completely. You can show it again by typing %1.</qt>").tqarg(accel), "Hide menu bar","HideMenuBarWarning"); } menuBar()->hide(); @@ -528,7 +528,7 @@ void KonversationMainWindow::openPrefsDialog() m_settingsDialog = new KonviSettingsDialog(this); //User edited the configuration - update your local copies of the //configuration data - connect(m_settingsDialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot())); + connect(m_settingsDialog, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(settingsChangedSlot())); } m_settingsDialog->show(); } @@ -638,7 +638,7 @@ void KonversationMainWindow::notifyAction(const TQString& serverName, const TQSt void KonversationMainWindow::setOnlineList(Server* notifyServer,const TQStringList& /*list*/, bool /*changed*/) { emit nicksNowOnline(notifyServer); - // FIXME if (changed && nicksOnlinePanel) newText(nicksOnlinePanel, TQString::null, true); + // FIXME if (changed && nicksOnlinePanel) newText(nicksOnlinePanel, TQString(), true); } TQString KonversationMainWindow::currentURL(bool passNetwork) diff --git a/konversation/src/konversationmainwindow.h b/konversation/src/konversationmainwindow.h index 82ee0db..4253441 100644 --- a/konversation/src/konversationmainwindow.h +++ b/konversation/src/konversationmainwindow.h @@ -48,6 +48,7 @@ namespace Konversation class KonversationMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: KonversationMainWindow(); @@ -113,7 +114,7 @@ class KonversationMainWindow : public KMainWindow void openQuickConnectDialog(); void openNotify(); - // it seems that moc does not honor #ifs in compile so we create an + // it seems that tqmoc does not honor #ifs in compile so we create an // empty slot in our .cpp file rather than #if this slot out void openNotifications(); void notifyAction(const TQString& serverName,const TQString& nick); diff --git a/konversation/src/konversationsound.cpp b/konversation/src/konversationsound.cpp index 58764c8..a4f678a 100644 --- a/konversation/src/konversationsound.cpp +++ b/konversation/src/konversationsound.cpp @@ -23,8 +23,8 @@ namespace Konversation { - Sound::Sound(TQObject* parent, const char* name) - : TQObject(parent, name) + Sound::Sound(TQObject* tqparent, const char* name) + : TQObject(tqparent, name) {} Sound::~Sound() diff --git a/konversation/src/konversationsound.h b/konversation/src/konversationsound.h index 00d273a..a39fbf1 100644 --- a/konversation/src/konversationsound.h +++ b/konversation/src/konversationsound.h @@ -25,12 +25,13 @@ namespace Konversation /** Class that handles sounds */ - class Sound : public QObject + class Sound : public TQObject { Q_OBJECT + TQ_OBJECT public: - explicit Sound(TQObject *parent = 0, const char *name = 0); + explicit Sound(TQObject *tqparent = 0, const char *name = 0); ~Sound(); public slots: diff --git a/konversation/src/konversationstatusbar.cpp b/konversation/src/konversationstatusbar.cpp index bdfc9ca..86ddb24 100644 --- a/konversation/src/konversationstatusbar.cpp +++ b/konversation/src/konversationstatusbar.cpp @@ -33,7 +33,7 @@ KonversationStatusBar::KonversationStatusBar(KonversationMainWindow* window) m_mainLabel = new KSqueezedTextLabel(m_window->statusBar(),"mainLabel"); setMainLabelText(i18n("Ready.")); - m_mainLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + m_mainLabel->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); m_mainLabel->setMinimumWidth(0); // KSqueezedLabel calculates the wrong height. Popular workaround. @@ -148,9 +148,9 @@ void KonversationStatusBar::updateLagLabel(Server* lagServer, int msec) if (msec == -1) lagString += i18n("Lag: Unknown"); else if (msec < 1000) - lagString += i18n("Lag: %1 ms").arg(msec); + lagString += i18n("Lag: %1 ms").tqarg(msec); else - lagString += i18n("Lag: %1 s").arg(msec / 1000); + lagString += i18n("Lag: %1 s").tqarg(msec / 1000); m_lagLabel->setText(lagString); @@ -179,8 +179,8 @@ void KonversationStatusBar::setTooLongLag(Server* lagServer, int msec) const TQString hoursString = i18n("1 hour", "%n hours", (hours % 24)); const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60)); const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60)); - lagString = i18n("%1 = name of server, %2 = (x days), %3 = (x hours), %4 = (x minutes), %5 = (x seconds)", "No answer from server %1 for more than %2, %3, %4, and %5.").arg(lagServer->getServerName()) - .arg(daysString).arg(hoursString).arg(minutesString).arg(secondsString); + lagString = i18n("%1 = name of server, %2 = (x days), %3 = (x hours), %4 = (x minutes), %5 = (x seconds)", "No answer from server %1 for more than %2, %3, %4, and %5.").tqarg(lagServer->getServerName()) + .tqarg(daysString).tqarg(hoursString).tqarg(minutesString).tqarg(secondsString); // or longer than an hour } else if (hours) @@ -188,21 +188,21 @@ void KonversationStatusBar::setTooLongLag(Server* lagServer, int msec) const TQString hoursString = i18n("1 hour", "%n hours", hours); const TQString minutesString = i18n("1 minute", "%n minutes", (minutes % 60)); const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60)); - lagString = i18n("%1 = name of server, %2 = (x hours), %3 = (x minutes), %4 = (x seconds)", "No answer from server %1 for more than %2, %3, and %4.").arg(lagServer->getServerName()) - .arg(hoursString).arg(minutesString).arg(secondsString); + lagString = i18n("%1 = name of server, %2 = (x hours), %3 = (x minutes), %4 = (x seconds)", "No answer from server %1 for more than %2, %3, and %4.").tqarg(lagServer->getServerName()) + .tqarg(hoursString).tqarg(minutesString).tqarg(secondsString); // or longer than a minute } else if (minutes) { const TQString minutesString = i18n("1 minute", "%n minutes", minutes); const TQString secondsString = i18n("1 second", "%n seconds", (seconds % 60)); - lagString = i18n("%1 = name of server, %2 = (x minutes), %3 = (x seconds)", "No answer from server %1 for more than %2 and %3.").arg(lagServer->getServerName()) - .arg(minutesString).arg(secondsString); + lagString = i18n("%1 = name of server, %2 = (x minutes), %3 = (x seconds)", "No answer from server %1 for more than %2 and %3.").tqarg(lagServer->getServerName()) + .tqarg(minutesString).tqarg(secondsString); // or just some seconds } else { - lagString = i18n("No answer from server %1 for more than 1 second.", "No answer from server %1 for more than %n seconds.", seconds).arg(lagServer->getServerName()); + lagString = i18n("No answer from server %1 for more than 1 second.", "No answer from server %1 for more than %n seconds.", seconds).tqarg(lagServer->getServerName()); } setMainLabelText(lagString); @@ -211,7 +211,7 @@ void KonversationStatusBar::setTooLongLag(Server* lagServer, int msec) if (lagServer==m_window->getViewContainer()->getFrontServer()) { TQString lagString = lagServer->getServerName() + " - "; - lagString.append(i18n("Lag: %1 s").arg(msec/1000)); + lagString.append(i18n("Lag: %1 s").tqarg(msec/1000)); if (m_lagLabel->isHidden()) m_lagLabel->show(); m_lagLabel->setText(lagString); diff --git a/konversation/src/konversationstatusbar.h b/konversation/src/konversationstatusbar.h index fc569a3..91c33dd 100644 --- a/konversation/src/konversationstatusbar.h +++ b/konversation/src/konversationstatusbar.h @@ -22,12 +22,13 @@ class KSqueezedTextLabel; class SSLLabel; class Server; -class KonversationStatusBar : public QObject +class KonversationStatusBar : public TQObject { Q_OBJECT + TQ_OBJECT public: - explicit KonversationStatusBar(KonversationMainWindow* parent); + explicit KonversationStatusBar(KonversationMainWindow* tqparent); ~KonversationStatusBar(); public slots: diff --git a/konversation/src/konvibookmarkhandler.cpp b/konversation/src/konvibookmarkhandler.cpp index 5a76682..79cf12a 100644 --- a/konversation/src/konvibookmarkhandler.cpp +++ b/konversation/src/konvibookmarkhandler.cpp @@ -63,7 +63,7 @@ KonviBookmarkHandler::~KonviBookmarkHandler() void KonviBookmarkHandler::slotEditBookmarks() { KProcess proc; - proc << TQString::fromLatin1("keditbookmarks"); + proc << TQString::tqfromLatin1("keditbookmarks"); proc << "--nobrowser"; proc << "--caption" << i18n("Konversation Bookmarks Editor"); proc << m_file; diff --git a/konversation/src/konvibookmarkhandler.h b/konversation/src/konvibookmarkhandler.h index ae862aa..9220855 100644 --- a/konversation/src/konvibookmarkhandler.h +++ b/konversation/src/konvibookmarkhandler.h @@ -29,6 +29,7 @@ class KonviBookmarkMenu; class KonviBookmarkHandler : public TQObject, public KBookmarkOwner { Q_OBJECT + TQ_OBJECT public: explicit KonviBookmarkHandler(KonversationMainWindow *mainWindow); diff --git a/konversation/src/konvibookmarkmenu.cpp b/konversation/src/konvibookmarkmenu.cpp index f16ee21..a421b96 100644 --- a/konversation/src/konvibookmarkmenu.cpp +++ b/konversation/src/konvibookmarkmenu.cpp @@ -27,8 +27,8 @@ Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org> KonviBookmarkMenu::KonviBookmarkMenu( KBookmarkManager* mgr, KonviBookmarkHandler * _owner, KPopupMenu * _parentMenu, KActionCollection *collec, bool _isRoot, bool _add, -const TQString & parentAddress ) -: KBookmarkMenu( mgr, _owner, _parentMenu, collec, _isRoot, _add, parentAddress), +const TQString & tqparentAddress ) +: KBookmarkMenu( mgr, _owner, _parentMenu, collec, _isRoot, _add, tqparentAddress), m_kOwner(_owner) { /* @@ -86,14 +86,14 @@ void KonviBookmarkMenu::fillBookmarkMenu() addNewFolder(); } - KBookmarkGroup parentBookmark = m_pManager->findByAddress( m_parentAddress ).toGroup(); - Q_ASSERT(!parentBookmark.isNull()); + KBookmarkGroup tqparentBookmark = m_pManager->findByAddress( m_parentAddress ).toGroup(); + Q_ASSERT(!tqparentBookmark.isNull()); bool separatorInserted = false; - for ( KBookmark bm = parentBookmark.first(); !bm.isNull(); - bm = parentBookmark.next(bm) ) + for ( KBookmark bm = tqparentBookmark.first(); !bm.isNull(); + bm = tqparentBookmark.next(bm) ) { TQString text = bm.text(); - text.replace( '&', "&&" ); + text.tqreplace( '&', "&&" ); if ( !separatorInserted && m_bIsRoot) // inserted before the first konq bookmark, to avoid the separator if no konq bookmark { m_parentMenu->insertSeparator(); @@ -147,7 +147,7 @@ void KonviBookmarkMenu::slotBookmarkSelected() { if ( !m_pOwner ) return; // this view doesn't handle bookmarks... /* URL */ - m_kOwner->openBookmarkURL( TQString::fromUtf8(sender()->name()), + m_kOwner->openBookmarkURL( TQString::fromUtf8(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name()), ( (KAction *)sender() )->text() /* Title */ ); } diff --git a/konversation/src/konvibookmarkmenu.h b/konversation/src/konvibookmarkmenu.h index d3ccdfe..1dfcc7c 100644 --- a/konversation/src/konvibookmarkmenu.h +++ b/konversation/src/konvibookmarkmenu.h @@ -38,12 +38,13 @@ class KonviBookmarkMenuPrivate; class KonviBookmarkMenu : public KBookmarkMenu { Q_OBJECT + TQ_OBJECT public: KonviBookmarkMenu( KBookmarkManager* mgr, KonviBookmarkHandler * _owner, KPopupMenu * _parentMenu, KActionCollection *collec, bool _isRoot, - bool _add = true, const TQString & parentAddress = ""); + bool _add = true, const TQString & tqparentAddress = ""); void fillBookmarkMenu(); diff --git a/konversation/src/konviconfigdialog.cpp b/konversation/src/konviconfigdialog.cpp index f3beef5..01b463c 100644 --- a/konversation/src/konviconfigdialog.cpp +++ b/konversation/src/konviconfigdialog.cpp @@ -63,14 +63,14 @@ class KonviConfigDialog::KConfigDialogPrivate TQMap<TQWidget *, KConfigDialogManager *> managerForPage; }; -KonviConfigDialog::KonviConfigDialog( TQWidget *parent, const char *name, +KonviConfigDialog::KonviConfigDialog( TQWidget *tqparent, const char *name, KConfigSkeleton *config, DialogType dialogType, int dialogButtons, ButtonCode defaultButton, bool modal ) : - KDialogBase( dialogType, Qt::WStyle_DialogBorder, - parent, name, modal, i18n("Configure"), dialogButtons, defaultButton ), + KDialogBase( dialogType, TQt::WStyle_DialogBorder, + tqparent, name, modal, i18n("Configure"), dialogButtons, defaultButton ), d(new KConfigDialogPrivate(dialogType)) { if ( name ) @@ -182,7 +182,7 @@ void KonviConfigDialog::setupManagerConnections(KConfigDialogManager *manager) KonviConfigDialog* KonviConfigDialog::exists(const char* name) { - return openDialogs.find(name); + return openDialogs.tqfind(name); } bool KonviConfigDialog::showDialog(const char* name) diff --git a/konversation/src/konviconfigdialog.h b/konversation/src/konviconfigdialog.h index 75f1d1b..663f13a 100644 --- a/konversation/src/konviconfigdialog.h +++ b/konversation/src/konviconfigdialog.h @@ -51,6 +51,7 @@ class KConfigDialogManager; class KonviConfigDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT signals: void widgetModified(); @@ -62,7 +63,7 @@ class KonviConfigDialog : public KDialogBase void sigUpdateWidgets(); public: - KonviConfigDialog( TQWidget *parent, const char *name, + KonviConfigDialog( TQWidget *tqparent, const char *name, KConfigSkeleton *config, DialogType dialogType = IconList, int dialogButtons = Default|Ok|Apply|Cancel|Help, diff --git a/konversation/src/konvisettingsdialog.cpp b/konversation/src/konvisettingsdialog.cpp index a5e01f3..5580e96 100644 --- a/konversation/src/konvisettingsdialog.cpp +++ b/konversation/src/konvisettingsdialog.cpp @@ -43,8 +43,8 @@ #include <klistview.h> -KonviSettingsDialog::KonviSettingsDialog( TQWidget *parent) : - KonviConfigDialog( parent, "settings", Preferences::self(), KDialogBase::TreeList) +KonviSettingsDialog::KonviSettingsDialog( TQWidget *tqparent) : + KonviConfigDialog( tqparent, "settings", Preferences::self(), KDialogBase::TreeList) { m_modified = false; setShowIconsInTreeList(true); @@ -146,7 +146,7 @@ KonviSettingsDialog::KonviSettingsDialog( TQWidget *parent) : connect(m_confAliasWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot())); //Behaviour/Auto Replace - m_confAutoreplaceWdg = new Autoreplace_Config( this, "Autoreplace" ); + m_confAutoreplaceWdg = new Autoreplace_Config( this, "Autotqreplace" ); pagePath.clear(); pagePath << i18n("Behavior") << i18n("Auto Replace"); addPage ( m_confAutoreplaceWdg, pagePath, "kview", i18n("Auto Replace") ); @@ -190,7 +190,7 @@ KonviSettingsDialog::KonviSettingsDialog( TQWidget *parent) : m_confWatchedNicknamesWdg = new WatchedNicknames_Config( this, "WatchedNicknames" ); pagePath.clear(); pagePath << i18n("Notifications") << i18n("Watched Nicknames"); - addPage ( m_confWatchedNicknamesWdg, pagePath, "kfind", i18n("Watched Nicknames") ); + addPage ( m_confWatchedNicknamesWdg, pagePath, "ktqfind", i18n("Watched Nicknames") ); // remember index so we can open this page later from outside m_watchedNicknamesIndex=lastAddedIndex(); connect(m_confWatchedNicknamesWdg, TQT_SIGNAL(modified()), this, TQT_SLOT(modifiedSlot())); diff --git a/konversation/src/konvisettingsdialog.h b/konversation/src/konvisettingsdialog.h index 2e9089a..e44becc 100644 --- a/konversation/src/konvisettingsdialog.h +++ b/konversation/src/konvisettingsdialog.h @@ -45,6 +45,7 @@ class TabNotifications_Config; class KDEUI_EXPORT KonviSettingsDialog : public KonviConfigDialog { Q_OBJECT + TQ_OBJECT protected: Warnings_Config* m_confWarningsWdg; @@ -71,7 +72,7 @@ class KDEUI_EXPORT KonviSettingsDialog : public KonviConfigDialog bool m_modified; public: - explicit KonviSettingsDialog(TQWidget *parent); + explicit KonviSettingsDialog(TQWidget *tqparent); ~KonviSettingsDialog(); void openWatchedNicknamesPage(); diff --git a/konversation/src/linkaddressbook/addressbook.cpp b/konversation/src/linkaddressbook/addressbook.cpp index 85670dd..17e9211 100644 --- a/konversation/src/linkaddressbook/addressbook.cpp +++ b/konversation/src/linkaddressbook/addressbook.cpp @@ -98,7 +98,7 @@ namespace Konversation kdDebug() << "Addressbook::presenceString() called with an empty uid" << endl; return TQString("Error"); } - switch( presenceStatus(uid)) + switch( presencetqStatus(uid)) { case 0: return ""; @@ -113,7 +113,7 @@ namespace Konversation } return TQString("Error"); } - int Addressbook::presenceStatus(const TQString &uid) + int Addressbook::presencetqStatus(const TQString &uid) { return presenceStatusByAddressee(addressBook->findByUid(uid)); } @@ -125,7 +125,7 @@ namespace Konversation kdDebug() << "Addressbook::canReceiveFiles() called with empty uid" << endl; return false; } - int presence = presenceStatus(uid); + int presence = presencetqStatus(uid); return (presence == 4) || (presence == 3); } @@ -137,7 +137,7 @@ namespace Konversation return false; } //this should return false if they are offline. - int result = presenceStatus(uid); + int result = presencetqStatus(uid); if(result == 3 || result == 4) return true; return false; } @@ -161,7 +161,7 @@ namespace Konversation if(!isPresent(uid)) return TQPixmap(); - switch(presenceStatus(uid)) + switch(presencetqStatus(uid)) { case 0: //Unknown case 1: //Offline @@ -226,7 +226,7 @@ namespace Konversation { TQString user = addressee.fullEmail(); if(!user.isEmpty()) user = " (" + user + ')'; - focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation for instant messaging, but the requested user%1 is not online.").arg(user)); + focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation for instant messaging, but the requested user%1 is not online.").tqarg(user)); return; } @@ -286,7 +286,7 @@ void Addressbook::sendFile(const TQString &uid, const KURL &sourceURL, const TQS { TQString user = addressee.fullEmail(); if(!user.isEmpty()) user = " (" + user + ')'; - focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation to send a file to a contact, but the requested user%1 is not currently online.").arg(user)); + focusAndShowErrorMessage(i18n("Another KDE application tried to use Konversation to send a file to a contact, but the requested user%1 is not currently online.").tqarg(user)); return; } nickInfo->getServer()->addDccSend(nickInfo->getNickname(), sourceURL, altFileName, fileSize); @@ -301,7 +301,7 @@ void Addressbook::sendFile(const TQString &uid, const KURL &sourceURL, const TQS /** * Add a contact to the contact list * @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC. - * @param protocolId the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ... + * @param protocolId the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICTQProtocol", ... * @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported. */ bool Addressbook::addContact( const TQString &/*contactId*/, const TQString &/*protocolId*/ ) { @@ -331,7 +331,7 @@ void Addressbook::emitContactPresenceChanged(const TQString &uid) return; }; - emitContactPresenceChanged(uid, presenceStatus(uid)); + emitContactPresenceChanged(uid, presencetqStatus(uid)); } } //NAMESPACE diff --git a/konversation/src/linkaddressbook/addressbook.h b/konversation/src/linkaddressbook/addressbook.h index 5cc6b42..222a05f 100644 --- a/konversation/src/linkaddressbook/addressbook.h +++ b/konversation/src/linkaddressbook/addressbook.h @@ -33,6 +33,7 @@ namespace Konversation class Addressbook : public AddressbookBase { Q_OBJECT + TQ_OBJECT public: virtual ~Addressbook(); // This needs to be public so it can be deleted by our static pointer @@ -51,7 +52,7 @@ namespace Konversation // metadata TQPixmap icon( const TQString &uid ); TQString context( const TQString &uid ); - virtual int presenceStatus(const TQString &uid); + virtual int presencetqStatus(const TQString &uid); // App capabilities TQStringList protocols(); diff --git a/konversation/src/linkaddressbook/addressbook_base.cpp b/konversation/src/linkaddressbook/addressbook_base.cpp index 2740e12..313a4bf 100644 --- a/konversation/src/linkaddressbook/addressbook_base.cpp +++ b/konversation/src/linkaddressbook/addressbook_base.cpp @@ -109,7 +109,7 @@ namespace Konversation TQStringList::iterator end = addresses.end(); for ( TQStringList::iterator it = addresses.begin(); it != end; ++it ) { - if(!(*it).contains(TQChar( 0xE120))) + if(!(*it).tqcontains(TQChar( 0xE120))) nicks.append(*it); else { @@ -194,7 +194,7 @@ namespace Konversation lnick_servergroup = lnick + TQChar(0xE120) + servergroup.lower(); //We should now have lnick = ircnick, and versions with servername and servergroup - - // like johnflux, johnflux@freenode, or johnflux@irc.kde.org except with the unicode + // like johnflux, johnflux@freenode, or johnflux@irc.kde.org except with the tqunicode // separator char 0xe120 instead of the @ kdDebug() << "nick" << ircnick<< endl; @@ -463,9 +463,9 @@ namespace Konversation else { if(nicksWithoutAddressee.count() > 1) - message = i18n("Some of the contacts (%1) that you have selected are not associated with addressbook contacts. ").arg(nicksWithoutAddressee.join(", ")); + message = i18n("Some of the contacts (%1) that you have selected are not associated with addressbook contacts. ").tqarg(nicksWithoutAddressee.join(", ")); else - message = i18n("One of the contacts (%1) that you have selected is not associated with an addressbook contact. ").arg(nicksWithoutAddressee.join(", ")); + message = i18n("One of the contacts (%1) that you have selected is not associated with an addressbook contact. ").tqarg(nicksWithoutAddressee.join(", ")); } message += i18n("You can right click on a contact, and choose to edit the Addressbook Associations to link them to a contact in your addressbook."); } @@ -481,15 +481,15 @@ namespace Konversation else { if(nicksWithoutEmails.count() > 1) - message = i18n("Some of the contacts (%1) that you have selected do not have an email address associated with them. ").arg(nicksWithoutEmails.join(", ")); + message = i18n("Some of the contacts (%1) that you have selected do not have an email address associated with them. ").tqarg(nicksWithoutEmails.join(", ")); else - message = i18n("One of the contacts (%1) that you have selected does not have an email address associated with them. ").arg(nicksWithoutEmails.join(", ")); + message = i18n("One of the contacts (%1) that you have selected does not have an email address associated with them. ").tqarg(nicksWithoutEmails.join(", ")); } message += i18n("You can right click on a contact, and choose to edit the addressbook contact, adding an email for them."); } else { - message = i18n("Some of the contacts (%1) that you have selected are not associated with addressbook contacts, and some of the contacts (%2) do not have an email address associated with them. ").arg(nicksWithoutAddressee.join(", ").arg(nicksWithoutEmails.join(", "))); + message = i18n("Some of the contacts (%1) that you have selected are not associated with addressbook contacts, and some of the contacts (%2) do not have an email address associated with them. ").tqarg(nicksWithoutAddressee.join(", ").tqarg(nicksWithoutEmails.join(", "))); message += i18n("You can right click on a contact, and choose to edit the Addressbook Associations to link them to a contact in your addressbook, and choose to edit the addressbook contact, adding an email for them."); } if(nicksWithEmails.isEmpty()) diff --git a/konversation/src/linkaddressbook/addressbook_base.h b/konversation/src/linkaddressbook/addressbook_base.h index 2fe1d25..cbd7d48 100644 --- a/konversation/src/linkaddressbook/addressbook_base.h +++ b/konversation/src/linkaddressbook/addressbook_base.h @@ -34,6 +34,7 @@ namespace Konversation class AddressbookBase : public TQObject, public KIMIface { Q_OBJECT + TQ_OBJECT public: virtual ~AddressbookBase(); // This needs to be public so it can be deleted by our static pointer KABC::Addressee getKABCAddresseeFromNick(const TQString &ircnick, const TQString &servername, const TQString &servergroup); @@ -50,7 +51,7 @@ namespace Konversation /** If this user is online, return one of the nicks that they are * using. Otherwise return the first nick listed. * If there are multiple matches, it will prefer ones that are not set to away. - * @return online nick, first nick, or TQString::null if they aren't known at all. + * @return online nick, first nick, or TQString() if they aren't known at all. */ TQString getBestNick(const KABC::Addressee &addressee); bool hasAnyNicks(const KABC::Addressee &addresse); diff --git a/konversation/src/linkaddressbook/addresseeitem.cpp b/konversation/src/linkaddressbook/addresseeitem.cpp index 46c3f62..b91a161 100644 --- a/konversation/src/linkaddressbook/addresseeitem.cpp +++ b/konversation/src/linkaddressbook/addresseeitem.cpp @@ -27,8 +27,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include <kdebug.h> -AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) : -KListViewItem( parent ), +AddresseeItem::AddresseeItem( TQListView *tqparent, const KABC::Addressee &addressee) : +KListViewItem( tqparent ), mAddressee( addressee ) { //We can't save showphoto because we don't have a d pointer diff --git a/konversation/src/linkaddressbook/addresseeitem.h b/konversation/src/linkaddressbook/addresseeitem.h index fd5943b..eeefb58 100644 --- a/konversation/src/linkaddressbook/addresseeitem.h +++ b/konversation/src/linkaddressbook/addresseeitem.h @@ -45,10 +45,10 @@ class AddresseeItem : public KListViewItem /** Constructor. - @param parent The parent listview. + @param tqparent The tqparent listview. @param addressee The associated addressee. */ - AddresseeItem( TQListView *parent, const KABC::Addressee &addressee ); + AddresseeItem( TQListView *tqparent, const KABC::Addressee &addressee ); /** Returns the addressee. diff --git a/konversation/src/linkaddressbook/kimiface.h b/konversation/src/linkaddressbook/kimiface.h index 99daf2c..bd6ab85 100644 --- a/konversation/src/linkaddressbook/kimiface.h +++ b/konversation/src/linkaddressbook/kimiface.h @@ -88,7 +88,7 @@ class KIMIface : virtual public DCOPObject * @param uid the KABC uid you want the presence for. * @return a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online) */ - virtual int presenceStatus( const TQString & uid ) = 0; + virtual int presencetqStatus( const TQString & uid ) = 0; /** * Indicate if a given uid can receive files * @param uid the KABC uid you are interested in. @@ -105,7 +105,7 @@ class KIMIface : virtual public DCOPObject * Get the KABC uid corresponding to the supplied IM address * Protocols should be * @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC. - * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", + * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICTQProtocol", * @return a KABC uid or null if none found/ */ virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0; @@ -165,7 +165,7 @@ class KIMIface : virtual public DCOPObject /** * Add a contact to the contact list * @param contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC. - * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ... + * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICTQProtocol", ... * @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported. */ virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0; @@ -175,7 +175,7 @@ class KIMIface : virtual public DCOPObject * Indicates that a contact's presence has changed * @param uid the contact whose presence changed. * @param appId the dcop application id of the program the signal originates from. - * @param presence the new numeric presence @ref presenceStatus + * @param presence the new numeric presence @ref presencetqStatus */ void contactPresenceChanged( TQString uid, TQCString appId, int presence ); }; diff --git a/konversation/src/linkaddressbook/linkaddressbookui.cpp b/konversation/src/linkaddressbook/linkaddressbookui.cpp index f766e8b..96152f3 100644 --- a/konversation/src/linkaddressbook/linkaddressbookui.cpp +++ b/konversation/src/linkaddressbook/linkaddressbookui.cpp @@ -47,8 +47,8 @@ Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org> #include <kabc/stdaddressbook.h> -LinkAddressbookUI::LinkAddressbookUI( TQWidget *parent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname ) -: KDialogBase(Plain, i18n("Link IRC Nick to Addressbook Contact"), Ok|Cancel|Help, Ok, parent, name) +LinkAddressbookUI::LinkAddressbookUI( TQWidget *tqparent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname ) +: KDialogBase(Plain, i18n("Link IRC Nick to Addressbook Contact"), Ok|Cancel|Help, Ok, tqparent, name) { TQFrame* page = plainPage(); TQGridLayout* pageLayout = new TQGridLayout(page, 1, 1, 0, 0); @@ -115,13 +115,13 @@ void LinkAddressbookUI::slotLoadAddressees() /*AddresseeItem *item =*/ new AddresseeItem( m_mainWidget->addresseeListView, (*it)); if(num_contacts_with_nick == 0) - m_mainWidget->lblHeader->setText(i18n("Choose the person who '%1' is.").arg(m_ircnick)); + m_mainWidget->lblHeader->setText(i18n("Choose the person who '%1' is.").tqarg(m_ircnick)); else if(num_contacts_with_nick == 1 && realname.isEmpty()) - m_mainWidget->lblHeader->setText(i18n("Currently '%1' is associated with a contact.").arg(m_ircnick)); + m_mainWidget->lblHeader->setText(i18n("Currently '%1' is associated with a contact.").tqarg(m_ircnick)); else if(num_contacts_with_nick == 1 && !realname.isEmpty()) - m_mainWidget->lblHeader->setText(i18n("Currently '%1' is associated with contact '%2'.").arg(m_ircnick).arg(realname)); + m_mainWidget->lblHeader->setText(i18n("Currently '%1' is associated with contact '%2'.").tqarg(m_ircnick).tqarg(realname)); else - m_mainWidget->lblHeader->setText(i18n("<qt><b>Warning:</b> '%1' is currently being listed as belonging to multiple contacts. Please select the correct contact.</qt>").arg(m_ircnick)); + m_mainWidget->lblHeader->setText(i18n("<qt><b>Warning:</b> '%1' is currently being listed as belonging to multiple contacts. Please select the correct contact.</qt>").tqarg(m_ircnick)); } diff --git a/konversation/src/linkaddressbook/linkaddressbookui.h b/konversation/src/linkaddressbook/linkaddressbookui.h index d1904e6..64a1e65 100644 --- a/konversation/src/linkaddressbook/linkaddressbookui.h +++ b/konversation/src/linkaddressbook/linkaddressbookui.h @@ -38,9 +38,10 @@ class LinkAddressbookUI_Base; class LinkAddressbookUI : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LinkAddressbookUI( TQWidget *parent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname); + LinkAddressbookUI( TQWidget *tqparent, const char *name, const TQString &ircnick, const TQString &servername, const TQString &servergroup, const TQString &suggested_realname); ~LinkAddressbookUI(); private: diff --git a/konversation/src/linkaddressbook/linkaddressbookui_base.ui b/konversation/src/linkaddressbook/linkaddressbookui_base.ui index 6e82416..1847c76 100644 --- a/konversation/src/linkaddressbook/linkaddressbookui_base.ui +++ b/konversation/src/linkaddressbook/linkaddressbookui_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>LinkAddressbookUI_Base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>LinkAddressbookUI_Base</cstring> </property> @@ -37,14 +37,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>405</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="3" column="0"> + <widget class="TQPushButton" row="3" column="0"> <property name="name"> <cstring>addAddresseeButton</cstring> </property> @@ -123,15 +123,15 @@ <string>Select the contact you want to communicate with via Instant Messaging</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblSearch</cstring> </property> @@ -161,8 +161,8 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kactivelabel.h</includehint> <includehint>klistview.h</includehint> diff --git a/konversation/src/linkaddressbook/nicklisttooltip.cpp b/konversation/src/linkaddressbook/nicklisttooltip.cpp index 732b32e..502198d 100644 --- a/konversation/src/linkaddressbook/nicklisttooltip.cpp +++ b/konversation/src/linkaddressbook/nicklisttooltip.cpp @@ -27,7 +27,7 @@ class NickListView; namespace Konversation { - KonversationNickListViewToolTip::KonversationNickListViewToolTip(TQWidget *parent, NickListView *lv) : TQToolTip(parent) + KonversationNickListViewToolTip::KonversationNickListViewToolTip(TQWidget *tqparent, NickListView *lv) : TQToolTip(tqparent) { m_listView = lv; } @@ -38,7 +38,7 @@ namespace Konversation void KonversationNickListViewToolTip::maybeTip( const TQPoint &pos ) { - if( !parentWidget() || !m_listView ) + if( !tqparentWidget() || !m_listView ) return; TQListViewItem *item = m_listView->itemAt( pos ); @@ -52,17 +52,17 @@ namespace Konversation return; TQString toolTip; - TQRect itemRect = m_listView->itemRect( item ); + TQRect tqitemRect = m_listView->tqitemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + m_listView->itemMargin(); - uint xAdjust = itemRect.left() + leftMargin; - uint yAdjust = itemRect.top(); + uint xAdjust = tqitemRect.left() + leftMargin; + uint yAdjust = tqitemRect.top(); TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); toolTip = Konversation::removeIrcMarkup(nick->getChannelNick()->tooltip()); if(!toolTip.isEmpty()) - tip(itemRect, toolTip); + tip(tqitemRect, toolTip); } } // namespace Konversation diff --git a/konversation/src/linkaddressbook/nicklisttooltip.h b/konversation/src/linkaddressbook/nicklisttooltip.h index f03419d..9a871f5 100644 --- a/konversation/src/linkaddressbook/nicklisttooltip.h +++ b/konversation/src/linkaddressbook/nicklisttooltip.h @@ -30,10 +30,10 @@ class NickListView; namespace Konversation { - class KonversationNickListViewToolTip : public QToolTip + class KonversationNickListViewToolTip : public TQToolTip { public: - KonversationNickListViewToolTip(TQWidget *parent, NickListView *lv); + KonversationNickListViewToolTip(TQWidget *tqparent, NickListView *lv); virtual ~KonversationNickListViewToolTip(); void maybeTip( const TQPoint &pos ); diff --git a/konversation/src/linkaddressbook/nicksonlinetooltip.cpp b/konversation/src/linkaddressbook/nicksonlinetooltip.cpp index 9c4df71..76b8eb9 100644 --- a/konversation/src/linkaddressbook/nicksonlinetooltip.cpp +++ b/konversation/src/linkaddressbook/nicksonlinetooltip.cpp @@ -29,7 +29,7 @@ class NickListView; namespace Konversation { - KonversationNicksOnlineToolTip::KonversationNicksOnlineToolTip(TQWidget *parent, NicksOnline *nicksOnline) : TQToolTip(parent) + KonversationNicksOnlineToolTip::KonversationNicksOnlineToolTip(TQWidget *tqparent, NicksOnline *nicksOnline) : TQToolTip(tqparent) { m_nicksOnline = nicksOnline; } @@ -40,7 +40,7 @@ namespace Konversation void KonversationNicksOnlineToolTip::maybeTip( const TQPoint &pos ) { - if( !parentWidget() || !m_nicksOnline || !m_nicksOnline->getNickListView() ) + if( !tqparentWidget() || !m_nicksOnline || !m_nicksOnline->getNickListView() ) return; KListView *m_listView = m_nicksOnline->getNickListView(); TQListViewItem *item = m_listView->itemAt( pos ); @@ -51,17 +51,17 @@ namespace Konversation if(!nickInfo ) return; TQString toolTip; - TQRect itemRect = m_listView->itemRect( item ); + TQRect tqitemRect = m_listView->tqitemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + m_listView->itemMargin(); - uint xAdjust = itemRect.left() + leftMargin; - uint yAdjust = itemRect.top(); + uint xAdjust = tqitemRect.left() + leftMargin; + uint yAdjust = tqitemRect.top(); TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); toolTip = nickInfo->tooltip(); if(!toolTip.isEmpty()) - tip(itemRect, toolTip); + tip(tqitemRect, toolTip); } } // namespace Konversation diff --git a/konversation/src/linkaddressbook/nicksonlinetooltip.h b/konversation/src/linkaddressbook/nicksonlinetooltip.h index a94baa5..5a89d0c 100644 --- a/konversation/src/linkaddressbook/nicksonlinetooltip.h +++ b/konversation/src/linkaddressbook/nicksonlinetooltip.h @@ -30,10 +30,10 @@ class NicksOnline; namespace Konversation { - class KonversationNicksOnlineToolTip : public QToolTip + class KonversationNicksOnlineToolTip : public TQToolTip { public: - KonversationNicksOnlineToolTip(TQWidget *parent, NicksOnline *nicksOnline); + KonversationNicksOnlineToolTip(TQWidget *tqparent, NicksOnline *nicksOnline); virtual ~KonversationNicksOnlineToolTip(); void maybeTip( const TQPoint &pos ); diff --git a/konversation/src/log_preferences.ui b/konversation/src/log_preferences.ui index 3af0047..c7fa8cc 100644 --- a/konversation/src/log_preferences.ui +++ b/konversation/src/log_preferences.ui @@ -4,7 +4,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</comment> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Log_Config</cstring> </property> @@ -23,7 +23,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>kcfg_Log</cstring> </property> @@ -37,7 +37,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_LowerLog</cstring> </property> @@ -45,7 +45,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Enable &lower case logfile names</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_AddHostnameToLog</cstring> </property> @@ -53,7 +53,7 @@ the Free Software Foundation; either version 2 of the License, or <string>&Append hostname to logfile names</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -92,7 +92,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> @@ -106,8 +106,8 @@ the Free Software Foundation; either version 2 of the License, or <tabstop>kcfg_AddHostnameToLog</tabstop> <tabstop>kcfg_LogfilePath</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/logfilereader.cpp b/konversation/src/logfilereader.cpp index e62c43a..4a78b83 100644 --- a/konversation/src/logfilereader.cpp +++ b/konversation/src/logfilereader.cpp @@ -37,7 +37,7 @@ #include <kio/jobclasses.h> -LogfileReader::LogfileReader(TQWidget* parent, const TQString& log) : ChatWindow(parent) +LogfileReader::LogfileReader(TQWidget* tqparent, const TQString& log) : ChatWindow(tqparent) { setType(ChatWindow::LogFileReader); @@ -45,7 +45,7 @@ LogfileReader::LogfileReader(TQWidget* parent, const TQString& log) : ChatWindow TQDockArea* toolBarDock = new TQDockArea(Qt::Horizontal,TQDockArea::Normal,this,"logfile_toolbar_dock"); toolBar = new KToolBar(toolBarDock,"logfile_toolbar",true,true); - toolBar->insertButton("filesaveas",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(saveLog()),true,i18n("Save As...")); + toolBar->insertButton("filesaveas",0,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(saveLog()),true,i18n("Save As...")); new TQLabel(i18n("Show last:"),toolBar,"logfile_size_label"); sizeSpin = new TQSpinBox(10,1000,10,toolBar,"logfile_size_spinbox"); @@ -54,8 +54,8 @@ LogfileReader::LogfileReader(TQWidget* parent, const TQString& log) : ChatWindow sizeSpin->setSuffix(i18n(" KB")); sizeSpin->installEventFilter(this); - toolBar->insertButton("reload",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(updateView()),true,i18n("Reload")); - toolBar->insertButton("editdelete",0,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearLog()),true,i18n("Clear Logfile")); + toolBar->insertButton("reload",0,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(updateView()),true,i18n("Reload")); + toolBar->insertButton("editdelete",0,TQT_SIGNAL(clicked()),TQT_TQOBJECT(this),TQT_SLOT(clearLog()),true,i18n("Clear Logfile")); IRCViewBox* ircBox = new IRCViewBox(this, 0); setTextView(ircBox->ircView()); @@ -63,8 +63,8 @@ LogfileReader::LogfileReader(TQWidget* parent, const TQString& log) : ChatWindow updateView(); resize(Preferences::logfileReaderSize()); - ircBox->ircView()->setFocusPolicy(TQWidget::StrongFocus); - setFocusPolicy(TQWidget::StrongFocus); + ircBox->ircView()->setFocusPolicy(TQ_StrongFocus); + setFocusPolicy(TQ_StrongFocus); setFocusProxy(ircBox->ircView()); connect(getTextView(), TQT_SIGNAL(gotFocus()), getTextView(), TQT_SLOT(setFocus())); @@ -82,9 +82,9 @@ bool LogfileReader::eventFilter(TQObject* /* watched */, TQEvent* e) { if (e->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); + TQKeyEvent* ke = TQT_TQKEYEVENT(e); - if (ke->key() == Qt::Key_Return || ke->key() == Qt::Key_Enter) + if (ke->key() == TQt::Key_Return || ke->key() == TQt::Key_Enter) { updateView(); @@ -111,8 +111,8 @@ void LogfileReader::updateView() stream.setEncoding(TQTextStream::UnicodeUTF8); // Set file pointer to <pos> bytes from the end - if(stream.device()->size()>pos) - stream.device()->at(stream.device()->size()-pos); + if(stream.tqdevice()->size()>pos) + stream.tqdevice()->at(stream.tqdevice()->size()-pos); // Skip first line, since it may be incomplete stream.readLine(); TQString str; @@ -154,8 +154,8 @@ void LogfileReader::saveLog() i18n("Choose Destination Folder")); if(!destination.isEmpty()) { - // replace # with %25 to make it URL conforming - KIO::Job* job=KIO::copy(KURL(fileName.replace("#","%23")), + // tqreplace # with %25 to make it URL conforming + KIO::Job* job=KIO::copy(KURL(fileName.tqreplace("#","%23")), KURL(destination), true); diff --git a/konversation/src/logfilereader.h b/konversation/src/logfilereader.h index 6f91e73..2f66f5a 100644 --- a/konversation/src/logfilereader.h +++ b/konversation/src/logfilereader.h @@ -26,9 +26,10 @@ class TQSpinBox; class LogfileReader : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - LogfileReader(TQWidget* parent, const TQString& log); + LogfileReader(TQWidget* tqparent, const TQString& log); ~LogfileReader(); virtual bool closeYourself() { closeLog(); return true; } diff --git a/konversation/src/modebutton.cpp b/konversation/src/modebutton.cpp index b01661b..9e9d9c1 100644 --- a/konversation/src/modebutton.cpp +++ b/konversation/src/modebutton.cpp @@ -14,8 +14,8 @@ #include "modebutton.h" -ModeButton::ModeButton(const TQString& label,TQWidget* parent,int newId) : -TQPushButton::TQPushButton(label,parent) +ModeButton::ModeButton(const TQString& label,TQWidget* tqparent,int newId) : +TQPushButton::TQPushButton(label,tqparent) { id=newId; on=false; diff --git a/konversation/src/modebutton.h b/konversation/src/modebutton.h index d3ae6ed..df45448 100644 --- a/konversation/src/modebutton.h +++ b/konversation/src/modebutton.h @@ -17,12 +17,13 @@ #include <tqpushbutton.h> -class ModeButton : public QPushButton +class ModeButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - ModeButton(const TQString& label,TQWidget* parent,int id); + ModeButton(const TQString& label,TQWidget* tqparent,int id); ~ModeButton(); void setOn(bool state); diff --git a/konversation/src/multilineedit.cpp b/konversation/src/multilineedit.cpp index b4af548..319c768 100644 --- a/konversation/src/multilineedit.cpp +++ b/konversation/src/multilineedit.cpp @@ -20,15 +20,15 @@ TQString MultilineEdit::returnText; // static -MultilineEdit::MultilineEdit(TQWidget* parent, const TQString& text) : -KDialogBase(parent,"multiline_edit_dialog",true,i18n("Edit Multiline Paste"), +MultilineEdit::MultilineEdit(TQWidget* tqparent, const TQString& text) : +KDialogBase(tqparent,"multiline_edit_dialog",true,i18n("Edit Multiline Paste"), KDialogBase::User1 | KDialogBase::Ok | KDialogBase::Cancel,KDialogBase::Ok,true, KGuiItem(i18n("Add &Quotation Indicators"))) { // Create the top level widget TQWidget* page=new TQWidget(this); setMainWidget(page); - // Add the layout to the widget + // Add the tqlayout to the widget TQVBoxLayout* dialogLayout=new TQVBoxLayout(page); dialogLayout->setSpacing(spacingHint()); // add the text editor @@ -68,9 +68,9 @@ void MultilineEdit::slotUser1() textEditor->setText(lines.join("\n")); } -TQString MultilineEdit::edit(TQWidget* parent, const TQString& text) +TQString MultilineEdit::edit(TQWidget* tqparent, const TQString& text) { - MultilineEdit dlg(parent,text); + MultilineEdit dlg(tqparent,text); dlg.exec(); return returnText; diff --git a/konversation/src/multilineedit.h b/konversation/src/multilineedit.h index 40b28fd..90f3632 100644 --- a/konversation/src/multilineedit.h +++ b/konversation/src/multilineedit.h @@ -21,12 +21,13 @@ class MultilineTextEdit; class MultilineEdit : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MultilineEdit(TQWidget* parent, const TQString& text); + MultilineEdit(TQWidget* tqparent, const TQString& text); ~MultilineEdit(); - static TQString edit(TQWidget* parent, const TQString& text); + static TQString edit(TQWidget* tqparent, const TQString& text); protected slots: void slotOk(); diff --git a/konversation/src/multilinetextedit.cpp b/konversation/src/multilinetextedit.cpp index be42a1f..4d20761 100644 --- a/konversation/src/multilinetextedit.cpp +++ b/konversation/src/multilinetextedit.cpp @@ -17,7 +17,7 @@ #include <kdebug.h> -MultilineTextEdit::MultilineTextEdit(TQWidget* parent,const char* name) : TQTextEdit(parent,name) +MultilineTextEdit::MultilineTextEdit(TQWidget* tqparent,const char* name) : TQTextEdit(tqparent,name) { // make sure, our whitespace highlighting gets called whenever needed connect(this,TQT_SIGNAL(textChanged()),this,TQT_SLOT(drawWhitespaces())); @@ -44,7 +44,7 @@ void MultilineTextEdit::drawWhitespaces() TQPainter pa(viewport()); // get a sane color - TQColor col=colorGroup().link(); + TQColor col=tqcolorGroup().link(); // and a brush of the same color TQBrush fillBrush(col); // use it for line drawing @@ -71,7 +71,7 @@ void MultilineTextEdit::drawWhitespaces() line=text(paragraph); // start looking for whitespaces from the beginning pos=0; - while((pos=line.find(regex,pos))!=-1) + while((pos=line.tqfind(regex,pos))!=-1) { // whitespace found is not the carriage return at the end of the line? if(pos<((int)line.length()-1)) diff --git a/konversation/src/multilinetextedit.h b/konversation/src/multilinetextedit.h index 2c61da9..3b6127b 100644 --- a/konversation/src/multilinetextedit.h +++ b/konversation/src/multilinetextedit.h @@ -18,12 +18,13 @@ class TQPaintEvent; class TQWheelEvent; -class MultilineTextEdit : public QTextEdit +class MultilineTextEdit : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - explicit MultilineTextEdit(TQWidget* parent=0,const char* name=0); + explicit MultilineTextEdit(TQWidget* tqparent=0,const char* name=0); ~MultilineTextEdit(); protected slots: diff --git a/konversation/src/nick.cpp b/konversation/src/nick.cpp index 4a14ff6..81aad09 100644 --- a/konversation/src/nick.cpp +++ b/konversation/src/nick.cpp @@ -27,8 +27,8 @@ Nick::Nick(KListView *listView, const ChannelNickPtr& channelnick) : TQObject (), - KListViewItem (listView, listView->lastItem(), TQString::null, - channelnick->getNickname(), channelnick->getHostmask()) + KListViewItem (listView, listView->lastItem(), TQString(), + channelnick->getNickname(), channelnick->getHosttqmask()) { m_channelnickptr = channelnick; @@ -124,7 +124,7 @@ void Nick::refresh() } setText(2, calculateLabel2()); - repaint(); + tqrepaint(); if(m_flags != flags) { @@ -152,7 +152,7 @@ TQString Nick::calculateLabel1() TQString Nick::calculateLabel2() { - return getChannelNick()->getNickInfo()->getHostmask(); + return getChannelNick()->getNickInfo()->getHosttqmask(); } int Nick::compare(TQListViewItem* item,int col,bool ascending) const @@ -238,7 +238,7 @@ void Nick::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int wid if(nickInfo->isAway()) { - cg2.setColor(TQColorGroup::Text, kapp->palette(listView()).disabled().text()); + cg2.setColor(TQColorGroup::Text, kapp->tqpalette(listView()).disabled().text()); } KListViewItem::paintCell(p,cg2,column,width,align); @@ -249,12 +249,12 @@ int Nick::getSortingValue() const int flags; TQString sortingOrder = Preferences::sortOrder(); - if(getChannelNick()->isOwner()) flags=sortingOrder.find('q'); - else if(getChannelNick()->isAdmin()) flags=sortingOrder.find('p'); - else if(getChannelNick()->isOp() ) flags=sortingOrder.find('o'); - else if(getChannelNick()->isHalfOp()) flags=sortingOrder.find('h'); - else if(getChannelNick()->hasVoice()) flags=sortingOrder.find('v'); - else flags=sortingOrder.find('-'); + if(getChannelNick()->isOwner()) flags=sortingOrder.tqfind('q'); + else if(getChannelNick()->isAdmin()) flags=sortingOrder.tqfind('p'); + else if(getChannelNick()->isOp() ) flags=sortingOrder.tqfind('o'); + else if(getChannelNick()->isHalfOp()) flags=sortingOrder.tqfind('h'); + else if(getChannelNick()->hasVoice()) flags=sortingOrder.tqfind('v'); + else flags=sortingOrder.tqfind('-'); return flags; } diff --git a/konversation/src/nick.h b/konversation/src/nick.h index 066aa4d..c44c460 100644 --- a/konversation/src/nick.h +++ b/konversation/src/nick.h @@ -23,6 +23,7 @@ class Nick : public TQObject, public KListViewItem { Q_OBJECT + TQ_OBJECT public: Nick(KListView *listView, const ChannelNickPtr& channelnick); diff --git a/konversation/src/nickinfo.cpp b/konversation/src/nickinfo.cpp index efc218e..d585a4b 100644 --- a/konversation/src/nickinfo.cpp +++ b/konversation/src/nickinfo.cpp @@ -64,7 +64,7 @@ NickInfo::~NickInfo() // Get properties of NickInfo object. TQString NickInfo::getNickname() const { return m_nickname; } TQString NickInfo::loweredNickname() const { return m_loweredNickname; } -TQString NickInfo::getHostmask() const { return m_hostmask; } +TQString NickInfo::getHosttqmask() const { return m_hosttqmask; } bool NickInfo::isAway() const { return m_away; } TQString NickInfo::getAwayMessage() const { return m_awayMessage; } @@ -85,7 +85,7 @@ uint NickInfo::getNickColor() for (uint index = 0; index < m_nickname.length(); index++) { - nickvalue += m_nickname[index].unicode(); + nickvalue += m_nickname[index].tqunicode(); } m_nickColor = (nickvalue % 8) + 1; @@ -99,7 +99,7 @@ bool NickInfo::isIdentified() const { return m_identified; } TQString NickInfo::getPrettyOnlineSince() const { TQString prettyOnlineSince; - int daysto = m_onlineSince.date().daysTo( TQDate::currentDate()); + int daysto = m_onlineSince.date().daysTo( TQDate::tqcurrentDate()); if(daysto == 0) prettyOnlineSince = i18n("Today"); else if(daysto == 1) prettyOnlineSince = i18n("Yesterday"); else prettyOnlineSince = m_onlineSince.toString("ddd d MMMM yyyy"); @@ -153,10 +153,10 @@ void NickInfo::startNickInfoChangedTimer() m_changedTimer->start(3000, true /*single shot*/); } -void NickInfo::setHostmask(const TQString& newMask) +void NickInfo::setHosttqmask(const TQString& newMask) { - if (newMask.isEmpty() || newMask == m_hostmask) return; - m_hostmask = newMask; + if (newMask.isEmpty() || newMask == m_hosttqmask) return; + m_hosttqmask = newMask; startNickInfoChangedTimer(); } @@ -344,7 +344,7 @@ void NickInfo::tooltipTableData(TQTextStream &tooltip) const else if(!getRealName().isEmpty() && getRealName().lower() != loweredNickname()) { TQString escapedRealName( getRealName() ); - escapedRealName.replace("<","<").replace(">",">"); + escapedRealName.tqreplace("<","<").tqreplace(">",">"); tooltip << escapedRealName; dirty = true; } @@ -386,9 +386,9 @@ void NickInfo::tooltipTableData(TQTextStream &tooltip) const tooltip << "<tr><td><b>" << m_addressee.birthdayLabel() << ": </b></td><td>" << m_addressee.birthday().toString("ddd d MMMM yyyy") << "</td></tr>"; dirty=true; } - if(!getHostmask().isEmpty()) + if(!getHosttqmask().isEmpty()) { - tooltip << "<tr><td><b>" << i18n("Hostmask:") << " </b></td><td>" << getHostmask() << "</td></tr>"; + tooltip << "<tr><td><b>" << i18n("Hosttqmask:") << " </b></td><td>" << getHosttqmask() << "</td></tr>"; dirty=true; } if(isAway()) diff --git a/konversation/src/nickinfo.h b/konversation/src/nickinfo.h index e62bb08..bbb60e1 100644 --- a/konversation/src/nickinfo.h +++ b/konversation/src/nickinfo.h @@ -36,6 +36,7 @@ class TQTimer; class NickInfo : public TQObject, public KShared { Q_OBJECT + TQ_OBJECT public: NickInfo(const TQString& nick, Server* server); @@ -44,9 +45,9 @@ class NickInfo : public TQObject, public KShared // Get properties of NickInfo object. TQString getNickname() const; TQString loweredNickname() const; - TQString getHostmask() const; + TQString getHosttqmask() const; /** Currently return whether the user has set themselves to away with /away. - * May be changed in the future to parse the nick string and see if it contains + * May be changed in the future to parse the nick string and see if it tqcontains * "|away" or "|afk" or something. */ bool isAway() const; @@ -76,8 +77,8 @@ class NickInfo : public TQObject, public KShared /** Set properties of NickInfo object. */ void setNickname(const TQString& newNickname); - /** Set properties of NickInfo object. Ignores the request is newmask is empty.*/ - void setHostmask(const TQString& newMask); + /** Set properties of NickInfo object. Ignores the request is newtqmask is empty.*/ + void setHosttqmask(const TQString& newMask); /** Set properties of NickInfo object. */ void setAway(bool state); /** Set properties of NickInfo object. */ @@ -140,7 +141,7 @@ class NickInfo : public TQObject, public KShared TQString m_nickname; TQString m_loweredNickname; Server* m_owningServer; - TQString m_hostmask; + TQString m_hosttqmask; bool m_away; TQString m_awayMessage; TQString m_identdInfo; diff --git a/konversation/src/nicklistbehavior_preferences.cpp b/konversation/src/nicklistbehavior_preferences.cpp index ad66c18..0f1112f 100644 --- a/konversation/src/nicklistbehavior_preferences.cpp +++ b/konversation/src/nicklistbehavior_preferences.cpp @@ -21,8 +21,8 @@ #include <klocale.h> -NicklistBehavior_Config::NicklistBehavior_Config(TQWidget *parent, const char *name) - : NicklistBehavior_ConfigUI(parent, name) +NicklistBehavior_Config::NicklistBehavior_Config(TQWidget *tqparent, const char *name) + : NicklistBehavior_ConfigUI(tqparent, name) { // get page widget and populate listview loadSettings(); diff --git a/konversation/src/nicklistbehavior_preferences.h b/konversation/src/nicklistbehavior_preferences.h index a9e7588..4de3ba4 100644 --- a/konversation/src/nicklistbehavior_preferences.h +++ b/konversation/src/nicklistbehavior_preferences.h @@ -22,9 +22,10 @@ class NicklistBehavior_Config : public NicklistBehavior_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit NicklistBehavior_Config(TQWidget *parent = 0, const char *name = 0); + explicit NicklistBehavior_Config(TQWidget *tqparent = 0, const char *name = 0); ~NicklistBehavior_Config(); virtual void saveSettings(); diff --git a/konversation/src/nicklistbehavior_preferencesui.ui b/konversation/src/nicklistbehavior_preferencesui.ui index 2e84d89..b0ed9b1 100644 --- a/konversation/src/nicklistbehavior_preferencesui.ui +++ b/konversation/src/nicklistbehavior_preferencesui.ui @@ -6,7 +6,7 @@ the Free Software Foundation; either version 2 of the License, or (at your option) any later version. </comment> <author>Copyright (C) 2005 Peter Simonsson</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>NicklistBehavior_ConfigUI</cstring> </property> @@ -25,7 +25,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -36,7 +36,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_ChannelDoubleClickAction</cstring> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_SortCaseInsensitive</cstring> </property> @@ -44,7 +44,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Sort case &insensitive</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_SortByActivity</cstring> </property> @@ -52,9 +52,9 @@ the Free Software Foundation; either version 2 of the License, or <string>Sort by &activity</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> - <cstring>kcfg_SortByStatus</cstring> + <cstring>kcfg_SortBytqStatus</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -118,7 +118,7 @@ the Free Software Foundation; either version 2 of the License, or <cstring>kcfg_ChannelDoubleClickAction</cstring> </property> </widget> - <widget class="QLabel" row="3" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>orderHintLabel</cstring> </property> @@ -133,13 +133,13 @@ the Free Software Foundation; either version 2 of the License, or </widget> <connections> <connection> - <sender>kcfg_SortByStatus</sender> + <sender>kcfg_SortBytqStatus</sender> <signal>toggled(bool)</signal> <receiver>sortOrder</receiver> <slot>setEnabled(bool)</slot> </connection> <connection> - <sender>kcfg_SortByStatus</sender> + <sender>kcfg_SortBytqStatus</sender> <signal>toggled(bool)</signal> <receiver>orderHintLabel</receiver> <slot>setEnabled(bool)</slot> @@ -148,11 +148,11 @@ the Free Software Foundation; either version 2 of the License, or <tabstops> <tabstop>kcfg_ChannelDoubleClickAction</tabstop> <tabstop>kcfg_SortCaseInsensitive</tabstop> - <tabstop>kcfg_SortByStatus</tabstop> + <tabstop>kcfg_SortBytqStatus</tabstop> <tabstop>sortOrder</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistview.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/nicklistview.cpp b/konversation/src/nicklistview.cpp index 26e6bdd..5741a3a 100644 --- a/konversation/src/nicklistview.cpp +++ b/konversation/src/nicklistview.cpp @@ -27,8 +27,8 @@ #include <tqdragobject.h> -NickListView::NickListView(TQWidget* parent, Channel *chan) : -KListView(parent) +NickListView::NickListView(TQWidget* tqparent, Channel *chan) : +KListView(tqparent) { KListView::setSorting(-1); setWhatsThis(); @@ -86,14 +86,14 @@ KListView(parent) int newitem; newitem = popup->insertItem(i18n("Open &Query"),Konversation::OpenQuery); - popup->setWhatsThis(newitem, "<qt>Start a private chat between you and this person.<p/><em>Technical note:</em><br>The conversation between you and this person will be sent via the server. This means that the conversation will be affected by server lag, server stability, and will be terminated when you disconnect from the server.</qt>"); + popup->tqsetWhatsThis(newitem, "<qt>Start a private chat between you and this person.<p/><em>Technical note:</em><br>The conversation between you and this person will be sent via the server. This means that the conversation will be affected by server lag, server stability, and will be terminated when you disconnect from the server.</qt>"); newitem = popup->insertItem(i18n("Open DCC &Chat"),Konversation::StartDccChat); - popup->setWhatsThis(newitem, "<qt>Start a private <em>D</em>irect <em>C</em>lient <em>C</em>onnection chat between you and this person.<p/><em>Technical note:</em><br />The conversation between you and this person will be sent directly. This means it is independent from the server - so if the server connection fails, or use disconnect, your DCC Chat will be unaffected. It also means that no irc server admin can view or spy on this chat.</qt>"); + popup->tqsetWhatsThis(newitem, "<qt>Start a private <em>D</em>irect <em>C</em>lient <em>C</em>onnection chat between you and this person.<p/><em>Technical note:</em><br />The conversation between you and this person will be sent directly. This means it is independent from the server - so if the server connection fails, or use disconnect, your DCC Chat will be unaffected. It also means that no irc server admin can view or spy on this chat.</qt>"); if (kapp->authorize("allow_downloading")) { newitem = popup->insertItem(SmallIcon("2rightarrow"),i18n("Send &File..."),Konversation::DccSend); - popup->setWhatsThis(newitem, "<qt>Send a file to this person. If you are having problem sending files, or they are sending slowly, see the Konversation Handbook and DCC preferences page.</qt>"); + popup->tqsetWhatsThis(newitem, "<qt>Send a file to this person. If you are having problem sending files, or they are sending slowly, see the Konversation Handbook and DCC preferences page.</qt>"); } popup->insertItem(SmallIconSet("mail_generic"),i18n("&Send Email..."), Konversation::SendEmail); diff --git a/konversation/src/nicklistview.h b/konversation/src/nicklistview.h index 5b745b4..3680d37 100644 --- a/konversation/src/nicklistview.h +++ b/konversation/src/nicklistview.h @@ -30,9 +30,10 @@ class TQTimer; class NickListView : public KListView { Q_OBJECT + TQ_OBJECT public: - NickListView(TQWidget* parent, Channel *chan); + NickListView(TQWidget* tqparent, Channel *chan); ~NickListView(); /** Call when the icons have been changed. diff --git a/konversation/src/nicksonline.cpp b/konversation/src/nicksonline.cpp index 46579dd..5a5461b 100644 --- a/konversation/src/nicksonline.cpp +++ b/konversation/src/nicksonline.cpp @@ -47,7 +47,7 @@ #include <kmessagebox.h> -NicksOnline::NicksOnline(TQWidget* parent): ChatWindow(parent) +NicksOnline::NicksOnline(TQWidget* tqparent): ChatWindow(tqparent) { setName(i18n("Watched Nicks Online")); setType(ChatWindow::NicksOnline); @@ -102,7 +102,7 @@ NicksOnline::NicksOnline(TQWidget* parent): ChatWindow(parent) "When you select a nickname in the list above, the buttons here are used " "to associate the nickname with an entry in KAddressBook."); TQWhatsThis::add(addressbookLabel, addressbookLabelWT); - addressbookLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + addressbookLabel->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); m_editContactButton = new TQPushButton(i18n("Edit C&ontact..."), buttonBox, "nicksonline_editcontact_button"); TQString editContactButtonWT = i18n( @@ -165,17 +165,17 @@ KListView* NicksOnline::getNickListView() } /** - * Returns the named child of parent item in a NicksOnlineItem - * @param parent Pointer to a NicksOnlineItem. + * Returns the named child of tqparent item in a NicksOnlineItem + * @param tqparent Pointer to a NicksOnlineItem. * @param name The name in the desired child TQListViewItem, must be in column 0. * @param type The type of entry to be found * @return Pointer to the child TQListViewItem or 0 if not found. */ -TQListViewItem* NicksOnline::findItemChild(const TQListViewItem* parent, const TQString& name, NicksOnlineItem::NickListViewColumn type) +TQListViewItem* NicksOnline::findItemChild(const TQListViewItem* tqparent, const TQString& name, NicksOnlineItem::NickListViewColumn type) { - if (!parent) return 0; + if (!tqparent) return 0; TQListViewItem* child; - for (child = parent->firstChild(); (child) ; child = child->nextSibling()) + for (child = tqparent->firstChild(); (child) ; child = child->nextSibling()) { if(static_cast<NicksOnlineItem*>(child)->type() == type && child->text(0) == name) return child; } @@ -184,15 +184,15 @@ TQListViewItem* NicksOnline::findItemChild(const TQListViewItem* parent, const T /** * Returns the first occurrence of a child item of a given type in a NicksOnlineItem - * @param parent Pointer to a NicksOnlineItem. + * @param tqparent Pointer to a NicksOnlineItem. * @param type The type of entry to be found * @return Pointer to the child TQListViewItem or 0 if not found. */ -TQListViewItem* NicksOnline::findItemType(const TQListViewItem* parent, NicksOnlineItem::NickListViewColumn type) +TQListViewItem* NicksOnline::findItemType(const TQListViewItem* tqparent, NicksOnlineItem::NickListViewColumn type) { - if (!parent) return 0; + if (!tqparent) return 0; TQListViewItem* child; - for (child = parent->firstChild(); (child) ; child = child->nextSibling()) + for (child = tqparent->firstChild(); (child) ; child = child->nextSibling()) { if(static_cast<NicksOnlineItem*>(child)->type() == type) return child; } @@ -243,18 +243,18 @@ bool& needWhois) if (!nickInfo->getAwayMessage().isEmpty()) niInfo += '(' + nickInfo->getAwayMessage() + ')'; } - if (!nickInfo->getHostmask().isEmpty()) - niInfo += ' ' + nickInfo->getHostmask(); + if (!nickInfo->getHosttqmask().isEmpty()) + niInfo += ' ' + nickInfo->getHosttqmask(); if (!nickInfo->getRealName().isEmpty()) niInfo += " (" + nickInfo->getRealName() + ')'; if (!nickInfo->getNetServer().isEmpty()) { - niInfo += i18n( " online via %1" ).arg( nickInfo->getNetServer() ); + niInfo += i18n( " online via %1" ).tqarg( nickInfo->getNetServer() ); if (!nickInfo->getNetServerInfo().isEmpty()) niInfo += " (" + nickInfo->getNetServerInfo() + ')'; } if (!nickInfo->getOnlineSince().isNull()) - niInfo += i18n( " since %1" ).arg( nickInfo->getPrettyOnlineSince() ); + niInfo += i18n( " since %1" ).tqarg( nickInfo->getPrettyOnlineSince() ); } needWhois = niInfo.isEmpty(); if (!info.isEmpty() && !needWhois) info += ' '; @@ -284,7 +284,7 @@ void NicksOnline::updateServerOnlineList(Server* servr) networkRoot->setText(nlvcServerName, serverName); // Update list of servers in the network that are connected. TQStringList serverList = TQStringList::split(",", networkRoot->text(nlvcAdditionalInfo)); - if (!serverList.contains(serverName)) serverList.append(serverName); + if (!serverList.tqcontains(serverName)) serverList.append(serverName); networkRoot->setText(nlvcAdditionalInfo, serverList.join(",")); // Get item in nicklistview for the Offline branch. TQListViewItem* offlineRoot = findItemType(networkRoot, NicksOnlineItem::OfflineItem); @@ -382,7 +382,7 @@ void NicksOnline::updateServerOnlineList(Server* servr) while (child) { TQListViewItem* nextChild = child->nextSibling(); - if (channelList.find(child->text(nlvcNick)) == channelList.end()) + if (channelList.tqfind(child->text(nlvcNick)) == channelList.end()) delete child; child = nextChild; } @@ -420,7 +420,7 @@ void NicksOnline::updateServerOnlineList(Server* servr) if (static_cast<NicksOnlineItem*>(item)->type() != NicksOnlineItem::OfflineItem) { TQString nickname = item->text(nlvcNick); - if ((watchList.find(nickname) == watchList.end()) && + if ((watchList.tqfind(nickname) == watchList.end()) && (serverName == item->text(nlvcServerName))) delete item; } item = nextItem; @@ -432,7 +432,7 @@ void NicksOnline::updateServerOnlineList(Server* servr) { TQListViewItem* nextItem = item->nextSibling(); TQString nickname = item->text(nlvcNick); - if ((watchList.find(nickname) == watchList.end()) && + if ((watchList.tqfind(nickname) == watchList.end()) && (serverName == item->text(nlvcServerName))) delete item; item = nextItem; } @@ -582,7 +582,7 @@ bool NicksOnline::getItemServerAndNick(const TQListViewItem* item, TQString& ser // If on a channel, move up to the nickname. if (nlItem->type() == NicksOnlineItem::ChannelItem) { - item = item->parent(); + item = item->tqparent(); serverName = item->text(nlvcServerName); } nickname = item->text(nlvcNick); @@ -623,7 +623,7 @@ const TQString& nickname) Server* server = KonversationApplication::instance()->getConnectionManager()->getServerByName(serverName); if (!server) return 0; TQString networkName = server->getDisplayName(); - TQListViewItem* networkRoot = m_nickListView->findItem(networkName, nlvcNetwork); + TQListViewItem* networkRoot = m_nickListView->tqfindItem(networkName, nlvcNetwork); if (!networkRoot) return 0; TQListViewItem* nickRoot = findItemChild(networkRoot, nickname, NicksOnlineItem::NicknameItem); return nickRoot; @@ -971,5 +971,5 @@ void NicksOnline::childAdjustFocus() {} #include "nicksonline.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/nicksonline.h b/konversation/src/nicksonline.h index 9dcf7f0..17ace06 100644 --- a/konversation/src/nicksonline.h +++ b/konversation/src/nicksonline.h @@ -34,6 +34,7 @@ class ChatWindow; class NicksOnline : public ChatWindow { Q_OBJECT + TQ_OBJECT public: // Columns of the NickListView. @@ -60,7 +61,7 @@ class NicksOnline : public ChatWindow nsHasAddress = 2 // Nick has an associated addressbook entry. }; - explicit NicksOnline(TQWidget* parent); + explicit NicksOnline(TQWidget* tqparent); ~NicksOnline(); // These are here for the benefit of NicksOnlineTooltip. @@ -134,20 +135,20 @@ class NicksOnline : public ChatWindow private: /** - * Returns the named child of parent item in a NicksOnlineItem - * @param parent Pointer to a NicksOnlineItem. + * Returns the named child of tqparent item in a NicksOnlineItem + * @param tqparent Pointer to a NicksOnlineItem. * @param name The name in the desired child TQListViewItem, must be in column 0. * @param type The type of entry to be found * @return Pointer to the child TQListViewItem or 0 if not found. */ - TQListViewItem* findItemChild(const TQListViewItem* parent, const TQString& name, NicksOnlineItem::NickListViewColumn type); + TQListViewItem* findItemChild(const TQListViewItem* tqparent, const TQString& name, NicksOnlineItem::NickListViewColumn type); /** * Returns the first occurrence of a child item of a given type in a NicksOnlineItem - * @param parent Pointer to a NicksOnlineItem. + * @param tqparent Pointer to a NicksOnlineItem. * @param type The type of entry to be found * @return Pointer to the child TQListViewItem or 0 if not found. */ - TQListViewItem* findItemType(const TQListViewItem* parent, NicksOnlineItem::NickListViewColumn type); + TQListViewItem* findItemType(const TQListViewItem* tqparent, NicksOnlineItem::NickListViewColumn type); /** * Returns a pointer to the network TQListViewItem with the given name. * @param name The name of the network, assumed to be in column 0 of the item. diff --git a/konversation/src/nicksonlineitem.cpp b/konversation/src/nicksonlineitem.cpp index 1ad2824..6bbeaa4 100644 --- a/konversation/src/nicksonlineitem.cpp +++ b/konversation/src/nicksonlineitem.cpp @@ -12,14 +12,14 @@ #include "nicksonlineitem.h" -NicksOnlineItem::NicksOnlineItem(int type, TQListView* parent, const TQString& name, const TQString& col2) : - KListViewItem(parent, name, col2) +NicksOnlineItem::NicksOnlineItem(int type, TQListView* tqparent, const TQString& name, const TQString& col2) : + KListViewItem(tqparent, name, col2) { m_type=type; } -NicksOnlineItem::NicksOnlineItem(int type, TQListViewItem* parent, const TQString& name, const TQString& col2) : - KListViewItem(parent, name, col2) +NicksOnlineItem::NicksOnlineItem(int type, TQListViewItem* tqparent, const TQString& name, const TQString& col2) : + KListViewItem(tqparent, name, col2) { m_type=type; } diff --git a/konversation/src/nicksonlineitem.h b/konversation/src/nicksonlineitem.h index e7e911d..7b1ef49 100644 --- a/konversation/src/nicksonlineitem.h +++ b/konversation/src/nicksonlineitem.h @@ -27,12 +27,12 @@ class NicksOnlineItem : public KListViewItem }; NicksOnlineItem(int type, - TQListView* parent, + TQListView* tqparent, const TQString& name, const TQString& col2 = TQString()); NicksOnlineItem(int type, - TQListViewItem* parent, + TQListViewItem* tqparent, const TQString& name, const TQString& col2 = TQString()); diff --git a/konversation/src/notificationhandler.cpp b/konversation/src/notificationhandler.cpp index 7b615e0..82cdd12 100644 --- a/konversation/src/notificationhandler.cpp +++ b/konversation/src/notificationhandler.cpp @@ -29,10 +29,10 @@ namespace Konversation { - NotificationHandler::NotificationHandler(KonversationApplication* parent, const char* name) - : TQObject(parent, name) + NotificationHandler::NotificationHandler(KonversationApplication* tqparent, const char* name) + : TQObject(tqparent, name) { - m_mainWindow = parent->getMainWindow(); + m_mainWindow = tqparent->getMainWindow(); } NotificationHandler::~NotificationHandler() @@ -50,7 +50,7 @@ namespace Konversation TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message)); TQString cutup = addLineBreaks(cleanedMessage); - KNotifyClient::event(m_mainWindow->winId(), "message", TQString("<qt><%1> %2</qt>").arg(fromNick).arg(cutup)); + KNotifyClient::event(m_mainWindow->winId(), "message", TQString("<qt><%1> %2</qt>").tqarg(fromNick).tqarg(cutup)); if(!Preferences::trayNotifyOnlyOwnNick()) { @@ -76,7 +76,7 @@ namespace Konversation TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message)); TQString cutup = addLineBreaks(cleanedMessage); - KNotifyClient::event(m_mainWindow->winId(), "nick", TQString("<qt><%1> %2</qt>").arg(fromNick).arg(cutup)); + KNotifyClient::event(m_mainWindow->winId(), "nick", TQString("<qt><%1> %2</qt>").tqarg(fromNick).tqarg(cutup)); startTrayNotification(chatWin); @@ -86,7 +86,7 @@ namespace Konversation (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView()))) { - konvApp->osd->showOSD(i18n("[HighLight] (%1) <%2> %3").arg(chatWin->getName()).arg(fromNick).arg(cleanedMessage)); + konvApp->osd->showOSD(i18n("[HighLight] (%1) <%2> %3").tqarg(chatWin->getName()).tqarg(fromNick).tqarg(cleanedMessage)); } } @@ -102,7 +102,7 @@ namespace Konversation TQString cleanedMessage = TQStyleSheet::escape(Konversation::removeIrcMarkup(message)); TQString cutup = addLineBreaks(cleanedMessage); - KNotifyClient::event(m_mainWindow->winId(), "queryMessage", TQString("<qt><%1> %2</qt>").arg(fromNick).arg(cutup)); + KNotifyClient::event(m_mainWindow->winId(), "queryMessage", TQString("<qt><%1> %2</qt>").tqarg(fromNick).tqarg(cutup)); startTrayNotification(chatWin); @@ -111,7 +111,7 @@ namespace Konversation if(Preferences::oSDShowQuery() && (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView()))) { - konvApp->osd->showOSD(i18n("[Query] <%1> %2").arg(fromNick).arg(cleanedMessage)); + konvApp->osd->showOSD(i18n("[Query] <%1> %2").tqarg(fromNick).tqarg(cleanedMessage)); } } @@ -135,14 +135,14 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "join", i18n("%1 joined %2").arg(nick, chatWin->getName())); + KNotifyClient::event(m_mainWindow->winId(), "join", i18n("%1 joined %2").tqarg(nick, chatWin->getName())); // OnScreen Message if(Preferences::oSDShowChannelEvent() && (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView()))) { KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp); - konvApp->osd->showOSD(i18n("%1 joined %2").arg(nick, chatWin->getName())); + konvApp->osd->showOSD(i18n("%1 joined %2").tqarg(nick, chatWin->getName())); } } @@ -154,14 +154,14 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "part", i18n("%1 parted %2").arg(nick, chatWin->getName())); + KNotifyClient::event(m_mainWindow->winId(), "part", i18n("%1 parted %2").tqarg(nick, chatWin->getName())); // OnScreen Message if(Preferences::oSDShowChannelEvent() && (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView()))) { KonversationApplication* konvApp = static_cast<KonversationApplication*>(kapp); - konvApp->osd->showOSD(i18n("%1 parted %2").arg(nick, chatWin->getName())); + konvApp->osd->showOSD(i18n("%1 parted %2").tqarg(nick, chatWin->getName())); } } @@ -173,7 +173,7 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "part", i18n("%1 quit %2").arg(nick, chatWin->getServer()->getServerName())); + KNotifyClient::event(m_mainWindow->winId(), "part", i18n("%1 quit %2").tqarg(nick, chatWin->getServer()->getServerName())); } void NotificationHandler::nickChange(ChatWindow* chatWin, const TQString& oldNick, const TQString& newNick) @@ -184,7 +184,7 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "nickchange", i18n("%1 changed nickname to %2").arg(oldNick, newNick)); + KNotifyClient::event(m_mainWindow->winId(), "nickchange", i18n("%1 changed nickname to %2").tqarg(oldNick, newNick)); } void NotificationHandler::dccIncoming(ChatWindow* chatWin, const TQString& fromNick) @@ -195,7 +195,7 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "dcc_incoming", i18n("%1 wants to send a file to you").arg(fromNick)); + KNotifyClient::event(m_mainWindow->winId(), "dcc_incoming", i18n("%1 wants to send a file to you").tqarg(fromNick)); } void NotificationHandler::mode(ChatWindow* chatWin, const TQString& /*nick*/) @@ -220,7 +220,7 @@ namespace Konversation startTrayNotification(chatWin); KNotifyClient::event(m_mainWindow->winId(), "query", - i18n("%1 has started a conversation (query) with you.").arg(fromNick)); + i18n("%1 has started a conversation (query) with you.").tqarg(fromNick)); } void NotificationHandler::nickOnline(ChatWindow* chatWin, const TQString& nick) @@ -232,7 +232,7 @@ namespace Konversation return; KNotifyClient::event(m_mainWindow->winId(), "notify", - i18n("%1 is online (%2).").arg(nick).arg(chatWin->getServer()->getServerName())); + i18n("%1 is online (%2).").tqarg(nick).tqarg(chatWin->getServer()->getServerName())); } void NotificationHandler::nickOffline(ChatWindow* chatWin, const TQString& nick) @@ -244,7 +244,7 @@ namespace Konversation return; KNotifyClient::event(m_mainWindow->winId(), "notify", - i18n("%1 went offline (%2).").arg(nick).arg(chatWin->getServer()->getServerName())); + i18n("%1 went offline (%2).").tqarg(nick).tqarg(chatWin->getServer()->getServerName())); } void NotificationHandler::kick(ChatWindow* chatWin, const TQString& channel,const TQString& nick) @@ -256,7 +256,7 @@ namespace Konversation return; KNotifyClient::event(m_mainWindow->winId(), "kick", - i18n("You are kicked by %1 from %2").arg(nick).arg(channel)); + i18n("You are kicked by %1 from %2").tqarg(nick).tqarg(channel)); } void NotificationHandler::dccChat(ChatWindow* chatWin, const TQString& nick) @@ -268,7 +268,7 @@ namespace Konversation return; KNotifyClient::event(m_mainWindow->winId(), "dccChat", - i18n("%1 started a dcc chat with you").arg(nick)); + i18n("%1 started a dcc chat with you").tqarg(nick)); } void NotificationHandler::highlight(ChatWindow* chatWin, const TQString& fromNick, const TQString& message) @@ -288,10 +288,10 @@ namespace Konversation // if there was no nick associated, this must be a command message, so don't try displaying // an empty nick in <> if(fromNick.isEmpty()) - konvApp->osd->showOSD(i18n("[HighLight] (%1) *** %2").arg(chatWin->getName()).arg(message)); + konvApp->osd->showOSD(i18n("[HighLight] (%1) *** %2").tqarg(chatWin->getName()).tqarg(message)); // normal highlight message else - konvApp->osd->showOSD(i18n("[HighLight] (%1) <%2> %3").arg(chatWin->getName()).arg(fromNick).arg(message)); + konvApp->osd->showOSD(i18n("[HighLight] (%1) <%2> %3").tqarg(chatWin->getName()).tqarg(fromNick).tqarg(message)); } } @@ -301,7 +301,7 @@ namespace Konversation return; KNotifyClient::event(m_mainWindow->winId(), "connectionFailure", - i18n("Failed to connect to %1").arg(server)); + i18n("Failed to connect to %1").tqarg(server)); } void NotificationHandler::channelJoin(ChatWindow* chatWin, const TQString& channel) @@ -312,7 +312,7 @@ namespace Konversation if (Preferences::disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway()) return; - KNotifyClient::event(m_mainWindow->winId(), "channelJoin", i18n("You have joined %1.").arg(channel)); + KNotifyClient::event(m_mainWindow->winId(), "channelJoin", i18n("You have joined %1.").tqarg(channel)); } TQString NotificationHandler::addLineBreaks(const TQString& string) diff --git a/konversation/src/notificationhandler.h b/konversation/src/notificationhandler.h index 9b5c216..ece720b 100644 --- a/konversation/src/notificationhandler.h +++ b/konversation/src/notificationhandler.h @@ -22,12 +22,13 @@ class KonversationMainWindow; namespace Konversation { - class NotificationHandler : public QObject + class NotificationHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: - explicit NotificationHandler(KonversationApplication* parent = 0, const char* name = 0); + explicit NotificationHandler(KonversationApplication* tqparent = 0, const char* name = 0); ~NotificationHandler(); public slots: diff --git a/konversation/src/osd.cpp b/konversation/src/osd.cpp index 96ee353..4161eab 100644 --- a/konversation/src/osd.cpp +++ b/konversation/src/osd.cpp @@ -29,17 +29,17 @@ the Free Software Foundation; either version 2 of the License, or #include <X11/Xlib.h> //reposition() -OSDWidget::OSDWidget( const TQString &appName, TQWidget *parent, const char *name ) -: TQWidget( parent, name, WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_Tool ) +OSDWidget::OSDWidget( const TQString &appName, TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name, WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_Tool ) , m_appName( appName ) , m_duration( 5000 ) , m_shadow( true ) -, m_alignment( Middle ) +, m_tqalignment( Middle ) , m_screen( 0 ) , m_y( MARGIN ) , m_dirty( false ) { - setFocusPolicy( NoFocus ); + setFocusPolicy( TQ_NoFocus ); setBackgroundMode( NoBackground ); unsetColors(); @@ -52,7 +52,7 @@ void OSDWidget::renderOSDText( const TQString &txt ) // Escaped text TQString text = Konversation::removeIrcMarkup(txt); - static TQBitmap mask; + static TQBitmap tqmask; //This is various spacings and margins, based on the font to look "just right" const uint METRIC = fontMetrics().width( 'x' ); @@ -75,17 +75,17 @@ void OSDWidget::renderOSDText( const TQString &txt ) textRect.addCoords( 0, 0, METRIC*2, titleRect.height() + METRIC ); osdBuffer.resize( textRect.size() ); - mask.resize( textRect.size() ); + tqmask.resize( textRect.size() ); // Start painting! TQPainter bufferPainter( &osdBuffer ); - TQPainter maskPainter( &mask ); + TQPainter tqmaskPainter( &tqmask ); // Draw backing rectangle const uint xround = (METRIC * 200) / textRect.width(); const uint yround = (METRIC * 200) / textRect.height(); - bufferPainter.setPen( Qt::black ); + bufferPainter.setPen( TQt::black ); bufferPainter.setBrush( backgroundColor() ); bufferPainter.drawRoundRect( textRect, xround, yround ); bufferPainter.setFont( font() ); @@ -109,10 +109,10 @@ void OSDWidget::renderOSDText( const TQString &txt ) bufferPainter.drawText( METRIC * 2, (METRIC/2), w, h, AlignLeft, m_appName ); // Masking for transparency - mask.fill( Qt::black ); - maskPainter.setBrush( Qt::white ); - maskPainter.drawRoundRect( textRect, xround, yround ); - setMask( mask ); + tqmask.fill( TQt::black ); + tqmaskPainter.setBrush( TQt::white ); + tqmaskPainter.drawRoundRect( textRect, xround, yround ); + setMask( tqmask ); //do last to reduce noticeable change when showing multiple OSDs in succession reposition( textRect.size() ); @@ -130,10 +130,10 @@ void OSDWidget::showOSD( const TQString &text, bool preemptive ) { TQString plaintext = text.copy(); - plaintext.replace(TQRegExp("</?(?:font|a|b|i)\\b[^>]*>"), TQString("")); - plaintext.replace(TQString("<"), TQString("<")); - plaintext.replace(TQString(">"), TQString(">")); - plaintext.replace(TQString("&"), TQString("&")); + plaintext.tqreplace(TQRegExp("</?(?:font|a|b|i)\\b[^>]*>"), TQString("")); + plaintext.tqreplace(TQString("<"), TQString("<")); + plaintext.tqreplace(TQString(">"), TQString(">")); + plaintext.tqreplace(TQString("&"), TQString("&")); if ( preemptive || !timerMin.isActive() ) { @@ -206,9 +206,9 @@ void OSDWidget::setOffset( int /*x*/, int y ) reposition(); } -void OSDWidget::setAlignment( Alignment a ) +void OSDWidget::tqsetAlignment( Alignment a ) { - m_alignment = a; + m_tqalignment = a; reposition(); } @@ -277,7 +277,7 @@ void OSDWidget::reposition( TQSize newSize ) //TODO m_y is the middle of the OSD, and don't exceed screen margins - switch ( m_alignment ) + switch ( m_tqalignment ) { case Left: break; @@ -303,7 +303,7 @@ void OSDWidget::reposition( TQSize newSize ) newPos += screen.topLeft(); //ensure we are painted before we move - if( isVisible() ) paintEvent( 0 ); + if( isVisible() ) paintEvent( (TQPaintEvent*)0 ); //fancy X11 move+resize, reduces visual artifacts XMoveResizeWindow( x11Display(), winId(), newPos.x(), newPos.y(), newSize.width(), newSize.height() ); @@ -314,8 +314,8 @@ void OSDWidget::reposition( TQSize newSize ) #include <kcursor.h> //previewWidget #include <klocale.h> -OSDPreviewWidget::OSDPreviewWidget( const TQString &appName, TQWidget *parent, const char *name ) -: OSDWidget( appName, parent, name ) +OSDPreviewWidget::OSDPreviewWidget( const TQString &appName, TQWidget *tqparent, const char *name ) +: OSDWidget( appName, tqparent, name ) , m_dragging( false ) { m_currentText = i18n( "OSD Preview - drag to reposition" ); @@ -326,7 +326,7 @@ void OSDPreviewWidget::mousePressEvent( TQMouseEvent *event ) { m_dragOffset = event->pos(); - if ( event->button() == LeftButton && !m_dragging ) + if ( event->button() == Qt::LeftButton && !m_dragging ) { grabMouse( KCursor::sizeAllCursor() ); m_dragging = true; @@ -371,12 +371,12 @@ void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e ) if( eGlobalPosX < (hcenter-snapZone) ) { - m_alignment = Left; + m_tqalignment = Left; destination.rx() = MARGIN; } else if( eGlobalPosX > (hcenter+snapZone) ) { - m_alignment = Right; + m_tqalignment = Right; destination.rx() = screen.width() - MARGIN - width(); } else @@ -388,10 +388,10 @@ void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e ) if( eGlobalPosY >= (vcenter-snapZone) && eGlobalPosY <= (vcenter+snapZone) ) { - m_alignment = Center; + m_tqalignment = Center; destination.ry() = vcenter - height()/2; } - else m_alignment = Middle; + else m_tqalignment = Middle; } destination += screen.topLeft(); @@ -402,7 +402,7 @@ void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e ) // the code was taken from pilotDaemon.cc in KPilot // static -OSDWidget::KDesktopLockStatus OSDWidget::isKDesktopLockRunning() +OSDWidget::KDesktopLocktqStatus OSDWidget::isKDesktopLockRunning() { if (!Preferences::oSDCheckDesktopLock()) return NotLocked; diff --git a/konversation/src/osd.h b/konversation/src/osd.h index 8d62641..3821425 100644 --- a/konversation/src/osd.h +++ b/konversation/src/osd.h @@ -26,28 +26,29 @@ class TQStringList; class TQTimer; class MetaBundle; -class OSDWidget : public QWidget +class OSDWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum Alignment { Left, Middle, Center, Right }; - explicit OSDWidget(const TQString &appName, TQWidget *parent = 0, const char *name = "osd"); + explicit OSDWidget(const TQString &appName, TQWidget *tqparent = 0, const char *name = "osd"); void setDuration(int ms); void setFont(TQFont newfont); void setShadow(bool shadow); void setTextColor(const TQColor &newcolor); void setBackgroundColor(const TQColor &newColor); void setOffset( int x, int y ); - void setAlignment(Alignment); + void tqsetAlignment(Alignment); void setScreen(uint screen); void setText(const TQString &text) { m_currentText = text; refresh(); } void unsetColors(); int screen() { return m_screen; } - int alignment() { return m_alignment; } + int tqalignment() { return m_tqalignment; } int y() { return m_y; } signals: @@ -78,8 +79,8 @@ class OSDWidget : public QWidget /* called after most set*() calls to update the OSD */ void refresh(); - enum KDesktopLockStatus { NotLocked=0, Locked=1, DCOPError=2 }; - static KDesktopLockStatus isKDesktopLockRunning(); + enum KDesktopLocktqStatus { NotLocked=0, Locked=1, DCOPError=2 }; + static KDesktopLocktqStatus isKDesktopLockRunning(); static const int MARGIN = 15; @@ -92,7 +93,7 @@ class OSDWidget : public QWidget TQString m_currentText; bool m_shadow; - Alignment m_alignment; + Alignment m_tqalignment; int m_screen; uint m_y; @@ -103,9 +104,10 @@ class OSDWidget : public QWidget class OSDPreviewWidget : public OSDWidget { Q_OBJECT + TQ_OBJECT public: - explicit OSDPreviewWidget( const TQString &appName, TQWidget *parent = 0, const char *name = "osdpreview" ); + explicit OSDPreviewWidget( const TQString &appName, TQWidget *tqparent = 0, const char *name = "osdpreview" ); static TQPoint m_previewOffset; diff --git a/konversation/src/osd_preferences.cpp b/konversation/src/osd_preferences.cpp index 61e8115..e21dc7f 100644 --- a/konversation/src/osd_preferences.cpp +++ b/konversation/src/osd_preferences.cpp @@ -28,8 +28,8 @@ #include <kconfigdialog.h> -OSD_Config::OSD_Config( TQWidget* parent, const char* name, WFlags fl ) - : OSD_ConfigUI( parent, name, fl ) +OSD_Config::OSD_Config( TQWidget* tqparent, const char* name, WFlags fl ) + : OSD_ConfigUI( tqparent, name, fl ) { bool enableScreenChooser = false; TQRect screenRect; @@ -108,7 +108,7 @@ void OSD_Config::saveSettings() //x is ignored anyway, but leave incase we use in future konvApp->osd->setOffset(kcfg_OSDOffsetX->value(), kcfg_OSDOffsetY->value()); - konvApp->osd->setAlignment((OSDWidget::Alignment)kcfg_OSDAlignment->value()); + konvApp->osd->tqsetAlignment((OSDWidget::Alignment)kcfg_OSDAlignment->value()); } } @@ -116,7 +116,7 @@ void OSD_Config::saveSettings() void OSD_Config::showEvent(TQShowEvent*) { //Update the preview - m_pOSDPreview->setAlignment((OSDWidget::Alignment)( kcfg_OSDAlignment->value() ) ); + m_pOSDPreview->tqsetAlignment((OSDWidget::Alignment)( kcfg_OSDAlignment->value() ) ); m_pOSDPreview->setOffset(kcfg_OSDOffsetX->value(),kcfg_OSDOffsetY->value()); m_pOSDPreview->setShown(kcfg_UseOSD->isChecked()); @@ -143,7 +143,7 @@ void OSD_Config::slotPositionChanged() { kcfg_OSDScreen->setCurrentItem(m_pOSDPreview->screen()); - kcfg_OSDAlignment->setValue( m_pOSDPreview->alignment() ); + kcfg_OSDAlignment->setValue( m_pOSDPreview->tqalignment() ); kcfg_OSDOffsetX->setValue( m_pOSDPreview->x()); kcfg_OSDOffsetY->setValue( m_pOSDPreview->y()); } diff --git a/konversation/src/osd_preferences.h b/konversation/src/osd_preferences.h index 14616e4..11a9a96 100644 --- a/konversation/src/osd_preferences.h +++ b/konversation/src/osd_preferences.h @@ -25,9 +25,10 @@ class OSDPreviewWidget; class OSD_Config : public OSD_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit OSD_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + explicit OSD_Config( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~OSD_Config(); virtual void restorePageToDefaults(); diff --git a/konversation/src/osd_preferencesui.ui b/konversation/src/osd_preferencesui.ui index 3d44f1d..459be19 100644 --- a/konversation/src/osd_preferencesui.ui +++ b/konversation/src/osd_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>OSD_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>OSD_ConfigUI</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_UseOSD</cstring> </property> @@ -44,7 +44,7 @@ <string>&Enable On Screen Display</string> </property> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -58,7 +58,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_OSDDrawShadow</cstring> </property> @@ -69,7 +69,7 @@ <string>&Draw shadows</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -94,7 +94,7 @@ <bool>false</bool> </property> </widget> - <widget class="QSpinBox" row="0" column="2"> + <widget class="TQSpinBox" row="0" column="2"> <property name="name"> <cstring>kcfg_OSDOffsetX</cstring> </property> @@ -113,7 +113,7 @@ <number>-2048</number> </property> </widget> - <widget class="QSpinBox" row="0" column="3"> + <widget class="TQSpinBox" row="0" column="3"> <property name="name"> <cstring>kcfg_OSDOffsetY</cstring> </property> @@ -132,7 +132,7 @@ <number>-2048</number> </property> </widget> - <widget class="QSpinBox" row="0" column="4"> + <widget class="TQSpinBox" row="0" column="4"> <property name="name"> <cstring>kcfg_OSDAlignment</cstring> </property> @@ -147,7 +147,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -161,7 +161,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_OSDShowOwnNick</cstring> </property> @@ -169,7 +169,7 @@ <string>&If own nick appears in channel message</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_OSDShowChannel</cstring> </property> @@ -177,7 +177,7 @@ <string>On an&y channel message</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_OSDShowQuery</cstring> </property> @@ -185,7 +185,7 @@ <string>On &query activity</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>kcfg_OSDShowChannelEvent</cstring> </property> @@ -195,7 +195,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>kcfg_OSDUseCustomColors</cstring> </property> @@ -215,7 +215,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -226,7 +226,7 @@ <cstring>kcfg_OSDTextColor</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -263,7 +263,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>31</height> @@ -272,7 +272,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox" row="4" column="0"> + <widget class="TQGroupBox" row="4" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -286,7 +286,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -297,7 +297,7 @@ <cstring>kcfg_OSDDuration</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -308,7 +308,7 @@ <cstring>kcfg_OSDScreen</cstring> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_OSDDuration</cstring> </property> @@ -340,7 +340,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> @@ -413,8 +413,8 @@ <tabstop>kcfg_OSDScreen</tabstop> <tabstop>kcfg_OSDUseCustomColors</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/konversation/src/outputfilter.cpp b/konversation/src/outputfilter.cpp index 1a291a5..f1c95c2 100644 --- a/konversation/src/outputfilter.cpp +++ b/konversation/src/outputfilter.cpp @@ -76,17 +76,17 @@ namespace Konversation TQString aliasReplace; // cut alias replacement from definition - if ( aliasList[index].contains("%p") ) + if ( aliasList[index].tqcontains("%p") ) aliasReplace = aliasList[index].section(' ',1); else aliasReplace = aliasList[index].section(' ',1 )+' '+line.section(' ',1 ); // protect "%%" - aliasReplace.replace("%%","%\x01"); - // replace %p placeholder with rest of line - aliasReplace.replace("%p",line.section(' ',1)); + aliasReplace.tqreplace("%%","%\x01"); + // tqreplace %p placeholder with rest of line + aliasReplace.tqreplace("%p",line.section(' ',1)); // restore "%<1>" as "%%" - aliasReplace.replace("%\x01","%%"); + aliasReplace.tqreplace("%\x01","%%"); // modify line line=aliasReplace; // return "replaced" @@ -181,8 +181,8 @@ namespace Konversation // someone didn't notice leading spaces { TQString testNickServ( inputLine.stripWhiteSpace() ); - if(testNickServ.startsWith(commandChar+"nickserv", false) - || testNickServ.startsWith(commandChar+"ns", false)) + if(testNickServ.tqstartsWith(commandChar+"nickserv", false) + || testNickServ.tqstartsWith(commandChar+"ns", false)) { inputLine = testNickServ; } @@ -191,17 +191,17 @@ namespace Konversation if(!Preferences::disableExpansion()) { // replace placeholders - inputLine.replace("%%","%\x01"); // make sure to protect double %% - inputLine.replace("%B","\x02"); // replace %B with bold char - inputLine.replace("%C","\x03"); // replace %C with color char - inputLine.replace("%G","\x07"); // replace %G with ASCII BEL 0x07 - inputLine.replace("%I","\x09"); // replace %I with italics char - inputLine.replace("%O","\x0f"); // replace %O with reset to default char - inputLine.replace("%S","\x13"); // replace %S with strikethru char - // inputLine.replace(TQRegExp("%?"),"\x15"); - inputLine.replace("%R","\x16"); // replace %R with reverse char - inputLine.replace("%U","\x1f"); // replace %U with underline char - inputLine.replace("%\x01","%"); // restore double %% as single % + inputLine.tqreplace("%%","%\x01"); // make sure to protect double %% + inputLine.tqreplace("%B","\x02"); // tqreplace %B with bold char + inputLine.tqreplace("%C","\x03"); // tqreplace %C with color char + inputLine.tqreplace("%G","\x07"); // tqreplace %G with ASCII BEL 0x07 + inputLine.tqreplace("%I","\x09"); // tqreplace %I with italics char + inputLine.tqreplace("%O","\x0f"); // tqreplace %O with reset to default char + inputLine.tqreplace("%S","\x13"); // tqreplace %S with strikethru char + // inputLine.tqreplace(TQRegExp("%?"),"\x15"); + inputLine.tqreplace("%R","\x16"); // tqreplace %R with reverse char + inputLine.tqreplace("%U","\x1f"); // tqreplace %U with underline char + inputLine.tqreplace("%\x01","%"); // restore double %% as single % } TQString line=inputLine.lower(); @@ -334,7 +334,7 @@ namespace Konversation else if(parameter == "off") konvApp->showQueueTuner(false); else - result = usage(i18n("Usage: %1queuetuner [on | off]").arg(commandChar)); + result = usage(i18n("Usage: %1queuetuner [on | off]").tqarg(commandChar)); return result; } @@ -373,14 +373,14 @@ namespace Konversation { OutputFilterResult result; - if(channelName.contains(",")) // Protect against #foo,0 tricks + if(channelName.tqcontains(",")) // Protect against #foo,0 tricks channelName = channelName.remove(",0"); //else if(channelName == "0") // FIXME IRC RFC 2812 section 3.2.1 if (channelName.isEmpty()) { if (destination.isEmpty() || !isAChannel(destination)) - return usage(i18n("Usage: %1JOIN <channel> [password]").arg(commandChar)); + return usage(i18n("Usage: %1JOIN <channel> [password]").tqarg(commandChar)); channelName=destination; } else if (!isAChannel(channelName)) @@ -409,11 +409,11 @@ namespace Konversation if(isAChannel(destination)) { // get nick to kick - TQString victim = parameter.left(parameter.find(" ")); + TQString victim = parameter.left(parameter.tqfind(" ")); if(victim.isEmpty()) { - result = usage(i18n("Usage: %1KICK <nick> [reason]").arg(commandChar)); + result = usage(i18n("Usage: %1KICK <nick> [reason]").tqarg(commandChar)); } else { @@ -431,7 +431,7 @@ namespace Konversation } else { - result = error(i18n("%1KICK only works from within channels.").arg(commandChar)); + result = error(i18n("%1KICK only works from within channels.").tqarg(commandChar)); } return result; @@ -451,7 +451,7 @@ namespace Konversation } else { - result = error(i18n("%1PART without parameters only works from within a channel or a query.").arg(commandChar)); + result = error(i18n("%1PART without parameters only works from within a channel or a query.").tqarg(commandChar)); } } else @@ -460,7 +460,7 @@ namespace Konversation if(isAChannel(parameter)) { // get channel name - TQString channel = parameter.left(parameter.find(" ")); + TQString channel = parameter.left(parameter.tqfind(" ")); // get part reason (if any) TQString reason = parameter.mid(channel.length() + 1); @@ -481,7 +481,7 @@ namespace Konversation } else { - result = error(i18n("%1PART without channel name only works from within a channel.").arg(commandChar)); + result = error(i18n("%1PART without channel name only works from within a channel.").tqarg(commandChar)); } } } @@ -503,7 +503,7 @@ namespace Konversation } else { - result = error(i18n("%1TOPIC without parameters only works from within a channel.").arg(commandChar)); + result = error(i18n("%1TOPIC without parameters only works from within a channel.").tqarg(commandChar)); } } else @@ -512,7 +512,7 @@ namespace Konversation if(isAChannel(parameter)) { // get channel name - TQString channel=parameter.left(parameter.find(" ")); + TQString channel=parameter.left(parameter.tqfind(" ")); // get topic (if any) TQString topic=parameter.mid(channel.length()+1); // if no topic given, retrieve topic @@ -545,7 +545,7 @@ namespace Konversation } else { - result = error(i18n("%1TOPIC without channel name only works from within a channel.").arg(commandChar)); + result = error(i18n("%1TOPIC without channel name only works from within a channel.").tqarg(commandChar)); } } } @@ -572,7 +572,7 @@ namespace Konversation result.toServer = "NAMES "; if (parameter.isNull()) { - return error(i18n("%1NAMES with no target may disconnect you from the server. Specify '*' if you really want this.").arg(commandChar)); + return error(i18n("%1NAMES with no target may disconnect you from the server. Specify '*' if you really want this.").tqarg(commandChar)); } else if (parameter != TQChar('*')) { @@ -593,7 +593,7 @@ namespace Konversation else if (parm.isEmpty()) // this can only mean one thing.. we're in the Server tab m_server->closeYourself(false); else - return usage(i18n("Usage: %1close [window] closes the named channel or query tab, or the current tab if none specified.").arg(commandChar)); + return usage(i18n("Usage: %1close [window] closes the named channel or query tab, or the current tab if none specified.").tqarg(commandChar)); return OutputFilterResult(); } @@ -601,7 +601,7 @@ namespace Konversation { OutputFilterResult result; - result.toServer = "QUIT :"; + result.toServer = "TQUIT :"; // if no reason given, take default reason if(reason.isEmpty()) result.toServer += m_server->getIdentity()->getQuitReason(); @@ -614,18 +614,18 @@ namespace Konversation OutputFilterResult OutputFilter::parseNotice(const TQString ¶meter) { OutputFilterResult result; - TQString recipient = parameter.left(parameter.find(" ")); + TQString recipient = parameter.left(parameter.tqfind(" ")); TQString message = parameter.mid(recipient.length()+1); if(parameter.isEmpty() || message.isEmpty()) { - result = usage(i18n("Usage: %1NOTICE <recipient> <message>").arg(commandChar)); + result = usage(i18n("Usage: %1NOTICE <recipient> <message>").tqarg(commandChar)); } else { result.typeString = i18n("Notice"); result.toServer = "NOTICE " + recipient + " :" + message; - result.output=i18n("%1 is the message, %2 the recipient nickname","Sending notice \"%2\" to %1.").arg(recipient).arg(message); + result.output=i18n("%1 is the message, %2 the recipient nickname","Sending notice \"%2\" to %1.").tqarg(recipient).tqarg(message); result.type = Program; } @@ -644,7 +644,7 @@ namespace Konversation } else { - result = usage(i18n("Usage: %1ME text").arg(commandChar)); + result = usage(i18n("Usage: %1ME text").tqarg(commandChar)); } return result; @@ -681,7 +681,7 @@ namespace Konversation else if (message.startsWith(commandChar+"me")) { result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + "ACTION " + message.mid(4) + '\x01'; - output = TQString("* %1 %2").arg(myNick).arg(message.mid(4)); + output = TQString("* %1 %2").tqarg(myNick).tqarg(message.mid(4)); } else { @@ -731,7 +731,7 @@ namespace Konversation OutputFilterResult OutputFilter::parseSMsg(const TQString ¶meter) { OutputFilterResult result; - TQString recipient = parameter.left(parameter.find(" ")); + TQString recipient = parameter.left(parameter.tqfind(" ")); TQString message = parameter.mid(recipient.length() + 1); if(message.startsWith(commandChar + "me")) @@ -762,14 +762,14 @@ namespace Konversation if (request == "PING") { - unsigned int time_t = TQDateTime::currentDateTime().toTime_t(); - result.toServer = TQString("PRIVMSG %1 :\x01PING %2\x01").arg(recipient).arg(time_t); - result.output = i18n("Sending CTCP-%1 request to %2.").arg("PING").arg(recipient); + unsigned int time_t = TQDateTime::tqcurrentDateTime().toTime_t(); + result.toServer = TQString("PRIVMSG %1 :\x01PING %2\x01").tqarg(recipient).tqarg(time_t); + result.output = i18n("Sending CTCP-%1 request to %2.").tqarg("PING").tqarg(recipient); } else { result.toServer = "PRIVMSG " + recipient + " :" + '\x01' + out + '\x01'; - result.output = i18n("Sending CTCP-%1 request to %2.").arg(out).arg(recipient); + result.output = i18n("Sending CTCP-%1 request to %2.").tqarg(out).tqarg(recipient); } result.typeString = i18n("CTCP"); @@ -842,7 +842,7 @@ namespace Konversation else { TQString tmpParameter = parameter; - TQStringList parameterList = TQStringList::split(' ', tmpParameter.replace("\\ ", "%20")); + TQStringList parameterList = TQStringList::split(' ', tmpParameter.tqreplace("\\ ", "%20")); TQString dccType = parameterList[0].lower(); @@ -863,7 +863,7 @@ namespace Konversation else if(parameterList.count()>2) { // TODO: make sure this will work: - //output=i18n("Usage: %1DCC SEND nickname [fi6lename] [filename] ...").arg(commandChar); + //output=i18n("Usage: %1DCC SEND nickname [fi6lename] [filename] ...").tqarg(commandChar); KURL fileURL(parameterList[2]); //We could easily check if the remote file exists, but then we might @@ -874,12 +874,12 @@ namespace Konversation } else { - result = error(i18n("File \"%1\" does not exist.").arg(parameterList[2])); + result = error(i18n("File \"%1\" does not exist.").tqarg(parameterList[2])); } } else // Don't know how this should happen, but ... { - result = usage(i18n("Usage: %1DCC [SEND nickname filename]").arg(commandChar)); + result = usage(i18n("Usage: %1DCC [SEND nickname filename]").tqarg(commandChar)); } } // TODO: DCC Chat etc. comes here @@ -891,12 +891,12 @@ namespace Konversation } else { - result = usage(i18n("Usage: %1DCC [CHAT nickname]").arg(commandChar)); + result = usage(i18n("Usage: %1DCC [CHAT nickname]").tqarg(commandChar)); } } else { - result = error(i18n("Unrecognized command %1DCC %2. Possible commands are SEND, CHAT, CLOSE.").arg(commandChar).arg(parameterList[0])); + result = error(i18n("Unrecognized command %1DCC %2. Possible commands are SEND, CHAT, CLOSE.").tqarg(commandChar).tqarg(parameterList[0])); } } @@ -959,7 +959,7 @@ namespace Konversation OutputFilterResult result; /*TQString newFileName(fileName); - newFileName.replace(" ", "_");*/ + newFileName.tqreplace(" ", "_");*/ result.toServer = "PRIVMSG " + sender + " :" + '\x01' + "DCC RESUME " + fileName + ' ' + port + ' ' + TQString::number(startAt) + '\x01'; @@ -993,7 +993,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1INVITE <nick> [channel]").arg(commandChar)); + result = usage(i18n("Usage: %1INVITE <nick> [channel]").tqarg(commandChar)); } else { @@ -1008,7 +1008,7 @@ namespace Konversation } else { - result = error(i18n("%1INVITE without channel name works only from within channels.").arg(commandChar)); + result = error(i18n("%1INVITE without channel name works only from within channels.").tqarg(commandChar)); } } @@ -1020,7 +1020,7 @@ namespace Konversation } else { - result = error(i18n("%1 is not a channel.").arg(channel)); + result = error(i18n("%1 is not a channel.").tqarg(channel)); } } } @@ -1034,13 +1034,13 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1EXEC <script> [parameter list]").arg(commandChar)); + result = usage(i18n("Usage: %1EXEC <script> [parameter list]").tqarg(commandChar)); } else { TQStringList parameterList = TQStringList::split(' ', parameter); - if(parameterList[0].find("../") == -1) + if(parameterList[0].tqfind("../") == -1) { emit launchScript(destination, parameter); } @@ -1067,7 +1067,7 @@ namespace Konversation } else { - result = usage(i18n("Usage: %1RAW [OPEN | CLOSE]").arg(commandChar)); + result = usage(i18n("Usage: %1RAW [OPEN | CLOSE]").tqarg(commandChar)); } return result; @@ -1110,7 +1110,7 @@ namespace Konversation if(list.isEmpty()) result.output = i18n("Current notify list is empty."); else - result.output = i18n("Current notify list: %1").arg(list); + result.output = i18n("Current notify list: %1").tqarg(list); result.type = Program; return result; @@ -1175,7 +1175,7 @@ namespace Konversation parameterList.pop_front(); } - // look for channel / ban mask + // look for channel / ban tqmask if (parameterList.count()) { // user specified channel @@ -1191,9 +1191,9 @@ namespace Konversation { // destination is no channel => error if (!kick) - result = error(i18n("%1BAN without channel name works only from inside a channel.").arg(commandChar)); + result = error(i18n("%1BAN without channel name works only from inside a channel.").tqarg(commandChar)); else - result = error(i18n("%1KICKBAN without channel name works only from inside a channel.").arg(commandChar)); + result = error(i18n("%1KICKBAN without channel name works only from inside a channel.").tqarg(commandChar)); // no usage information after error showUsage = false; @@ -1226,19 +1226,19 @@ namespace Konversation if (showUsage) { if (!kick) - result = usage(i18n("Usage: %1BAN [-HOST | -DOMAIN | -USERHOST | -USERDOMAIN] [channel] <user|mask>").arg(commandChar)); + result = usage(i18n("Usage: %1BAN [-HOST | -DOMAIN | -USERHOST | -USERDOMAIN] [channel] <user|tqmask>").tqarg(commandChar)); else - result = usage(i18n("Usage: %1KICKBAN [-HOST | -DOMAIN | -USERHOST | -USERDOMAIN] [channel] <user|mask> [reason]").arg(commandChar)); + result = usage(i18n("Usage: %1KICKBAN [-HOST | -DOMAIN | -USERHOST | -USERDOMAIN] [channel] <user|tqmask> [reason]").tqarg(commandChar)); } return result; } // finally set the ban - OutputFilterResult OutputFilter::execBan(const TQString& mask,const TQString& channel) + OutputFilterResult OutputFilter::execBan(const TQString& tqmask,const TQString& channel) { OutputFilterResult result; - result.toServer = "MODE " + channel + " +b " + mask; + result.toServer = "MODE " + channel + " +b " + tqmask; return result; } @@ -1252,7 +1252,7 @@ namespace Konversation { TQStringList parameterList = TQStringList::split(' ', parameter); TQString channel; - TQString mask; + TQString tqmask; // if the user specified a channel if(isAChannel(parameterList[0])) @@ -1268,11 +1268,11 @@ namespace Konversation else { // destination is no channel => error - result = error(i18n("%1UNBAN without channel name works only from inside a channel.").arg(commandChar)); + result = error(i18n("%1UNBAN without channel name works only from inside a channel.").tqarg(commandChar)); // no usage information after error showUsage = false; } - // if all went good, signal server to unban this mask + // if all went good, signal server to unban this tqmask if(!channel.isEmpty()) { emit unbanUsers(parameterList[0], channel); @@ -1283,16 +1283,16 @@ namespace Konversation if(showUsage) { - result = usage(i18n("Usage: %1UNBAN [channel] pattern").arg(commandChar)); + result = usage(i18n("Usage: %1UNBAN [channel] pattern").tqarg(commandChar)); } return result; } - OutputFilterResult OutputFilter::execUnban(const TQString& mask,const TQString& channel) + OutputFilterResult OutputFilter::execUnban(const TQString& tqmask,const TQString& channel) { OutputFilterResult result; - result.toServer = "MODE " + channel + " -b " + mask; + result.toServer = "MODE " + channel + " -b " + tqmask; return result; } @@ -1323,7 +1323,7 @@ namespace Konversation { for(unsigned int index=0;index<parameterList.count();index++) { - if(!parameterList[index].contains('!')) + if(!parameterList[index].tqcontains('!')) { parameterList[index] += "!*"; } @@ -1331,7 +1331,7 @@ namespace Konversation Preferences::addIgnore(parameterList[index] + ',' + TQString::number(value)); } - result.output = i18n("Added %1 to your ignore list.").arg(parameterList.join(", ")); + result.output = i18n("Added %1 to your ignore list.").tqarg(parameterList.join(", ")); result.typeString = i18n("Ignore"); result.type = Program; @@ -1342,7 +1342,7 @@ namespace Konversation if(showUsage) { - result = usage(i18n("Usage: %1IGNORE [ -ALL ] <user 1> <user 2> ... <user n>").arg(commandChar)); + result = usage(i18n("Usage: %1IGNORE [ -ALL ] <user 1> <user 2> ... <user n>").tqarg(commandChar)); } return result; @@ -1354,7 +1354,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1UNIGNORE <user 1> <user 2> ... <user n>").arg(commandChar)); + result = usage(i18n("Usage: %1UNIGNORE <user 1> <user 2> ... <user n>").tqarg(commandChar)); } else { @@ -1368,7 +1368,7 @@ namespace Konversation for (TQStringList::Iterator it = unignoreList.begin(); it != unignoreList.end(); ++it) { // If pattern looks incomplete, try to complete it - if (!(*it).contains('!')) + if (!(*it).tqcontains('!')) { TQString fixedPattern = (*it); fixedPattern += "!*"; @@ -1404,19 +1404,19 @@ namespace Konversation // Print all successful unignores, in case there were any if (succeeded.count()>=1) { - m_server->appendMessageToFrontmost(i18n("Ignore"),i18n("Removed %1 from your ignore list.").arg(succeeded.join(", "))); + m_server->appendMessageToFrontmost(i18n("Ignore"),i18n("Removed %1 from your ignore list.").tqarg(succeeded.join(", "))); } // One failed unignore if (failed.count()==1) { - m_server->appendMessageToFrontmost(i18n("Error"),i18n("No such ignore: %1").arg(failed.join(", "))); + m_server->appendMessageToFrontmost(i18n("Error"),i18n("No such ignore: %1").tqarg(failed.join(", "))); } // Multiple failed unignores if (failed.count()>1) { - m_server->appendMessageToFrontmost(i18n("Error"),i18n("No such ignores: %1").arg(failed.join(", "))); + m_server->appendMessageToFrontmost(i18n("Error"),i18n("No such ignores: %1").tqarg(failed.join(", "))); } } @@ -1429,7 +1429,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1QUOTE command list").arg(commandChar)); + result = usage(i18n("Usage: %1TQUOTE command list").tqarg(commandChar)); } else { @@ -1445,7 +1445,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1SAY text").arg(commandChar)); + result = usage(i18n("Usage: %1SAY text").tqarg(commandChar)); } else { @@ -1471,7 +1471,7 @@ namespace Konversation { Q_ASSERT(m_server); // XXX if we ever see the assert, we need the ternary - return m_server? m_server->isAChannel(check) : TQString("#&").contains(check.at(0)); + return m_server? m_server->isAChannel(check) : TQString("#&").tqcontains(check.at(0)); } OutputFilterResult OutputFilter::usage(const TQString& string) @@ -1507,7 +1507,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1AME text").arg(commandChar)); + result = usage(i18n("Usage: %1AME text").tqarg(commandChar)); } emit multiServerCommand("me", parameter); @@ -1520,7 +1520,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1AMSG text").arg(commandChar)); + result = usage(i18n("Usage: %1AMSG text").tqarg(commandChar)); } emit multiServerCommand("msg", parameter); @@ -1542,7 +1542,7 @@ namespace Konversation emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1], splitted[2]); else if (splitted.count() == 2) { - if (splitted[0].contains(TQRegExp(":[0-9]+$"))) + if (splitted[0].tqcontains(TQRegExp(":[0-9]+$"))) emit connectTo(Konversation::CreateNewConnection, splitted[0], "", splitted[1]); else emit connectTo(Konversation::CreateNewConnection, splitted[0], splitted[1]); @@ -1562,7 +1562,7 @@ namespace Konversation } else { - result = usage(i18n("Usage: %1OMSG text").arg(commandChar)); + result = usage(i18n("Usage: %1OMSG text").tqarg(commandChar)); } return result; @@ -1577,11 +1577,11 @@ namespace Konversation result.toServer = "NOTICE @"+destination+" :"+parameter; result.typeString = i18n("Notice"); result.type = Program; - result.output = i18n("Sending notice \"%1\" to %2.").arg(parameter, destination); + result.output = i18n("Sending notice \"%1\" to %2.").tqarg(parameter, destination); } else { - result = usage(i18n("Usage: %1ONOTICE text").arg(commandChar)); + result = usage(i18n("Usage: %1ONOTICE text").tqarg(commandChar)); } return result; @@ -1594,7 +1594,7 @@ namespace Konversation if (charset.isEmpty ()) { result = info (i18n("Current encoding is: %1") - .arg(m_server->getIdentity()->getCodec()->name())); + .tqarg(m_server->getIdentity()->getCodec()->name())); return result; } @@ -1604,7 +1604,7 @@ namespace Konversation { m_server->getIdentity()->setCodecName(shortName); emit encodingChanged(); - result = info (i18n("Switched to %1 encoding.").arg(shortName)); + result = info (i18n("Switched to %1 encoding.").tqarg(shortName)); } else { @@ -1620,7 +1620,7 @@ namespace Konversation TQStringList parms = TQStringList::split(" ", parameter); if (parms.count() == (0 >> parms.count() > 2)) - return usage(i18n("Usage: %1setkey [<nick|channel>] <key> sets the encryption key for nick or channel. %2setkey <key> when in a channel or query tab to set the key for it.").arg(commandChar).arg(commandChar) ); + return usage(i18n("Usage: %1setkey [<nick|channel>] <key> sets the encryption key for nick or channel. %2setkey <key> when in a channel or query tab to set the key for it.").tqarg(commandChar).tqarg(commandChar) ); else if (parms.count() == 1) parms.prepend(destination); @@ -1631,15 +1631,15 @@ namespace Konversation else if (m_server->getQueryByName(parms[0])) m_server->getQueryByName(parms[0])->setEncryptedOutput(true); - return info(i18n("The key for %1 has been set.").arg(parms[0])); + return info(i18n("The key for %1 has been set.").tqarg(parms[0])); } OutputFilterResult OutputFilter::parseDelKey(const TQString& prametr) { TQString parameter(prametr.isEmpty()?destination:prametr); - if(parameter.isEmpty() || parameter.contains(' ')) - return usage(i18n("Usage: %1delkey <nick> or <channel> deletes the encryption key for nick or channel").arg(commandChar)); + if(parameter.isEmpty() || parameter.tqcontains(' ')) + return usage(i18n("Usage: %1delkey <nick> or <channel> deletes the encryption key for nick or channel").tqarg(commandChar)); m_server->setKeyForRecipient(parameter, ""); @@ -1648,7 +1648,7 @@ namespace Konversation else if (m_server->getQueryByName(parameter)) m_server->getQueryByName(parameter)->setEncryptedOutput(false); - return info(i18n("The key for %1 has been deleted.").arg(parameter)); + return info(i18n("The key for %1 has been deleted.").tqarg(parameter)); } OutputFilterResult OutputFilter::parseShowKey(const TQString& prametr) @@ -1657,9 +1657,9 @@ namespace Konversation TQString key(m_server->getKeyForRecipient(parameter)); TQWidget *mw=KonversationApplication::instance()->getMainWindow(); if (!key.isEmpty()) - KMessageBox::information(mw, i18n("The key for %1 is \"%2\".").arg(parameter).arg(key), i18n("Blowfish")); + KMessageBox::information(mw, i18n("The key for %1 is \"%2\".").tqarg(parameter).tqarg(key), i18n("Blowfish")); else - KMessageBox::information(mw, i18n("No key has been set for %1.").arg(parameter)); + KMessageBox::information(mw, i18n("No key has been set for %1.").tqarg(parameter)); OutputFilterResult result; return result; } @@ -1679,7 +1679,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1DNS <nick>").arg(commandChar)); + result = usage(i18n("Usage: %1DNS <nick>").tqarg(commandChar)); } else { @@ -1702,12 +1702,12 @@ namespace Konversation if (KNetwork::KReverseResolver::resolve(socketAddress,resolvedTarget,serv)) { result.typeString = i18n("DNS"); - result.output = i18n("Resolved %1 to: %2").arg(target).arg(resolvedTarget); + result.output = i18n("Resolved %1 to: %2").tqarg(target).tqarg(resolvedTarget); result.type = Program; } else { - result = error(i18n("Unable to resolve %1").arg(target)); + result = error(i18n("Unable to resolve %1").tqarg(target)); } #else result = error(i18n("Reverse-resolving requires KDE version 3.5.1 or higher.")); @@ -1717,19 +1717,19 @@ namespace Konversation // FIXME: The reason we detect the host by occurrence of a dot is the large penalty // we would incur by using inputfilter to find out if there's a user==target on the // server - once we have a better API for this, switch to it. - else if (target.contains('.')) + else if (target.tqcontains('.')) { KNetwork::KResolverResults resolved = KNetwork::KResolver::resolve(target,""); if(resolved.error() == KResolver::NoError && resolved.size() > 0) { TQString resolvedTarget = resolved.first().address().nodeName(); result.typeString = i18n("DNS"); - result.output = i18n("Resolved %1 to: %2").arg(target).arg(resolvedTarget); + result.output = i18n("Resolved %1 to: %2").tqarg(target).tqarg(resolvedTarget); result.type = Program; } else { - result = error(i18n("Unable to resolve %1").arg(target)); + result = error(i18n("Unable to resolve %1").tqarg(target)); } } // Parameter is either host nor IP, so request a lookup from server, which in @@ -1773,7 +1773,7 @@ namespace Konversation if(parameter.isEmpty()) { - result = usage(i18n("Usage: %1KILL <nick> [comment]").arg(commandChar)); + result = usage(i18n("Usage: %1KILL <nick> [comment]").tqarg(commandChar)); } else { @@ -1786,5 +1786,5 @@ namespace Konversation } #include "outputfilter.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/outputfilter.h b/konversation/src/outputfilter.h index 4ff1518..81397b4 100644 --- a/konversation/src/outputfilter.h +++ b/konversation/src/outputfilter.h @@ -49,9 +49,10 @@ namespace Konversation MessageType type; }; - class OutputFilter : public QObject + class OutputFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: explicit OutputFilter(Server* server); @@ -86,7 +87,7 @@ namespace Konversation void sendToAllChannels(const TQString& text); void launchScript(const TQString& target, const TQString& parameter); void banUsers(const TQStringList& userList,const TQString& channel,const TQString& option); - void unbanUsers(const TQString& mask,const TQString& channel); + void unbanUsers(const TQString& tqmask,const TQString& channel); void multiServerCommand(const TQString& command, const TQString& parameter); void reconnectServer(); void disconnectServer(); @@ -106,8 +107,8 @@ namespace Konversation public slots: void setCommandChar(); - OutputFilterResult execBan(const TQString& mask,const TQString& channels); - OutputFilterResult execUnban(const TQString& mask,const TQString& channels); + OutputFilterResult execBan(const TQString& tqmask,const TQString& channels); + OutputFilterResult execUnban(const TQString& tqmask,const TQString& channels); protected: OutputFilterResult parseMsg(const TQString& myNick,const TQString& parameter, bool focusQueryWindow); diff --git a/konversation/src/query.cpp b/konversation/src/query.cpp index 9801de2..e5ae865 100644 --- a/konversation/src/query.cpp +++ b/konversation/src/query.cpp @@ -41,7 +41,7 @@ #include <kpopupmenu.h> -Query::Query(TQWidget* parent, TQString _name) : ChatWindow(parent) +Query::Query(TQWidget* tqparent, TQString _name) : ChatWindow(tqparent) { name=_name; // need the name a little bit earlier for setServer // don't setName here! It will break logfiles! @@ -57,18 +57,18 @@ Query::Query(TQWidget* parent, TQString _name) : ChatWindow(parent) awayState=false; TQHBox *box = new TQHBox(m_headerSplitter); addresseeimage = new TQLabel(box, "query_image"); - addresseeimage->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + addresseeimage->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); addresseeimage->hide(); addresseelogoimage = new TQLabel(box, "query_logo_image"); - addresseelogoimage->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + addresseelogoimage->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); addresseelogoimage->hide(); - queryHostmask=new Konversation::TopicLabel(box, "query_hostmask"); + queryHosttqmask=new Konversation::TopicLabel(box, "query_hosttqmask"); - TQString whatsthis = i18n("<qt>Some details of the person you are talking to in this query is shown in this bar. The full name and hostmask is shown, along with any image or logo this person has associated with them in the KDE Addressbook.<p>See the <i>Konversation Handbook</i> for information on associating a nick with a contact in the Addressbook, and for an explanation of what the hostmask is.</qt>"); + TQString whatsthis = i18n("<qt>Some details of the person you are talking to in this query is shown in this bar. The full name and hosttqmask is shown, along with any image or logo this person has associated with them in the KDE Addressbook.<p>See the <i>Konversation Handbook</i> for information on associating a nick with a contact in the Addressbook, and for an explanation of what the hosttqmask is.</qt>"); TQWhatsThis::add(addresseeimage, whatsthis); TQWhatsThis::add(addresseelogoimage, whatsthis); - TQWhatsThis::add(queryHostmask, whatsthis); + TQWhatsThis::add(queryHosttqmask, whatsthis); IRCViewBox* ircBox = new IRCViewBox(m_headerSplitter,0); setTextView(ircBox->ircView()); // Server will be set later in setServer(); @@ -136,7 +136,7 @@ void Query::setServer(Server* newServer) ChatWindow::setServer(newServer); - if (newServer->getKeyForRecipient(getName())) + if (!newServer->getKeyForRecipient(getName()).isNull()) blowfishLabel->show(); } @@ -174,7 +174,7 @@ void Query::setName(const TQString& newName) if(Preferences::addHostnameToLog()) { if(m_nickInfo) - logName += m_nickInfo->getHostmask(); + logName += m_nickInfo->getHosttqmask(); } setLogfileName(logName); @@ -284,8 +284,8 @@ void Query::updateAppearance() } else { - fg=colorGroup().foreground(); - bg=colorGroup().base(); + fg=tqcolorGroup().foreground(); + bg=tqcolorGroup().base(); } queryInput->unsetPalette(); @@ -353,7 +353,7 @@ void Query::indicateAway(bool show) } } -// fix QTs broken behavior on hidden TQListView pages +// fix TQTs broken behavior on hidden TQListView pages void Query::showEvent(TQShowEvent*) { if(awayChanged) @@ -365,7 +365,7 @@ void Query::showEvent(TQShowEvent*) if(m_initialShow) { m_initialShow = false; TQValueList<int> sizes; - sizes << queryHostmask->sizeHint().height() << (height() - queryHostmask->sizeHint().height()); + sizes << queryHosttqmask->tqsizeHint().height() << (height() - queryHosttqmask->tqsizeHint().height()); m_headerSplitter->setSizes(sizes); } } @@ -385,7 +385,7 @@ void Query::popup(int id) case Konversation::IgnoreNick: { - if (KMessageBox::warningContinueCancel(this, i18n("Do you want to ignore %1?").arg(name), + if (KMessageBox::warningContinueCancel(this, i18n("Do you want to ignore %1?").tqarg(name), i18n("Ignore"), i18n("Ignore"), "IgnoreNick") == KMessageBox::Continue) { sendQueryText(Preferences::commandChar()+"IGNORE -ALL "+name); @@ -405,7 +405,7 @@ void Query::popup(int id) } case Konversation::UnignoreNick: { - TQString question = i18n("Do you want to stop ignoring %1?").arg(name); + TQString question = i18n("Do you want to stop ignoring %1?").tqarg(name); if (KMessageBox::warningContinueCancel(this, question, i18n("Unignore"), i18n("Unignore"), "UnignoreNick") == KMessageBox::Continue) @@ -483,17 +483,17 @@ void Query::nickInfoChanged() { setName(m_nickInfo->getNickname()); TQString text = m_nickInfo->getBestAddresseeName(); - if(!m_nickInfo->getHostmask().isEmpty() && !text.isEmpty()) + if(!m_nickInfo->getHosttqmask().isEmpty() && !text.isEmpty()) text += " - "; - text += m_nickInfo->getHostmask(); + text += m_nickInfo->getHosttqmask(); if(m_nickInfo->isAway() && !m_nickInfo->getAwayMessage().isEmpty()) text += " (" + KStringHandler::rsqueeze(m_nickInfo->getAwayMessage(),100) + ") "; - queryHostmask->setText(Konversation::removeIrcMarkup(text)); + queryHosttqmask->setText(Konversation::removeIrcMarkup(text)); KABC::Picture pic = m_nickInfo->getAddressee().photo(); if(pic.isIntern()) { - TQPixmap qpixmap(pic.data().scaleHeight(queryHostmask->height())); + TQPixmap qpixmap(pic.data().scaleHeight(queryHosttqmask->height())); if(!qpixmap.isNull()) { addresseeimage->setPixmap(qpixmap); @@ -511,7 +511,7 @@ void Query::nickInfoChanged() KABC::Picture logo = m_nickInfo->getAddressee().logo(); if(logo.isIntern()) { - TQPixmap qpixmap(logo.data().scaleHeight(queryHostmask->height())); + TQPixmap qpixmap(logo.data().scaleHeight(queryHosttqmask->height())); if(!qpixmap.isNull()) { addresseelogoimage->setPixmap(qpixmap); @@ -537,7 +537,7 @@ void Query::nickInfoChanged() m_nickInfo->tooltipTableData(tooltip); tooltip << "</table></qt>"; - TQToolTip::add(queryHostmask, strTooltip); + TQToolTip::add(queryHosttqmask, strTooltip); TQToolTip::add(addresseeimage, strTooltip); TQToolTip::add(addresseelogoimage, strTooltip); @@ -590,14 +590,14 @@ TQString Query::getChannelEncoding() // virtual TQString Query::getChannelEncodingDefaultDesc() // virtual { - return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName()); + return i18n("Identity Default ( %1 )").tqarg(getServer()->getIdentity()->getCodecName()); } bool Query::closeYourself(bool confirm) { int result = KMessageBox::Continue; if (confirm) - result=KMessageBox::warningContinueCancel(this, i18n("Do you want to close your query with %1?").arg(getName()), i18n("Close Query"), i18n("Close"), "QuitQueryTab"); + result=KMessageBox::warningContinueCancel(this, i18n("Do you want to close your query with %1?").tqarg(getName()), i18n("Close Query"), i18n("Close"), "QuitQueryTab"); if (result == KMessageBox::Continue) { @@ -659,14 +659,14 @@ void Query::quitNick(const TQString& reason) if (displayReason.isEmpty()) { - appendCommandMessage(i18n("Quit"),i18n("%1 has left this server.").arg(getName()),false); + appendCommandMessage(i18n("Quit"),i18n("%1 has left this server.").tqarg(getName()),false); } else { - if (displayReason.find(TQRegExp("[\\0000-\\0037]"))!=-1) + if (displayReason.tqfind(TQRegExp("[\\0000-\\0037]"))!=-1) displayReason+="\017"; - appendCommandMessage(i18n("Quit"),i18n("%1 has left this server (%2).").arg(getName()).arg(displayReason),false); + appendCommandMessage(i18n("Quit"),i18n("%1 has left this server (%2).").tqarg(getName()).tqarg(displayReason),false); } } diff --git a/konversation/src/query.h b/konversation/src/query.h index af28087..67193a9 100644 --- a/konversation/src/query.h +++ b/konversation/src/query.h @@ -10,8 +10,8 @@ Copyright (C) 2005-2008 Eike Hein <hein@kde.org> */ -#ifndef QUERY_H -#define QUERY_H +#ifndef TQUERY_H +#define TQUERY_H #include "chatwindow.h" #include "nickinfo.h" @@ -35,9 +35,10 @@ namespace Konversation { class Query : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit Query(TQWidget* parent, TQString name); + explicit Query(TQWidget* tqparent, TQString name); virtual void setServer(Server* newServer); ~Query(); @@ -105,7 +106,7 @@ class Query : public ChatWindow TQString buffer; TQSplitter* m_headerSplitter; - Konversation::TopicLabel* queryHostmask; + Konversation::TopicLabel* queryHosttqmask; TQLabel* addresseeimage; TQLabel* addresseelogoimage; TQLabel* awayLabel; diff --git a/konversation/src/queuetuner.cpp b/konversation/src/queuetuner.cpp index 6f12646..d999041 100644 --- a/konversation/src/queuetuner.cpp +++ b/konversation/src/queuetuner.cpp @@ -31,8 +31,8 @@ #include <klocale.h> -QueueTuner::QueueTuner(TQWidget* parent, ViewContainer *container) -: QueueTunerBase(parent), m_server(0), m_timer(this, "qTuner"), +QueueTuner::QueueTuner(TQWidget* tqparent, ViewContainer *container) +: QueueTunerBase(tqparent), m_server(0), m_timer(this, "qTuner"), m_vis(Preferences::self()->showQueueTunerItem()->value()) { m_closeButton->setIconSet(kapp->iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, 16)); @@ -243,7 +243,7 @@ void QueueTuner::contextMenuEvent(TQContextMenuEvent* e) { TQString question(i18n("This cannot be undone, are you sure you wish to reset to default values?")); - int x = KMessageBox::warningContinueCancel(this, question, i18n("Reset Values"), KStdGuiItem::reset(), TQString::null, KMessageBox::Dangerous); + int x = KMessageBox::warningContinueCancel(this, question, i18n("Reset Values"), KStdGuiItem::reset(), TQString(), KMessageBox::Dangerous); if ( x == KMessageBox::Continue) { Server::_resetRates(); diff --git a/konversation/src/queuetuner.h b/konversation/src/queuetuner.h index c64c0be..5c5ae6e 100644 --- a/konversation/src/queuetuner.h +++ b/konversation/src/queuetuner.h @@ -10,8 +10,8 @@ */ -#ifndef QUEUETUNER_H -#define QUEUETUNER_H +#ifndef TQUEUETUNER_H +#define TQUEUETUNER_H #include "queuetunerbase.h" @@ -24,9 +24,10 @@ class TQTimer; class QueueTuner: public QueueTunerBase { Q_OBJECT + TQ_OBJECT public: - QueueTuner(TQWidget* parent, ViewContainer *container); + QueueTuner(TQWidget* tqparent, ViewContainer *container); ~QueueTuner(); virtual void contextMenuEvent (TQContextMenuEvent*); diff --git a/konversation/src/queuetunerbase.ui b/konversation/src/queuetunerbase.ui index f11a117..d3fb1b3 100644 --- a/konversation/src/queuetunerbase.ui +++ b/konversation/src/queuetunerbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>QueueTunerBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>QueueTunerBase</cstring> </property> @@ -30,9 +30,9 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout92</cstring> + <cstring>tqlayout92</cstring> </property> <vbox> <property name="name"> @@ -54,14 +54,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>34</height> </size> </property> </spacer> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_closeButton</cstring> </property> @@ -96,7 +96,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>33</height> @@ -105,7 +105,7 @@ </spacer> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_slowBox</cstring> </property> @@ -130,9 +130,9 @@ <property name="margin"> <number>5</number> </property> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout164</cstring> + <cstring>tqlayout164</cstring> </property> <hbox> <property name="name"> @@ -144,7 +144,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_slowRate</cstring> </property> @@ -155,7 +155,7 @@ <number>999</number> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Lines</string> @@ -173,7 +173,7 @@ <bool>false</bool> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_slowInterval</cstring> </property> @@ -183,9 +183,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout242</cstring> + <cstring>tqlayout242</cstring> </property> <grid> <property name="name"> @@ -197,7 +197,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="1" column="1" rowspan="2" colspan="1"> + <widget class="TQLabel" row="1" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>m_slowAge</cstring> </property> @@ -208,7 +208,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_slowCount</cstring> </property> @@ -219,7 +219,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_textLabel3_2</cstring> </property> @@ -227,7 +227,7 @@ <string>Age:</string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1"> + <widget class="TQLabel" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>m_textLabel3</cstring> </property> @@ -237,9 +237,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout236_2_2</cstring> + <cstring>tqlayout236_2_2</cstring> </property> <grid> <property name="name"> @@ -251,7 +251,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2_2</cstring> </property> @@ -259,7 +259,7 @@ <string>Lines:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5_2_2</cstring> </property> @@ -267,7 +267,7 @@ <string>Bytes:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_slowLines</cstring> </property> @@ -275,7 +275,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_slowBytes</cstring> </property> @@ -287,7 +287,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_normalBox</cstring> </property> @@ -312,9 +312,9 @@ <property name="margin"> <number>5</number> </property> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout163</cstring> + <cstring>tqlayout163</cstring> </property> <hbox> <property name="name"> @@ -326,7 +326,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_normalRate</cstring> </property> @@ -337,7 +337,7 @@ <number>999</number> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Lines</string> @@ -355,7 +355,7 @@ <bool>false</bool> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_normalInterval</cstring> </property> @@ -365,9 +365,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout236_2</cstring> + <cstring>tqlayout236_2</cstring> </property> <grid> <property name="name"> @@ -379,7 +379,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -387,7 +387,7 @@ <string>Lines:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -395,7 +395,7 @@ <string>Bytes:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_normalLines</cstring> </property> @@ -403,7 +403,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_normalBytes</cstring> </property> @@ -413,9 +413,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout240</cstring> + <cstring>tqlayout240</cstring> </property> <grid> <property name="name"> @@ -427,7 +427,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_textLabel3_4</cstring> </property> @@ -435,7 +435,7 @@ <string>Count:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_normalAge</cstring> </property> @@ -446,7 +446,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_normalCount</cstring> </property> @@ -457,7 +457,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_textLabel3_2_3</cstring> </property> @@ -469,7 +469,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_fastBox</cstring> </property> @@ -494,9 +494,9 @@ <property name="margin"> <number>5</number> </property> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout161</cstring> + <cstring>tqlayout161</cstring> </property> <hbox> <property name="name"> @@ -508,7 +508,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_fastRate</cstring> </property> @@ -516,7 +516,7 @@ <number>999</number> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Lines</string> @@ -534,7 +534,7 @@ <bool>false</bool> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_fastInterval</cstring> </property> @@ -550,9 +550,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout237</cstring> + <cstring>tqlayout237</cstring> </property> <grid> <property name="name"> @@ -564,7 +564,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_textLabel3_2_3_2</cstring> </property> @@ -572,7 +572,7 @@ <string>Age:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_fastAge</cstring> </property> @@ -583,7 +583,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_fastCount</cstring> </property> @@ -594,7 +594,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_textLabel3_4_2</cstring> </property> @@ -604,9 +604,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout236</cstring> + <cstring>tqlayout236</cstring> </property> <grid> <property name="name"> @@ -618,7 +618,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -626,7 +626,7 @@ <string>Lines:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -634,7 +634,7 @@ <string>Bytes:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_fastLines</cstring> </property> @@ -642,7 +642,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_fastBytes</cstring> </property> @@ -654,7 +654,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_globalBox</cstring> </property> @@ -679,9 +679,9 @@ <property name="margin"> <number>5</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout88</cstring> + <cstring>tqlayout88</cstring> </property> <grid> <property name="name"> @@ -693,7 +693,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel13</cstring> </property> @@ -701,7 +701,7 @@ <string>Received:</string> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_recvBytes</cstring> </property> @@ -709,7 +709,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_globalLines</cstring> </property> @@ -717,7 +717,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -725,7 +725,7 @@ <string>Bytes (Raw):</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4_3</cstring> </property> @@ -733,7 +733,7 @@ <string>Bytes (Encoded):</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_globalBytes</cstring> </property> @@ -741,7 +741,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_srverBytes</cstring> </property> @@ -749,7 +749,7 @@ <string>888</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -763,5 +763,5 @@ </widget> </hbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/konversation/src/quickbutton.cpp b/konversation/src/quickbutton.cpp index b69bc07..3439e8c 100644 --- a/konversation/src/quickbutton.cpp +++ b/konversation/src/quickbutton.cpp @@ -14,8 +14,8 @@ #include "quickbutton.h" -QuickButton::QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* parent) : -TQPushButton::TQPushButton(label,parent) +QuickButton::QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* tqparent) : +TQPushButton::TQPushButton(label,tqparent) { setDefinition(newDefinition); connect(this,TQT_SIGNAL (clicked()),this,TQT_SLOT (wasClicked()) ); diff --git a/konversation/src/quickbutton.h b/konversation/src/quickbutton.h index 7b1373b..e8a7b3d 100644 --- a/konversation/src/quickbutton.h +++ b/konversation/src/quickbutton.h @@ -11,18 +11,19 @@ email: eisfuchs@tigress.com */ -#ifndef QUICKBUTTON_H -#define QUICKBUTTON_H +#ifndef TQUICKBUTTON_H +#define TQUICKBUTTON_H #include <tqpushbutton.h> -class QuickButton : public QPushButton +class QuickButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* parent); + QuickButton(const TQString &label,const TQString &newDefinition,TQWidget* tqparent); ~QuickButton(); void setDefinition(const TQString &newDefinition); diff --git a/konversation/src/quickbuttons_preferences.cpp b/konversation/src/quickbuttons_preferences.cpp index 564e1ee..59163e5 100644 --- a/konversation/src/quickbuttons_preferences.cpp +++ b/konversation/src/quickbuttons_preferences.cpp @@ -25,8 +25,8 @@ #include <klistview.h> -QuickButtons_Config::QuickButtons_Config(TQWidget* parent, const char* name) - : QuickButtons_ConfigUI(parent, name) +QuickButtons_Config::QuickButtons_Config(TQWidget* tqparent, const char* name) + : QuickButtons_ConfigUI(tqparent, name) { // reset flag to defined state (used to block signals when just selecting a new item) m_newItemSelected=false; @@ -98,7 +98,7 @@ void QuickButtons_Config::saveSettings() for(unsigned int index=0;index<newList.count();index++) { // write the current button's name and definition - config->writeEntry(TQString("Button%1").arg(index),newList[index]); + config->writeEntry(TQString("Button%1").tqarg(index),newList[index]); } // for } // if there were no buttons at all, write a dummy entry to prevent KConfigXT from "optimizing" diff --git a/konversation/src/quickbuttons_preferences.h b/konversation/src/quickbuttons_preferences.h index 8ee4600..141179c 100644 --- a/konversation/src/quickbuttons_preferences.h +++ b/konversation/src/quickbuttons_preferences.h @@ -10,8 +10,8 @@ Copyright (C) 2006 John Tapsell <johnflux@gmail.com> */ -#ifndef QUICKBUTTONSCONFIG_H -#define QUICKBUTTONSCONFIG_H +#ifndef TQUICKBUTTONSCONFIG_H +#define TQUICKBUTTONSCONFIG_H #include "quickbuttons_preferencesui.h" #include "konvisettingspage.h" @@ -20,9 +20,10 @@ class QuickButtons_Config : public QuickButtons_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit QuickButtons_Config(TQWidget* parent, const char* name=NULL); + explicit QuickButtons_Config(TQWidget* tqparent, const char* name=NULL); ~QuickButtons_Config(); virtual void saveSettings(); diff --git a/konversation/src/quickbuttons_preferencesui.ui b/konversation/src/quickbuttons_preferencesui.ui index 64377dd..77fe401 100644 --- a/konversation/src/quickbuttons_preferencesui.ui +++ b/konversation/src/quickbuttons_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>QuickButtons_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>QuickButtons_ConfigUI</cstring> </property> @@ -61,9 +61,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -101,7 +101,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>actionLabel</cstring> </property> @@ -112,7 +112,7 @@ <string>Button action:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>nameLabel</cstring> </property> @@ -125,7 +125,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -136,7 +136,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>placeholderHelpLabel</cstring> </property> @@ -159,15 +159,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="3" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="3" colspan="1"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>newButton</cstring> </property> @@ -175,7 +175,7 @@ <string>New</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeButton</cstring> </property> @@ -193,7 +193,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>230</height> @@ -213,7 +213,7 @@ <tabstop>newButton</tabstop> <tabstop>removeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> <includehint>klineedit.h</includehint> diff --git a/konversation/src/quickconnectdialog.cpp b/konversation/src/quickconnectdialog.cpp index 0d86fcc..20f9819 100644 --- a/konversation/src/quickconnectdialog.cpp +++ b/konversation/src/quickconnectdialog.cpp @@ -24,16 +24,16 @@ #include <klocale.h> -QuickConnectDialog::QuickConnectDialog(TQWidget *parent) -:KDialogBase(parent, "quickconnect", true, i18n("Quick Connect"), +QuickConnectDialog::QuickConnectDialog(TQWidget *tqparent) +:KDialogBase(tqparent, "quickconnect", true, i18n("Quick Connect"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) { TQWidget* page = new TQWidget(this); setMainWidget(page); - TQGridLayout* layout = new TQGridLayout(page, 2, 4); - layout->setSpacing(spacingHint()); - layout->setColStretch(1, 10); + TQGridLayout* tqlayout = new TQGridLayout(page, 2, 4); + tqlayout->setSpacing(spacingHint()); + tqlayout->setColStretch(1, 10); TQLabel* hostNameLabel = new TQLabel(i18n("&Server host:"), page); TQString hostNameWT = i18n("Enter the host of the network here."); @@ -66,17 +66,17 @@ KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true) sslCheckBox = new TQCheckBox(page, "sslCheckBox"); sslCheckBox->setText(i18n("&Use SSL")); - layout->addWidget(hostNameLabel, 0, 0); - layout->addWidget(hostNameInput, 0, 1); - layout->addWidget(portLabel, 0, 2); - layout->addWidget(portInput, 0, 3); + tqlayout->addWidget(hostNameLabel, 0, 0); + tqlayout->addWidget(hostNameInput, 0, 1); + tqlayout->addWidget(portLabel, 0, 2); + tqlayout->addWidget(portInput, 0, 3); - layout->addWidget(nickLabel, 1, 0); - layout->addWidget(nickInput, 1, 1); - layout->addWidget(passwordLabel, 1, 2); - layout->addWidget(passwordInput, 1, 3); + tqlayout->addWidget(nickLabel, 1, 0); + tqlayout->addWidget(nickInput, 1, 1); + tqlayout->addWidget(passwordLabel, 1, 2); + tqlayout->addWidget(passwordInput, 1, 3); - layout->addWidget(sslCheckBox, 2, 0); + tqlayout->addWidget(sslCheckBox, 2, 0); hostNameInput->setFocus(); diff --git a/konversation/src/quickconnectdialog.h b/konversation/src/quickconnectdialog.h index 7322854..bdcd1ef 100644 --- a/konversation/src/quickconnectdialog.h +++ b/konversation/src/quickconnectdialog.h @@ -12,8 +12,8 @@ email: mail@tuxipuxi.de */ -#ifndef QUICKCONNECTDIALOG_H -#define QUICKCONNECTDIALOG_H +#ifndef TQUICKCONNECTDIALOG_H +#define TQUICKCONNECTDIALOG_H #include "common.h" @@ -26,9 +26,10 @@ class KLineEdit; class QuickConnectDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit QuickConnectDialog(TQWidget* parent=0); + explicit QuickConnectDialog(TQWidget* tqparent=0); ~QuickConnectDialog(); signals: diff --git a/konversation/src/rawlog.cpp b/konversation/src/rawlog.cpp index bb3d65f..0d9db53 100644 --- a/konversation/src/rawlog.cpp +++ b/konversation/src/rawlog.cpp @@ -23,7 +23,7 @@ #include <kdebug.h> -RawLog::RawLog(TQWidget* parent) : ChatWindow(parent) +RawLog::RawLog(TQWidget* tqparent) : ChatWindow(tqparent) { setName(i18n("Raw Log")); setType(ChatWindow::RawLog); diff --git a/konversation/src/rawlog.h b/konversation/src/rawlog.h index 83ab545..cd2741e 100644 --- a/konversation/src/rawlog.h +++ b/konversation/src/rawlog.h @@ -21,9 +21,10 @@ class RawLog : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit RawLog(TQWidget* parent); + explicit RawLog(TQWidget* tqparent); ~RawLog(); virtual bool closeYourself(); diff --git a/konversation/src/scriptlauncher.h b/konversation/src/scriptlauncher.h index d52e222..e34ff04 100644 --- a/konversation/src/scriptlauncher.h +++ b/konversation/src/scriptlauncher.h @@ -18,9 +18,10 @@ class Server; -class ScriptLauncher : public QObject +class ScriptLauncher : public TQObject { Q_OBJECT + TQ_OBJECT public: explicit ScriptLauncher(Server* server); diff --git a/konversation/src/searchbar.cpp b/konversation/src/searchbar.cpp index cb54e3c..d531ea9 100644 --- a/konversation/src/searchbar.cpp +++ b/konversation/src/searchbar.cpp @@ -36,8 +36,8 @@ #define FROM_CURSOR_MENU 4 -SearchBar::SearchBar(TQWidget* parent) -: SearchBarBase(parent) +SearchBar::SearchBar(TQWidget* tqparent) +: SearchBarBase(tqparent) { m_searchFoward = false; m_matchCase = false; @@ -55,7 +55,7 @@ SearchBar::SearchBar(TQWidget* parent) m_timer = new TQTimer(this); TQAccel* accel = new TQAccel(this); - accel->connectItem( accel->insertItem(Qt::Key_Escape), this, TQT_SLOT(hide())); + accel->connectItem( accel->insertItem(TQt::Key_Escape), this, TQT_SLOT(hide())); connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotFind())); connect(m_searchEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged())); @@ -126,7 +126,7 @@ void SearchBar::slotFind() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(TQPixmap(), ""); + settqStatus(TQPixmap(), ""); return; } @@ -140,7 +140,7 @@ void SearchBar::slotFindNext() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(TQPixmap(), ""); + settqStatus(TQPixmap(), ""); return; } @@ -154,7 +154,7 @@ void SearchBar::slotFindPrevious() m_searchEdit->unsetPalette(); m_findNextButton->setEnabled(false); m_findPreviousButton->setEnabled(false); - setStatus(TQPixmap(), ""); + settqStatus(TQPixmap(), ""); return; } @@ -164,13 +164,13 @@ void SearchBar::slotFindPrevious() void SearchBar::setHasMatch(bool value) { TQPalette pal = m_searchEdit->palette(); - pal.setColor(TQPalette::Active, TQColorGroup::Base, value ? Qt::green : Qt::red); + pal.setColor(TQPalette::Active, TQColorGroup::Base, value ? TQt::green : TQt::red); m_searchEdit->setPalette(pal); m_findNextButton->setEnabled(value); m_findPreviousButton->setEnabled(value); } -void SearchBar::setStatus(const TQPixmap& pix, const TQString& text) +void SearchBar::settqStatus(const TQPixmap& pix, const TQString& text) { if(!text.isEmpty()) { m_statusPixLabel->show(); diff --git a/konversation/src/searchbar.h b/konversation/src/searchbar.h index 7818441..bc6d1e5 100644 --- a/konversation/src/searchbar.h +++ b/konversation/src/searchbar.h @@ -27,13 +27,14 @@ class TQPopupMenu; class SearchBar : public SearchBarBase { Q_OBJECT + TQ_OBJECT public: - explicit SearchBar(TQWidget* parent); + explicit SearchBar(TQWidget* tqparent); ~SearchBar(); void setHasMatch(bool value); - void setStatus(const TQPixmap& pix, const TQString& text); + void settqStatus(const TQPixmap& pix, const TQString& text); TQString pattern() const; diff --git a/konversation/src/searchbarbase.ui b/konversation/src/searchbarbase.ui index c86f6b1..f35ef94 100644 --- a/konversation/src/searchbarbase.ui +++ b/konversation/src/searchbarbase.ui @@ -5,7 +5,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. </comment> <author>Copyright (C) 2006 Peter Simonsson <psn@linux.se></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SearchBarBase</cstring> </property> @@ -21,7 +21,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_closeButton</cstring> </property> @@ -43,7 +43,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY <cstring>m_searchEdit</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_statusPixLabel</cstring> </property> @@ -59,7 +59,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_statusTextLabel</cstring> </property> @@ -100,7 +100,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY <bool>false</bool> </property> </widget> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_optionsButton</cstring> </property> @@ -121,8 +121,8 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="4"/> -<layoutfunctions spacing="KDialog::spacingHint"/> +<tqlayoutdefaults spacing="6" margin="4"/> +<tqlayoutfunctions spacing="KDialog::spacingHint"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/konversation/src/server.cpp b/konversation/src/server.cpp index 6477995..b582dee 100644 --- a/konversation/src/server.cpp +++ b/konversation/src/server.cpp @@ -64,7 +64,7 @@ int Server::m_availableConnectionId = 0; -Server::Server(TQObject* parent, ConnectionSettings& settings) : TQObject(parent) +Server::Server(TQObject* tqparent, ConnectionSettings& settings) : TQObject(tqparent) { m_connectionId = m_availableConnectionId; m_availableConnectionId++; @@ -99,7 +99,7 @@ Server::Server(TQObject* parent, ConnectionSettings& settings) : TQObject(parent m_encodedBytesSent=0; m_bytesSent=0; m_linesSent=0; - // TODO fold these into a QMAP, and these need to be reset to RFC values if this server object is reused. + // TODO fold these into a TQMAP, and these need to be reset to RFC values if this server object is reused. m_serverNickPrefixModes = "ovh"; m_serverNickPrefixes = "@+%"; m_channelPrefixes = "#&"; @@ -324,7 +324,7 @@ void Server::connectSignals() connect(&m_inputFilter, TQT_SIGNAL(addToChannelList(const TQString&, int, const TQString& )), this, TQT_SLOT(addToChannelList(const TQString&, int, const TQString& ))); - // Status View + // tqStatus View connect(this, TQT_SIGNAL(serverOnline(bool)), getStatusView(), TQT_SLOT(serverOnline(bool))); // Scripts @@ -413,8 +413,8 @@ void Server::connectToIRCServer() // set up the connection details setPrefixes(m_serverNickPrefixModes, m_serverNickPrefixes); getStatusView()->appendServerMessage(i18n("Info"),i18n("Looking for server %1:%2...") - .arg(getConnectionSettings().server().host()) - .arg(getConnectionSettings().server().port())); + .tqarg(getConnectionSettings().server().host()) + .tqarg(getConnectionSettings().server().port())); // reset InputFilter (auto request info, /WHO request info) m_inputFilter.reset(); } @@ -443,7 +443,7 @@ TQString Server::getChannelTypes() const // set user mode prefixes according to non-standard 005-Reply (see inputfilter.cpp) void Server::setPrefixes(const TQString &modes, const TQString& prefixes) { - // NOTE: serverModes is TQString::null, if server did not supply the + // NOTE: serverModes is TQString(), if server did not supply the // modes which relates to the network's nick-prefixes m_serverNickPrefixModes = modes; m_serverNickPrefixes = prefixes; @@ -463,7 +463,7 @@ bool& isOp,bool& isHalfop,bool& hasVoice) if (nickname.isEmpty()) return; - while ((modeIndex = m_serverNickPrefixes.find(nickname[0])) != -1) + while ((modeIndex = m_serverNickPrefixes.tqfind(nickname[0])) != -1) { if(nickname.isEmpty()) return; @@ -534,8 +534,8 @@ void Server::lookupFinished() { // inform user about the error getStatusView()->appendServerMessage(i18n("Error"),i18n("Server %1 not found: %2") - .arg(getConnectionSettings().server().host()) - .arg(m_socket->errorString(m_socket->error()))); + .tqarg(getConnectionSettings().server().host()) + .tqarg(m_socket->KSocketBase::errorString(m_socket->error()))); m_socket->resetStatus(); @@ -607,8 +607,8 @@ void Server::broken(int state) static_cast<KonversationApplication*>(kapp)->notificationHandler()->connectionFailure(getStatusView(), getServerName()); TQString error = i18n("Connection to Server %1 lost: %2.") - .arg(getConnectionSettings().server().host()) - .arg(KNetwork::KSocketBase::errorString((KNetwork::KSocketBase::SocketError)state)); + .tqarg(getConnectionSettings().server().host()) + .tqarg(KNetwork::KSocketBase::errorString((KNetwork::KSocketBase::SocketError)state)); getStatusView()->appendServerMessage(i18n("Error"), error); @@ -619,9 +619,9 @@ void Server::broken(int state) void Server::sslError(const TQString& reason) { TQString error = i18n("Could not connect to %1:%2 using SSL encryption.Maybe the server does not support SSL, or perhaps you have the wrong port? %3") - .arg(getConnectionSettings().server().host()) - .arg(getConnectionSettings().server().port()) - .arg(reason); + .tqarg(getConnectionSettings().server().host()) + .tqarg(getConnectionSettings().server().port()) + .tqarg(reason); getStatusView()->appendServerMessage(i18n("SSL Connection Error"),error); updateConnectionState(Konversation::SSDeliberatelyDisconnected); @@ -692,12 +692,12 @@ void Server::gotOwnResolvedHostByWelcome(KResolverResults res) void Server::quitServer() { - // Make clear this is deliberate even if the QUIT never actually goes through the queue + // Make clear this is deliberate even if the TQUIT never actually goes through the queue // (i.e. this is not redundant with _send_internal()'s updateConnectionState() call for - // a QUIT). + // a TQUIT). updateConnectionState(Konversation::SSDeliberatelyDisconnected); - TQString command(Preferences::commandChar()+"QUIT"); + TQString command(Preferences::commandChar()+"TQUIT"); Konversation::OutputFilterResult result = getOutputFilter()->parse(getNickname(),command, TQString()); queue(result.toServer, HighPriority); @@ -707,7 +707,7 @@ void Server::quitServer() m_socket->close(); - getStatusView()->appendServerMessage(i18n("Info"), i18n("Disconnected from %1.").arg(getConnectionSettings().server().host())); + getStatusView()->appendServerMessage(i18n("Info"), i18n("Disconnected from %1.").tqarg(getConnectionSettings().server().host())); } void Server::notifyAction(const TQString& nick) @@ -741,7 +741,7 @@ void Server::notifyResponse(const TQString& nicksOnline) //Are any nicks gone offline for (it = m_prevISONList.begin(); it != m_prevISONList.end(); ++it) { - if (lcActual.find(' ' + (*it) + ' ', 0, false) == -1) + if (lcActual.tqfind(' ' + (*it) + ' ', 0, false) == -1) { setNickOffline(*it); nicksOnlineChanged = true; @@ -751,7 +751,7 @@ void Server::notifyResponse(const TQString& nicksOnline) //Are any nicks gone online for (it = actualList.begin(); it != actualList.end(); ++it) { - if (lcPrevISON.find(' ' + (*it) + ' ', 0, false) == -1) { + if (lcPrevISON.tqfind(' ' + (*it) + ' ', 0, false) == -1) { setWatchedNickOnline(*it); nicksOnlineChanged = true; } @@ -798,7 +798,7 @@ void Server::autoCommandsAndChannels() TQString connectCommands = getServerGroup()->connectCommands(); if (!getNickname().isEmpty()) - connectCommands.replace("%nick", getNickname()); + connectCommands.tqreplace("%nick", getNickname()); TQStringList connectCommandsList = TQStringList::split(";", connectCommands); TQStringList::iterator iter; @@ -831,7 +831,7 @@ void Server::resetNickSelection() //for equivalence testing in case the identity gets changed underneath us m_referenceNicklist = getIdentity()->getNicknameList(); //where in this identities nicklist will we have started? - int start = m_referenceNicklist.findIndex(getNickname()); + int start = m_referenceNicklist.tqfindIndex(getNickname()); int len = m_referenceNicklist.count(); //we first use this list of indices *after* we've already tried the current nick, which we don't want @@ -857,7 +857,7 @@ TQString Server::getNextNickname() if (newNick.isNull()) { - TQString inputText = i18n("No nicknames from the \"%1\" identity were accepted by the connection \"%2\".\nPlease enter a new one or press Cancel to disconnect:").arg(getIdentity()->getName()).arg(getDisplayName()); + TQString inputText = i18n("No nicknames from the \"%1\" identity were accepted by the connection \"%2\".\nPlease enter a new one or press Cancel to disconnect:").tqarg(getIdentity()->getName()).tqarg(getDisplayName()); newNick = KInputDialog::getText(i18n("Nickname error"), inputText, TQString(), 0, getStatusView(), "NickChangeDialog"); } @@ -877,7 +877,7 @@ void Server::processIncomingData() if (m_rawLog) { TQString toRaw = front; - m_rawLog->appendRaw(">> " + toRaw.replace("&","&").replace("<","<").replace(">",">").replace(TQRegExp("\\s"), " ")); + m_rawLog->appendRaw(">> " + toRaw.tqreplace("&","&").tqreplace("<","<").tqreplace(">",">").tqreplace(TQRegExp("\\s"), " ")); } m_inputFilter.parseLine(front); m_processingIncoming = false; @@ -908,7 +908,7 @@ void Server::incoming() { getStatusView()->appendServerMessage(i18n("Error"), i18n("There was an error reading the data from the server: %1"). - arg(m_socket->errorString())); + tqarg(m_socket->KSocketBase::errorString())); broken(m_socket->error()); return; @@ -921,7 +921,7 @@ void Server::incoming() // split buffer to lines TQValueList<TQCString> qcsBufferLines; int lastLFposition = -1; - for( int nextLFposition ; ( nextLFposition = qcsBuffer.find('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition ) + for( int nextLFposition ; ( nextLFposition = qcsBuffer.tqfind('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition ) qcsBufferLines << qcsBuffer.mid(lastLFposition+1, nextLFposition-lastLFposition-1); // remember the incomplete line (split by packets) @@ -943,10 +943,10 @@ void Server::incoming() { if( lineSplit[0][0] == ':' ) // does this message have a prefix? { - if( !lineSplit[0].contains('!') ) // is this a server(global) message? + if( !lineSplit[0].tqcontains('!') ) // is this a server(global) message? isServerMessage = true; else - senderNick = lineSplit[0].mid(1, lineSplit[0].find('!')-1); + senderNick = lineSplit[0].mid(1, lineSplit[0].tqfind('!')-1); lineSplit.pop_front(); // remove prefix } @@ -1039,24 +1039,24 @@ int Server::getPreLength(const TQString& command, const TQString& dest) int hostMaskLength = 0; if(info) - hostMaskLength = info->getHostmask().length(); + hostMaskLength = info->getHosttqmask().length(); //:Sho_!i=ehs1@konversation/developer/hein PRIVMSG #konversation :and then back to it - //<colon>$nickname<!>$hostmask<space>$command<space>$destination<space><colon>$message<cr><lf> + //<colon>$nickname<!>$hosttqmask<space>$command<space>$destination<space><colon>$message<cr><lf> int x= 512 - 8 - (m_nickname.length() + hostMaskLength + command.length() + dest.length()); return x; } //Commands greater than 1 have localizeable text: 0 1 2 3 4 5 6 -static TQStringList outcmds=TQStringList::split(TQChar(' '),"WHO QUIT PRIVMSG NOTICE KICK PART TOPIC"); +static TQStringList outcmds=TQStringList::split(TQChar(' '),"WHO TQUIT PRIVMSG NOTICE KICK PART TOPIC"); int Server::_send_internal(TQString outputLine) { TQStringList outputLineSplit=TQStringList::split(" ", outputLine); //Lets cache the uppercase command so we don't miss or reiterate too much - int outboundCommand=outcmds.findIndex(outputLineSplit[0].upper()); + int outboundCommand=outcmds.tqfindIndex(outputLineSplit[0].upper()); if (outputLine.at(outputLine.length()-1) == '\n') { @@ -1072,7 +1072,7 @@ int Server::_send_internal(TQString outputLine) else // no argument (servers recognize it as "*") m_inputFilter.addWhoRequest("*"); } - else if (outboundCommand == 1) //"QUIT" + else if (outboundCommand == 1) //"TQUIT" updateConnectionState(Konversation::SSDeliberatelyDisconnected); // set channel encoding if specified @@ -1088,7 +1088,7 @@ int Server::_send_internal(TQString outputLine) else codec = Konversation::IRCCharsets::self()->codecForName(channelCodecName); - // Some codecs don't work with a negative value. This is a bug in Qt 3. + // Some codecs don't work with a negative value. This is a bug in TQt 3. // ex.: JIS7, eucJP, SJIS //int outlen=-1; int outlen=outputLine.length(); @@ -1099,7 +1099,7 @@ int Server::_send_internal(TQString outputLine) TQString blowfishKey=getKeyForRecipient(outputLineSplit[1]); if (!blowfishKey.isEmpty() && outboundCommand >1) { - int colon = outputLine.find(':'); + int colon = outputLine.tqfind(':'); if (colon > -1) { colon++; @@ -1108,7 +1108,7 @@ int Server::_send_internal(TQString outputLine) int len=pay.length(); //only encode the actual user text, IRCD *should* desire only ASCII 31 < x < 127 for protocol elements TQCString payload=codec->fromUnicode(pay, len); - //apparently channel name isn't a protocol element... + //aptqparently channel name isn't a protocol element... len=outputLineSplit[1].length(); TQCString dest=codec->fromUnicode(outputLineSplit[1], len); @@ -1133,10 +1133,10 @@ int Server::_send_internal(TQString outputLine) } } encoded += '\n'; - Q_LONG sout = m_socket->writeBlock(encoded, encoded.length()); + TQ_LONG sout = m_socket->writeBlock(encoded, encoded.length()); if (m_rawLog) - m_rawLog->appendRaw("<< " + outputLine.replace("&","&").replace("<","<").replace(">",">")); + m_rawLog->appendRaw("<< " + outputLine.tqreplace("&","&").tqreplace("<","<").tqreplace(">",">")); return sout; } @@ -1279,7 +1279,7 @@ void Server::ctcpReply(const TQString &receiver,const TQString &text) NickInfoPtr Server::getNickInfo(const TQString& nickname) { TQString lcNickname(nickname.lower()); - if (m_allNicks.contains(lcNickname)) + if (m_allNicks.tqcontains(lcNickname)) { NickInfoPtr nickinfo = m_allNicks[lcNickname]; Q_ASSERT(nickinfo); @@ -1310,7 +1310,7 @@ const NickInfoMap* Server::getAllNicks() { return &m_allNicks; } const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelName) const { TQString lcChannelName = channelName.lower(); - if (m_joinedChannels.contains(lcChannelName)) + if (m_joinedChannels.tqcontains(lcChannelName)) return m_joinedChannels[lcChannelName]; else return 0; @@ -1322,7 +1322,7 @@ const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelNam const ChannelNickMap *Server::getUnjoinedChannelMembers(const TQString& channelName) const { TQString lcChannelName = channelName.lower(); - if (m_unjoinedChannels.contains(lcChannelName)) + if (m_unjoinedChannels.tqcontains(lcChannelName)) return m_unjoinedChannels[lcChannelName]; else return 0; @@ -1348,7 +1348,7 @@ ChannelNickPtr Server::getChannelNick(const TQString& channelName, const TQStrin const ChannelNickMap *channelNickMap = getChannelMembers(channelName); if (channelNickMap) { - if (channelNickMap->contains(lcNickname)) + if (channelNickMap->tqcontains(lcNickname)) return (*channelNickMap)[lcNickname]; else return 0; @@ -1375,7 +1375,7 @@ ChannelNickPtr Server::setChannelNick(const TQString& channelName, const TQStrin // Create a lower case nick list from the watch list. TQStringList watchLowerList=TQStringList::split(' ',watchlist.lower()); // If on the watch list, add channel and nick to unjoinedChannels list. - if (watchLowerList.find(lcNickname) != watchLowerList.end()) + if (watchLowerList.tqfind(lcNickname) != watchLowerList.end()) { channelNick = addNickToUnjoinedChannelsList(channelName, nickname); channelNick->setMode(mode); @@ -1395,7 +1395,7 @@ TQStringList Server::getNickJoinedChannels(const TQString& nickname) ChannelMembershipMap::ConstIterator channel; for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel ) { - if (channel.data()->contains(lcNickname)) channellist.append(channel.key()); + if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key()); } return channellist; } @@ -1408,11 +1408,11 @@ TQStringList Server::getNickChannels(const TQString& nickname) ChannelMembershipMap::ConstIterator channel; for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel ) { - if (channel.data()->contains(lcNickname)) channellist.append(channel.key()); + if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key()); } for( channel = m_unjoinedChannels.begin(); channel != m_unjoinedChannels.end(); ++channel ) { - if (channel.data()->contains(lcNickname)) channellist.append(channel.key()); + if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key()); } return channellist; } @@ -1461,8 +1461,8 @@ class Query* Server::addQuery(const NickInfoPtr & nickInfo, bool weinitiated) static_cast<KonversationApplication*>(kapp)->notificationHandler()->query(query, nickname); } - // try to get hostmask if there's none yet - if (query->getNickInfo()->getHostmask().isEmpty()) requestUserhost(nickname); + // try to get hosttqmask if there's none yet + if (query->getNickInfo()->getHosttqmask().isEmpty()) requestUserhost(nickname); Q_ASSERT(query); @@ -1536,50 +1536,50 @@ void Server::resolveUserhost(const TQString& nickname) void Server::requestBan(const TQStringList& users,const TQString& channel,const TQString& a_option) { - TQString hostmask; + TQString hosttqmask; TQString option=a_option.lower(); Channel* targetChannel=getChannelByName(channel); for(unsigned int index=0;index<users.count();index++) { - // first, set the ban mask to the specified nick - TQString mask=users[index]; + // first, set the ban tqmask to the specified nick + TQString tqmask=users[index]; // did we specify an option? if(!option.isEmpty()) { // try to find specified nick on the channel - Nick* targetNick=targetChannel->getNickByName(mask); - // if we found the nick try to find their hostmask + Nick* targetNick=targetChannel->getNickByName(tqmask); + // if we found the nick try to find their hosttqmask if(targetNick) { - TQString hostmask=targetNick->getChannelNick()->getHostmask(); - // if we found the hostmask, add it to the ban mask - if(!hostmask.isEmpty()) + TQString hosttqmask=targetNick->getChannelNick()->getHosttqmask(); + // if we found the hosttqmask, add it to the ban tqmask + if(!hosttqmask.isEmpty()) { - mask=targetNick->getChannelNick()->getNickname()+'!'+hostmask; + tqmask=targetNick->getChannelNick()->getNickname()+'!'+hosttqmask; - // adapt ban mask to the option given + // adapt ban tqmask to the option given if(option=="host") - mask="*!*@*."+hostmask.section('.',1); + tqmask="*!*@*."+hosttqmask.section('.',1); else if(option=="domain") - mask="*!*@"+hostmask.section('@',1); + tqmask="*!*@"+hosttqmask.section('@',1); else if(option=="userhost") - mask="*!"+hostmask.section('@',0,0)+"@*."+hostmask.section('.',1); + tqmask="*!"+hosttqmask.section('@',0,0)+"@*."+hosttqmask.section('.',1); else if(option=="userdomain") - mask="*!"+hostmask.section('@',0,0)+'@'+hostmask.section('@',1); + tqmask="*!"+hosttqmask.section('@',0,0)+'@'+hosttqmask.section('@',1); } } } - Konversation::OutputFilterResult result = getOutputFilter()->execBan(mask,channel); + Konversation::OutputFilterResult result = getOutputFilter()->execBan(tqmask,channel); queue(result.toServer); } } -void Server::requestUnban(const TQString& mask,const TQString& channel) +void Server::requestUnban(const TQString& tqmask,const TQString& channel) { - Konversation::OutputFilterResult result = getOutputFilter()->execUnban(mask,channel); + Konversation::OutputFilterResult result = getOutputFilter()->execUnban(tqmask,channel); queue(result.toServer); } @@ -1610,7 +1610,7 @@ void Server::requestDccSend(const TQString &a_recipient) Nick* lookNick=nicks.first(); while(lookNick) { - if(!nickList.contains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname()); + if(!nickList.tqcontains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname()); lookNick=nicks.next(); } lookChannel=m_channelList.next(); @@ -1620,7 +1620,7 @@ void Server::requestDccSend(const TQString &a_recipient) class Query* lookQuery=m_queryList.first(); while(lookQuery) { - if(!nickList.contains(lookQuery->getName())) nickList.append(lookQuery->getName()); + if(!nickList.tqcontains(lookQuery->getName())) nickList.append(lookQuery->getName()); lookQuery=m_queryList.next(); } @@ -1633,7 +1633,7 @@ void Server::requestDccSend(const TQString &a_recipient) ":lastDccDir", TQString(), getViewContainer()->getWindow(), - i18n("Select File(s) to Send to %1").arg(recipient) + i18n("Select File(s) to Send to %1").tqarg(recipient) ); KURL::List::iterator it; for ( it = fileURLs.begin() ; it != fileURLs.end() ; ++it ) @@ -1709,7 +1709,7 @@ void Server::addDccGet(const TQString &sourceNick, const TQStringList &dccArgume appendMessageToFrontmost( i18n( "DCC" ), i18n( "%1 offers to send you \"%2\" (%3)..." ) - .arg( newDcc->getPartnerNick(), + .tqarg( newDcc->getPartnerNick(), showfile, ( newDcc->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( newDcc->getFileSize() ) ) ); @@ -1725,7 +1725,7 @@ void Server::openDccChat(const TQString& nickname) void Server::requestDccChat(const TQString& partnerNick, const TQString& numericalOwnIp, const TQString& ownPort) { - queue(TQString("PRIVMSG %1 :\001DCC CHAT chat %2 %3\001").arg(partnerNick).arg(numericalOwnIp).arg(ownPort)); + queue(TQString("PRIVMSG %1 :\001DCC CHAT chat %2 %3\001").tqarg(partnerNick).tqarg(numericalOwnIp).tqarg(ownPort)); } void Server::dccSendRequest(const TQString &partner, const TQString &fileName, const TQString &address, const TQString &port, unsigned long size) @@ -1740,7 +1740,7 @@ void Server::dccSendRequest(const TQString &partner, const TQString &fileName, c appendMessageToFrontmost( i18n( "DCC" ), i18n( "Asking %1 to accept upload of \"%2\" (%3)..." ) - .arg( partner, + .tqarg( partner, showfile, ( size == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( size ) ) ); } @@ -1755,7 +1755,7 @@ void Server::dccResumeGetRequest(const TQString &sender, const TQString &fileNam { Konversation::OutputFilterResult result; - if (fileName.contains(" ") > 0) + if (fileName.tqcontains(" ") > 0) result = getOutputFilter()->resumeRequest(sender,"\""+fileName+"\"",port,startAt); else result = getOutputFilter()->resumeRequest(sender,fileName,port,startAt); @@ -1790,7 +1790,7 @@ void Server::startReverseDccSendTransfer(const TQString& sourceNick,const TQStri appendMessageToFrontmost( i18n( "Error" ), i18n( "%1 = file name, %2 = nickname", "Received invalid passive DCC send acceptance message for \"%1\" from %2." ) - .arg( showfile, + .tqarg( showfile, sourceNick ) ); } @@ -1817,7 +1817,7 @@ void Server::resumeDccGetTransfer(const TQString &sourceNick, const TQStringList appendMessageToFrontmost( i18n( "DCC" ), i18n( "%1 = file name, %2 = nickname of sender, %3 = percentage of file size, %4 = file size", "Resuming download of \"%1\" from %2 starting at %3% of %4..." ) - .arg( showfile, + .tqarg( showfile, sourceNick, TQString::number( dccTransfer->getProgress() ), ( dccTransfer->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( dccTransfer->getFileSize() ) ) ); @@ -1827,7 +1827,7 @@ void Server::resumeDccGetTransfer(const TQString &sourceNick, const TQStringList appendMessageToFrontmost( i18n( "Error" ), i18n( "%1 = file name, %2 = nickname", "Received invalid resume acceptance message for \"%1\" from %2." ) - .arg( showfile, + .tqarg( showfile, sourceNick ) ); } } @@ -1852,7 +1852,7 @@ void Server::resumeDccSendTransfer(const TQString &sourceNick, const TQStringLis appendMessageToFrontmost( i18n( "DCC" ), i18n( "%1 = file name, %2 = nickname of recipient, %3 = percentage of file size, %4 = file size", "Resuming upload of \"%1\" to %2 starting at %3% of %4...") - .arg( showfile, + .tqarg( showfile, sourceNick, TQString::number(dccTransfer->getProgress()), ( dccTransfer->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( dccTransfer->getFileSize() ) ) ); @@ -1867,7 +1867,7 @@ void Server::resumeDccSendTransfer(const TQString &sourceNick, const TQStringLis appendMessageToFrontmost( i18n( "Error" ), i18n( "%1 = file name, %2 = nickname", "Received invalid resume request for \"%1\" from %2." ) - .arg( showfile, + .tqarg( showfile, sourceNick ) ); } } @@ -1882,12 +1882,12 @@ void Server::dccGetDone(DccTransfer* item) if(showfile.startsWith("\"") && showfile.endsWith("\"")) showfile = showfile.mid(1, showfile.length() - 2); - if(item->getStatus()==DccTransfer::Done) + if(item->gettqStatus()==DccTransfer::Done) appendMessageToFrontmost(i18n("DCC"),i18n("%1 = file name, %2 = nickname of sender", - "Download of \"%1\" from %2 finished.").arg(showfile, item->getPartnerNick())); - else if(item->getStatus()==DccTransfer::Failed) + "Download of \"%1\" from %2 finished.").tqarg(showfile, item->getPartnerNick())); + else if(item->gettqStatus()==DccTransfer::Failed) appendMessageToFrontmost(i18n("DCC"),i18n("%1 = file name, %2 = nickname of sender", - "Download of \"%1\" from %2 failed. Reason: %3.").arg(showfile, + "Download of \"%1\" from %2 failed. Reason: %3.").tqarg(showfile, item->getPartnerNick(), item->getStatusDetail())); } @@ -1901,16 +1901,16 @@ void Server::dccSendDone(DccTransfer* item) if(showfile.startsWith("\"") && showfile.endsWith("\"")) showfile = showfile.mid(1, showfile.length() - 2); - if(item->getStatus()==DccTransfer::Done) + if(item->gettqStatus()==DccTransfer::Done) appendMessageToFrontmost(i18n("DCC"),i18n("%1 = file name, %2 = nickname of recipient", - "Upload of \"%1\" to %2 finished.").arg(showfile, item->getPartnerNick())); - else if(item->getStatus()==DccTransfer::Failed) + "Upload of \"%1\" to %2 finished.").tqarg(showfile, item->getPartnerNick())); + else if(item->gettqStatus()==DccTransfer::Failed) appendMessageToFrontmost(i18n("DCC"),i18n("%1 = file name, %2 = nickname of recipient", - "Upload of \"%1\" to %2 failed. Reason: %3.").arg(showfile, item->getPartnerNick(), + "Upload of \"%1\" to %2 failed. Reason: %3.").tqarg(showfile, item->getPartnerNick(), item->getStatusDetail())); } -void Server::dccStatusChanged(DccTransfer *item, int newStatus, int oldStatus) +void Server::dccStatusChanged(DccTransfer *item, int newtqStatus, int oldtqStatus) { if(!item) return; @@ -1923,17 +1923,17 @@ void Server::dccStatusChanged(DccTransfer *item, int newStatus, int oldStatus) if ( item->getType() == DccTransfer::Send ) { // when resuming, a message about the receiver's acceptance has been shown already, so suppress this message - if ( newStatus == DccTransfer::Transferring && oldStatus == DccTransfer::WaitingRemote && !item->isResumed() ) + if ( newtqStatus == DccTransfer::Transferring && oldtqStatus == DccTransfer::WaitingRemote && !item->isResumed() ) appendMessageToFrontmost( i18n( "DCC" ), i18n( "%1 = file name, %2 nickname of recipient", - "Sending \"%1\" to %2...").arg( showfile, item->getPartnerNick() ) ); + "Sending \"%1\" to %2...").tqarg( showfile, item->getPartnerNick() ) ); } else // type == Receive { - if ( newStatus == DccTransfer::Transferring && !item->isResumed() ) + if ( newtqStatus == DccTransfer::Transferring && !item->isResumed() ) { appendMessageToFrontmost( i18n( "DCC" ), i18n( "%1 = file name, %2 = file size, %3 = nickname of sender", "Downloading \"%1\" (%2) from %3...") - .arg( showfile, + .tqarg( showfile, ( item->getFileSize() == 0 ) ? i18n( "unknown size" ) : KIO::convertSize( item->getFileSize() ), item->getPartnerNick() ) ); } @@ -1969,7 +1969,7 @@ void Server::sendJoinCommand(const TQString& name, const TQString& password) queue(result.toServer); } -void Server::joinChannel(const TQString& name, const TQString& hostmask) +void Server::joinChannel(const TQString& name, const TQString& hosttqmask) { // (re-)join channel, open a new panel if needed Channel* channel = getChannelByName(name); @@ -1997,10 +1997,10 @@ void Server::joinChannel(const TQString& name, const TQString& hostmask) // Move channel from unjoined (if present) to joined list and add our own nickname to the joined list. ChannelNickPtr channelNick = addNickToJoinedChannelsList(name, getNickname()); - if ((channelNick->getHostmask() != hostmask ) && !hostmask.isEmpty()) + if ((channelNick->getHosttqmask() != hosttqmask ) && !hosttqmask.isEmpty()) { NickInfoPtr nickInfo = channelNick->getNickInfo(); - nickInfo->setHostmask(hostmask); + nickInfo->setHosttqmask(hosttqmask); } channel->joinNickname(channelNick); @@ -2033,7 +2033,7 @@ void Server::updateChannelMode(const TQString &updater, const TQString &channelN // "q" is the likely answer.. UnrealIRCd and euIRCd use it. // TODO these need to become dynamic TQString userModes="vhoqa"; // voice halfop op owner admin - int modePos = userModes.find(mode); + int modePos = userModes.tqfind(mode); if (modePos > 0) { ChannelNickPtr updateeNick = getChannelNick(channelName, parameter); @@ -2068,7 +2068,7 @@ void Server::updateChannelMode(const TQString &updater, const TQString &channelN if (plus) { TQDateTime when; - addBan(channelName, TQString("%1 %2 %3").arg(parameter).arg(updater).arg(TQDateTime::currentDateTime().toTime_t())); + addBan(channelName, TQString("%1 %2 %3").tqarg(parameter).tqarg(updater).tqarg(TQDateTime::tqcurrentDateTime().toTime_t())); } else { removeBan(channelName, parameter); } @@ -2164,7 +2164,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName, // Move the channel from unjoined list (if present) to joined list. TQString lcChannelName = channelName.lower(); ChannelNickMap *channel; - if (m_unjoinedChannels.contains(lcChannelName)) + if (m_unjoinedChannels.tqcontains(lcChannelName)) { channel = m_unjoinedChannels[lcChannelName]; m_unjoinedChannels.remove(lcChannelName); @@ -2174,7 +2174,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName, else { // Create a new list in the joined channels if not already present. - if (!m_joinedChannels.contains(lcChannelName)) + if (!m_joinedChannels.tqcontains(lcChannelName)) { channel = new ChannelNickMap; m_joinedChannels.insert(lcChannelName, channel); @@ -2185,7 +2185,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName, } // Add NickInfo to channel list if not already in the list. ChannelNickPtr channelNick; - if (!channel->contains(lcNickname)) + if (!channel->tqcontains(lcNickname)) { channelNick = new ChannelNick(nickInfo, false, false, false, false, false); Q_ASSERT(channelNick); @@ -2242,7 +2242,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName // Move the channel from joined list (if present) to unjoined list. TQString lcChannelName = channelName.lower(); ChannelNickMap *channel; - if (m_joinedChannels.contains(lcChannelName)) + if (m_joinedChannels.tqcontains(lcChannelName)) { channel = m_joinedChannels[lcChannelName]; m_joinedChannels.remove(lcChannelName); @@ -2252,7 +2252,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName else { // Create a new list in the unjoined channels if not already present. - if (!m_unjoinedChannels.contains(lcChannelName)) + if (!m_unjoinedChannels.tqcontains(lcChannelName)) { channel = new ChannelNickMap; m_unjoinedChannels.insert(lcChannelName, channel); @@ -2263,7 +2263,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName } // Add NickInfo to unjoinedChannels list if not already in the list. ChannelNickPtr channelNick; - if (!channel->contains(lcNickname)) + if (!channel->tqcontains(lcNickname)) { channelNick = new ChannelNick(nickInfo, false, false, false, false, false); channel->insert(lcNickname, channelNick); @@ -2299,7 +2299,7 @@ NickInfoPtr Server::setWatchedNickOnline(const TQString& nickname) if (!addressee.isEmpty()) Konversation::Addressbook::self()->emitContactPresenceChanged(addressee.uid()); appendMessageToFrontmost(i18n("Notify"),"<a href=\"#"+nickname+"\">"+ - i18n("%1 is online (%2).").arg(nickname).arg(getServerName())+"</a>", getStatusView()); + i18n("%1 is online (%2).").tqarg(nickname).tqarg(getServerName())+"</a>", getStatusView()); static_cast<KonversationApplication*>(kapp)->notificationHandler()->nickOnline(getStatusView(), nickname); @@ -2316,7 +2316,7 @@ void Server::setWatchedNickOffline(const TQString& nickname, const NickInfoPtr n emit watchedNickChanged(this, nickname, false); - appendMessageToFrontmost(i18n("Notify"), i18n("%1 went offline (%2).").arg(nickname).arg(getServerName()), getStatusView()); + appendMessageToFrontmost(i18n("Notify"), i18n("%1 went offline (%2).").tqarg(nickname).tqarg(getServerName()), getStatusView()); static_cast<KonversationApplication*>(kapp)->notificationHandler()->nickOffline(getStatusView(), nickname); @@ -2331,7 +2331,7 @@ bool Server::setNickOffline(const TQString& nickname) if (nickInfo && wasOnline) { // Delete from query list, if present. - if (m_queryNicks.contains(lcNickname)) m_queryNicks.remove(lcNickname); + if (m_queryNicks.tqcontains(lcNickname)) m_queryNicks.remove(lcNickname); // Delete the nickname from all channels (joined or unjoined). TQStringList nickChannels = getNickChannels(lcNickname); TQStringList::iterator itEnd = nickChannels.end(); @@ -2343,7 +2343,7 @@ bool Server::setNickOffline(const TQString& nickname) } // Delete NickInfo. - if (m_allNicks.contains(lcNickname)) m_allNicks.remove(lcNickname); + if (m_allNicks.tqcontains(lcNickname)) m_allNicks.remove(lcNickname); // If the nick was in the watch list, emit various signals and messages. if (isWatchedNick(nickname)) setWatchedNickOffline(nickname, nickInfo); @@ -2366,7 +2366,7 @@ bool Server::deleteNickIfUnlisted(const TQString &nickname) // Don't delete our own nickinfo. if (lcNickname == loweredNickname()) return false; - if (!m_queryNicks.contains(lcNickname)) + if (!m_queryNicks.tqcontains(lcNickname)) { TQStringList nickChannels = getNickChannels(nickname); if (nickChannels.isEmpty()) @@ -2390,10 +2390,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick TQString lcChannelName = channelName.lower(); TQString lcNickname = nickname.lower(); ChannelNickMap *channel; - if (m_joinedChannels.contains(lcChannelName)) + if (m_joinedChannels.tqcontains(lcChannelName)) { channel = m_joinedChannels[lcChannelName]; - if (channel->contains(lcNickname)) + if (channel->tqcontains(lcNickname)) { channel->remove(lcNickname); doSignal = true; @@ -2404,10 +2404,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick } else { - if (m_unjoinedChannels.contains(lcChannelName)) + if (m_unjoinedChannels.tqcontains(lcChannelName)) { channel = m_unjoinedChannels[lcChannelName]; - if (channel->contains(lcNickname)) + if (channel->tqcontains(lcNickname)) { channel->remove(lcNickname); doSignal = true; @@ -2453,7 +2453,7 @@ bool Server::isWatchedNick(const TQString& nickname) // Get watch list from preferences. TQString watchlist= ' ' + getWatchListString() + ' '; // Search case-insensitivly - return (watchlist.find(' ' + nickname + ' ', 0, 0) != -1); + return (watchlist.tqfind(' ' + nickname + ' ', 0, 0) != -1); } /** @@ -2468,7 +2468,7 @@ void Server::removeJoinedChannel(const TQString& channelName) TQStringList watchListLower = getWatchList(); TQString lcChannelName = channelName.lower(); // Move the channel nick list from the joined to unjoined lists. - if (m_joinedChannels.contains(lcChannelName)) + if (m_joinedChannels.tqcontains(lcChannelName)) { doSignal = true; ChannelNickMap* channel = m_joinedChannels[lcChannelName]; @@ -2482,7 +2482,7 @@ void Server::removeJoinedChannel(const TQString& channelName) for ( member = channel->begin(); member != channel->end() ;) { TQString lcNickname = member.key(); - if (watchListLower.find(lcNickname) == watchListLower.end()) + if (watchListLower.tqfind(lcNickname) == watchListLower.end()) { // Remove the unwatched nickname from the unjoined channel. channel->remove(member); @@ -2536,7 +2536,7 @@ void Server::renameNickInfo(NickInfoPtr nickInfo, const TQString& newname) } // Rename key in Query list. - if (m_queryNicks.contains(lcNickname)) + if (m_queryNicks.tqcontains(lcNickname)) { m_queryNicks.remove(lcNickname); m_queryNicks.insert(lcNewname, nickInfo); @@ -2548,7 +2548,7 @@ void Server::renameNickInfo(NickInfoPtr nickInfo, const TQString& newname) } } -Channel* Server::nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hostmask) +Channel* Server::nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hosttqmask) { Channel* outChannel=getChannelByName(channelName); if(outChannel) @@ -2556,9 +2556,9 @@ Channel* Server::nickJoinsChannel(const TQString &channelName, const TQString &n // Update NickInfo. ChannelNickPtr channelNick = addNickToJoinedChannelsList(channelName, nickname); NickInfoPtr nickInfo = channelNick->getNickInfo(); - if ((nickInfo->getHostmask() != hostmask) && !hostmask.isEmpty()) + if ((nickInfo->getHosttqmask() != hosttqmask) && !hosttqmask.isEmpty()) { - nickInfo->setHostmask(hostmask); + nickInfo->setHosttqmask(hosttqmask); } outChannel->joinNickname(channelNick); } @@ -2566,15 +2566,15 @@ Channel* Server::nickJoinsChannel(const TQString &channelName, const TQString &n return outChannel; } -void Server::addHostmaskToNick(const TQString& sourceNick, const TQString& sourceHostmask) +void Server::addHosttqmaskToNick(const TQString& sourceNick, const TQString& sourceHosttqmask) { // Update NickInfo. NickInfoPtr nickInfo=getNickInfo(sourceNick); if (nickInfo) { - if ((nickInfo->getHostmask() != sourceHostmask) && !sourceHostmask.isEmpty()) + if ((nickInfo->getHosttqmask() != sourceHosttqmask) && !sourceHosttqmask.isEmpty()) { - nickInfo->setHostmask(sourceHostmask); + nickInfo->setHosttqmask(sourceHosttqmask); } } } @@ -2683,14 +2683,14 @@ void Server::renameNick(const TQString &nickname, const TQString &newNick) } -void Server::userhost(const TQString& nick,const TQString& hostmask,bool away,bool /* ircOp */) +void Server::userhost(const TQString& nick,const TQString& hosttqmask,bool away,bool /* ircOp */) { - addHostmaskToNick(nick, hostmask); + addHosttqmaskToNick(nick, hosttqmask); // remember my IP for DCC things // myself if (m_ownIpByUserhost.isEmpty() && nick == getNickname()) { - TQString myhost = hostmask.section('@', 1); + TQString myhost = hosttqmask.section('@', 1); // Use async lookup else you will be blocking GUI badly KNetwork::KResolver::resolveAsync(this,TQT_SLOT(gotOwnResolvedHostByUserhost(KResolverResults)),myhost,"0"); } @@ -2727,7 +2727,7 @@ void Server::appendCommandMessageToChannel(const TQString& channel,const TQStrin } else { - appendStatusMessage(command, TQString("%1 %2").arg(channel).arg(message)); + appendStatusMessage(command, TQString("%1 %2").tqarg(channel).tqarg(message)); } } @@ -2826,7 +2826,7 @@ const TQString& /*parameter*/) int index = 0, found = 0; TQChar toExpand; - while ((found = toParse.find('%',index)) != -1) + while ((found = toParse.tqfind('%',index)) != -1) { // append part before the % out.append(toParse.mid(index,found-index)); @@ -2836,7 +2836,7 @@ const TQString& /*parameter*/) toExpand = toParse.at(index++); if (toExpand == 's') { - found = toParse.find('%',index); + found = toParse.tqfind('%',index); if (found == -1) // no other % (not valid) break; separator = toParse.mid(index,found-index); @@ -2895,7 +2895,7 @@ void Server::invitation(const TQString& nick,const TQString& channel) { if(KMessageBox::questionYesNo(getViewContainer()->getWindow(), i18n("You were invited by %1 to join channel %2. " - "Do you accept the invitation?").arg(nick).arg(channel), + "Do you accept the invitation?").tqarg(nick).tqarg(channel), i18n("Invitation"), i18n("Join"), i18n("Ignore"), @@ -2907,17 +2907,17 @@ void Server::invitation(const TQString& nick,const TQString& channel) void Server::scriptNotFound(const TQString& name) { - appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not find script \"%1\".").arg(name)); + appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not find script \"%1\".").tqarg(name)); } void Server::scriptExecutionError(const TQString& name) { - appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not execute script \"%1\". Check file permissions.").arg(name)); + appendMessageToFrontmost(i18n("DCOP"),i18n("Error: Could not execute script \"%1\". Check file permissions.").tqarg(name)); } bool Server::isAChannel(const TQString &channel) const { - return (getChannelTypes().contains(channel.at(0)) > 0); + return (getChannelTypes().tqcontains(channel.at(0)) > 0); } void Server::addRawLog(bool show) @@ -3185,7 +3185,7 @@ void Server::setAway(bool away) if (identity && identity->getShowAwayMessage()) { TQString message = identity->getAwayMessage(); - sendToAllChannels(message.replace(TQRegExp("%s", false), m_awayReason)); + sendToAllChannels(message.tqreplace(TQRegExp("%s", false), m_awayReason)); } if (identity && identity->getInsertRememberLineOnAway()) @@ -3210,7 +3210,7 @@ void Server::setAway(bool away) if (identity && identity->getShowAwayMessage()) { TQString message = identity->getReturnMessage(); - sendToAllChannels(message.replace(TQRegExp("%t", false), awayTime())); + sendToAllChannels(message.tqreplace(TQRegExp("%t", false), awayTime())); } } else @@ -3226,7 +3226,7 @@ TQString Server::awayTime() const if (m_away) { - int diff = TQDateTime::currentDateTime().toTime_t() - m_awayTime; + int diff = TQDateTime::tqcurrentDateTime().toTime_t() - m_awayTime; int num = diff / 3600; if (num < 10) @@ -3254,7 +3254,7 @@ TQString Server::awayTime() const void Server::startAwayTimer() { - m_awayTime = TQDateTime::currentDateTime().toTime_t(); + m_awayTime = TQDateTime::tqcurrentDateTime().toTime_t(); } KABC::Addressee Server::getOfflineNickAddressee(TQString& nickname) @@ -3296,7 +3296,7 @@ void Server::removeBan(const TQString &channel, const TQString &ban) void Server::sendPing() { //WHO ourselves once a minute in case the irc server has changed our - //hostmask, such as what happens when a Freenode cloak is activated. + //hosttqmask, such as what happens when a Freenode cloak is activated. //It might be more intelligent to only do this when there is text //in the inputbox. Kinda changes this into a "do minutely" //queue :-) @@ -3344,5 +3344,5 @@ void Server::updateEncoding() #include "server.moc" -// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on; +// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on; // vim: set et sw=4 ts=4 cino=l1,cs,U1: diff --git a/konversation/src/server.h b/konversation/src/server.h index be6d62c..9a6b912 100644 --- a/konversation/src/server.h +++ b/konversation/src/server.h @@ -55,9 +55,10 @@ using namespace KNetwork; class IRCQueue; -class Server : public QObject +class Server : public TQObject { Q_OBJECT + TQ_OBJECT friend class IRCQueue; friend class QueueTuner; void resetNickSelection(); @@ -76,7 +77,7 @@ void resetNickSelection(); RegularPriority=StandardPriority }; - Server(TQObject* parent, ConnectionSettings& settings); + Server(TQObject* tqparent, ConnectionSettings& settings); ~Server(); int connectionId() { return m_connectionId; } @@ -104,8 +105,8 @@ void resetNickSelection(); void resetNickList(const TQString& channelName); void addPendingNickList(const TQString& channelName,const TQStringList& nickList); - void addHostmaskToNick(const TQString &sourceNick, const TQString &sourceHostmask); - Channel* nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hostmask); + void addHosttqmaskToNick(const TQString &sourceNick, const TQString &sourceHosttqmask); + Channel* nickJoinsChannel(const TQString &channelName, const TQString &nickname, const TQString &hosttqmask); void renameNick(const TQString &nickname,const TQString &newNick); Channel* removeNickFromChannel(const TQString &channelName, const TQString &nickname, const TQString &reason, bool quit=false); void nickWasKickedFromChannel(const TQString &channelName, const TQString &nickname, const TQString &kicker, const TQString &reason); @@ -130,7 +131,7 @@ void resetNickSelection(); InputFilter* getInputFilter() { return &m_inputFilter; } Konversation::OutputFilter* getOutputFilter() { return m_outputFilter; }; - void joinChannel(const TQString& name, const TQString& hostmask); + void joinChannel(const TQString& name, const TQString& hosttqmask); void removeChannel(Channel* channel); void appendServerMessageToChannel(const TQString& channel, const TQString& type, const TQString& message); void appendCommandMessageToChannel(const TQString& channel, const TQString& command, const TQString& message, bool highlight = true); @@ -271,7 +272,7 @@ void resetNickSelection(); * Returns the NickInfo object if nick is on any lists, otherwise 0. * @param channelName The channel name. Case sensitive. * @param nickname The nickname. Case sensitive. - * @param mode Bit mask containing the modes the nick has in the channel, + * @param mode Bit tqmask containing the modes the nick has in the channel, * or 99 if not known. See channelnick.cpp for bit definitions. */ ChannelNickPtr setChannelNick(const TQString& channelName, const TQString& nickname, unsigned int mode = 99); @@ -438,7 +439,7 @@ void resetNickSelection(); void openDccChat(const TQString& nickname); void requestDccChat(const TQString& partnerNick, const TQString& numericalOwnIp, const TQString& ownPort); void requestBan(const TQStringList& users,const TQString& channel,const TQString& option); - void requestUnban(const TQString& mask,const TQString& channel); + void requestUnban(const TQString& tqmask,const TQString& channel); void addDccSend(const TQString &recipient,KURL fileURL, const TQString &altFileName = TQString(), uint fileSize = 0); void removeQuery(Query *query); @@ -501,10 +502,10 @@ void resetNickSelection(); void resumeDccSendTransfer(const TQString& sourceNick,const TQStringList& dccArguments); void dccGetDone(DccTransfer* item); void dccSendDone(DccTransfer* item); - void dccStatusChanged(DccTransfer* item, int newStatus, int oldStatus); + void dccStatusChanged(DccTransfer* item, int newtqStatus, int oldtqStatus); void scriptNotFound(const TQString& name); void scriptExecutionError(const TQString& name); - void userhost(const TQString& nick,const TQString& hostmask,bool away,bool ircOp); + void userhost(const TQString& nick,const TQString& hosttqmask,bool away,bool ircOp); void setTopicAuthor(const TQString& channel,const TQString& author, TQDateTime t); void endOfWho(const TQString& target); void invitation(const TQString& nick,const TQString& channel); diff --git a/konversation/src/serverdialog.cpp b/konversation/src/serverdialog.cpp index 060cf6d..60a718f 100644 --- a/konversation/src/serverdialog.cpp +++ b/konversation/src/serverdialog.cpp @@ -27,8 +27,8 @@ namespace Konversation { - ServerDialog::ServerDialog(const TQString& title, TQWidget *parent, const char *name) - : KDialogBase(Plain, title, Ok|Cancel, Ok, parent, name) + ServerDialog::ServerDialog(const TQString& title, TQWidget *tqparent, const char *name) + : KDialogBase(Plain, title, Ok|Cancel, Ok, tqparent, name) { TQFrame* mainWidget = plainPage(); TQGridLayout* mainLayout = new TQGridLayout(mainWidget, 1, 4, 0, spacingHint()); diff --git a/konversation/src/serverdialog.h b/konversation/src/serverdialog.h index cb51d3f..24dddfc 100644 --- a/konversation/src/serverdialog.h +++ b/konversation/src/serverdialog.h @@ -26,9 +26,10 @@ namespace Konversation class ServerDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit ServerDialog(const TQString& title, TQWidget *parent = 0, const char *name = 0); + explicit ServerDialog(const TQString& title, TQWidget *tqparent = 0, const char *name = 0); ~ServerDialog(); void setServerSettings(const ServerSettings& server); diff --git a/konversation/src/servergroupdialog.cpp b/konversation/src/servergroupdialog.cpp index f8278e5..d90d95c 100644 --- a/konversation/src/servergroupdialog.cpp +++ b/konversation/src/servergroupdialog.cpp @@ -44,8 +44,8 @@ namespace Konversation { - ServerGroupDialog::ServerGroupDialog(const TQString& title, TQWidget *parent, const char *name) - : KDialogBase(Swallow, title, Ok|Cancel, Ok, parent, name) + ServerGroupDialog::ServerGroupDialog(const TQString& title, TQWidget *tqparent, const char *name) + : KDialogBase(Swallow, title, Ok|Cancel, Ok, tqparent, name) { m_id = -1; m_identitiesNeedsUpdate = false; @@ -207,7 +207,7 @@ namespace Konversation // Track the server the Server List dialog told us to edit // and find out which server to select in the listbox m_editedServer = true; - m_editedServerIndex = m_serverList.findIndex(server); + m_editedServerIndex = m_serverList.tqfindIndex(server); m_mainWidget->m_serverLBox->setCurrentItem(m_editedServerIndex); editServer(); diff --git a/konversation/src/servergroupdialog.h b/konversation/src/servergroupdialog.h index 96977de..9a5df9d 100644 --- a/konversation/src/servergroupdialog.h +++ b/konversation/src/servergroupdialog.h @@ -31,8 +31,9 @@ namespace Konversation class ServerGroupDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit ServerGroupDialog(const TQString& title, TQWidget* parent = 0, const char* name = 0); + explicit ServerGroupDialog(const TQString& title, TQWidget* tqparent = 0, const char* name = 0); ~ServerGroupDialog(); void setServerGroupSettings(ServerGroupSettingsPtr settings); diff --git a/konversation/src/servergroupdialogui.ui b/konversation/src/servergroupdialogui.ui index 182147f..853568a 100644 --- a/konversation/src/servergroupdialogui.ui +++ b/konversation/src/servergroupdialogui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ServerGroupDialogUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ServerGroupDialogUI</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_networkLabel</cstring> </property> @@ -35,12 +35,12 @@ <string>Network name:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_nameEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_identityLabel</cstring> </property> @@ -56,7 +56,7 @@ <string>Identity:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_commandsLabel</cstring> </property> @@ -88,12 +88,12 @@ <string>&Edit...</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_commandEdit</cstring> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_autoConnectCBox</cstring> </property> @@ -101,7 +101,7 @@ <string>Co&nnect on application start up</string> </property> </widget> - <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_serverGroupBox</cstring> </property> @@ -136,7 +136,7 @@ <string>E&dit...</string> </property> </widget> - <widget class="QToolButton" row="1" column="2"> + <widget class="TQToolButton" row="1" column="2"> <property name="name"> <cstring>m_removeServerButton</cstring> </property> @@ -147,7 +147,7 @@ <string></string> </property> </widget> - <widget class="QToolButton" row="1" column="5"> + <widget class="TQToolButton" row="1" column="5"> <property name="name"> <cstring>m_downServerBtn</cstring> </property> @@ -161,7 +161,7 @@ <bool>true</bool> </property> </widget> - <widget class="QToolButton" row="1" column="4"> + <widget class="TQToolButton" row="1" column="4"> <property name="name"> <cstring>m_upServerBtn</cstring> </property> @@ -185,7 +185,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -194,7 +194,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_channelGroupBox</cstring> </property> @@ -229,7 +229,7 @@ <string>Ed&it...</string> </property> </widget> - <widget class="QToolButton" row="1" column="5"> + <widget class="TQToolButton" row="1" column="5"> <property name="name"> <cstring>m_downChannelBtn</cstring> </property> @@ -243,7 +243,7 @@ <bool>true</bool> </property> </widget> - <widget class="QToolButton" row="1" column="2"> + <widget class="TQToolButton" row="1" column="2"> <property name="name"> <cstring>m_removeChannelButton</cstring> </property> @@ -264,14 +264,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>255</width> <height>20</height> </size> </property> </spacer> - <widget class="QToolButton" row="1" column="4"> + <widget class="TQToolButton" row="1" column="4"> <property name="name"> <cstring>m_upChannelBtn</cstring> </property> @@ -287,7 +287,7 @@ </widget> </grid> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>m_identityCBox</cstring> </property> @@ -304,8 +304,8 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>klistbox.h</includehint> diff --git a/konversation/src/servergroupsettings.cpp b/konversation/src/servergroupsettings.cpp index 567edfc..33cf8fb 100644 --- a/konversation/src/servergroupsettings.cpp +++ b/konversation/src/servergroupsettings.cpp @@ -133,7 +133,7 @@ namespace Konversation if (before.name().isEmpty()) m_channelList.append(channel); else - m_channelList.insert(m_channelList.find(before), channel); + m_channelList.insert(m_channelList.tqfind(before), channel); } void ServerGroupSettings::removeChannel(const ChannelSettings& channel) diff --git a/konversation/src/serverison.cpp b/konversation/src/serverison.cpp index ac54843..4b77db6 100644 --- a/konversation/src/serverison.cpp +++ b/konversation/src/serverison.cpp @@ -78,7 +78,7 @@ KABC::Addressee ServerISON::getOfflineNickAddressee(TQString& nickname) TQString lcNickname = nickname.lower(); if(m_ISONList_invalid) recalculateAddressees(); - if (m_offlineNickToAddresseeMap.contains(lcNickname)) + if (m_offlineNickToAddresseeMap.tqcontains(lcNickname)) return m_offlineNickToAddresseeMap[lcNickname]; else return KABC::Addressee(); @@ -127,7 +127,7 @@ void ServerISON::recalculateAddressees() // First check if we already know that this addressee is online. // If so, add all the nicks of the addressee that are online, but do not // add the offline nicks. There is no point in monitoring such nicks. - if (addresseeToOnlineNickMap.contains(uid)) + if (addresseeToOnlineNickMap.tqcontains(uid)) { TQStringList nicknames = addresseeToOnlineNickMap[uid]; TQStringList::iterator itEnd = nicknames.end(); @@ -212,7 +212,7 @@ void ServerISON::nickInfoChanged(Server* /*server*/, const NickInfoPtr /*nickInf //We need to call recalculateAddressees before returning m_ISONList //Maybe we could do something like: -//if(m_ISONList.contains(nickInfo->getNickName())) return; +//if(m_ISONList.tqcontains(nickInfo->getNickName())) return; m_ISONList_invalid = true; } @@ -227,7 +227,7 @@ bool joined, bool parted, const TQString& nickname) { // Whenever a nick on the watch list leaves the last joined channel, must recalculate lists. // The nick will be added to the ISON list. - if (joined && parted && m_watchList.contains(nickname)) + if (joined && parted && m_watchList.tqcontains(nickname)) if (m_server->getNickJoinedChannels(nickname).isEmpty()) m_ISONList_invalid = true; } diff --git a/konversation/src/serverison.h b/konversation/src/serverison.h index 8a2dc23..5a68ada 100644 --- a/konversation/src/serverison.h +++ b/konversation/src/serverison.h @@ -30,9 +30,10 @@ class Server; typedef TQMap<TQString,KABC::Addressee> OfflineNickToAddresseeMap; -class ServerISON : public QObject +class ServerISON : public TQObject { Q_OBJECT + TQ_OBJECT public: explicit ServerISON(Server* server); diff --git a/konversation/src/serverlistdialog.cpp b/konversation/src/serverlistdialog.cpp index cd37cd1..26269ec 100644 --- a/konversation/src/serverlistdialog.cpp +++ b/konversation/src/serverlistdialog.cpp @@ -36,9 +36,9 @@ namespace Konversation // ServerListItem // - ServerListItem::ServerListItem(KListView* parent, int serverGroupId, int sortIndex, + ServerListItem::ServerListItem(KListView* tqparent, int serverGroupId, int sortIndex, const TQString& serverGroup, const TQString& identity, const TQString& channels) - : KListViewItem(parent, serverGroup, identity, channels) + : KListViewItem(tqparent, serverGroup, identity, channels) { m_serverGroupId = serverGroupId; m_sortIndex = sortIndex; @@ -46,9 +46,9 @@ namespace Konversation m_isServer = false; } - ServerListItem::ServerListItem(TQListViewItem* parent, int serverGroupId, int sortIndex, + ServerListItem::ServerListItem(TQListViewItem* tqparent, int serverGroupId, int sortIndex, const TQString& name, const ServerSettings& server) - : KListViewItem(parent, name) + : KListViewItem(tqparent, name) { m_serverGroupId = serverGroupId; m_sortIndex = sortIndex; @@ -101,8 +101,8 @@ namespace Konversation return key( col, ascending ).localeAwareCompare( i->key( col, ascending ) ); } - ServerListDialog::ServerListDialog(TQWidget *parent, const char *name) - : KDialogBase(Plain, i18n("Server List"), Ok|Close, Ok, parent, name, false) + ServerListDialog::ServerListDialog(TQWidget *tqparent, const char *name) + : KDialogBase(Plain, i18n("Server List"), Ok|Close, Ok, tqparent, name, false) { setButtonOK(KGuiItem(i18n("C&onnect"), "connect_creating", i18n("Connect to the server"), i18n("Click here to connect to the selected IRC network and channel."))); @@ -133,14 +133,14 @@ namespace Konversation showAtStartup->setChecked(Preferences::showServerList()); connect(showAtStartup, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShowAtStartup(bool))); - TQGridLayout* layout = new TQGridLayout(mainWidget, 5, 2, 0, spacingHint()); + TQGridLayout* tqlayout = new TQGridLayout(mainWidget, 5, 2, 0, spacingHint()); - layout->addMultiCellWidget(m_serverList, 0, 3, 0, 0); - layout->addWidget(m_addButton, 0, 1); - layout->addWidget(m_editButton, 1, 1); - layout->addWidget(m_delButton, 2, 1); - layout->addMultiCellWidget(showAtStartup, 4, 4, 0, 1); - layout->setRowStretch(3, 10); + tqlayout->addMultiCellWidget(m_serverList, 0, 3, 0, 0); + tqlayout->addWidget(m_addButton, 0, 1); + tqlayout->addWidget(m_editButton, 1, 1); + tqlayout->addWidget(m_delButton, 2, 1); + tqlayout->addMultiCellWidget(showAtStartup, 4, 4, 0, 1); + tqlayout->setRowStretch(3, 10); m_serverList->setFocus(); @@ -276,23 +276,23 @@ namespace Konversation return; ServerListItem* item = static_cast<ServerListItem*>(selectedItems.first()); - ServerListItem* parent = 0; + ServerListItem* tqparent = 0; // Make sure we're not deleting a network's only servers while (item) { if (item->isServer()) { - parent = static_cast<ServerListItem*>(item->parent()); + tqparent = static_cast<ServerListItem*>(item->tqparent()); - if (parent && parent->childCount() == 1) + if (tqparent && tqparent->childCount() == 1) { - KMessageBox::error(this, i18n("You cannot delete %1.\n\nThe network %2 needs to have at least one server.").arg(item->name()).arg(parent->name())); + KMessageBox::error(this, i18n("You cannot delete %1.\n\nThe network %2 needs to have at least one server.").tqarg(item->name()).tqarg(tqparent->name())); return; } - else if (parent && parent->childCount() == parent->selectedChildrenCount()) + else if (tqparent && tqparent->childCount() == tqparent->selectedChildrenCount()) { - KMessageBox::error(this, i18n("You cannot delete the selected servers.\n\nThe network %1 needs to have at least one server.").arg(parent->name())); + KMessageBox::error(this, i18n("You cannot delete the selected servers.\n\nThe network %1 needs to have at least one server.").tqarg(tqparent->name())); return; } } @@ -309,7 +309,7 @@ namespace Konversation if (selectedItems.count()>1) question = i18n("Do you really want to delete the selected entries?"); else - question = i18n("Do you really want to delete %1?").arg(item->name()); + question = i18n("Do you really want to delete %1?").tqarg(item->name()); if (KMessageBox::warningContinueCancel(this,question) == KMessageBox::Cancel) { @@ -483,7 +483,7 @@ namespace Konversation } m_serverList->setUpdatesEnabled(true); - m_serverList->repaint(); + m_serverList->tqrepaint(); } TQListViewItem* ServerListDialog::insertServerGroup(ServerGroupSettingsPtr serverGroup) diff --git a/konversation/src/serverlistdialog.h b/konversation/src/serverlistdialog.h index 34beed0..6a05c8f 100644 --- a/konversation/src/serverlistdialog.h +++ b/konversation/src/serverlistdialog.h @@ -29,9 +29,9 @@ namespace Konversation class ServerListItem : public KListViewItem { public: - ServerListItem(KListView* parent, int serverGroupId, int sortIndex, + ServerListItem(KListView* tqparent, int serverGroupId, int sortIndex, const TQString& serverGroup, const TQString& identity, const TQString& channels); - ServerListItem(TQListViewItem* parent, int serverGroupId, int sortIndex, + ServerListItem(TQListViewItem* tqparent, int serverGroupId, int sortIndex, const TQString& name, const ServerSettings& server); int serverGroupId() const { return m_serverGroupId; } @@ -58,9 +58,10 @@ namespace Konversation class ServerListDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - explicit ServerListDialog(TQWidget *parent = 0, const char *name = 0); + explicit ServerListDialog(TQWidget *tqparent = 0, const char *name = 0); ~ServerListDialog(); public slots: diff --git a/konversation/src/serverlistview.cpp b/konversation/src/serverlistview.cpp index be33e43..3c653c2 100644 --- a/konversation/src/serverlistview.cpp +++ b/konversation/src/serverlistview.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> -ServerListView::ServerListView(TQWidget *parent) - : KListView(parent) +ServerListView::ServerListView(TQWidget *tqparent) + : KListView(tqparent) { } @@ -37,9 +37,9 @@ TQPtrList<TQListViewItem> ServerListView::selectedServerListItems() while (item) { - if (item->parent()) + if (item->tqparent()) { - if (!item->parent()->isSelected()) + if (!item->tqparent()->isSelected()) selectedServerListItems.append(item); } else @@ -53,7 +53,7 @@ TQPtrList<TQListViewItem> ServerListView::selectedServerListItems() return selectedServerListItems; } -void ServerListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void ServerListView::findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); @@ -66,7 +66,7 @@ void ServerListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQLis else { // Get the closest item before us ('atpos' or the one above, if any) - if (p.y() - itemRect(atpos).topLeft().y() < (atpos->height()/2)) + if (p.y() - tqitemRect(atpos).topLeft().y() < (atpos->height()/2)) above = atpos->itemAbove(); else above = atpos; @@ -77,19 +77,19 @@ void ServerListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQLis if (above->firstChild()) { after = above; - parent = after->parent(); + tqparent = after->tqparent(); return; } else { - after = above->parent(); - parent = after ? after->parent() : 0L; + after = above->tqparent(); + tqparent = after ? after->tqparent() : 0L; return; } } // set as sibling after = above; - parent = after ? after->parent() : 0L; + tqparent = after ? after->tqparent() : 0L; } TQDragObject* ServerListView::dragObject() diff --git a/konversation/src/serverlistview.h b/konversation/src/serverlistview.h index a0824e6..35ca753 100644 --- a/konversation/src/serverlistview.h +++ b/konversation/src/serverlistview.h @@ -23,15 +23,16 @@ class TQDragObject; class ServerListView : public KListView { Q_OBJECT + TQ_OBJECT public: - explicit ServerListView(TQWidget *parent); + explicit ServerListView(TQWidget *tqparent); ~ServerListView(); TQPtrList<TQListViewItem> selectedServerListItems(); protected: - void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after); + void findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after); TQDragObject* dragObject(); }; diff --git a/konversation/src/ssllabel.cpp b/konversation/src/ssllabel.cpp index ea2a9a6..62a99b0 100644 --- a/konversation/src/ssllabel.cpp +++ b/konversation/src/ssllabel.cpp @@ -15,8 +15,8 @@ #include "ssllabel.h" -SSLLabel::SSLLabel(TQWidget* parent,const char* name) -: TQLabel(parent,name) +SSLLabel::SSLLabel(TQWidget* tqparent,const char* name) +: TQLabel(tqparent,name) { } diff --git a/konversation/src/ssllabel.h b/konversation/src/ssllabel.h index 27eb87b..3b9d418 100644 --- a/konversation/src/ssllabel.h +++ b/konversation/src/ssllabel.h @@ -17,12 +17,13 @@ #include <tqlabel.h> -class SSLLabel : public QLabel +class SSLLabel : public TQLabel { Q_OBJECT + TQ_OBJECT public: - SSLLabel(TQWidget* parent, const char* name); + SSLLabel(TQWidget* tqparent, const char* name); protected: void mouseReleaseEvent(TQMouseEvent *e); diff --git a/konversation/src/sslsocket.cpp b/konversation/src/sslsocket.cpp index 9d95cd5..135fc99 100644 --- a/konversation/src/sslsocket.cpp +++ b/konversation/src/sslsocket.cpp @@ -39,8 +39,8 @@ struct SSLSocketPrivate KSSLCertificateCache* cc; }; -SSLSocket::SSLSocket(TQWidget* serverParent, TQObject* parent, const char* name) -: KStreamSocket(0L,0L,parent,name), m_serverParent(serverParent) +SSLSocket::SSLSocket(TQWidget* serverParent, TQObject* tqparent, const char* name) +: KStreamSocket(0L,0L,tqparent,name), m_serverParent(serverParent) { d = new SSLSocketPrivate; d->kssl = 0L; @@ -62,7 +62,7 @@ SSLSocket::~SSLSocket() delete d; } -Q_LONG SSLSocket::writeBlock(const char *data, Q_ULONG len) +TQ_LONG SSLSocket::writeBlock(const char *data, TQ_ULONG len) { if (d->kssl && KSSL::doesSSLWork() && state() == KNetwork::KClientSocketBase::Connected) return d->kssl->write( data,len ); @@ -70,7 +70,7 @@ Q_LONG SSLSocket::writeBlock(const char *data, Q_ULONG len) return 0; } -Q_LONG SSLSocket::readBlock(char *data, Q_ULONG maxlen) +TQ_LONG SSLSocket::readBlock(char *data, TQ_ULONG maxlen) { int err = d->kssl->read( data, maxlen ); return err; @@ -91,7 +91,7 @@ const TQString SSLSocket::details() { int strength = d->kssl->connectionInfo().getCipherUsedBits(); - TQString details = i18n("Connection is secured with %1 bit SSL.").arg(strength); + TQString details = i18n("Connection is secured with %1 bit SSL.").tqarg(strength); return details; } @@ -228,7 +228,7 @@ int SSLSocket::verifyCertificate() "does not match the one the " "certificate was issued to."); result = KMessageBox::warningYesNoCancel( m_serverParent, - msg.arg(hostname), + msg.tqarg(hostname), i18n("Server Authentication"), KGuiItem(i18n("Details")), KGuiItem(i18n("Continue")), @@ -265,11 +265,11 @@ int SSLSocket::verifyCertificate() "does not match the one the " "certificate was issued to."); result = KMessageBox::warningYesNoCancel( m_serverParent, - msg.arg(hostname), + msg.tqarg(hostname), i18n("Server Authentication"), KGuiItem(i18n("Details")), KGuiItem(i18n("Continue")), - TQString::null, + TQString(), KMessageBox::Dangerous); } else @@ -277,11 +277,11 @@ int SSLSocket::verifyCertificate() TQString msg = i18n("The server (%1) certificate failed the " "authenticity test."); result = KMessageBox::warningYesNoCancel( m_serverParent, - msg.arg(hostname), + msg.tqarg(hostname), i18n("Server Authentication"), KGuiItem(i18n("Details")), KGuiItem(i18n("Continue")), - TQString::null, + TQString(), KMessageBox::Dangerous); } diff --git a/konversation/src/sslsocket.h b/konversation/src/sslsocket.h index 596cb5e..a5886f5 100644 --- a/konversation/src/sslsocket.h +++ b/konversation/src/sslsocket.h @@ -27,16 +27,17 @@ struct SSLSocketPrivate; class SSLSocket : public KStreamSocket { Q_OBJECT + TQ_OBJECT public: - explicit SSLSocket(TQWidget* serverParent, TQObject* parent = 0L, const char* name = 0L); + explicit SSLSocket(TQWidget* serverParent, TQObject* tqparent = 0L, const char* name = 0L); ~SSLSocket(); void showInfoDialog(); const TQString details(); - Q_LONG writeBlock (const char *data, Q_ULONG len); - Q_LONG readBlock (char *data, Q_ULONG maxlen); + TQ_LONG writeBlock (const char *data, TQ_ULONG len); + TQ_LONG readBlock (char *data, TQ_ULONG maxlen); protected: void stateChanging (KClientSocketBase::SocketState newState); diff --git a/konversation/src/statuspanel.cpp b/konversation/src/statuspanel.cpp index 867af61..6ee7637 100644 --- a/konversation/src/statuspanel.cpp +++ b/konversation/src/statuspanel.cpp @@ -30,9 +30,9 @@ #include <kmessagebox.h> -StatusPanel::StatusPanel(TQWidget* parent) : ChatWindow(parent) +StatusPanel::StatusPanel(TQWidget* tqparent) : ChatWindow(tqparent) { - setType(ChatWindow::Status); + setType(ChatWindow::tqStatus); setChannelEncodingSupported(true); @@ -164,8 +164,8 @@ void StatusPanel::updateAppearance() } else { - fg=colorGroup().foreground(); - bg=colorGroup().base(); + fg=tqcolorGroup().foreground(); + bg=tqcolorGroup().base(); } statusInput->unsetPalette(); @@ -239,7 +239,7 @@ void StatusPanel::indicateAway(bool show) } } -// fix Qt's broken behavior on hidden TQListView pages +// fix TQt's broken behavior on hidden TQListView pages void StatusPanel::showEvent(TQShowEvent*) { if(awayChanged) @@ -270,14 +270,14 @@ bool StatusPanel::closeYourself(bool confirm) // that due to string freeze at the moment. if (confirm && !m_server->isConnected()) { - result = KMessageBox::warningContinueCancel(this, i18n("Do you really want to close '%1'?\n\n All associated tabs will be closed as well.").arg(getName()), + result = KMessageBox::warningContinueCancel(this, i18n("Do you really want to close '%1'?\n\n All associated tabs will be closed as well.").tqarg(getName()), i18n("Close Tab"), i18n("Close"), "QuitServerTab"); } else { result = KMessageBox::warningContinueCancel( this, - i18n("Do you want to disconnect from '%1'?\n\n All associated tabs will be closed as well.").arg(m_server->getServerName()), + i18n("Do you want to disconnect from '%1'?\n\n All associated tabs will be closed as well.").tqarg(m_server->getServerName()), i18n("Disconnect From Server"), i18n("Disconnect"), "QuitServerTab"); @@ -347,7 +347,7 @@ TQString StatusPanel::getChannelEncoding() // virtual // virtual TQString StatusPanel::getChannelEncodingDefaultDesc() { - return i18n("Identity Default ( %1 )").arg(getServer()->getIdentity()->getCodecName()); + return i18n("Identity Default ( %1 )").tqarg(getServer()->getIdentity()->getCodecName()); } //Used to disable functions when not connected diff --git a/konversation/src/statuspanel.h b/konversation/src/statuspanel.h index dcef517..dc16498 100644 --- a/konversation/src/statuspanel.h +++ b/konversation/src/statuspanel.h @@ -29,9 +29,10 @@ class NickChangeDialog; class StatusPanel : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit StatusPanel(TQWidget* parent); + explicit StatusPanel(TQWidget* tqparent); ~StatusPanel(); virtual void setName(const TQString& newName); diff --git a/konversation/src/tabnotifications_preferences.ui b/konversation/src/tabnotifications_preferences.ui index 337b010..6b979d1 100644 --- a/konversation/src/tabnotifications_preferences.ui +++ b/konversation/src/tabnotifications_preferences.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>TabNotifications_Config</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TabNotifications_Config</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_TabNotificationsText</cstring> </property> @@ -41,7 +41,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>kcfg_TabNotificationsLeds</cstring> </property> @@ -51,7 +51,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -62,7 +62,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_TabNotificationsSystem</cstring> </property> @@ -73,7 +73,7 @@ <bool>true</bool> </property> <property name="whatsThis" stdset="0"> - <string>Application events occur in Konsole tabs, the DCC Status tab and other application tabs not used directly for chatting.</string> + <string>Application events occur in Konsole tabs, the DCC tqStatus tab and other application tabs not used directly for chatting.</string> </property> </widget> <spacer row="5" column="3"> @@ -86,7 +86,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> @@ -101,7 +101,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_TabNotificationsMsgs</cstring> </property> @@ -122,7 +122,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> @@ -154,14 +154,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>21</height> </size> </property> </spacer> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_TabNotificationsPrivate</cstring> </property> @@ -187,7 +187,7 @@ </color> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_TabNotificationsNick</cstring> </property> @@ -208,7 +208,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -225,7 +225,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>21</height> @@ -248,7 +248,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>kcfg_TabNotificationsEvents</cstring> </property> @@ -262,7 +262,7 @@ <string>Channel events are mode changes or users joining/leaving a channel.</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>kcfg_TabNotificationsHighlights</cstring> </property> @@ -283,7 +283,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -303,7 +303,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox10</cstring> </property> @@ -314,7 +314,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_TabNotificationsOverride</cstring> </property> @@ -337,7 +337,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>60</height> @@ -395,7 +395,7 @@ <tabstop>kcfg_TabNotificationsSystemColor</tabstop> <tabstop>kcfg_TabNotificationsOverride</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>kcolorbutton.h</includehint> diff --git a/konversation/src/tabs_preferences.cpp b/konversation/src/tabs_preferences.cpp index c3f8836..3455772 100644 --- a/konversation/src/tabs_preferences.cpp +++ b/konversation/src/tabs_preferences.cpp @@ -16,8 +16,8 @@ #include <tqcheckbox.h> -Tabs_Config::Tabs_Config(TQWidget *parent, const char *name) - : Tabs_PreferencesUI(parent, name) +Tabs_Config::Tabs_Config(TQWidget *tqparent, const char *name) + : Tabs_PreferencesUI(tqparent, name) { connect(kcfg_TabPlacement, TQT_SIGNAL(activated(int)), this, TQT_SLOT(toggleCheckBoxes(int))); } diff --git a/konversation/src/tabs_preferences.h b/konversation/src/tabs_preferences.h index 3be891b..9d5ac24 100644 --- a/konversation/src/tabs_preferences.h +++ b/konversation/src/tabs_preferences.h @@ -18,9 +18,10 @@ class Tabs_Config : public Tabs_PreferencesUI { Q_OBJECT + TQ_OBJECT public: - explicit Tabs_Config(TQWidget *parent = 0, const char *name = 0); + explicit Tabs_Config(TQWidget *tqparent = 0, const char *name = 0); ~Tabs_Config(); public slots: diff --git a/konversation/src/tabs_preferencesui.ui b/konversation/src/tabs_preferencesui.ui index a0063f7..e668412 100644 --- a/konversation/src/tabs_preferencesui.ui +++ b/konversation/src/tabs_preferencesui.ui @@ -4,7 +4,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</comment> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Tabs_PreferencesUI</cstring> </property> @@ -26,7 +26,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>lookGBox</cstring> </property> @@ -37,15 +37,15 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>placementLabel</cstring> </property> @@ -53,7 +53,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Placement:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Top</string> @@ -83,7 +83,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>111</width> <height>20</height> @@ -92,7 +92,7 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_CloseButtons</cstring> </property> @@ -100,7 +100,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show &close button on tabs</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowTabBarCloseButton</cstring> </property> @@ -108,7 +108,7 @@ the Free Software Foundation; either version 2 of the License, or <string>Show a close button on the &right side of the tab bar</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_UseMaxSizedTabs</cstring> </property> @@ -118,7 +118,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>focusGBox</cstring> </property> @@ -129,7 +129,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_BringToFront</cstring> </property> @@ -137,7 +137,7 @@ the Free Software Foundation; either version 2 of the License, or <string>&Focus new tabs</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_FocusNewQueries</cstring> </property> @@ -147,7 +147,7 @@ the Free Software Foundation; either version 2 of the License, or </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>mouseGBox</cstring> </property> @@ -158,7 +158,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_MiddleClickClose</cstring> </property> @@ -178,7 +178,7 @@ the Free Software Foundation; either version 2 of the License, or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>100</height> @@ -187,6 +187,6 @@ the Free Software Foundation; either version 2 of the License, or </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> </UI> diff --git a/konversation/src/theme_preferences.cpp b/konversation/src/theme_preferences.cpp index 1b052fd..77c5390 100644 --- a/konversation/src/theme_preferences.cpp +++ b/konversation/src/theme_preferences.cpp @@ -47,8 +47,8 @@ using namespace Konversation; -Theme_Config::Theme_Config(TQWidget* parent, const char* name) - : Theme_ConfigUI( parent, name) +Theme_Config::Theme_Config(TQWidget* tqparent, const char* name) + : Theme_ConfigUI( tqparent, name) { m_defaultThemeIndex = -1; @@ -245,7 +245,7 @@ void Theme_Config::removeTheme() dir = m_dirs[iconThemeIndex->currentItem()]; int remove = KMessageBox::warningContinueCancel(0L, - i18n("Do you want to remove %1 ?").arg(themeName), + i18n("Do you want to remove %1 ?").tqarg(themeName), i18n("Remove Theme"), KStdGuiItem::del(), "warningRemoveTheme" diff --git a/konversation/src/theme_preferences.h b/konversation/src/theme_preferences.h index 52acff2..aa4ee96 100644 --- a/konversation/src/theme_preferences.h +++ b/konversation/src/theme_preferences.h @@ -26,9 +26,10 @@ class TQStringList; class Theme_Config : public Theme_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Theme_Config(TQWidget* parent, const char* name=NULL); + explicit Theme_Config(TQWidget* tqparent, const char* name=NULL); ~Theme_Config(); virtual void restorePageToDefaults(); diff --git a/konversation/src/theme_preferencesui.ui b/konversation/src/theme_preferencesui.ui index ae2624d..28ab7fc 100644 --- a/konversation/src/theme_preferencesui.ui +++ b/konversation/src/theme_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Theme_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Theme_ConfigUI</cstring> </property> @@ -27,15 +27,15 @@ <cstring>iconThemeIndex</cstring> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>installButton</cstring> </property> @@ -43,7 +43,7 @@ <string>I&nstall Theme...</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>removeButton</cstring> </property> @@ -66,18 +66,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>131</width> <height>20</height> </size> </property> </spacer> - <widget class="QFrame" row="1" column="1"> + <widget class="TQFrame" row="1" column="1"> <property name="name"> <cstring>frame3_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -93,7 +93,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>previewLabel1</cstring> </property> @@ -103,91 +103,91 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for normal users</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>previewLabel2</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for away users</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>previewLabel3</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for users with voice</string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>previewLabel4</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for users with half-operator privileges</string> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>previewLabel5</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for users with operator privileges</string> </property> </widget> - <widget class="QLabel" row="0" column="5"> + <widget class="TQLabel" row="0" column="5"> <property name="name"> <cstring>previewLabel6</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> <string>Icon for users with admin privileges</string> </property> </widget> - <widget class="QLabel" row="0" column="6"> + <widget class="TQLabel" row="0" column="6"> <property name="name"> <cstring>previewLabel7</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> <property name="toolTip" stdset="0"> @@ -196,7 +196,7 @@ </widget> </grid> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -214,8 +214,8 @@ </widget> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klistbox.h</includehint> </includehints> diff --git a/konversation/src/topiccombobox.cpp b/konversation/src/topiccombobox.cpp index 1340f02..b9bc792 100644 --- a/konversation/src/topiccombobox.cpp +++ b/konversation/src/topiccombobox.cpp @@ -14,8 +14,8 @@ #include "topiccombobox.h" -TopicComboBox::TopicComboBox(TQWidget* parent) : -KComboBox(parent,"topic_combo_box") +TopicComboBox::TopicComboBox(TQWidget* tqparent) : +KComboBox(tqparent,"topic_combo_box") { connect(this,TQT_SIGNAL(activated(int)),this,TQT_SLOT(topicActivated(int))); connect(this,TQT_SIGNAL(returnPressed(const TQString&)),this,TQT_SLOT(topicActivated(const TQString&))); diff --git a/konversation/src/topiccombobox.h b/konversation/src/topiccombobox.h index 7161355..5338441 100644 --- a/konversation/src/topiccombobox.h +++ b/konversation/src/topiccombobox.h @@ -20,9 +20,10 @@ class TopicComboBox : public KComboBox { Q_OBJECT + TQ_OBJECT public: - explicit TopicComboBox(TQWidget* parent); + explicit TopicComboBox(TQWidget* tqparent); ~TopicComboBox(); void insertStringList(const TQStringList& list); diff --git a/konversation/src/topiclabel.cpp b/konversation/src/topiclabel.cpp index caa8eed..4e4480c 100644 --- a/konversation/src/topiclabel.cpp +++ b/konversation/src/topiclabel.cpp @@ -37,11 +37,11 @@ namespace Konversation { - TopicLabel::TopicLabel(TQWidget *parent, const char *name) - : KActiveLabel(parent, name) + TopicLabel::TopicLabel(TQWidget *tqparent, const char *name) + : KActiveLabel(tqparent, name) { setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); - setFocusPolicy(TQWidget::ClickFocus); + setFocusPolicy(TQ_ClickFocus); m_isOnChannel = false; m_copyUrlMenu = false; @@ -60,13 +60,13 @@ namespace Konversation { } - TQSize TopicLabel::minimumSizeHint() const + TQSize TopicLabel::tqminimumSizeHint() const { int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent(); return TQSize(0, minHeight); } - TQSize TopicLabel::sizeHint() const + TQSize TopicLabel::tqsizeHint() const { int minHeight = fontMetrics().lineSpacing() + fontMetrics().descent(); return TQSize(0, minHeight); @@ -79,12 +79,12 @@ namespace Konversation void TopicLabel::contentsMousePressEvent(TQMouseEvent *e) { - if (e->button()==TQMouseEvent::LeftButton) + if (e->button()==Qt::LeftButton) { pressPosition=e->pos(); urlToDrag = anchorAt(pressPosition); - // HACK Replace % with \x03 in the url to keep Qt from doing stupid things - urlToDrag = urlToDrag.replace ('\x03', "%"); + // HACK Replace % with \x03 in the url to keep TQt from doing stupid things + urlToDrag = urlToDrag.tqreplace ('\x03', "%"); // Hack to counter the fact that we're given an decoded url urlToDrag = KURL::fromPathOrURL(urlToDrag).url(); if (!urlToDrag.isNull()) @@ -98,7 +98,7 @@ namespace Konversation void TopicLabel::contentsMouseReleaseEvent(TQMouseEvent *e) { - if (e->button()==TQMouseEvent::LeftButton) + if (e->button()==Qt::LeftButton) { if (mousePressed) openLink(urlToDrag); mousePressed=false; @@ -114,8 +114,8 @@ namespace Konversation removeSelection(); KURL ux = KURL::fromPathOrURL(urlToDrag); //FIXME consistent IRC URL serialization - if (urlToDrag.startsWith("##")) ux=TQString("irc://%1:%2/%3").arg(m_server->getServerName()). - arg(m_server->getPort()).arg(urlToDrag.mid(2)); + if (urlToDrag.startsWith("##")) ux=TQString("irc://%1:%2/%3").tqarg(m_server->getServerName()). + tqarg(m_server->getPort()).tqarg(urlToDrag.mid(2)); KURLDrag* u=new KURLDrag(ux,viewport()); u->drag(); } @@ -140,7 +140,7 @@ namespace Konversation else if (link.startsWith("#") && m_server && m_server->isConnected()) { TQString channel(link); - channel.replace("##","#"); + channel.tqreplace("##","#"); m_server->sendJoinCommand(channel); } // Always use KDE default mailer. @@ -151,7 +151,7 @@ namespace Konversation else { TQString cmd = Preferences::webBrowserCmd(); - cmd.replace("%u",KURL::fromPathOrURL(link).url()); + cmd.tqreplace("%u",KURL::fromPathOrURL(link).url()); KProcess *proc = new KProcess; TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; @@ -199,9 +199,9 @@ namespace Konversation break; case CopyUrl: { - QClipboard *cb = KApplication::kApplication()->clipboard(); - cb->setText(m_urlToCopy,QClipboard::Selection); - cb->setText(m_urlToCopy,QClipboard::Clipboard); + TQClipboard *cb = KApplication::kApplication()->tqclipboard(); + cb->setText(m_urlToCopy,TQClipboard::Selection); + cb->setText(m_urlToCopy,TQClipboard::Clipboard); break; } case SelectAll: @@ -245,16 +245,16 @@ namespace Konversation if (m_fullText.isEmpty()) { - KActiveLabel::setText(TQString::null); + KActiveLabel::setText(TQString()); return; } TQFontMetrics fm(currentFont()); TQString text = m_fullText; - // text.replace("&", "&"). Not needed as we do it in tagURLs - text.replace("<", "\x0blt;"). // tagUrls will replace \x0b with & - replace(">", "\x0bgt;"); + // text.tqreplace("&", "&"). Not needed as we do it in tagURLs + text.tqreplace("<", "\x0blt;"). // tagUrls will tqreplace \x0b with & + tqreplace(">", "\x0bgt;"); text = tagURLs(text, "", false); if(height() < (fm.lineSpacing() * 2)) @@ -325,7 +325,7 @@ namespace Konversation if (link == m_lastStatusText && !link.isEmpty()) return; - // remember current URL to overcome link clicking problems in QTextBrowser + // remember current URL to overcome link clicking problems in TQTextBrowser m_highlightedURL = link; if (link.isEmpty()) @@ -377,7 +377,7 @@ namespace Konversation m_channelPopup->changeTitle(m_channelPopupId,prettyId); m_isOnChannel = true; - emit setStatusBarTempText(i18n("Join the channel %1").arg(m_currentChannel)); + emit setStatusBarTempText(i18n("Join the channel %1").tqarg(m_currentChannel)); } } } diff --git a/konversation/src/topiclabel.h b/konversation/src/topiclabel.h index ca40da6..4278b95 100644 --- a/konversation/src/topiclabel.h +++ b/konversation/src/topiclabel.h @@ -27,13 +27,14 @@ namespace Konversation class TopicLabel : public KActiveLabel { Q_OBJECT + TQ_OBJECT public: - explicit TopicLabel(TQWidget *parent = 0, const char *name = 0); + explicit TopicLabel(TQWidget *tqparent = 0, const char *name = 0); ~TopicLabel(); - TQSize minimumSizeHint() const; - TQSize sizeHint() const; + TQSize tqminimumSizeHint() const; + TQSize tqsizeHint() const; void setServer(Server* server); enum PopupIDs { Copy,CopyUrl,SelectAll,Bookmark }; diff --git a/konversation/src/trayicon.cpp b/konversation/src/trayicon.cpp index b64bcf6..3d92490 100644 --- a/konversation/src/trayicon.cpp +++ b/konversation/src/trayicon.cpp @@ -30,7 +30,7 @@ namespace Konversation { - TrayIcon::TrayIcon(TQWidget* parent) : KSystemTray(parent) + TrayIcon::TrayIcon(TQWidget* tqparent) : KSystemTray(tqparent) { m_notificationEnabled = false; m_blinkTimer = new TQTimer(this); diff --git a/konversation/src/trayicon.h b/konversation/src/trayicon.h index 44a515d..27dbde6 100644 --- a/konversation/src/trayicon.h +++ b/konversation/src/trayicon.h @@ -30,9 +30,10 @@ namespace Konversation class TrayIcon : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - explicit TrayIcon(TQWidget* parent = 0); + explicit TrayIcon(TQWidget* tqparent = 0); ~TrayIcon(); bool notificationEnabled() { return m_notificationEnabled; } diff --git a/konversation/src/urlcatcher.cpp b/konversation/src/urlcatcher.cpp index cb92742..da96a45 100644 --- a/konversation/src/urlcatcher.cpp +++ b/konversation/src/urlcatcher.cpp @@ -38,9 +38,9 @@ #include <klistviewsearchline.h> -UrlCatcher::UrlCatcher(TQWidget* parent) : ChatWindow(parent) +UrlCatcher::UrlCatcher(TQWidget* tqparent) : ChatWindow(tqparent) { - layout()->setAutoAdd(false); + tqlayout()->setAutoAdd(false); setName(i18n("URL Catcher")); setType(ChatWindow::UrlCatcher); @@ -96,9 +96,9 @@ UrlCatcher::UrlCatcher(TQWidget* parent) : ChatWindow(parent) saveListButton->setEnabled(false); clearListButton->setEnabled(false); - layout()->add(searchWidget); - layout()->add(urlListView); - layout()->add(buttonBox); + tqlayout()->add(searchWidget); + tqlayout()->add(urlListView); + tqlayout()->add(buttonBox); urlSelected(); } @@ -143,7 +143,7 @@ void UrlCatcher::openUrl(TQListViewItem* item) else { TQString cmd = Preferences::webBrowserCmd(); - cmd.replace("%u", url); + cmd.tqreplace("%u", url); KProcess *proc = new KProcess; TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; @@ -167,9 +167,9 @@ void UrlCatcher::copyUrlClicked() TQListViewItem* item=urlListView->selectedItem(); if(item) { - QClipboard *cb=KApplication::kApplication()->clipboard(); - cb->setText(item->text(1),QClipboard::Selection); - cb->setText(item->text(1),QClipboard::Clipboard); + TQClipboard *cb=KApplication::kApplication()->tqclipboard(); + cb->setText(item->text(1),TQClipboard::Selection); + cb->setText(item->text(1),TQClipboard::Clipboard); } } diff --git a/konversation/src/urlcatcher.h b/konversation/src/urlcatcher.h index 9203b19..a451fa2 100644 --- a/konversation/src/urlcatcher.h +++ b/konversation/src/urlcatcher.h @@ -27,9 +27,10 @@ class KListViewSearchLineWidget; class UrlCatcher : public ChatWindow { Q_OBJECT + TQ_OBJECT public: - explicit UrlCatcher(TQWidget* parent); + explicit UrlCatcher(TQWidget* tqparent); ~UrlCatcher(); virtual bool canBeFrontView() { return true; } diff --git a/konversation/src/valuelistviewitem.cpp b/konversation/src/valuelistviewitem.cpp index 9be09ef..2e43b98 100644 --- a/konversation/src/valuelistviewitem.cpp +++ b/konversation/src/valuelistviewitem.cpp @@ -16,15 +16,15 @@ #include "valuelistviewitem.h" -ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, const TQString& label) -: KListViewItem(parent,label) +ValueListViewItem::ValueListViewItem(int newValue, KListView* tqparent, const TQString& label) +: KListViewItem(tqparent,label) { m_value=newValue; enforceSortOrder(); } -ValueListViewItem::ValueListViewItem(int newValue, KListView* parent, TQListViewItem* after, const TQString& label) -: KListViewItem(parent,after,label) +ValueListViewItem::ValueListViewItem(int newValue, KListView* tqparent, TQListViewItem* after, const TQString& label) +: KListViewItem(tqparent,after,label) { m_value=newValue; enforceSortOrder(); diff --git a/konversation/src/valuelistviewitem.h b/konversation/src/valuelistviewitem.h index 4eeac1e..8324e68 100644 --- a/konversation/src/valuelistviewitem.h +++ b/konversation/src/valuelistviewitem.h @@ -21,8 +21,8 @@ class ValueListViewItem : public KListViewItem { public: - ValueListViewItem(int newValue, KListView* parent, const TQString& label); - ValueListViewItem(int newValue, KListView* parent, TQListViewItem* after, const TQString& label); + ValueListViewItem(int newValue, KListView* tqparent, const TQString& label); + ValueListViewItem(int newValue, KListView* tqparent, TQListViewItem* after, const TQString& label); ~ValueListViewItem(); int getValue() const; diff --git a/konversation/src/viewcontainer.cpp b/konversation/src/viewcontainer.cpp index c939f33..bffff02 100644 --- a/konversation/src/viewcontainer.cpp +++ b/konversation/src/viewcontainer.cpp @@ -69,7 +69,7 @@ ViewContainer::ViewContainer(KonversationMainWindow* window): // The tree needs to be initialized before the tab widget so that it // may assume a leading role in view selection management. - if (Preferences::tabPlacement()==Preferences::Left) setupViewTree(); + if (Preferences::tabPlacement()==PreferencesBase::Left) setupViewTree(); setupTabWidget(); @@ -157,7 +157,7 @@ void ViewContainer::setupTabWidget() KPushButton* closeBtn = new KPushButton(m_tabWidget); closeBtn->setPixmap(KGlobal::iconLoader()->loadIcon("tab_remove", KIcon::Small)); closeBtn->resize(22, 22); - closeBtn->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + closeBtn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); m_tabWidget->setCornerWidget(closeBtn); connect(closeBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeCurrentView())); @@ -220,7 +220,7 @@ void ViewContainer::setupViewTree() { ChatWindow* view = static_cast<ChatWindow*>(m_tabWidget->page(i)); - if (view->getType() == ChatWindow::Status) + if (view->getType() == ChatWindow::tqStatus) { if (view == m_frontView) m_viewTree->addView(view->getName(), view, m_tabWidget->tabIconSet(view), true); @@ -233,7 +233,7 @@ void ViewContainer::setupViewTree() { ChatWindow* view = static_cast<ChatWindow*>(m_tabWidget->page(i)); - if (!view->getType() == ChatWindow::Status) + if (!view->getType() == ChatWindow::tqStatus) { if (view == m_frontView) m_viewTree->addView(view->getName(), view, m_tabWidget->tabIconSet(view), true); @@ -338,13 +338,13 @@ void ViewContainer::syncTabBarToTree() void ViewContainer::updateAppearance() { - if (Preferences::tabPlacement()==Preferences::Left && m_viewTree == 0) + if (Preferences::tabPlacement()==PreferencesBase::Left && m_viewTree == 0) { m_saveSplitterSizesLock = true; setupViewTree(); } - if (!(Preferences::tabPlacement()==Preferences::Left) && m_viewTree) + if (!(Preferences::tabPlacement()==PreferencesBase::Left) && m_viewTree) { m_saveSplitterSizesLock = true; removeViewTree(); @@ -373,17 +373,17 @@ void ViewContainer::updateTabWidgetAppearance() { if (!m_tabWidget) return; - m_tabWidget->setTabBarHidden((Preferences::tabPlacement()==Preferences::Left)); + m_tabWidget->setTabBarHidden((Preferences::tabPlacement()==PreferencesBase::Left)); if (Preferences::customTabFont()) m_tabWidget->setFont(Preferences::tabFont()); else m_tabWidget->setFont(KGlobalSettings::generalFont()); - m_tabWidget->setTabPosition((Preferences::tabPlacement()==Preferences::Top) ? + m_tabWidget->setTabPosition((Preferences::tabPlacement()==PreferencesBase::Top) ? TQTabWidget::Top : TQTabWidget::Bottom); - if (Preferences::showTabBarCloseButton() && !(Preferences::tabPlacement()==Preferences::Left)) + if (Preferences::showTabBarCloseButton() && !(Preferences::tabPlacement()==PreferencesBase::Left)) m_tabWidget->cornerWidget()->show(); else m_tabWidget->cornerWidget()->hide(); @@ -426,7 +426,7 @@ void ViewContainer::updateViewActions(int index) if (action) action->setEnabled(index < (m_tabWidget->count() - 1)); } - if (server && (viewType == ChatWindow::Status || server == m_frontServer)) + if (server && (viewType == ChatWindow::tqStatus || server == m_frontServer)) { action = actionCollection()->action("reconnect_server"); if (action) action->setEnabled(true); @@ -457,7 +457,7 @@ void ViewContainer::updateViewActions(int index) if (notifyAction) { notifyAction->setEnabled(viewType == ChatWindow::Channel || viewType == ChatWindow::Query || - viewType == ChatWindow::Status || viewType == ChatWindow::Konsole || + viewType == ChatWindow::tqStatus || viewType == ChatWindow::Konsole || viewType == ChatWindow::DccTransferPanel || viewType == ChatWindow::RawLog); notifyAction->setChecked(view->notificationsEnabled()); } @@ -519,7 +519,7 @@ void ViewContainer::updateViewActions(int index) action = actionCollection()->action("clear_window"); if (action) action->setEnabled(insertSupported); - action = actionCollection()->action("edit_find"); + action = actionCollection()->action("edit_tqfind"); if (action) { action->setText(i18n("Find Text...")); @@ -539,10 +539,10 @@ void ViewContainer::updateViewActions(int index) if (m_frontServer) { TQString name = m_frontServer->getDisplayName(); - name = name.replace('&', "&&"); + name = name.tqreplace('&', "&&"); channelListAction->setEnabled(true); channelListAction->setChecked(m_frontServer->getChannelListPanel()); - channelListAction->setText(i18n("Channel &List for %1").arg(name)); + channelListAction->setText(i18n("Channel &List for %1").tqarg(name)); } else { @@ -561,8 +561,8 @@ void ViewContainer::updateViewActions(int index) else { TQString name = view->getName(); - name = name.replace('&', "&&"); - action->setText(i18n("&Open Logfile for %1").arg(name)); + name = name.tqreplace('&', "&&"); + action->setText(i18n("&Open Logfile for %1").tqarg(name)); } } @@ -573,7 +573,7 @@ void ViewContainer::updateViewActions(int index) if (action && view->getType() == ChatWindow::Channel) { action->setEnabled(true); - action->setText(i18n("&Channel Settings for %1...").arg(view->getName())); + action->setText(i18n("&Channel Settings for %1...").tqarg(view->getName())); } else if (action) { @@ -629,7 +629,7 @@ void ViewContainer::updateViewActions(int index) action = actionCollection()->action("clear_tabs"); if (action) action->setEnabled(false); - action = actionCollection()->action("edit_find"); + action = actionCollection()->action("edit_tqfind"); if (action) action->setEnabled(false); action = actionCollection()->action("edit_find_next"); @@ -702,7 +702,7 @@ void ViewContainer::updateFrontView() { case ChatWindow::Channel: case ChatWindow::Query: - case ChatWindow::Status: + case ChatWindow::tqStatus: case ChatWindow::ChannelList: case ChatWindow::RawLog: emit setStatusBarLagLabelShown(true); @@ -729,7 +729,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG if (serverGroup) { - if (view->getType() == ChatWindow::Status && view->getServer()->getServerGroup() == serverGroup) + if (view->getType() == ChatWindow::tqStatus && view->getServer()->getServerGroup() == serverGroup) { TQString label = view->getServer()->getDisplayName(); @@ -762,7 +762,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG if (!Preferences::tabNotificationsText()) - m_viewTree->setViewColor(view, m_window->colorGroup().foreground()); + m_viewTree->setViewColor(view, m_window->tqcolorGroup().foreground()); } else if (m_tabWidget) { @@ -773,7 +773,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG m_tabWidget->setTabIconSet(view, images->getCloseIcon()); if (!Preferences::tabNotificationsText()) - m_tabWidget->setTabColor(view, m_window->colorGroup().foreground()); + m_tabWidget->setTabColor(view, m_window->tqcolorGroup().foreground()); } if (Preferences::tabNotificationsLeds() || Preferences::tabNotificationsText()) @@ -823,7 +823,7 @@ void ViewContainer::setViewNotification(ChatWindow* view, const Konversation::Ta if (!view || view == m_tabWidget->currentPage()) return; - if (type < Konversation::tnfControl && (m_activeViewOrderList.find(view) == m_activeViewOrderList.end())) + if (type < Konversation::tnfControl && (m_activeViewOrderList.tqfind(view) == m_activeViewOrderList.end())) m_activeViewOrderList.append(view); if (!Preferences::tabNotificationsLeds() && !Preferences::tabNotificationsText()) @@ -1040,7 +1040,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view) m_viewTree->setViewIcon(view, images->getPrivateLed(false)); break; - case ChatWindow::Status: + case ChatWindow::tqStatus: m_viewTree->setViewIcon(view, images->getServerLed(false)); break; @@ -1051,19 +1051,19 @@ void ViewContainer::unsetViewNotification(ChatWindow* view) } TQColor textColor = (Preferences::inputFieldsBackgroundColor() - ? Preferences::color(Preferences::ChannelMessage) : m_window->colorGroup().foreground()); + ? Preferences::color(Preferences::ChannelMessage) : m_window->tqcolorGroup().foreground()); if (view->getType() == ChatWindow::Channel) { Channel *channel = static_cast<Channel*>(view); if (!channel->joined()) - textColor = KonversationApplication::instance()->palette(m_viewTree).disabled().text(); + textColor = KonversationApplication::instance()->tqpalette(m_viewTree).disabled().text(); } else if (view->getType() == ChatWindow::Query) { if (!view->getServer()->isConnected()) - textColor = KonversationApplication::instance()->palette(m_tabWidget).disabled().text(); + textColor = KonversationApplication::instance()->tqpalette(m_tabWidget).disabled().text(); } m_viewTree->setViewColor(view, textColor); @@ -1083,7 +1083,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view) m_tabWidget->setTabIconSet(view, images->getPrivateLed(false)); break; - case ChatWindow::Status: + case ChatWindow::tqStatus: m_tabWidget->setTabIconSet(view, images->getServerLed(false)); break; @@ -1093,25 +1093,25 @@ void ViewContainer::unsetViewNotification(ChatWindow* view) } } - TQColor textColor = m_window->colorGroup().foreground(); + TQColor textColor = m_window->tqcolorGroup().foreground(); if (view->getType() == ChatWindow::Channel) { Channel *channel = static_cast<Channel*>(view); if (!channel->joined()) - textColor = KonversationApplication::instance()->palette(m_tabWidget).disabled().text(); + textColor = KonversationApplication::instance()->tqpalette(m_tabWidget).disabled().text(); } else if (view->getType() == ChatWindow::Query) { if (!view->getServer()->isConnected()) - textColor = KonversationApplication::instance()->palette(m_tabWidget).disabled().text(); + textColor = KonversationApplication::instance()->tqpalette(m_tabWidget).disabled().text(); } m_tabWidget->setTabColor(view, textColor); } - TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view); + TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.tqfind(view); if (it != m_activeViewOrderList.end()) m_activeViewOrderList.remove(it); @@ -1196,7 +1196,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit { tmp_ChatWindow = static_cast<ChatWindow *>(m_tabWidget->page(sindex)); - if (tmp_ChatWindow->getType() == ChatWindow::Status && tmp_ChatWindow->getServer() == view->getServer()) + if (tmp_ChatWindow->getType() == ChatWindow::tqStatus && tmp_ChatWindow->getServer() == view->getServer()) { for (int index = sindex + 1; index < m_tabWidget->count(); index++) { @@ -1226,7 +1226,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit { tmp_ChatWindow = static_cast<ChatWindow *>(m_tabWidget->page(sindex)); - if (tmp_ChatWindow->getType() == ChatWindow::Status && tmp_ChatWindow->getServer() == view->getServer()) + if (tmp_ChatWindow->getType() == ChatWindow::tqStatus && tmp_ChatWindow->getServer() == view->getServer()) { placement = sindex + 1; break; @@ -1245,7 +1245,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit { tmp_ChatWindow = static_cast<ChatWindow *>(m_tabWidget->page(sindex)); - if (tmp_ChatWindow->getType() == ChatWindow::Status && tmp_ChatWindow->getServer() == view->getServer()) + if (tmp_ChatWindow->getType() == ChatWindow::tqStatus && tmp_ChatWindow->getServer() == view->getServer()) { for (int index = sindex + 1; index < m_tabWidget->count(); index++) { @@ -1276,7 +1276,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit tmp_ChatWindow = static_cast<ChatWindow*>(m_tabWidget->page(sindex)); wtype = tmp_ChatWindow->getType(); - if (wtype != ChatWindow::Status && wtype != ChatWindow::Channel + if (wtype != ChatWindow::tqStatus && wtype != ChatWindow::Channel && wtype != ChatWindow::RawLog && wtype != ChatWindow::Query && wtype != ChatWindow::DccChat && wtype != ChatWindow::ChannelList) { @@ -1286,7 +1286,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit } break; - case ChatWindow::Status: + case ChatWindow::tqStatus: if (Preferences::tabNotificationsLeds()) iconSet = images->getServerLed(false); else if (Preferences::closeButtons()) @@ -1299,7 +1299,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit tmp_ChatWindow = static_cast<ChatWindow *>(m_tabWidget->page(sindex)); if (tmp_ChatWindow->getType() != ChatWindow::Channel - && tmp_ChatWindow->getType() != ChatWindow::Status + && tmp_ChatWindow->getType() != ChatWindow::tqStatus && tmp_ChatWindow->getType() != ChatWindow::RawLog && tmp_ChatWindow->getType() != ChatWindow::Query && tmp_ChatWindow->getType() != ChatWindow::DccChat) @@ -1559,12 +1559,12 @@ void ViewContainer::cleanupAfterClose(ChatWindow* view) m_saveSplitterSizesLock = true; m_vbox->hide(); emit resetStatusBar(); - emit setWindowCaption(TQString::null); + emit setWindowCaption(TQString()); } } // Remove the view from the active view list if it's still on it - TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.find(view); + TQValueList<ChatWindow*>::iterator it = m_activeViewOrderList.tqfind(view); if (it != m_activeViewOrderList.end()) m_activeViewOrderList.remove(it); @@ -1624,14 +1624,14 @@ void ViewContainer::updateViewEncoding(ChatWindow* view) if (codecAction) { - if(viewType == ChatWindow::Channel || viewType == ChatWindow::Query || viewType == ChatWindow::Status) + if(viewType == ChatWindow::Channel || viewType == ChatWindow::Query || viewType == ChatWindow::tqStatus) { codecAction->setEnabled(view->isChannelEncodingSupported()); TQString encoding = view->getChannelEncoding(); if(m_frontServer) { - codecAction->changeItem(0, i18n("Default encoding", "Default ( %1 )").arg(m_frontServer->getIdentity()->getCodecName())); + codecAction->changeItem(0, i18n("Default encoding", "Default ( %1 )").tqarg(m_frontServer->getIdentity()->getCodecName())); } if(encoding.isEmpty()) @@ -1682,7 +1682,7 @@ void ViewContainer::showViewContextMenu(TQWidget* tab, const TQPoint& pos) } } - if (viewType == ChatWindow::Status) + if (viewType == ChatWindow::tqStatus) { TQPtrList<KAction> serverActions; KAction* action = actionCollection()->action("disconnect_server"); @@ -1755,7 +1755,7 @@ TQString ViewContainer::currentViewURL(bool passNetwork) port = ':'+TQString::number(m_frontServer->getPort()); } - if (server.contains(':')) // IPv6 + if (server.tqcontains(':')) // IPv6 server = '['+server+']'; url = "irc://"+server+port+'/'+channel; @@ -1825,7 +1825,7 @@ void ViewContainer::appendToFrontmost(const TQString& type,const TQString& messa } // This might happen if canBeFrontView() is false for active ChatWindow - // and the view does not belong to any server (e.g. DCC Status View). + // and the view does not belong to any server (e.g. DCC tqStatus View). // Discard message in this case. if (!serverView) return; @@ -1842,7 +1842,7 @@ void ViewContainer::appendToFrontmost(const TQString& type,const TQString& messa // FIXME: this signal should be sent from the status panel instead, so it // can be using the correct highlight color, would be more consistent // anyway! - // FIXME newText(serverView,TQString::null,true); + // FIXME newText(serverView,TQString(),true); } else m_frontView->appendServerMessage(type, message, parseURL); @@ -1957,7 +1957,7 @@ void ViewContainer::openLogFile() ChatWindow* view=static_cast<ChatWindow*>(m_frontView); ChatWindow::WindowType viewType=view->getType(); if (viewType==ChatWindow::Channel || viewType==ChatWindow::Query || - viewType==ChatWindow::Status || viewType==ChatWindow::DccChat) + viewType==ChatWindow::tqStatus || viewType==ChatWindow::DccChat) { openLogFile(view->getName(), view->logFileName()); } @@ -1969,7 +1969,7 @@ void ViewContainer::openLogFile(const TQString& caption, const TQString& file) if (!file.isEmpty()) { LogfileReader* logReader = new LogfileReader(m_tabWidget, file); - addView(logReader, i18n("Logfile of %1").arg(caption)); + addView(logReader, i18n("Logfile of %1").tqarg(caption)); logReader->setServer(0); } } @@ -2033,7 +2033,7 @@ void ViewContainer::addDccPanel() { if (!m_dccPanelOpen) { - addView(m_dccPanel, i18n("DCC Status")); + addView(m_dccPanel, i18n("DCC tqStatus")); m_dccPanelOpen=true; (dynamic_cast<KToggleAction*>(actionCollection()->action("open_dccstatus_window")))->setChecked(true); } diff --git a/konversation/src/viewcontainer.h b/konversation/src/viewcontainer.h index b0d3121..a91b487 100644 --- a/konversation/src/viewcontainer.h +++ b/konversation/src/viewcontainer.h @@ -41,9 +41,10 @@ namespace Konversation class ServerGroupSettings; } -class ViewContainer : public QObject +class ViewContainer : public TQObject { Q_OBJECT + TQ_OBJECT public: explicit ViewContainer(KonversationMainWindow* window); diff --git a/konversation/src/viewtree.cpp b/konversation/src/viewtree.cpp index 9254be9..ab84d87 100644 --- a/konversation/src/viewtree.cpp +++ b/konversation/src/viewtree.cpp @@ -32,10 +32,10 @@ #include <kapplication.h> -class ViewTree::ToolTip : public QToolTip +class ViewTree::ToolTip : public TQToolTip { public: - ToolTip(TQWidget *parent, KListView *viewTree); + ToolTip(TQWidget *tqparent, KListView *viewTree); virtual ~ToolTip() {} protected: @@ -45,30 +45,30 @@ class ViewTree::ToolTip : public QToolTip KListView* viewTree; }; -ViewTree::ToolTip::ToolTip(TQWidget *parent, KListView *viewTree) - : TQToolTip(parent), viewTree(viewTree) +ViewTree::ToolTip::ToolTip(TQWidget *tqparent, KListView *viewTree) + : TQToolTip(tqparent), viewTree(viewTree) { } void ViewTree::ToolTip::maybeTip (const TQPoint &pos) { - if (!parentWidget() || !viewTree) return; + if (!tqparentWidget() || !viewTree) return; ViewTreeItem* view = static_cast<ViewTreeItem*>(viewTree->itemAt(pos)); - if (view && view->isTruncated()) tip(viewTree->itemRect(view), view->getName()); + if (view && view->isTruncated()) tip(viewTree->tqitemRect(view), view->getName()); } -ViewTree::ViewTree(TQWidget *parent) - : KListView(parent) +ViewTree::ViewTree(TQWidget *tqparent) + : KListView(tqparent) { header()->hide(); setHScrollBarMode(TQScrollView::AlwaysOff); addColumn(i18n("Tabs")); setSortColumn(0); - setSortOrder(Qt::Ascending); + setSortOrder(TQt::Ascending); setResizeMode(TQListView::AllColumns); setSelectionModeExt(KListView::Single); @@ -135,22 +135,22 @@ void ViewTree::updateAppearance() void ViewTree::addView(const TQString& name, ChatWindow* view, const TQIconSet &iconset, bool select, ChatWindow* afterView) { ViewTreeItem* item = 0; - ViewTreeItem* parent = 0; + ViewTreeItem* tqparent = 0; if (view->getType() != ChatWindow::DccChat) - parent = getParentItemForView(view); + tqparent = getParentItemForView(view); - if (parent) + if (tqparent) { if (afterView) { ViewTreeItem* afterItem = getItemForView(afterView); slotAboutToMoveView(); - item = new ViewTreeItem(parent, afterItem, name, view); + item = new ViewTreeItem(tqparent, afterItem, name, view); slotMovedView(); } else - item = new ViewTreeItem(parent, name, view); + item = new ViewTreeItem(tqparent, name, view); } else item = new ViewTreeItem(this, name, view); @@ -385,15 +385,15 @@ void ViewTree::moveViewUp(ChatWindow* view) } else if (item->depth() < itemAbove->depth()) { - ViewTreeItem* parent = static_cast<ViewTreeItem*>(itemAbove->parent()); + ViewTreeItem* tqparent = static_cast<ViewTreeItem*>(itemAbove->tqparent()); - if (parent) + if (tqparent) { - int newSortIndex = parent->getSortIndex(); + int newSortIndex = tqparent->getSortIndex(); int oldSortIndex = item->getSortIndex(); item->setSortIndex(newSortIndex); - parent->setSortIndex(oldSortIndex); + tqparent->setSortIndex(oldSortIndex); sort(); } @@ -503,7 +503,7 @@ void ViewTree::enableCloseButton() bool ViewTree::isAboveIcon(TQPoint point, ViewTreeItem* item) { - TQPoint inItem = point - itemRect(item).topLeft(); + TQPoint inItem = point - tqitemRect(item).topLeft(); int MARGIN = 2; int LED_ICON_SIZE = 14; @@ -538,10 +538,10 @@ void ViewTree::contentsMousePressEvent(TQMouseEvent* e) // Don't change the selected item when the user only // wants to get the context menu for a non-selected // item. - if (e->button() == RightButton && !item->isSelected()) + if (e->button() == Qt::RightButton && !item->isSelected()) return; - if (Preferences::closeButtons() && e->button() == LeftButton && isAboveIcon(vp, item)) + if (Preferences::closeButtons() && e->button() == Qt::LeftButton && isAboveIcon(vp, item)) { m_pressedAboveCloseButton = true; if (!item->getCloseButtonEnabled()) KListView::contentsMousePressEvent(e); @@ -551,7 +551,7 @@ void ViewTree::contentsMousePressEvent(TQMouseEvent* e) m_pressedAboveCloseButton = false; KListView::contentsMousePressEvent(e); } - m_middleClickItem = (Preferences::middleClickClose() && e->button() == MidButton) ? item : 0; + m_middleClickItem = (Preferences::middleClickClose() && e->button() == Qt::MidButton) ? item : 0; } } @@ -560,19 +560,19 @@ void ViewTree::contentsMouseReleaseEvent(TQMouseEvent* e) TQPoint vp = contentsToViewport(e->pos()); ViewTreeItem* item = static_cast<ViewTreeItem*>(itemAt(vp)); - if (!item && e->button() == RightButton) + if (!item && e->button() == Qt::RightButton) return; if (item) { - if (Preferences::closeButtons() && e->button() == LeftButton + if (Preferences::closeButtons() && e->button() == Qt::LeftButton && isAboveIcon(vp, item) && m_pressedAboveCloseButton && item->getCloseButtonEnabled()) { emit closeView(item->getView()); } - if (Preferences::middleClickClose() && e->button() == MidButton + if (Preferences::middleClickClose() && e->button() == Qt::MidButton && item == m_middleClickItem) { emit closeView(item->getView()); @@ -597,9 +597,9 @@ void ViewTree::contentsMouseMoveEvent(TQMouseEvent* e) // Allow dragging only with the middle mouse button, just // like for the tab bar. - if ((e->state() & MidButton) == MidButton) + if ((e->state() & Qt::MidButton) == Qt::MidButton) KListView::contentsMouseMoveEvent(e); - else if ((e->state() & LeftButton) == LeftButton) + else if ((e->state() & Qt::LeftButton) == Qt::LeftButton) { if (item && (item != selectedItem()) && !item->isSeparator()) setSelected(item, true); @@ -607,7 +607,7 @@ void ViewTree::contentsMouseMoveEvent(TQMouseEvent* e) if (Preferences::closeButtons()) { - if (!(e->state() & LeftButton) && !(e->state() & MidButton) && !(e->state() & RightButton)) + if (!(e->state() & Qt::LeftButton) && !(e->state() & Qt::MidButton) && !(e->state() & Qt::RightButton)) { if (item) { @@ -735,7 +735,7 @@ void ViewTree::resizeEvent(TQResizeEvent* e) emit sizeChanged(); } -void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after) +void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after) { TQPoint p (contentsToViewport(pos)); @@ -748,7 +748,7 @@ void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewI else { // Get the closest item before us ('atpos' or the one above, if any). - if (p.y() - itemRect(atpos).topLeft().y() < (atpos->height()/2)) + if (p.y() - tqitemRect(atpos).topLeft().y() < (atpos->height()/2)) above = atpos->itemAbove(); else above = atpos; @@ -764,14 +764,14 @@ void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewI if (itemAbove->sortLast()) { after = itemAbove; - parent = after->parent(); + tqparent = after->tqparent(); return; } else { after = m_separator; - parent = after->parent(); + tqparent = after->tqparent(); return; } } @@ -780,20 +780,20 @@ void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewI if (itemAbove->sortLast()) { after = m_separator->itemAbove(); - after = (!after || after->depth() == 0) ? after : after->parent(); - parent = 0L; + after = (!after || after->depth() == 0) ? after : after->tqparent(); + tqparent = 0L; return; } else if (above->depth() == dragItem->depth()) { after = above; - parent = 0L; + tqparent = 0L; return; } else { - after = above->parent(); - parent = 0L; + after = above->tqparent(); + tqparent = 0L; return; } } @@ -801,33 +801,33 @@ void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewI { if (!itemAbove->getView() || itemAbove->sortLast()) { - after = getLastChild(dragItem->parent()); - parent = after ? after->parent() : 0L; + after = getLastChild(dragItem->tqparent()); + tqparent = after ? after->tqparent() : 0L; return; } else if (itemAbove->getView()->getServer() != dragItem->getView()->getServer()) { if (itemIndex(itemAbove) > itemIndex(dragItem)) { - after = getLastChild(dragItem->parent()); - parent = after ? after->parent() : 0L; + after = getLastChild(dragItem->tqparent()); + tqparent = after ? after->tqparent() : 0L; return; } else { after = 0L; - parent = dragItem->parent(); + tqparent = dragItem->tqparent(); return; } } else { - if (above == dragItem->parent()) + if (above == dragItem->tqparent()) after = 0L; else after = above; - parent = dragItem->parent(); + tqparent = dragItem->tqparent(); return; } } @@ -837,25 +837,25 @@ void ViewTree::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewI if (dragItem->sortLast()) { after = m_separator; - parent = after->parent(); + tqparent = after->tqparent(); return; } else if (dragItem->depth() == 0) { after = 0L; - parent = 0L; + tqparent = 0L; return; } else { after = 0L; - parent = dragItem->parent(); + tqparent = dragItem->tqparent(); return; } } after = 0L; - parent = 0L; + tqparent = 0L; } TQDragObject* ViewTree::dragObject() @@ -913,7 +913,7 @@ ViewTreeItem* ViewTree::getParentItemForView(ChatWindow* view) while (item) { - if (item->getViewType() == ChatWindow::Status + if (item->getViewType() == ChatWindow::tqStatus && item->getView() && item->getView()->getServer() == server) { @@ -927,9 +927,9 @@ ViewTreeItem* ViewTree::getParentItemForView(ChatWindow* view) return 0; } -ViewTreeItem* ViewTree::getLastChild(TQListViewItem* parent) +ViewTreeItem* ViewTree::getLastChild(TQListViewItem* tqparent) { - ViewTreeItem* item = static_cast<ViewTreeItem*>(parent); + ViewTreeItem* item = static_cast<ViewTreeItem*>(tqparent); Server* server = item->getView()->getServer(); ViewTreeItem* lastChild = 0; @@ -953,7 +953,7 @@ void ViewTree::paintEmptyArea(TQPainter* p, const TQRect& rect) int y = last->itemPos() + last->height(); int x = visibleWidth(); - if (!rect.contains(x-1, y+2)) + if (!rect.tqcontains(x-1, y+2)) return; TQColor bgColor = paletteBackgroundColor(); diff --git a/konversation/src/viewtree.h b/konversation/src/viewtree.h index f2d79ff..4f38c8e 100644 --- a/konversation/src/viewtree.h +++ b/konversation/src/viewtree.h @@ -21,9 +21,10 @@ class ChatWindow; class ViewTree : public KListView { Q_OBJECT + TQ_OBJECT public: - explicit ViewTree(TQWidget *parent); + explicit ViewTree(TQWidget *tqparent); ~ViewTree(); void selectFirstView(bool select); @@ -63,7 +64,7 @@ class ViewTree : public KListView void resizeEvent(TQResizeEvent* e); - void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after); + void findDrop(const TQPoint &pos, TQListViewItem *&tqparent, TQListViewItem *&after); TQDragObject* dragObject(); void paintEmptyArea(TQPainter* p, const TQRect& rect); @@ -84,7 +85,7 @@ class ViewTree : public KListView ViewTreeItem* getItemForView(ChatWindow* view); ViewTreeItem* getParentItemForView(ChatWindow* view); - ViewTreeItem* getLastChild(TQListViewItem* parent); + ViewTreeItem* getLastChild(TQListViewItem* tqparent); bool canMoveItemUp(ViewTreeItem* item); bool canMoveItemDown(ViewTreeItem* item); diff --git a/konversation/src/viewtreeitem.cpp b/konversation/src/viewtreeitem.cpp index 819176b..6ed0265 100644 --- a/konversation/src/viewtreeitem.cpp +++ b/konversation/src/viewtreeitem.cpp @@ -28,8 +28,8 @@ int ViewTreeItem::s_availableSortIndex = 0; -ViewTreeItem::ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow* view) - : TQListViewItem(parent, name) +ViewTreeItem::ViewTreeItem(TQListView* tqparent, const TQString& name, ChatWindow* view) + : TQListViewItem(tqparent, name) { m_sortIndex = s_availableSortIndex; s_availableSortIndex++; @@ -52,8 +52,8 @@ ViewTreeItem::ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow* m_closeButtonEnabled = false; } -ViewTreeItem::ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWindow* view, int sortIndex) - : TQListViewItem(parent, name) +ViewTreeItem::ViewTreeItem(TQListViewItem* tqparent, const TQString& name, ChatWindow* view, int sortIndex) + : TQListViewItem(tqparent, name) { if (sortIndex != -1) setSortIndex(sortIndex); @@ -82,8 +82,8 @@ ViewTreeItem::ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWin m_closeButtonEnabled = false; } -ViewTreeItem::ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view) - : TQListViewItem(parent, afterItem, name) +ViewTreeItem::ViewTreeItem(TQListViewItem* tqparent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view) + : TQListViewItem(tqparent, afterItem, name) { m_sortIndex = s_availableSortIndex; s_availableSortIndex++; @@ -107,7 +107,7 @@ ViewTreeItem::ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, co m_closeButtonEnabled = false; } -ViewTreeItem::ViewTreeItem(TQListView* parent) : TQListViewItem(parent) +ViewTreeItem::ViewTreeItem(TQListView* tqparent) : TQListViewItem(tqparent) { setView(0); setOpen(true); @@ -173,7 +173,7 @@ void ViewTreeItem::setColor(TQColor color) { m_color = color; m_customColorSet = true; - repaint(); + tqrepaint(); } } @@ -201,7 +201,7 @@ void ViewTreeItem::setHighlighted(bool highlight) if (m_isHighlighted != highlight) { m_isHighlighted = highlight; - repaint(); + tqrepaint(); } } @@ -246,7 +246,7 @@ bool ViewTreeItem::sortLast() const { if (!m_isSeparator) { - if (getViewType() == ChatWindow::Status + if (getViewType() == ChatWindow::tqStatus || getViewType() == ChatWindow::Channel || getViewType() == ChatWindow::Query || getViewType() == ChatWindow::RawLog @@ -304,7 +304,7 @@ void ViewTreeItem::setup() int LED_ICON_SIZE = 14; int MARGIN = 2; - TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0)); + TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop | TQt::ShowPrefix, text(/*column=*/0)); int height = MARGIN + kMax(LED_ICON_SIZE, textRect.height()) + MARGIN; setHeight(height); } @@ -329,9 +329,9 @@ void ViewTreeItem::paintFocus(TQPainter* /* p */, const TQColorGroup& /* cg */, void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /* column */, int width, int /* align */) { - // Workaround a Qt bug: + // Workaround a TQt bug: // When the splitter is moved to hide the tree view and then the application is restarted, - // Qt try to draw items with a negative size. + // TQt try to draw items with a negative size. if (width <= 0) return; int LED_ICON_SIZE = 14; @@ -359,7 +359,7 @@ void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /* if (!m_isSeparator) { // Draw the rounded rectangle. - TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, Qt::AlignAuto | Qt::AlignTop | Qt::ShowPrefix, text(/*column=*/0)); + TQRect textRect = listView()->fontMetrics().boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop | TQt::ShowPrefix, text(/*column=*/0)); int xRound = MARGIN; int yRound = MARGIN; int hRound = height() - 2 * MARGIN; @@ -473,7 +473,7 @@ void ViewTreeItem::paintCell(TQPainter* p, const TQColorGroup& /* cg */, int /* painter.setPen(textColor); painter.setFont(listView()->font()); - painter.drawText(xText, 0, textWidth, height(), Qt::AlignAuto | Qt::AlignVCenter, text); + painter.drawText(xText, 0, textWidth, height(), TQt::AlignAuto | TQt::AlignVCenter, text); } } else diff --git a/konversation/src/viewtreeitem.h b/konversation/src/viewtreeitem.h index f132562..2834fd8 100644 --- a/konversation/src/viewtreeitem.h +++ b/konversation/src/viewtreeitem.h @@ -24,15 +24,15 @@ class ChatWindow; class Images; -class ViewTreeItem : public QListViewItem +class ViewTreeItem : public TQListViewItem { public: - ViewTreeItem(TQListView* parent, const TQString& name, ChatWindow* view); - ViewTreeItem(TQListViewItem* parent, const TQString& name, ChatWindow* view, int sortIndex = -1); - ViewTreeItem(TQListViewItem* parent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view); + ViewTreeItem(TQListView* tqparent, const TQString& name, ChatWindow* view); + ViewTreeItem(TQListViewItem* tqparent, const TQString& name, ChatWindow* view, int sortIndex = -1); + ViewTreeItem(TQListViewItem* tqparent, TQListViewItem* afterItem, const TQString& name, ChatWindow* view); // Minimal constructor for separator items. - explicit ViewTreeItem(TQListView* parent); + explicit ViewTreeItem(TQListView* tqparent); ~ViewTreeItem(); void setSortIndex(int newSortIndex); diff --git a/konversation/src/warnings_preferences.cpp b/konversation/src/warnings_preferences.cpp index e8d62b7..9fcbb85 100644 --- a/konversation/src/warnings_preferences.cpp +++ b/konversation/src/warnings_preferences.cpp @@ -24,8 +24,8 @@ #include <klistview.h> -Warnings_Config::Warnings_Config( TQWidget* parent, const char* name, WFlags fl ) - : Warnings_ConfigUI( parent, name, fl ) +Warnings_Config::Warnings_Config( TQWidget* tqparent, const char* name, WFlags fl ) + : Warnings_ConfigUI( tqparent, name, fl ) { dialogListView->setSorting(1); loadSettings(); diff --git a/konversation/src/warnings_preferences.h b/konversation/src/warnings_preferences.h index 2d3d39c..444ab8b 100644 --- a/konversation/src/warnings_preferences.h +++ b/konversation/src/warnings_preferences.h @@ -22,9 +22,10 @@ class TQListViewItem; class Warnings_Config : public Warnings_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit Warnings_Config( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + explicit Warnings_Config( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~Warnings_Config(); virtual void restorePageToDefaults(); diff --git a/konversation/src/warnings_preferencesui.ui b/konversation/src/warnings_preferencesui.ui index 2f189cc..a65b6c4 100644 --- a/konversation/src/warnings_preferencesui.ui +++ b/konversation/src/warnings_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>Warnings_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>Warnings_ConfigUI</cstring> </property> @@ -43,7 +43,7 @@ <tabstops> <tabstop>dialogListView</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klistview.h</includehint> </includehints> diff --git a/konversation/src/watchednicknames_preferences.cpp b/konversation/src/watchednicknames_preferences.cpp index 2471037..dcc91bd 100644 --- a/konversation/src/watchednicknames_preferences.cpp +++ b/konversation/src/watchednicknames_preferences.cpp @@ -28,8 +28,8 @@ #include <kdebug.h> -WatchedNicknames_Config::WatchedNicknames_Config(TQWidget *parent, const char *name) - : WatchedNicknames_ConfigUI(parent, name) +WatchedNicknames_Config::WatchedNicknames_Config(TQWidget *tqparent, const char *name) + : WatchedNicknames_ConfigUI(tqparent, name) { notifyListView->setRenameable(0,false); notifyListView->setSorting(-1); @@ -90,7 +90,7 @@ void WatchedNicknames_Config::addNetworkBranch(Konversation::ServerGroupSettings ValueListViewItem* groupItem=new ValueListViewItem(serverGroupList->id(),notifyListView,notifyListView->lastChild(),serverGroupList->name()); // get the group iterator to find all servers in the group - TQMapConstIterator<int, TQStringList> groupIt=notifyList.find(serverGroupList->id()); + TQMapConstIterator<int, TQStringList> groupIt=notifyList.tqfind(serverGroupList->id()); // get list of nicks for the current group TQStringList nicks=groupIt.data(); @@ -277,7 +277,7 @@ void WatchedNicknames_Config::newNotify() // just create the new entry inside of the first group if(item) { - if(item->parent()) item=item->parent(); + if(item->tqparent()) item=item->tqparent(); } else item=listView->firstChild(); @@ -335,7 +335,7 @@ void WatchedNicknames_Config::entrySelected(TQListViewItem* notifyEntry) if(notifyEntry) { // is this entry a nickname? - TQListViewItem* group=notifyEntry->parent(); + TQListViewItem* group=notifyEntry->tqparent(); if(group) { // all edit widgets may be enabled @@ -374,7 +374,7 @@ void WatchedNicknames_Config::networkChanged(const TQString& newNetwork) if(item) { // get group the nickname is presently associated to - TQListViewItem* group=item->parent(); + TQListViewItem* group=item->tqparent(); // did the user actually change anything? if(group && group->text(0)!=newNetwork) { diff --git a/konversation/src/watchednicknames_preferences.h b/konversation/src/watchednicknames_preferences.h index f2401cd..fc1e668 100644 --- a/konversation/src/watchednicknames_preferences.h +++ b/konversation/src/watchednicknames_preferences.h @@ -23,9 +23,10 @@ class TQListViewItem; class WatchedNicknames_Config : public WatchedNicknames_ConfigUI, public KonviSettingsPage { Q_OBJECT + TQ_OBJECT public: - explicit WatchedNicknames_Config(TQWidget *parent = 0, const char *name = 0); + explicit WatchedNicknames_Config(TQWidget *tqparent = 0, const char *name = 0); ~WatchedNicknames_Config(); virtual void saveSettings(); diff --git a/konversation/src/watchednicknames_preferencesui.ui b/konversation/src/watchednicknames_preferencesui.ui index 3195e64..4b6260c 100644 --- a/konversation/src/watchednicknames_preferencesui.ui +++ b/konversation/src/watchednicknames_preferencesui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>WatchedNicknames_ConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>WatchedNicknames_ConfigUI</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>notifyActionLabel</cstring> </property> @@ -79,7 +79,7 @@ command is placed in the <b>Input Line</b> on the server window.< </qt></string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>notifyDelayLabel</cstring> </property> @@ -106,14 +106,14 @@ command is placed in the <b>Input Line</b> on the server window.< <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>20</height> </size> </property> </spacer> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>kcfg_NotifyDelay</cstring> </property> @@ -133,7 +133,7 @@ command is placed in the <b>Input Line</b> on the server window.< <string>Konversation will check the status of the nicknames listed below at this interval.</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_OpenWatchedNicksAtStartup</cstring> </property> @@ -147,7 +147,7 @@ command is placed in the <b>Input Line</b> on the server window.< <string><qt>When checked, the <b>Nicks Online</b> window will be automatically opened when starting Konversation.</qt></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_UseNotify</cstring> </property> @@ -162,7 +162,7 @@ When the nickname watcher is turned on, you will be notified when the nicknames </qt></string> </property> </widget> - <widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>listGroupBox</cstring> </property> @@ -176,7 +176,7 @@ When the nickname watcher is turned on, you will be notified when the nicknames <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>networkLabel</cstring> </property> @@ -190,7 +190,7 @@ When the nickname watcher is turned on, you will be notified when the nicknames <string>The irc server network (such as 'freenode') that the selected user to watch is on.</string> </property> </widget> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>networkDropdown</cstring> </property> @@ -201,7 +201,7 @@ When the nickname watcher is turned on, you will be notified when the nicknames <string>The irc server network (such as 'freenode') that the selected user to watch is on.</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>nicknameLabel</cstring> </property> @@ -271,9 +271,9 @@ When the nickname watcher is turned on, you will be notified when the nicknames <p>You can also open the <b>Nicks Online</b> window to see the status of all the watched nicknames.</p></qt></string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="4" rowspan="2" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="4" rowspan="2" colspan="1"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> @@ -333,7 +333,7 @@ When the nickname watcher is turned on, you will be notified when the nicknames <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>160</height> @@ -403,8 +403,8 @@ When the nickname watcher is turned on, you will be notified when the nicknames <tabstop>newButton</tabstop> <tabstop>removeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> -<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includehints> <includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint> |