summaryrefslogtreecommitdiffstats
path: root/ksirc/toplevel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /ksirc/toplevel.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/toplevel.cpp')
-rw-r--r--ksirc/toplevel.cpp192
1 files changed, 96 insertions, 96 deletions
diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp
index f5f4d002..43b2201e 100644
--- a/ksirc/toplevel.cpp
+++ b/ksirc/toplevel.cpp
@@ -85,7 +85,7 @@ TQStringList KSircTopLevel::cmd_menu;
void
KSircTopLevel::initColors()
{
- TQColorGroup cg_mainw = kapp->palette().active();
+ TQColorGroup cg_mainw = kapp->tqpalette().active();
cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor);
cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor);
cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor);
@@ -119,9 +119,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
kapp->ref();
- m_topic = TQString::null;
+ m_topic = TQString();
- TQCString kstl_name = TQCString(TQObject::name()) + "_" + "toplevel";
+ TQCString kstl_name = TQCString(TQT_TQOBJECT(this)->name()) + "_" + "toplevel";
setName(kstl_name);
if(!m_channelInfo.channel().isEmpty()) {
@@ -130,7 +130,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
}
else
{
- caption = TQString::null;
+ caption = TQString();
}
Buffer = FALSE;
@@ -152,10 +152,10 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
connect(selector, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertText()));
selector->setFont(ksopts->defaultFont.family());
- file = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_file");
+ file = new TQPopupMenu(this, TQCString(TQT_TQOBJECT(this)->name()) + "_popup_file");
file->setCheckable(true);
- KAction *act = KStdAction::openNew( this, TQT_SLOT( newWindow() ), actionCollection() );
+ KAction *act = KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT( newWindow() ), actionCollection() );
act->plug( file );
file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), TQT_SLOT(new_connection()), Key_F2);
file->insertSeparator();
@@ -172,7 +172,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
beepitem = file->insertItem(i18n("N&otify on Change"), this, TQT_SLOT(toggleBeep()), CTRL + Key_P);
file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg);
- encodingAction = new KSelectAction( i18n( "&Encoding" ), 0, this );
+ encodingAction = new KSelectAction( i18n( "&Encoding" ), 0, TQT_TQOBJECT(this) );
connect( encodingAction, TQT_SIGNAL( activated() ), this, TQT_SLOT( setEncoding() ) );
TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames();
@@ -189,8 +189,8 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
// remove utf16/ucs2 as it just doesn't work for IRC
TQStringList::Iterator encodingIt = encodings.begin();
while ( encodingIt != encodings.end() ) {
- if ( ( *encodingIt ).find( "utf16" ) != -1 ||
- ( *encodingIt ).find( "iso-10646" ) != -1 )
+ if ( ( *encodingIt ).tqfind( "utf16" ) != -1 ||
+ ( *encodingIt ).tqfind( "iso-10646" ) != -1 )
encodingIt = encodings.remove( encodingIt );
else
++encodingIt;
@@ -200,7 +200,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
encodingAction->setItems( encodings );
encodingAction->plug( file );
- int eindex = encodings.findIndex(ksopts->chan(m_channelInfo).encoding);
+ int eindex = encodings.tqfindIndex(ksopts->chan(m_channelInfo).encoding);
if(eindex == -1)
encodingAction->setCurrentItem( 0 );
else
@@ -208,7 +208,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
setEncoding();
file->insertSeparator();
- act = KStdAction::close( this, TQT_SLOT( terminate() ), actionCollection() );
+ act = KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT( terminate() ), actionCollection() );
act->plug( file );
kmenu = menuBar();
@@ -216,11 +216,11 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
kmenu->setAccel(Key_F, KST_CHANNEL_ID);
/*
- * Ok, let's look at the basic widget "layout"
+ * Ok, let's look at the basic widget "tqlayout"
* Everything belongs to q TQFrame F, this is use so we
* can give the KApplication a single main client widget, which is needs.
*
- * A QVbox and a QHbox is used to ctronl the 3 sub widget
+ * A TQVbox and a TQHbox is used to ctronl the 3 sub widget
* The Modified TQListBox is then added side by side with the User list box.
* The SLE is then fit bello.
*/
@@ -234,9 +234,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
connect( ksTopic, TQT_SIGNAL( topicChange( const TQString & ) ),
this, TQT_SLOT( setTopicIntern( const TQString & ) ) );
- TQCString kstn = TQCString(TQObject::name()) + "_";
+ TQCString kstn = TQCString(TQT_TQOBJECT(this)->name()) + "_";
- pan = new TQSplitter(TQSplitter::Horizontal, top, kstn + "splitter");
+ pan = new TQSplitter(Qt::Horizontal, top, kstn + "splitter");
#if KDE_IS_VERSION(3,1,92)
pan->setOpaqueResize( KGlobalSettings::opaqueResize() );
#else
@@ -244,7 +244,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
#endif
mainw = new KSircView(ksircProcess(), pan, kstn + "KSircView" );
- mainw->setFocusPolicy(TQWidget::NoFocus);
+ mainw->setFocusPolicy(TQ_NoFocus);
nicks_box = new TQVBox(pan);
@@ -253,12 +253,12 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
this, TQT_SLOT(setMode(TQString, int, TQString)));
nicks = new aListBox(nicks_box, kstn + "aListBox");
- nicks->setFocusPolicy(TQWidget::NoFocus);
+ nicks->setFocusPolicy(TQ_NoFocus);
//nicks->hide(); // default = only the main widget
lag = new TQLabel(nicks_box);
lag->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
- lag->setAlignment(Qt::AlignCenter | Qt::SingleLine);
+ lag->tqsetAlignment(TQt::AlignCenter | TQt::SingleLine);
lag->setText(i18n("Lag: Wait"));
@@ -312,9 +312,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
mainw->enableTimeStamps(ksopts->chan(m_channelInfo).timeStamp);
edit = new TQPopupMenu(this);
- act = KStdAction::copy( mainw, TQT_SLOT( copy() ), actionCollection() );
+ act = KStdAction::copy( TQT_TQOBJECT(mainw), TQT_SLOT( copy() ), actionCollection() );
act->plug( edit );
- act = KStdAction::paste( this, TQT_SLOT( pasteToWindow() ), actionCollection() );
+ act = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT( pasteToWindow() ), actionCollection() );
act->plug( edit );
edit->insertItem(i18n("C&lear Window"), this, TQT_SLOT(clearWindow()), CTRL + Key_L);
kmenu->insertItem(i18n("&Edit"), edit, -1, -1);
@@ -360,7 +360,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
// setup line editor
- linee->setFocusPolicy(TQWidget::StrongFocus);
+ linee->setFocusPolicy(TQ_StrongFocus);
linee->setFont(ksopts->defaultFont);
if(ksopts->oneLineEntry == true) {
@@ -447,7 +447,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf
kmenu->insertItem(i18n("C&ommand"), command);
- kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( TQString::null, false ));
+ kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( TQString(), false ));
connect(user_controls, TQT_SIGNAL(activated(int)),
this, TQT_SLOT(UserParseMenu(int)));
@@ -553,7 +553,7 @@ KSircTopLevel::~KSircTopLevel()
ksit.atEnd() == 0;
++ksit) {
TQString rt = ksit.richText();
- if(rt.contains("<img src=\"user|servinfo\">"))
+ if(rt.tqcontains("<img src=\"user|servinfo\">"))
continue;
kdDebug(5008) << rt << endl;
@@ -587,9 +587,9 @@ void KSircTopLevel::setMode(TQString mode, int mode_type, TQString currentNick)
{
TQString command;
if (mode_type == 0)
- command = TQString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode);
+ command = TQString::tqfromLatin1("/mode %1 %2\n").tqarg(m_channelInfo.channel()).tqarg(mode);
else
- command = TQString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode);
+ command = TQString::tqfromLatin1("/mode %1 %2\n").tqarg(currentNick).tqarg(mode);
sirc_write(command);
linee->setFocus();
}
@@ -598,8 +598,8 @@ void KSircTopLevel::setEncoding()
{
int index = encodingAction->currentItem();
if ( index == 0 ) {// default (locale) encoding
- ksopts->chan(m_channelInfo).encoding = TQString::null;
- UnicodeMessageReceiver::setEncoding( TQString::null );
+ ksopts->chan(m_channelInfo).encoding = TQString();
+ UnicodeMessageReceiver::setEncoding( TQString() );
}
else {
ksopts->chan(m_channelInfo).encoding = encodingAction->currentText();
@@ -719,7 +719,7 @@ void KSircTopLevel::TabNickCompletion(int dir)
s = linee->text();
tab_saved = s;
end = linee->cursorPosition() - 1;
- start = s.findRev(" ", end, FALSE);
+ start = s.tqfindRev(" ", end, FALSE);
tab_start = start;
tab_end = end;
first = true;
@@ -765,9 +765,9 @@ void KSircTopLevel::TabNickCompletion(int dir)
tab_pressed -= 1;
tab_nick = findNick(s.mid(0, end+1), tab_pressed);
}
- s.replace(0, end + 1, "");
+ s.tqreplace(0, end + 1, "");
if(s[0] == ':')
- s.replace(0, 2, "");
+ s.tqreplace(0, 2, "");
s.prepend(tab_nick + ": ");
extra = 2;
}
@@ -784,11 +784,11 @@ void KSircTopLevel::TabNickCompletion(int dir)
}
if((uint) end == s.length() - 1){ /* if we're at the end add a space */
- s.replace(start + 1, end - start, tab_nick + " ");
+ s.tqreplace(start + 1, end - start, tab_nick + " ");
extra = 1;
}
else {
- s.replace(start + 1, end - start, tab_nick);
+ s.tqreplace(start + 1, end - start, tab_nick);
extra = 0;
}
}
@@ -829,7 +829,7 @@ void KSircTopLevel::sirc_receive(TQString str, bool broadcast)
// that we enter a local event loop (think of the ssfeprompt dialog!)
// which might trigger a socketnotifier activation which in turn
// might result in the execution of code that modifies the LineBuffer,
- // which would invalidate iterators (Simon)
+ // which would tqinvalidate iterators (Simon)
while ( LineBuffer.begin() != LineBuffer.end() )
{
TQString plainText("");
@@ -845,12 +845,12 @@ void KSircTopLevel::sirc_receive(TQString str, bool broadcast)
bool addressedLine = false;
- if(line.message.contains( ">~o")){ /* highlighted with our nick */
+ if(line.message.tqcontains( ">~o")){ /* highlighted with our nick */
addressedLine = true;
}
// detect /msg's -- needed when auto-create-window is off
- if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
+ if ( line.message.tqfind( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 )
addressedLine = true;
if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick()))
@@ -877,7 +877,7 @@ void KSircTopLevel::sirc_receive(TQString str, bool broadcast)
list = pan->sizes();
it = list.begin();
while( it != list.end()){
- values += TQString("%1 ").arg(*it);
+ values += TQString("%1 ").tqarg(*it);
++it;
}
}
@@ -911,7 +911,7 @@ void KSircTopLevel::sirc_write(const TQString &str)
plain.startsWith("/j ") ||
plain.startsWith("/query ")) {
- TQString s = plain.mid(plain.find(' ')+1);
+ TQString s = plain.mid(plain.tqfind(' ')+1);
TQStringList channels = TQStringList::split(",", s);
TQStringList::ConstIterator it = channels.begin();
@@ -924,11 +924,11 @@ void KSircTopLevel::sirc_write(const TQString &str)
KSircChannel ci(m_channelInfo.server(),
rx.cap(1), // channel
rx.cap(2)); // optional key
- linee->setText(TQString::null);
+ linee->setText(TQString());
emit open_toplevel(ci);
/* if(name[0] != '#'){
emit open_toplevel(name);
- linee->setText(TQString::null);
+ linee->setText(TQString());
}
else {
emit outputUnicodeLine(plain + "\n");
@@ -949,11 +949,11 @@ void KSircTopLevel::sirc_write(const TQString &str)
bool ssl = false;
if(server.startsWith("+")){
- server.replace(0, 1, "");
+ server.tqreplace(0, 1, "");
ssl = true;
}
- KSircServer serv(server, port, TQString::null, pass, ssl);
+ KSircServer serv(server, port, TQString(), pass, ssl);
servercontroller::self()->new_ksircprocess(serv);
return;
@@ -963,18 +963,18 @@ void KSircTopLevel::sirc_write(const TQString &str)
plain.startsWith("/leave") ||
plain.startsWith("/hop")) {
TQApplication::postEvent(this, new TQCloseEvent()); // WE'RE DEAD
- linee->setText(TQString::null);
+ linee->setText(TQString());
return;
}
else if( plain.startsWith( "/bye" ) ||
plain.startsWith( "/exit" ) ||
plain.startsWith( "/quit" )) {
- linee->setText( TQString::null );
+ linee->setText( TQString() );
emit requestQuit( command.ascii() );
return;
}
else if ( plain.startsWith( "/away" ) ) {
- TQString awayEvalCommand = TQString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' );
+ TQString awayEvalCommand = TQString::tqfromLatin1( "/eval $publicAway = %1\n" ).tqarg( ksopts->publicAway ? '1' : '0' );
emit outputUnicodeLine( awayEvalCommand );
}
@@ -985,7 +985,7 @@ void KSircTopLevel::sirc_write(const TQString &str)
if(!isSpecialWindow()) { // channel or private chat
if(plain[0].latin1() != '/'){
- command.prepend(TQString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel()));
+ command.prepend(TQString::tqfromLatin1("/msg %1 ").tqarg(m_channelInfo.channel()));
}
else if(plain.startsWith("/me ")) {
command.remove(0, 3);
@@ -1069,13 +1069,13 @@ bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText)
}
else
{
- logString = mainw->addLine( TQString::null, ksopts->textColor, string );
+ logString = mainw->addLine( TQString(), ksopts->textColor, string );
if(ticker != NULL){
ticker->mergeString(string);
}
// If it contains our nick, move the speaker to the top
// of the nick completion list
- if(string.contains("~o")){
+ if(string.tqcontains("~o")){
TQRegExp rx("<(\\S+)>");
if ( (rx.search(logString) >= 0) &&
(rx.cap(1) != ksircProcess()->getNick()) ) {
@@ -1104,7 +1104,7 @@ void KSircTopLevel::returnPressed()
uint i;
TQChar c;
for(i = 0; (c = s[i]); i++){
- switch(c.unicode()){
+ switch(c.tqunicode()){
case 0336:
s[i] = 002;
break;
@@ -1121,7 +1121,7 @@ void KSircTopLevel::returnPressed()
}
while(s.length() > IRC_SAFE_MAX_LINE){
- int wrap = s.findRev(' ', IRC_SAFE_MAX_LINE);
+ int wrap = s.tqfindRev(' ', IRC_SAFE_MAX_LINE);
if(wrap == -1)
wrap = IRC_SAFE_MAX_LINE;
sirc_line_return(s.left(wrap));
@@ -1147,16 +1147,16 @@ void KSircTopLevel::UserParseMenu(int id)
return;
TQString s;
- s = TQString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem()));
+ s = TQString("/eval $dest_nick='%1';\n").tqarg(nicks->text(nicks->currentItem()));
sirc_write(s);
// set $$dest_chan variable
- s = TQString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel());
+ s = TQString("/eval $dest_chan='%1';\n").tqarg(m_channelInfo.channel());
sirc_write(s);
TQString action = user_menu->at(id)->action;
if (action.length() && action[0] == '/')
action.remove(0, 1);
- s = TQString("/eval &docommand(eval{\"%1\"});\n").arg(action);
- s.replace(TQRegExp("\\$\\$"), "$");
+ s = TQString("/eval &docommand(eval{\"%1\"});\n").tqarg(action);
+ s.tqreplace(TQRegExp("\\$\\$"), "$");
sirc_write(s);
}
@@ -1192,7 +1192,7 @@ void KSircTopLevel::AccelScrollUpPage()
void KSircTopLevel::newWindow()
{
- NewWindowDialog w(KSircChannel(m_channelInfo.server(), TQString::null));
+ NewWindowDialog w(KSircChannel(m_channelInfo.server(), TQString()));
connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), TQT_SIGNAL(open_toplevel(const KSircChannel &)));
w.exec();
}
@@ -1211,7 +1211,7 @@ void KSircTopLevel::closeEvent(TQCloseEvent *e)
// Hide ourselves until we finally die
hide();
- qApp->flushX();
+ tqApp->flushX();
// Let's say we're closing
kdDebug(5008) << "Toplevel closing: " << m_channelInfo.channel() << endl;
emit closing(this, m_channelInfo.channel());
@@ -1233,7 +1233,7 @@ void KSircTopLevel::gotFocus()
if(isVisible() == TRUE){
if(have_focus == 0){
if(m_channelInfo.channel()[0] != '!' ){
- TQString str = TQString("/join %1").arg(m_channelInfo.channel());
+ TQString str = TQString("/join %1").tqarg(m_channelInfo.channel());
if(m_channelInfo.key().length() > 0){
str.append(" " + m_channelInfo.key());
}
@@ -1247,7 +1247,7 @@ void KSircTopLevel::gotFocus()
}
if(m_gotMsgWithoutFocus == true){
m_gotMsgWithoutFocus = false;
- servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()));
+ servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").tqarg(ksircProcess()->serverID()).tqarg(m_channelInfo.channel()));
}
}
@@ -1264,7 +1264,7 @@ void KSircTopLevel::control_message(int command, TQString str)
switch(command){
case CHANGE_CHANNEL: // 001 is defined as changeChannel
{
- KSircChannel ci(m_channelInfo.server(), TQString::null);
+ KSircChannel ci(m_channelInfo.server(), TQString());
TQRegExp rx("([^!]+)!+([^!]+)!*([^!]*)");
if(rx.search(str) < 0){
ci.setChannel(str);
@@ -1285,22 +1285,22 @@ void KSircTopLevel::control_message(int command, TQString str)
logFile->open();
}
setName(m_channelInfo.server().utf8() + "_" + m_channelInfo.channel().utf8() + "_" + "toplevel");
- pan->setName(TQCString(TQObject::name()) + "_" + "TQSplitter");
- kmenu->setName(TQCString(TQObject::name()) + "_ktoolframe");
- linee->setName(TQCString(TQObject::name()) + "_" + "LineEnter");
+ pan->setName(TQCString(TQT_TQOBJECT(this)->name()) + "_" + TQSPLITTER_OBJECT_NAME_STRING);
+ kmenu->setName(TQCString(TQT_TQOBJECT(this)->name()) + "_ktoolframe");
+ linee->setName(TQCString(TQT_TQOBJECT(this)->name()) + "_" + "LineEnter");
kmenu->show();
setCaption(m_channelInfo.channel());
emit currentWindow(this);
if(m_channelInfo.channel()[0] == '#' || m_channelInfo.channel()[0] == '&'){
- TQString str = TQString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key());
+ TQString str = TQString("/join %1 %2\n").tqarg(m_channelInfo.channel()).tqarg(m_channelInfo.key());
kdDebug(5008) << "Doing /join " << m_channelInfo.channel() << " :" << str << endl;
emit outputUnicodeLine(str);
emit outputLine("/eval $query=''\n");
}
else if (m_channelInfo.channel()[0] != '!')
{
- emit outputUnicodeLine(TQString("/eval $query='%1'\n").arg(m_channelInfo.channel()));
+ emit outputUnicodeLine(TQString("/eval $query='%1'\n").tqarg(m_channelInfo.channel()));
}
bool isPrivate = isPrivateChat();
@@ -1327,13 +1327,13 @@ void KSircTopLevel::control_message(int command, TQString str)
// nicks->show();
// lag->show();
}
- if(layout()) {
- //kdDebug(5008) << "Redoeing layout" << endl;
- layout()->invalidate();
- layout()->activate();
+ if(tqlayout()) {
+ //kdDebug(5008) << "Redoeing tqlayout" << endl;
+ tqlayout()->tqinvalidate();
+ tqlayout()->activate();
}
else {
- //kdDebug(5008) << "No layout" << endl;
+ //kdDebug(5008) << "No tqlayout" << endl;
}
pan->refresh();
@@ -1342,7 +1342,7 @@ void KSircTopLevel::control_message(int command, TQString str)
file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg);
file->setItemChecked(tsitem, ksopts->chan(m_channelInfo).timeStamp);
file->setItemChecked(fjpitem, ksopts->chan(m_channelInfo).filterJoinPart);
- int eindex = encodingAction->items().findIndex(ksopts->chan(m_channelInfo).encoding);
+ int eindex = encodingAction->items().tqfindIndex(ksopts->chan(m_channelInfo).encoding);
//kdDebug(5008) << "in change channel we want: " << ksopts->chan(m_channelInfo).encoding << " eindex: " << eindex << endl;
encodingAction->setCurrentItem(eindex < 0 ? 0 : eindex);
setEncoding();
@@ -1356,7 +1356,7 @@ void KSircTopLevel::control_message(int command, TQString str)
case RESUME_UPDATES:
Buffer = FALSE;
if(LineBuffer.isEmpty() == FALSE)
- sirc_receive(TQString::null);
+ sirc_receive(TQString());
break;
case REREAD_CONFIG:
emit freezeUpdates(TRUE); // Stop the list boxes update
@@ -1373,7 +1373,7 @@ void KSircTopLevel::control_message(int command, TQString str)
file->setItemChecked(beepitem, ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg);
file->setItemChecked(tsitem, ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp);
{
- int eindex = encodingAction->items().findIndex(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding);
+ int eindex = encodingAction->items().tqfindIndex(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding);
//kdDebug(5008) << "in re-readconfig we want: " << ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].encoding << " eindex: " << eindex << endl;
encodingAction->setCurrentItem(eindex < 0 ? 0 : eindex);
setEncoding();
@@ -1448,7 +1448,7 @@ TQString KSircTopLevel::findNick(TQString part, uint which)
}
for(uint i=0; i < nicks->count(); i++){
- if (matches.contains(nicks->text(i)))
+ if (matches.tqcontains(nicks->text(i)))
continue;
if(nicks->text(i).length() >= part.length()){
if(nicks->text(i).lower().startsWith( part.lower())){
@@ -1462,15 +1462,15 @@ TQString KSircTopLevel::findNick(TQString part, uint which)
if(which < matches.count())
return *(matches.at(which));
else
- return TQString::null;
+ return TQString();
}
- return TQString::null;
+ return TQString();
}
void KSircTopLevel::removeCompleteNick(const TQString &nick)
{
- TQStringList::Iterator it = completeNicks.find(nick);
+ TQStringList::Iterator it = completeNicks.tqfind(nick);
if (it != completeNicks.end())
completeNicks.remove(it);
}
@@ -1483,7 +1483,7 @@ void KSircTopLevel::addCompleteNick(const TQString &nick)
void KSircTopLevel::changeCompleteNick(const TQString &oldNick, const TQString &newNick)
{
- TQStringList::Iterator it = completeNicks.find(oldNick);
+ TQStringList::Iterator it = completeNicks.tqfind(oldNick);
if (it != completeNicks.end())
*it = newNick;
}
@@ -1497,8 +1497,8 @@ void KSircTopLevel::openQueryFromNick(const TQString &nick)
void KSircTopLevel::pasteToWindow()
{
// Ctrl-V
- //kdDebug(5008) << "Going to paste: " << KApplication::clipboard()->text( QClipboard::Clipboard ) << endl;
- slotTextDropped(KApplication::clipboard()->text( QClipboard::Clipboard ) );
+ //kdDebug(5008) << "Going to paste: " << KApplication::tqclipboard()->text( TQClipboard::Clipboard ) << endl;
+ slotTextDropped(KApplication::tqclipboard()->text( TQClipboard::Clipboard ) );
}
void KSircTopLevel::pasteToNickList(int button,
@@ -1510,7 +1510,7 @@ void KSircTopLevel::pasteToNickList(int button,
emit open_toplevel(ci);
TQStringList lines = TQStringList::split( '\n',
- KApplication::clipboard()->text( QClipboard::Selection ),
+ KApplication::tqclipboard()->text( TQClipboard::Selection ),
true );
TQStringList::ConstIterator it = lines.begin();
TQStringList::ConstIterator end = lines.end();
@@ -1568,14 +1568,14 @@ void KSircTopLevel::slotTextDropped( const TQString& _text )
if (text[text.length()-1] != '\n')
text += "\n";
- int lines = text.contains("\n");
+ int lines = text.tqcontains("\n");
int approx_lines = text.length() / 75;
if ( lines > approx_lines )
approx_lines = lines;
if (lines > 4) {
int result = KMessageBox::warningContinueCancel(this,
- i18n("You are about to send %1 lines of text.\nDo you really want to send that much?").arg(approx_lines),
- TQString::null, i18n("Send"));
+ i18n("You are about to send %1 lines of text.\nDo you really want to send that much?").tqarg(approx_lines),
+ TQString(), i18n("Send"));
if (result != KMessageBox::Continue)
{
// linee->setText("");
@@ -1601,7 +1601,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text )
if ( commands == Ask )
switch ( KMessageBox::questionYesNo( this, i18n(
"The text you pasted contains lines that start with /.\n"
- "Should they be interpreted as IRC commands?" ), TQString::null, i18n("Interpret"), i18n("Do Not Interpret") ) )
+ "Should they be interpreted as IRC commands?" ), TQString(), i18n("Interpret"), i18n("Do Not Interpret") ) )
{
case KMessageBox::Yes:
commands = Parse;
@@ -1622,7 +1622,7 @@ void KSircTopLevel::slotTextDropped( const TQString& _text )
linee->update();
}
else{
- text.replace(TQRegExp("\n"), "");
+ text.tqreplace(TQRegExp("\n"), "");
linee->setText(text);
linee->setCursorPosition( curPos + _text.length() );
}
@@ -1659,7 +1659,7 @@ bool KSircTopLevel::event( TQEvent *e)
void KSircTopLevel::saveCurrLog()
{
- KURL url = KURL( KFileDialog::getSaveFileName(TQString::null,
+ KURL url = KURL( KFileDialog::getSaveFileName(TQString(),
"*.log", 0L,
i18n("Save Chat/Query Logfile")));
if( url.isEmpty())
@@ -1700,7 +1700,7 @@ void KSircTopLevel::slotDccURLs( const TQStringList& urls, const TQString& nick
TQString file( *it );
kdDebug(5008) << "........ " << file << endl;
if ( !file.isEmpty() )
- sirc_write(s.arg( file ));
+ sirc_write(s.tqarg( file ));
}
}
@@ -1727,7 +1727,7 @@ void KSircTopLevel::outputUnicodeLine( const TQString &message )
void KSircTopLevel::setTopicIntern( const TQString &topic )
{
- TQString command = TQString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic );
+ TQString command = TQString::tqfromLatin1( "/topic %1 %2\n" ).tqarg( m_channelInfo.channel() ).tqarg( topic );
sirc_write( command );
linee->setFocus();
}
@@ -1737,17 +1737,17 @@ void KSircTopLevel::doChange(bool pers, TQString text)
TQTime ctime = TQTime::currentTime();
if (ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg) {
// beep only every 2 seconds otherwise it'll get very noisy in the room ;)
- if ( QABS( lastBeep.secsTo( ctime ) ) > 1 ) {
+ if ( TQABS( lastBeep.secsTo( ctime ) ) > 1 ) {
if ( pers ) {
- int winId = !ticker ? topLevelWidget()->winId() : ticker->winId();
+ int winId = !ticker ? tqtopLevelWidget()->winId() : ticker->winId();
KNotifyClient::event(winId,
- TQString::fromLatin1("ChannelPersonal"),
- i18n("Your nick appeared on channel %1").arg(m_channelInfo.channel()));
+ TQString::tqfromLatin1("ChannelPersonal"),
+ i18n("Your nick appeared on channel %1").tqarg(m_channelInfo.channel()));
} else {
- int winId = !ticker ? topLevelWidget()->winId() : ticker->winId();
+ int winId = !ticker ? tqtopLevelWidget()->winId() : ticker->winId();
KNotifyClient::event(winId,
- TQString::fromLatin1("ChannelChanged"),
- i18n("Channel %1 changed").arg(m_channelInfo.channel()));
+ TQString::tqfromLatin1("ChannelChanged"),
+ i18n("Channel %1 changed").tqarg(m_channelInfo.channel()));
}
lastBeep = ctime;
}
@@ -1755,7 +1755,7 @@ void KSircTopLevel::doChange(bool pers, TQString text)
if(have_focus == 0 && pers == true && m_gotMsgWithoutFocus == false){
m_gotMsgWithoutFocus = true;
- servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text);
+ servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").tqarg(ksircProcess()->serverID()).tqarg(m_channelInfo.channel()), text);
}
}
@@ -1834,7 +1834,7 @@ void KSircTopLevel::cmd_process(int id)
void KSircTopLevel::showDCCMgr()
{
- KSircMessageReceiver *kmr = ksircProcess()->mrList().find("!dcc");
+ KSircMessageReceiver *kmr = ksircProcess()->mrList().tqfind("!dcc");
if(kmr){
KSircIODCC *dcc = static_cast<KSircIODCC *>(kmr);
if(dcc){