Symbian defines
-
Also I think Q_WS_S60 will not work for n8, but Q_OS_SYMBIAN will work.
-
riussi: Would you prefer getting your responses during regular business hours only? And you do not seem to have anything better to do on a saturday night either;-)
-
Hi,
It somewhat depends. As Tobias said, if your code uses pure Symbian (no S60) then you should use Q_OS_SYMBIAN for maximum compatible. Q_WS_S60 will most likely not be defined on Symbian^4 where Avkon has been removed. However if you are using Avkon to, for example, lock the application's orientation, then Q_WS_S60 is the right choice.
Q_WS_S60 is still defined on Symbian^3 because Avkon is still present.
-
jbarron, thanks for this small note about Symbian3 and Q_WS_S60. Assistant is a bit unclear about it (there is mention about Avkon, but no mention about Symbian3 and Avkon), maybe will be useful to add a note there.
-
Another question popped into my mind.
If I have a block like this in my .pro-file:
@symbian {
Custom kinetic scroller for Symbian since kinetic scrolling is not working there yet
HEADERS += qscrollareakineticscroller.h \ qkineticscroller.h \ qkineticscroller_p.h SOURCES += qscrollareakineticscroller.cpp \ qkineticscroller.cpp
}@
Is there any way to compile those only for >=5th edition and not for 3rd edition at all? I know I can use QSysInfo at runtime but then is there something to separate different versions of Symbian platform at compilation or .pro-file evaluation time?
-
If you have a look at the Qt Mobility configure tests which run on Symbian, you'll see a few which are related to the contacts and organizer domains. The results of those tests are used to determine which version of Symbian the project is being compiled on.
In particular, take a look at plugins/organizer/symbian/symbian.pro and plugins/contacts/symbian/symbian.pro -- use the technique at your own risk, I'm certain there has to be a better way to do it. Indeed, someone more familiar with Symbian development might know of some file which only exists on S60 3rd edition, and so a qmake "exists(filename)" check might suffice.
Hope this helps.
Cheers,
Chris. -
I would love to see config variables for different S60/Symbian versions defined appropriately by qmake or one of its many prf/pri tentacles.