void TouchEventContext::checkReachability(TouchList* touchList) const { size_t length = touchList->length(); for (size_t i = 0; i < length; ++i) ASSERT(isReachable(touchList->item(i)->target()->toNode())); }
titleText = QString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); else titleText = QString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); menu->addTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { KAction *actionAddContact = new KAction( KIcon("list-add-user"), i18n( "&Add to Your Contact List" ), menu ); connect( actionAddContact, SIGNAL(triggered(bool)), this, SLOT(slotAddContact()) ); menu->addAction(actionAddContact); menu->addSeparator(); } // FIXME: After KDE 3.2 we should make isReachable do the isConnected call so it can be removed here - Martijn const bool reach = account()->isConnected() && isReachable(); const bool myself = (this == account()->myself()); KAction *actionSendMessage = KopeteStdAction::sendMessage( this, SLOT(sendMessage()), menu ); actionSendMessage->setEnabled( reach && !myself ); menu->addAction( actionSendMessage ); KAction *actionChat = KopeteStdAction::chat( this, SLOT(startChat()), menu ); actionChat->setEnabled( reach && !myself ); menu->addAction( actionChat ); KAction *actionSendFile = KopeteStdAction::sendFile( this, SLOT(sendFile()), menu ); actionSendFile->setEnabled( reach && d->fileCapable && !myself ); menu->addAction( actionSendFile ); // Protocol specific options will go below this separator