| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquickwindowattached.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | - | |||||||||||||||||||
| 4 | - | |||||||||||||||||||
| 5 | - | |||||||||||||||||||
| 6 | QQuickWindowAttached::QQuickWindowAttached(QObject* attachee) | - | ||||||||||||||||||
| 7 | : QObject(attachee) | - | ||||||||||||||||||
| 8 | , m_window(nullptr) | - | ||||||||||||||||||
| 9 | { | - | ||||||||||||||||||
| 10 | m_attachee = qobject_cast<QQuickItem*>(attachee); | - | ||||||||||||||||||
| 11 | if (m_attachee
| 0 | ||||||||||||||||||
| 12 | windowChange(m_attachee->window()); never executed: windowChange(m_attachee->window()); | 0 | ||||||||||||||||||
| 13 | if (m_attachee
| 0 | ||||||||||||||||||
| 14 | connect(m_attachee, &QQuickItem::windowChanged, this, &QQuickWindowAttached::windowChange); never executed: connect(m_attachee, &QQuickItem::windowChanged, this, &QQuickWindowAttached::windowChange); | 0 | ||||||||||||||||||
| 15 | } never executed: end of block | 0 | ||||||||||||||||||
| 16 | - | |||||||||||||||||||
| 17 | QWindow::Visibility QQuickWindowAttached::visibility() const | - | ||||||||||||||||||
| 18 | { | - | ||||||||||||||||||
| 19 | return never executed: (m_window ? m_window->visibility() : QWindow::Hidden);return (m_window ? m_window->visibility() : QWindow::Hidden);never executed: return (m_window ? m_window->visibility() : QWindow::Hidden); | 0 | ||||||||||||||||||
| 20 | } | - | ||||||||||||||||||
| 21 | - | |||||||||||||||||||
| 22 | bool QQuickWindowAttached::isActive() const | - | ||||||||||||||||||
| 23 | { | - | ||||||||||||||||||
| 24 | return never executed: (m_window ? m_window->isActive() : false);return (m_window ? m_window->isActive() : false);never executed: return (m_window ? m_window->isActive() : false); | 0 | ||||||||||||||||||
| 25 | } | - | ||||||||||||||||||
| 26 | - | |||||||||||||||||||
| 27 | QQuickItem *QQuickWindowAttached::activeFocusItem() const | - | ||||||||||||||||||
| 28 | { | - | ||||||||||||||||||
| 29 | return never executed: (m_window ? m_window->activeFocusItem() : nullptr);return (m_window ? m_window->activeFocusItem() : nullptr);never executed: return (m_window ? m_window->activeFocusItem() : nullptr); | 0 | ||||||||||||||||||
| 30 | } | - | ||||||||||||||||||
| 31 | - | |||||||||||||||||||
| 32 | QQuickItem *QQuickWindowAttached::contentItem() const | - | ||||||||||||||||||
| 33 | { | - | ||||||||||||||||||
| 34 | return never executed: (m_window ? m_window->contentItem() : nullptr);return (m_window ? m_window->contentItem() : nullptr);never executed: return (m_window ? m_window->contentItem() : nullptr); | 0 | ||||||||||||||||||
| 35 | } | - | ||||||||||||||||||
| 36 | - | |||||||||||||||||||
| 37 | int QQuickWindowAttached::width() const | - | ||||||||||||||||||
| 38 | { | - | ||||||||||||||||||
| 39 | return never executed: (m_window ? m_window->width() : 0);return (m_window ? m_window->width() : 0);never executed: return (m_window ? m_window->width() : 0); | 0 | ||||||||||||||||||
| 40 | } | - | ||||||||||||||||||
| 41 | - | |||||||||||||||||||
| 42 | int QQuickWindowAttached::height() const | - | ||||||||||||||||||
| 43 | { | - | ||||||||||||||||||
| 44 | return never executed: (m_window ? m_window->height() : 0);return (m_window ? m_window->height() : 0);never executed: return (m_window ? m_window->height() : 0); | 0 | ||||||||||||||||||
| 45 | } | - | ||||||||||||||||||
| 46 | - | |||||||||||||||||||
| 47 | QQuickWindow *QQuickWindowAttached::window() const | - | ||||||||||||||||||
| 48 | { | - | ||||||||||||||||||
| 49 | return never executed: m_window;return m_window;never executed: return m_window; | 0 | ||||||||||||||||||
| 50 | } | - | ||||||||||||||||||
| 51 | - | |||||||||||||||||||
| 52 | void QQuickWindowAttached::windowChange(QQuickWindow *window) | - | ||||||||||||||||||
| 53 | { | - | ||||||||||||||||||
| 54 | if (window != m_window
| 0 | ||||||||||||||||||
| 55 | QQuickWindow* oldWindow = m_window; | - | ||||||||||||||||||
| 56 | m_window = window; | - | ||||||||||||||||||
| 57 | - | |||||||||||||||||||
| 58 | if (oldWindow
| 0 | ||||||||||||||||||
| 59 | oldWindow->disconnect(this); never executed: oldWindow->disconnect(this); | 0 | ||||||||||||||||||
| 60 | - | |||||||||||||||||||
| 61 | windowChanged(); | - | ||||||||||||||||||
| 62 | - | |||||||||||||||||||
| 63 | if (!oldWindow
| 0 | ||||||||||||||||||
| 64 | visibilityChanged(); never executed: visibilityChanged(); | 0 | ||||||||||||||||||
| 65 | if (!oldWindow
| 0 | ||||||||||||||||||
| 66 | activeChanged(); never executed: activeChanged(); | 0 | ||||||||||||||||||
| 67 | if (!oldWindow
| 0 | ||||||||||||||||||
| 68 | activeFocusItemChanged(); never executed: activeFocusItemChanged(); | 0 | ||||||||||||||||||
| 69 | contentItemChanged(); | - | ||||||||||||||||||
| 70 | if (!oldWindow
| 0 | ||||||||||||||||||
| 71 | widthChanged(); never executed: widthChanged(); | 0 | ||||||||||||||||||
| 72 | if (!oldWindow
| 0 | ||||||||||||||||||
| 73 | heightChanged(); never executed: heightChanged(); | 0 | ||||||||||||||||||
| 74 | - | |||||||||||||||||||
| 75 | if (!window
| 0 | ||||||||||||||||||
| 76 | return; never executed: return; | 0 | ||||||||||||||||||
| 77 | - | |||||||||||||||||||
| 78 | - | |||||||||||||||||||
| 79 | - | |||||||||||||||||||
| 80 | - | |||||||||||||||||||
| 81 | - | |||||||||||||||||||
| 82 | - | |||||||||||||||||||
| 83 | - | |||||||||||||||||||
| 84 | connect(window, &QQuickWindow::visibilityChanged, | - | ||||||||||||||||||
| 85 | this, &QQuickWindowAttached::visibilityChanged); | - | ||||||||||||||||||
| 86 | connect(window, &QQuickWindow::activeChanged, | - | ||||||||||||||||||
| 87 | this, &QQuickWindowAttached::activeChanged); | - | ||||||||||||||||||
| 88 | connect(window, &QQuickWindow::activeFocusItemChanged, | - | ||||||||||||||||||
| 89 | this, &QQuickWindowAttached::activeFocusItemChanged); | - | ||||||||||||||||||
| 90 | connect(window, &QQuickWindow::widthChanged, | - | ||||||||||||||||||
| 91 | this, &QQuickWindowAttached::widthChanged); | - | ||||||||||||||||||
| 92 | connect(window, &QQuickWindow::heightChanged, | - | ||||||||||||||||||
| 93 | this, &QQuickWindowAttached::heightChanged); | - | ||||||||||||||||||
| 94 | } never executed: end of block | 0 | ||||||||||||||||||
| 95 | } never executed: end of block | 0 | ||||||||||||||||||
| 96 | - | |||||||||||||||||||
| 97 | - | |||||||||||||||||||
| 98 | - | |||||||||||||||||||
| Switch to Source code | Preprocessed file |