[Okular-devel] Review Request: Split active app desktop file

Bogdan Cristea cristeab at gmail.com
Fri Oct 19 17:55:45 UTC 2012


On Friday 19 October 2012 17:46:01 Albert Astals Cid wrote:
> One would say that on desktop you want okular to have a higher initial
> preference and the reverse on touch systems, but how do we do that? with a
> cmake switch?

You could test this with a cpp file called from cmake (provided that 
QtMobility is available), something like this

bool hasTouch() {
QSystemDeviceInfo systemInfo;                                                                                                                                                                                                             
QSystemDeviceInfo::InputMethodFlags flags = systemInfo.inputMethodType();                                                                                                                                                            
return ((flags & (QSystemDeviceInfo::SingleTouch |  
QSystemDeviceInfo::MultiTouch)) != 0) ? true : false; 
}
-- 
Bogdan


More information about the Okular-devel mailing list