Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickapplication.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | QQuickApplication::QQuickApplication(QObject *parent) | - | ||||||||||||
10 | : QQmlApplication(parent) | - | ||||||||||||
11 | { | - | ||||||||||||
12 | if ((static_cast<
| 0-12 | ||||||||||||
13 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("2""layoutDirectionChanged(Qt::LayoutDirection)" "\0" __FILE__ ":" "60"), | - | ||||||||||||
14 | this, qFlagLocation("2""layoutDirectionChanged()" "\0" __FILE__ ":" "61")); | - | ||||||||||||
15 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("2""applicationStateChanged(Qt::ApplicationState)" "\0" __FILE__ ":" "62"), | - | ||||||||||||
16 | this, qFlagLocation("2""stateChanged(Qt::ApplicationState)" "\0" __FILE__ ":" "63")); | - | ||||||||||||
17 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("2""applicationStateChanged(Qt::ApplicationState)" "\0" __FILE__ ":" "64"), | - | ||||||||||||
18 | this, qFlagLocation("2""activeChanged()" "\0" __FILE__ ":" "65")); | - | ||||||||||||
19 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), qFlagLocation("2""applicationDisplayNameChanged()" "\0" __FILE__ ":" "66"), | - | ||||||||||||
20 | this, qFlagLocation("2""displayNameChanged()" "\0" __FILE__ ":" "67")); | - | ||||||||||||
21 | - | |||||||||||||
22 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), &QGuiApplication::screenAdded, this, &QQuickApplication::updateScreens); | - | ||||||||||||
23 | connect((static_cast<QGuiApplication *>(QCoreApplication::instance())), &QGuiApplication::screenRemoved, this, &QQuickApplication::updateScreens); | - | ||||||||||||
24 | updateScreens(); | - | ||||||||||||
25 | } executed 12 times by 4 tests: end of block Executed by:
| 12 | ||||||||||||
26 | } executed 12 times by 4 tests: end of block Executed by:
| 12 | ||||||||||||
27 | - | |||||||||||||
28 | QQuickApplication::~QQuickApplication() | - | ||||||||||||
29 | { | - | ||||||||||||
30 | } | - | ||||||||||||
31 | - | |||||||||||||
32 | bool QQuickApplication::active() const | - | ||||||||||||
33 | { | - | ||||||||||||
34 | return executed 24 times by 2 tests: QGuiApplication::applicationState() == Qt::ApplicationActive;return QGuiApplication::applicationState() == Qt::ApplicationActive; Executed by:
executed 24 times by 2 tests: return QGuiApplication::applicationState() == Qt::ApplicationActive; Executed by:
| 24 | ||||||||||||
35 | } | - | ||||||||||||
36 | - | |||||||||||||
37 | Qt::LayoutDirection QQuickApplication::layoutDirection() const | - | ||||||||||||
38 | { | - | ||||||||||||
39 | return executed 10 times by 2 tests: QGuiApplication::layoutDirection();return QGuiApplication::layoutDirection(); Executed by:
executed 10 times by 2 tests: return QGuiApplication::layoutDirection(); Executed by:
| 10 | ||||||||||||
40 | } | - | ||||||||||||
41 | - | |||||||||||||
42 | bool QQuickApplication::supportsMultipleWindows() const | - | ||||||||||||
43 | { | - | ||||||||||||
44 | return never executed: QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows); never executed: return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows); | 0 | ||||||||||||
45 | } | - | ||||||||||||
46 | - | |||||||||||||
47 | Qt::ApplicationState QQuickApplication::state() const | - | ||||||||||||
48 | { | - | ||||||||||||
49 | return executed 12 times by 1 test: QGuiApplication::applicationState();return QGuiApplication::applicationState(); Executed by:
executed 12 times by 1 test: return QGuiApplication::applicationState(); Executed by:
| 12 | ||||||||||||
50 | } | - | ||||||||||||
51 | - | |||||||||||||
52 | QFont QQuickApplication::font() const | - | ||||||||||||
53 | { | - | ||||||||||||
54 | return executed 2 times by 1 test: QGuiApplication::font();return QGuiApplication::font(); Executed by:
executed 2 times by 1 test: return QGuiApplication::font(); Executed by:
| 2 | ||||||||||||
55 | } | - | ||||||||||||
56 | - | |||||||||||||
57 | QString QQuickApplication::displayName() const | - | ||||||||||||
58 | { | - | ||||||||||||
59 | return executed 8 times by 1 test: QGuiApplication::applicationDisplayName();return QGuiApplication::applicationDisplayName(); Executed by:
executed 8 times by 1 test: return QGuiApplication::applicationDisplayName(); Executed by:
| 8 | ||||||||||||
60 | } | - | ||||||||||||
61 | - | |||||||||||||
62 | void QQuickApplication::setDisplayName(const QString &displayName) | - | ||||||||||||
63 | { | - | ||||||||||||
64 | return executed 2 times by 1 test: QGuiApplication::setApplicationDisplayName(displayName);return QGuiApplication::setApplicationDisplayName(displayName); Executed by:
executed 2 times by 1 test: return QGuiApplication::setApplicationDisplayName(displayName); Executed by:
| 2 | ||||||||||||
65 | } | - | ||||||||||||
66 | - | |||||||||||||
67 | int screens_count(QQmlListProperty<QQuickScreenInfo> *prop) | - | ||||||||||||
68 | { | - | ||||||||||||
69 | return executed 24 times by 1 test: static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count();return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count(); Executed by:
executed 24 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count(); Executed by:
| 24 | ||||||||||||
70 | } | - | ||||||||||||
71 | - | |||||||||||||
72 | QQuickScreenInfo *screens_at(QQmlListProperty<QQuickScreenInfo> *prop, int idx) | - | ||||||||||||
73 | { | - | ||||||||||||
74 | return executed 6 times by 1 test: static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx);return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx); Executed by:
executed 6 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx); Executed by:
| 6 | ||||||||||||
75 | } | - | ||||||||||||
76 | - | |||||||||||||
77 | QQmlListProperty<QQuickScreenInfo> QQuickApplication::screens() | - | ||||||||||||
78 | { | - | ||||||||||||
79 | return executed 12 times by 1 test: QQmlListProperty<QQuickScreenInfo>(this,return QQmlListProperty<QQuickScreenInfo>(this, const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at); Executed by:
executed 12 times by 1 test: return QQmlListProperty<QQuickScreenInfo>(this, const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at); Executed by:
| 12 | ||||||||||||
80 | const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at); executed 12 times by 1 test: return QQmlListProperty<QQuickScreenInfo>(this, const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at); Executed by:
| 12 | ||||||||||||
81 | } | - | ||||||||||||
82 | - | |||||||||||||
83 | void QQuickApplication::updateScreens() | - | ||||||||||||
84 | { | - | ||||||||||||
85 | const QList<QScreen *> screenList = QGuiApplication::screens(); | - | ||||||||||||
86 | m_screens.resize(screenList.count()); | - | ||||||||||||
87 | for (int i = 0; i < screenList.count()
| 12 | ||||||||||||
88 | if (!m_screens[i]
| 0-12 | ||||||||||||
89 | m_screens[i] = new QQuickScreenInfo(this); executed 12 times by 4 tests: m_screens[i] = new QQuickScreenInfo(this); Executed by:
| 12 | ||||||||||||
90 | m_screens[i]->setWrappedScreen(screenList[i]); | - | ||||||||||||
91 | } executed 12 times by 4 tests: end of block Executed by:
| 12 | ||||||||||||
92 | screensChanged(); | - | ||||||||||||
93 | } executed 12 times by 4 tests: end of block Executed by:
| 12 | ||||||||||||
94 | - | |||||||||||||
95 | - | |||||||||||||
96 | - | |||||||||||||
Switch to Source code | Preprocessed file |