[Development] Another late API addition in QScreen

Samuel Rødal samuel.rodal at nokia.com
Wed Jun 6 16:06:43 CEST 2012


On 06/06/2012 03:38 PM, ext shane.kearns at accenture.com wrote:
>> -----Original Message-----
>> From: development-bounces+shane.kearns=accenture.com at qt-project.org
>> [mailto:development-bounces+shane.kearns=accenture.com at qt-project.org]
>> On Behalf Of Samuel Rødal
>> Sent: 05 June 2012 13:30
>> To: development at qt-project.org
>> Subject: [Development] Another late API addition in QScreen
>>
>> Hello,
>>
>> the current QScreen API forces the platform to always have an
>> accelerometer sensor or similar running in order to provide
>> QScreen::orientation() updates, which might lead to wasted resources in
>> the case of handheld embedded devices.
>>
>> As a fix for this I've introduced a new function in QScreen,
>> setOrientationUpdateMask(), in order force the application to
>> explicitly have to ask for orientation updates.
>>
>> https://codereview.qt-project.org/#change,27981
>>
> 
> Late comment, but should the default have been updates on?
> Qt 4 behaviour on symbian/harmattan was to have screen rotation be automatic unless opted out from (which was unfortunately a different Qt API on each platform)

As I commented in the change, that would make the mask mostly useless,
since an application that doesn't care about orientations probably
wouldn't go and explicitly disable the orientation updates.

--
Samuel



More information about the Development mailing list