5
So che possiamo usare #if DEBUG #endif #else in C#, quindi penso che Qt ha lo stesso modo di fare che, in questo modo:In QT, come distinguere il debug e rilasciare in qualche modo come preprocessore
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";
}
ma non ha funzionato.
domanda simile: http://stackoverflow.com/questions/11714118/detect-if-qt-is-running-a-debug-build-at-runtime – warunanc