[solved] Program stops when it gets emitted signal
-
Hi,
I compile project rosterHandling from qxmpp library and there is signal rosterReceived() that is connected to slot rosterReceived(). So when program get that signal it should use method rosterRecived(), but insted of that it stops when it gets signal(as same as I would put in that place breakpoint - program wait until I click to continue).
If anyone know where problem is? -
Hi,
You'll need to provide some code.
-
There is nothing special in code that can not work so I do not know why it stops:
@
xmppClient client; //class that inherits from QXmppClient
QXmppConfiguration config;
config.setUser("user");
config.setPassword("password");
config.setDomain(mydomain);
config.setSaslAuthMechanism("PLAIN");
client.connectToServer(config)
@
In xmppClient constructor:
@
connect(&this->rosterManager(),SIGNAL(rosterReceived()),SLOT(rosterReceived()));
@
And method rosterReceived()
@
qDebug("Roster received");
foreach(const QString &bareJid, rosterManager().getRosterBareJids())
{
QString name=rosterManager().getRosterEntry(bareJid).name();
if(nam.isEmpty()) name="-";
qDebug(Received: %s [%s]",QPrintable(bareJid),qPrintable(name));
} -
I don't see anything obviously wrong with your code.
Does your program listen for mouse events?
Did you set any breakpoints?
Does
_qDebug(“Roster received”);_
run before or after your mouse click?