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

Albert Astals Cid aacid at kde.org
Sun Oct 21 20:44:59 UTC 2012


El Divendres, 19 d'octubre de 2012, a les 19:55:45, Bogdan Cristea va 
escriure:
> 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;
> }

That doesn't really help with the problem since you can't embed C++ code in a 
.desktop file ;-)

Cheers,
  Albert


More information about the Okular-devel mailing list