Macro for Qt Simulator in .pro and source files.
-
Hello, I just want to know is there are any way to know, that we are building application for Qt Simulator target.
For example, for Maemo5 device in .pro file I can make branch by maemo5 directive:
@maemo5 {
dosomething
}@
and in the .cpp and .h files I can check by Q_WS_MAEMO_5 macro:
@#if defined(Q_WS_MAEMO_5)
dothomething
#endif
@But what about Qt Simulator, is there any predefined macro and directive for it?
Surely, I can pass something like "DEFINES+=QT_SIMULATOR" to qmake, and check it in the .pro and sources.
@contains($$DEFINES,"QT_SUMULATOR") {
doSomething
}
@
But it's not good solution, it's only workaround. -
It seems as of now there are only workarounds
Another one is discussed "here(http://discussion.forum.nokia.com/forum/showthread.php?187052-Managing-different-SDK-s-in-pro-file)":http://discussion.forum.nokia.com/forum/showthread.php?187052-Managing-different-SDK-s-in-pro-file.
-
[quote author="silvansky" date="1278666566"]for now there is QT_SIMULATOR macro for source files (in the latest Nokia Qt SDK)
but I don't know if there is somethong for .pro filesUPD:
in .pro files you can usesimulator {
# do something
}[/quote]O, It's brilliant, Just I need. Thank you a lot.
-
[quote author="silvansky" date="1278666566"]for now there is QT_SIMULATOR macro for source files (in the latest Nokia Qt SDK)
but I don't know if there is somethong for .pro filesUPD:
in .pro files you can usesimulator {
# do something
}[/quote]Thank you