~cimi/unity8/sdk1.3_newUbuntuShape

« back to all changes in this revision

Viewing changes to tests/uqmlscene/ActiveFocusLogger.cpp

  • Committer: Andrea Cimitan
  • Date: 2015-10-23 10:05:59 UTC
  • mfrom: (1821.1.36 use_sdk_13)
  • Revision ID: andrea.cimitan@gmail.com-20151023100559-fi60ots87umsplq1
[ CI Train Bot ]
* New rebuild forced.
[ Pawel Stolowski ]
* Store unity8 package version in /var/lib/.../version file for fast
  retrieval from the shell plugin.
[ Lukáš Tinkl ]
* Revert to using plaintext instead of HTML-like markup for the
  notifications (LP: #1504256)
[ CI Train Bot ]
* Resync trunk.
[ Lukáš Tinkl ]
* Wizard: skip the reporting page if the system is configured not to
  report crashes (LP: #1494442)
[ Alexandros Frantzis ]
* Use power state change reason SnapDecision to turn screen on when a
  SnapDecision arrives (LP: #1291455)
[ CI Train Bot ]
* New rebuild forced.
[ Albert Astals Cid ]
* Make Launcher::test_quickListMenuOnRMB stable (LP: #1500359)
[ CI Train Bot ]
* New rebuild forced.
[ Michael Zanetti ]
* Stabilize Launcher DND test
[ Albert Astals Cid ]
* Improvements from running clazy over the code
[ Daniel d'Andrada ]
* PhoneStage: ensure you're left in a consistent state after being
  reset (LP: #1476757)
[ Lukáš Tinkl ]
* Improve the appearance and functionality of datetime and session
  indicators in Unity8 desktop.
* Using InputInfo, determine if we need swipe or click to dismiss the
  notifications (e.g. incoming phone call)
[ Michael Zanetti ]
* further development on the Desktop Spread (LP: #1488147)
[ Michał Sawicz ]
* Bump application API version
* Skip bluetooth check under wily, use expectFailure to notice when
  it's back
[ Richard Somlói ]
* Fix translator comments in time formatter
[ Albert Astals Cid ]
* Adapt test to code changes
* Add DEP-8 test for all our UI and unit tests
* Keep the PreviewStack around to avoid mem leaks (LP: #1495467)
[ CI Train Bot ]
* Resync trunk.
[ Michael Terry ]
* When libusermetrics gives us an empty string, still show the
  infographic circle rather than hiding it.  This is a follow-on to a
  branch [1] that changes the "no data available" label to the empty
  string.
[ Michał Sawicz ]
* Add DEP-8 test for all our UI and unit tests
* Fix integrated LightDM path
* Resync trunk
[ Albert Astals Cid ]
* Fix testNotifications
* Make the wait longer to make tests pass in CI
* New simplified CroppedImageMinimumSourceSize (LP: #1467740)
* Stop animateTimer when starting the fadeOutAnimation
* Use  AlreadyLaunchedUpstart so that tests passes
* Workaround keyboard issues and make test pass again
[ Daniel d'Andrada ]
* DesktopStage: Refactor focus handling
* Stabilize tstShell.test_launchedAppHasActiveFocus
[ Gary.Wzl ]
* Add widgetData["expanded"] property for expandable widget.
[ Michael Terry ]
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
* Fix typo that caused the tutorial to tease the launcher on top of
  the greeter.
[ Michal Sawicz ]
* Resync wily with vivid
[ Albert Astals Cid ]
* Accomodate header height when using a card carousel with non
  overlayed header (LP: #1489309)
* Fix restart unity8 from inside the phone more than two times (LP:
  #1487946)
[ Gary.Wzl ]
* Move textarea up automatically when inputmethod popup. (LP:
  #1485947)
[ Lukáš Tinkl ]
* Introduce a GlobalShortcut QML component for handling global
  keyboard shortcuts
[ Michael Terry ]
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
* Fix the fact that a user that is locked out from their account for
  five minutes after entering too many wrong passwords can simply
  reboot to try again. (LP: #1383086)
[ Michael Zanetti ]
* Implement progressive autoscrolling in desktop spread
* add an animation transition when invoking the spread by hitting the
  right edge
[ Michael Zanetti ]
* release for wily
[ CI Train Bot ]
* New rebuild forced.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2015 Canonical, Ltd.
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; version 3.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful,
9
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 * GNU General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
 
17
 
#include "ActiveFocusLogger.h"
18
 
 
19
 
#include <QDebug>
20
 
#include <QQuickItem>
21
 
 
22
 
void ActiveFocusLogger::setWindow(QQuickWindow *window)
23
 
{
24
 
    m_window = window;
25
 
    QObject::connect(window, &QQuickWindow::activeFocusItemChanged,
26
 
            this, &ActiveFocusLogger::printActiveFocusInfo);
27
 
}
28
 
 
29
 
void ActiveFocusLogger::printActiveFocusInfo()
30
 
{
31
 
    if (!m_window) {
32
 
        return;
33
 
    }
34
 
 
35
 
    qDebug() << "============== Active focus info START ================";
36
 
    if (m_window->activeFocusItem()) {
37
 
        qDebug() << m_window->activeFocusItem();
38
 
        qDebug() << "Ancestry:";
39
 
        QQuickItem *item = m_window->activeFocusItem()->parentItem();
40
 
        while (item != nullptr) {
41
 
            qDebug() << item << ", isFocusScope =" << item->isFocusScope();
42
 
            item = item->parentItem();
43
 
        }
44
 
    } else {
45
 
        qDebug() << "NULL";
46
 
    }
47
 
    qDebug() << "============== Active focus info END ================";
48
 
}