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

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -