A easier way is to add this line in .pro file:
symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"
then you needn't add any code in .pro\.cpp
"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.