Page 1 of 1

Disable debug output from QxOrm

PostPosted: Fri Mar 30, 2012 12:03 pm
by Davita
Hi. I'm using Qt's test lib for unit testing several aspects of my project. As you know, test results are shown in console window, as a debug output. Because QxOrm also renders many information about executing queries etc in console window, it's very hard to see actual test results. Is there any way I can disable qxorm debug outputs for a particular project?

Thanks :)

Re: Disable debug output from QxOrm

PostPosted: Sat Mar 31, 2012 11:31 am
by QxOrm admin
Is there any way I can disable qxorm debug outputs for a particular project?

QxOrm works with the classic qDebug macro to output all SQL queries.
I think there is no way to disable it without changing the code of QxOrm library, sorry !
Maybe you could trace your results into a file instead of console window.

Anyway, for the next version, I could add a feature to disable all traces from QxOrm library, if you want...

Re: Disable debug output from QxOrm

PostPosted: Sat Mar 31, 2012 4:07 pm
by Davita
Anyway, for the next version, I could add a feature to disable all traces from QxOrm library, if you want...

It would be great, but you already did so much and we get it for free :D. I really woudn't mind if you didn't implement that feature. :) With it or without, I'm very greateful to you.
Thank you very much again. :)

Re: Disable debug output from QxOrm

PostPosted: Sat Mar 31, 2012 5:01 pm
by QxOrm admin
I think it's a good idea, I will implement this new feature for the next version of QxOrm library...
But I can't give you a date for the next version released (1.2.4).

Re: Disable debug output from QxOrm

PostPosted: Fri Apr 06, 2012 8:35 am
by QxOrm admin
Sorry, I forgot that there is already an option to disable output sql queries :oops:
You can try this following setting :
Code: Select all
qx::QxSqlDatabase::getSingleton()->setTraceSqlQuery(false);


Using this setting, QxOrm library will not render informations about sql queries in console windows.
For more details about qx::QxSqlDatabase : http://www.qxorm.com/doxygen/html/class ... abase.html