From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: 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 --- kopete/libkopete/knotification.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kopete/libkopete/knotification.cpp') diff --git a/kopete/libkopete/knotification.cpp b/kopete/libkopete/knotification.cpp index 4b41b48b..ddda9bd7 100644 --- a/kopete/libkopete/knotification.cpp +++ b/kopete/libkopete/knotification.cpp @@ -63,8 +63,8 @@ struct KNotification::Private int level; }; -KNotification::KNotification(TQObject *parent) : - TQObject(parent) , d(new Private) +KNotification::KNotification(TQObject *tqparent) : + TQObject(tqparent) , d(new Private) { m_linkClicked = false; } @@ -109,7 +109,7 @@ void KNotification::notifyByMessagebox() return; TQString action=d->actions[0]; - WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; + WId winId=d->widget ? d->widget->tqtopLevelWidget()->winId() : 0; if( action.isEmpty()) { @@ -139,16 +139,16 @@ void KNotification::notifyByMessagebox() { default: case KNotifyClient::Notification: - result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), TQString::null, false ); + result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), TQString(), false ); break; case KNotifyClient::Warning: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), TQString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), TQString(), false ); break; case KNotifyClient::Error: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), TQString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), TQString(), false ); break; case KNotifyClient::Catastrophe: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), TQString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), TQString(), false ); break; } if(result==KMessageBox::Yes && _this) @@ -171,12 +171,12 @@ void KNotification::notifyByPassivePopup(const TQPixmap &pix ) TQString title = config.readEntry( "Comment", appName ); //KPassivePopup::message(title, text, icon, senderWinId); - WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; + WId winId=d->widget ? d->widget->tqtopLevelWidget()->winId() : 0; KPassivePopup *pop = new KPassivePopup( checkWinId(appName, winId) ); TQObject::connect(this, TQT_SIGNAL(closed()), pop, TQT_SLOT(deleteLater())); - TQVBox *vb = pop->standardView( title, pix.isNull() ? d->text: TQString::null , icon ); + TQVBox *vb = pop->standardView( title, pix.isNull() ? d->text: TQString() , icon ); TQVBox *vb2=vb; if(!pix.isNull()) @@ -198,22 +198,22 @@ void KNotification::notifyByPassivePopup(const TQPixmap &pix ) } vb=new TQVBox(hb); TQLabel *msg = new TQLabel( d->text, vb, "msg_label" ); - msg->setAlignment( AlignLeft ); + msg->tqsetAlignment( AlignLeft ); } if ( !d->actions.isEmpty() ) { - TQString linkCode=TQString::fromLatin1("

"); + TQString linkCode=TQString::tqfromLatin1("

"); int i=0; for ( TQStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) { i++; - linkCode+=TQString::fromLatin1(" %2 ").arg( TQString::number(i) , TQStyleSheet::escape(*it) ); + linkCode+=TQString::tqfromLatin1(" %2 ").tqarg( TQString::number(i) , TQStyleSheet::escape(*it) ); } - linkCode+=TQString::fromLatin1("

"); + linkCode+=TQString::tqfromLatin1("

"); KActiveLabel *link = new KActiveLabel(linkCode , vb ); - //link->setAlignment( AlignRight ); + //link->tqsetAlignment( AlignRight ); TQObject::disconnect(link, TQT_SIGNAL(linkClicked(const TQString &)), link, TQT_SLOT(openLink(const TQString &))); TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotPopupLinkClicked(const TQString &))); TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), pop, TQT_SLOT(hide())); @@ -284,7 +284,7 @@ void KNotification::raiseWidget(TQWidget *w) } else { - TQWidget *pw=w->parentWidget(); + TQWidget *pw=w->tqparentWidget(); raiseWidget(pw); if( TQTabWidget *tab_widget=dynamic_cast(pw)) @@ -368,12 +368,12 @@ KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& p */ - KNotification *notify=new KNotification(widget); + KNotification *notify=new KNotification(TQT_TQOBJECT(widget)); notify->d->widget=widget; notify->d->text=text; notify->d->actions=actions; notify->d->level=level; - WId winId=widget ? widget->topLevelWidget()->winId() : 0; + WId winId=widget ? widget->tqtopLevelWidget()->winId() : 0; //we will catch some event that will not be fired by the old deamon @@ -401,7 +401,7 @@ KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& p if ( present & KNotifyClient::Execute ) { TQString appname = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); - notify->notifyByExecute(commandline, TQString::null,appname,text, winId, 0 ); + notify->notifyByExecute(commandline, TQString(),appname,text, winId, 0 ); } return notify; @@ -479,7 +479,7 @@ static KNotification *performCustomNotifications( TQWidget *widget, Kopete::Meta evt->firePresentation( Kopete::EventPresentation::Chat ); } // fire the event - n=KNotification::userEvent( text, mc->photo(), widget, TQStringList() , present, 0, sound, TQString::null, TQString::null , KNotification::CloseOnTimeout); + n=KNotification::userEvent( text, mc->photo(), widget, TQStringList() , present, 0, sound, TQString(), TQString() , KNotification::CloseOnTimeout); } } -- cgit v1.2.1