PDA

View Full Version : qDebug() output from Kopete



Morea
1st January 2008, 21:26
Kopete 3.5.7 is an IM client for KDE and I'm trying to get it to
somefunction_I_have_not_written (...)
{
QString result = ...;
qDebug(result.ascii());
}

so I get a write out of the result. But I get nothing written in my console window. Is there any thing else I must do to get qDebug to produce output? Compilation options?
It's a lot of source code so it is hard to be sure what to change.

marcel
1st January 2008, 21:31
Qt 3.x, right?
I think it is:


qDebug("%s", result.ascii());


Regards

Morea
1st January 2008, 21:41
Ah, yes of course! Thanks.
But still no console output :-(

marcel
1st January 2008, 21:54
Is somefunction_I_have_not_written ever executed? And, are you testing on a debug version(you should)?

Morea
1st January 2008, 22:11
I think it is executed, since it handles decryption of a scrambled password saved in a configuration file.
And i tried to add another printout in another function that I believe is called, but I got nothing.

Concerning debug... how do I get that? running ./configure --enable-debug ?

marcel
1st January 2008, 22:15
qDebug is effective only in debug mode, that is why I asked.


Concerning debug... how do I get that? running ./configure --enable-debug ?

I am not sure... That should be the option, but it won't work if qt isn't compiled in debug mode also.

Morea
2nd January 2008, 08:49
Oh it might be that qt3 isn't and can't be (atleast not very easily). :mad:
So, then I have to try to append the strings to a text file.

Morea
5th January 2008, 21:40
Sorry, I know I'm a little lazy, but what is the easiest way to append QStrings in Qt3 to a text file? It should never overwrite.

jpn
5th January 2008, 23:30
Just open the file file in "append|text" mode?