debugging - In QT,how to distinguish debug and release in someway like preprocessor -


i know can use #if debug #else #endif in c#,so think qt has same way that, this:

qstring paths::sqlscriptpath() { #if debug     return "d:\edocclient\edocclient-build-desktop_qt_4_8_4_qt4_8_4-debug\sql"; #else     return "d:\edocclient\edocclient-build-desktop_qt_4_8_4_qt4_8_4-release\sql"; } 

but didn't work.

the correct qt macros qt_debug. code be:

qstring paths::sqlscriptpath() { #ifdef qt_debug     return "d:\edocclient\edocclient-build-desktop_qt_4_8_4_qt4_8_4-debug\sql"; #else     return "d:\edocclient\edocclient-build-desktop_qt_4_8_4_qt4_8_4-release\sql"; #endif } 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -