OpenCoverage

qquickapplication.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/util/qquickapplication.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9QQuickApplication::QQuickApplication(QObject *parent)-
10 : QQmlApplication(parent)-
11{-
12 if ((static_cast<
(static_cast<Q...::instance()))Description
TRUEevaluated 12 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
FALSEnever evaluated
QGuiApplication *>(QCoreApplication::instance()))
(static_cast<Q...::instance()))Description
TRUEevaluated 12 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
FALSEnever evaluated
) {
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:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
26}
executed 12 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
27-
28QQuickApplication::~QQuickApplication()-
29{-
30}-
31-
32bool QQuickApplication::active() const-
33{-
34 return
executed 24 times by 2 tests: return QGuiApplication::applicationState() == Qt::ApplicationActive;
Executed by:
  • tst_examples
  • tst_qquickapplication
QGuiApplication::applicationState() == Qt::ApplicationActive;
executed 24 times by 2 tests: return QGuiApplication::applicationState() == Qt::ApplicationActive;
Executed by:
  • tst_examples
  • tst_qquickapplication
24
35}-
36-
37Qt::LayoutDirection QQuickApplication::layoutDirection() const-
38{-
39 return
executed 10 times by 2 tests: return QGuiApplication::layoutDirection();
Executed by:
  • tst_examples
  • tst_qquickapplication
QGuiApplication::layoutDirection();
executed 10 times by 2 tests: return QGuiApplication::layoutDirection();
Executed by:
  • tst_examples
  • tst_qquickapplication
10
40}-
41-
42bool QQuickApplication::supportsMultipleWindows() const-
43{-
44 return
never executed: return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
never executed: return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows);
0
45}-
46-
47Qt::ApplicationState QQuickApplication::state() const-
48{-
49 return
executed 12 times by 1 test: return QGuiApplication::applicationState();
Executed by:
  • tst_qquickapplication
QGuiApplication::applicationState();
executed 12 times by 1 test: return QGuiApplication::applicationState();
Executed by:
  • tst_qquickapplication
12
50}-
51-
52QFont QQuickApplication::font() const-
53{-
54 return
executed 2 times by 1 test: return QGuiApplication::font();
Executed by:
  • tst_qquickapplication
QGuiApplication::font();
executed 2 times by 1 test: return QGuiApplication::font();
Executed by:
  • tst_qquickapplication
2
55}-
56-
57QString QQuickApplication::displayName() const-
58{-
59 return
executed 8 times by 1 test: return QGuiApplication::applicationDisplayName();
Executed by:
  • tst_qquickapplication
QGuiApplication::applicationDisplayName();
executed 8 times by 1 test: return QGuiApplication::applicationDisplayName();
Executed by:
  • tst_qquickapplication
8
60}-
61-
62void QQuickApplication::setDisplayName(const QString &displayName)-
63{-
64 return
executed 2 times by 1 test: return QGuiApplication::setApplicationDisplayName(displayName);
Executed by:
  • tst_qquickapplication
QGuiApplication::setApplicationDisplayName(displayName);
executed 2 times by 1 test: return QGuiApplication::setApplicationDisplayName(displayName);
Executed by:
  • tst_qquickapplication
2
65}-
66-
67int screens_count(QQmlListProperty<QQuickScreenInfo> *prop)-
68{-
69 return
executed 24 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count();
Executed by:
  • tst_qquickscreen
static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count();
executed 24 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->count();
Executed by:
  • tst_qquickscreen
24
70}-
71-
72QQuickScreenInfo *screens_at(QQmlListProperty<QQuickScreenInfo> *prop, int idx)-
73{-
74 return
executed 6 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx);
Executed by:
  • tst_qquickscreen
static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx);
executed 6 times by 1 test: return static_cast<QVector<QQuickScreenInfo *> *>(prop->data)->at(idx);
Executed by:
  • tst_qquickscreen
6
75}-
76-
77QQmlListProperty<QQuickScreenInfo> QQuickApplication::screens()-
78{-
79 return
executed 12 times by 1 test: return QQmlListProperty<QQuickScreenInfo>(this, const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at);
Executed by:
  • tst_qquickscreen
QQmlListProperty<QQuickScreenInfo>(this,
executed 12 times by 1 test: return QQmlListProperty<QQuickScreenInfo>(this, const_cast<QVector<QQuickScreenInfo *> *>(&m_screens), &screens_count, &screens_at);
Executed by:
  • tst_qquickscreen
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:
  • tst_qquickscreen
12
81}-
82-
83void QQuickApplication::updateScreens()-
84{-
85 const QList<QScreen *> screenList = QGuiApplication::screens();-
86 m_screens.resize(screenList.count());-
87 for (int i = 0; i < screenList.count()
i < screenList.count()Description
TRUEevaluated 12 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
FALSEevaluated 12 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
; ++i) {
12
88 if (!m_screens[i]
!m_screens[i]Description
TRUEevaluated 12 times by 4 tests
Evaluated by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
FALSEnever evaluated
)
0-12
89 m_screens[i] = new QQuickScreenInfo(this);
executed 12 times by 4 tests: m_screens[i] = new QQuickScreenInfo(this);
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
90 m_screens[i]->setWrappedScreen(screenList[i]);-
91 }
executed 12 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
92 screensChanged();-
93}
executed 12 times by 4 tests: end of block
Executed by:
  • tst_examples
  • tst_qqmlecmascript
  • tst_qquickapplication
  • tst_qquickscreen
12
94-
95-
96-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0