[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/protocols/jabber
From:       Pali Rohár <pali.rohar () gmail ! com>
Date:       2012-12-11 1:02:37
Message-ID: 20121211010237.4CC02AC867 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1328051 by pali:

Fix resource selection for Jabber contacts

Patch from Anton Revunov, thanks!

BUG: 176456


 M  +4 -1      jabbercontact.cpp  


--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jabbercontact.cpp #1328050:1328051
@@ -237,6 +237,7 @@
 				KAction *tmp = new KAction( this );
 				tmp->setIcon( KIcon("dialog-ok") );
 				tmp->setText( str);
+				tmp->setObjectName( QString::number(i) );
 				connect(tmp, SIGNAL(triggered(bool)), SLOT(slotSelectResource()));
 				actionSelectResource->addAction(tmp);
 			}
@@ -252,6 +253,7 @@
 				KAction *tmp = new KAction(this);
 				tmp->setIcon( KIcon(iconSet) );
 				tmp->setText( str );
+				tmp->setObjectName( QString::number(i) );
 				connect(tmp, SIGNAL(triggered(bool)), SLOT(slotSelectResource()));
 				actionSelectResource->addAction ( tmp );
 			}
@@ -1178,7 +1180,8 @@
 	}
 	else
 	{
-		QString selectedResource = static_cast<const KAction *>(sender())->text();
+		// use iconText() instead of text(), because we need stripped value without '&'
+		QString selectedResource = static_cast<const KAction *>(sender())->iconText();
 
 		kDebug (JABBER_DEBUG_GLOBAL) << "Moving to resource " << selectedResource;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic