~ci-train-bot/ubuntu-ui-toolkit/ubuntu-ui-toolkit-ubuntu-yakkety-landing-094

« back to all changes in this revision

Viewing changes to src/Ubuntu/Components/plugin/uclistitem.cpp

  • Committer: Bileto Bot
  • Author(s): Tarmac --author=Zoltán Balogh
  • Date: 2016-06-07 18:24:40 UTC
  • mfrom: (1000.954.8 OTA12-2016-06-07)
  • Revision ID: ci-train-bot@canonical.com-20160607182440-8shc9yv12gpbe46j
OTA12-2016-06-07 landing

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "uclistitemactions_p.h"
24
24
#include "privates/listitemselection.h"
25
25
#include "ucubuntuanimation.h"
26
 
#include "propertychange_p.h"
 
26
#include <PropertyChange>
27
27
#include "i18n.h"
28
28
#include "quickutils.h"
29
29
#include "ucaction.h"
1484
1484
    update();
1485
1485
}
1486
1486
 
 
1487
// emit clicked when Enter/Return/Space is pressed
 
1488
void UCListItem::keyReleaseEvent(QKeyEvent *event)
 
1489
{
 
1490
    Q_D(UCListItem);
 
1491
 
 
1492
    UCStyledItemBase::keyReleaseEvent(event);
 
1493
 
 
1494
    switch (event->key()) {
 
1495
        case Qt::Key_Enter:
 
1496
        case Qt::Key_Return:
 
1497
        case Qt::Key_Space:
 
1498
            event->accept();
 
1499
            clicked();
 
1500
            if (d->mainAction) {
 
1501
                invokeTrigger<UCAction>(d->mainAction, d->index());
 
1502
            }
 
1503
            break;
 
1504
        default:
 
1505
            break;
 
1506
    }
 
1507
}
 
1508
 
 
1509
 
1487
1510
// handle horizontal keys to navigate between focusable slots
1488
1511
void UCListItem::keyPressEvent(QKeyEvent *event)
1489
1512
{