Merge lp:~renatofilho/ubuntu-calendar-app/fix-1556945 into lp:ubuntu-calendar-app

Proposed by Renato Araujo Oliveira Filho
Status: Work in progress
Proposed branch: lp:~renatofilho/ubuntu-calendar-app/fix-1556945
Merge into: lp:ubuntu-calendar-app
Diff against target: 42 lines (+15/-5)
1 file modified
calendar.qml (+15/-5)
To merge this branch: bzr merge lp:~renatofilho/ubuntu-calendar-app/fix-1556945
Reviewer Review Type Date Requested Status
Ubuntu Calendar Developers Pending
Review via email: mp+288942@code.launchpad.net

Commit message

Use QSystemInfo API to detect if there is mouse attached.

Description of the change

This is not the full solution, since the app will be blocked by apparmor when trying to read device info.

To post a comment you must log in.

Unmerged revisions

779. By Renato Araujo Oliveira Filho

Use QSystemInfo API to detect if there is mouse attached.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'calendar.qml'
2--- calendar.qml 2016-03-07 15:58:43 +0000
3+++ calendar.qml 2016-03-14 15:26:35 +0000
4@@ -16,6 +16,7 @@
5 * along with this program. If not, see <http://www.gnu.org/licenses/>.
6 */
7 import QtQuick 2.4
8+import QtSystemInfo 5.5
9 import Ubuntu.Components 1.3
10 import Ubuntu.Components.Popups 1.0
11 import QtOrganizer 5.0
12@@ -428,11 +429,6 @@
13 tabs.selectedTabIndex = settings.defaultViewIndex;
14 }
15 tabs.isReady = true
16- // WORKAROUND: Due the missing feature on SDK, they can not detect if
17- // there is a mouse attached to device or not. And this will cause the
18- // bootom edge component to not work correct on desktop.
19- // We will consider that a mouse is always attached until it get implement on SDK.
20- QuickUtils.mouseAttached = true
21 } // End of Component.onCompleted:
22
23 Keys.onTabPressed: {
24@@ -733,4 +729,18 @@
25 }
26 }
27 }
28+
29+ // WORKAROUND: Due the missing feature on SDK, they can not detect if
30+ // there is a mouse attached to device or not. And this will cause the
31+ // bootom edge component to not work correct on desktop.
32+ Binding {
33+ target: QuickUtils
34+ property: "mouseAttached"
35+ value: (mouseList.count > 1)
36+ }
37+
38+ InputDeviceManager {
39+ id: mouseList
40+ filter: InputInfo.Mouse | InputInfo.TouchPad
41+ }
42 }

Subscribers

People subscribed via source and target branches

to status/vote changes: