| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/qquicktextedit_p_p.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count |
|---|---|---|
| 1 | - | |
| 2 | - | |
| 3 | - | |
| 4 | - | |
| 5 | - | |
| 6 | class QTextLayout; | - |
| 7 | class QQuickTextDocumentWithImageResources; | - |
| 8 | class QQuickTextControl; | - |
| 9 | class QQuickTextNode; | - |
| 10 | class QQuickTextNodeEngine; | - |
| 11 | - | |
| 12 | class __attribute__((visibility("default"))) QQuickTextEditPrivate : public QQuickImplicitSizeItemPrivate | - |
| 13 | { | - |
| 14 | public: | - |
| 15 | inline QQuickTextEdit* q_func() { return static_cast<QQuickTextEdit *>(q_ptr); } inline const QQuickTextEdit* q_func() const { return static_cast<const QQuickTextEdit *>(q_ptr); } friend class QQuickTextEdit; | - |
| 16 | - | |
| 17 | typedef QQuickTextEdit Public; | - |
| 18 | - | |
| 19 | struct Node { | - |
| 20 | explicit Node(int startPos = std::numeric_limits<int>::max(), | - |
| 21 | QQuickTextNode *node = nullptr) | - |
| 22 | : m_startPos(startPos), m_node(node), m_dirty(false) { } executed 7410 times by 5 tests: end of blockExecuted by:
| 7410 |
| 23 | QQuickTextNode* textNode() const { return executed 758 times by 4 tests: m_node;return m_node;Executed by:
executed 758 times by 4 tests: }return m_node;Executed by:
| 758 |
| 24 | void moveStartPos(int delta) { ((m_startPos + delta > 0) ? static_cast<void>(0) : qt_assert("m_startPos + delta > 0", __FILE__, 83)); m_startPos += delta; } executed 6 times by 1 test: end of blockExecuted by:
| 6 |
| 25 | int startPos() const { return executed 16696 times by 4 tests: m_startPos;return m_startPos;Executed by:
executed 16696 times by 4 tests: }return m_startPos;Executed by:
| 16696 |
| 26 | void setDirty() { m_dirty = true; } executed 2696 times by 1 test: end of blockExecuted by:
| 2696 |
| 27 | bool dirty() const { return executed 354 times by 2 tests: m_dirty;return m_dirty;Executed by:
executed 354 times by 2 tests: }return m_dirty;Executed by:
| 354 |
| 28 | - | |
| 29 | private: | - |
| 30 | int m_startPos; | - |
| 31 | QQuickTextNode* m_node; | - |
| 32 | bool m_dirty; | - |
| 33 | }; | - |
| 34 | typedef QList<Node>::iterator TextNodeIterator; | - |
| 35 | - | |
| 36 | struct ExtraData { | - |
| 37 | ExtraData(); | - |
| 38 | - | |
| 39 | qreal padding; | - |
| 40 | qreal topPadding; | - |
| 41 | qreal leftPadding; | - |
| 42 | qreal rightPadding; | - |
| 43 | qreal bottomPadding; | - |
| 44 | bool explicitTopPadding : 1; | - |
| 45 | bool explicitLeftPadding : 1; | - |
| 46 | bool explicitRightPadding : 1; | - |
| 47 | bool explicitBottomPadding : 1; | - |
| 48 | bool implicitResize : 1; | - |
| 49 | }; | - |
| 50 | QLazilyAllocated<ExtraData> extra; | - |
| 51 | - | |
| 52 | - | |
| 53 | QQuickTextEditPrivate() | - |
| 54 | : color(QRgb(0xFF000000)), selectionColor(QRgb(0xFF000080)), selectedTextColor(QRgb(0xFFFFFFFF)) | - |
| 55 | , textMargin(0.0), xoff(0), yoff(0) | - |
| 56 | , font(sourceFont), cursorComponent(nullptr), cursorItem(nullptr), document(nullptr), control(nullptr) | - |
| 57 | , quickDocument(nullptr), lastSelectionStart(0), lastSelectionEnd(0), lineCount(0) | - |
| 58 | , hAlign(QQuickTextEdit::AlignLeft), vAlign(QQuickTextEdit::AlignTop) | - |
| 59 | , format(QQuickTextEdit::PlainText), wrapMode(QQuickTextEdit::NoWrap) | - |
| 60 | , renderType(QQuickTextUtil::textRenderType<QQuickTextEdit>()) | - |
| 61 | , contentDirection(Qt::LayoutDirectionAuto) | - |
| 62 | , mouseSelectionMode(QQuickTextEdit::SelectCharacters) | - |
| 63 | - | |
| 64 | , inputMethodHints(Qt::ImhNone) | - |
| 65 | - | |
| 66 | , updateType(UpdatePaintNode) | - |
| 67 | , dirty(false), richText(false), cursorVisible(false), cursorPending(false) | - |
| 68 | , focusOnPress(true), persistentSelection(false), requireImplicitWidth(false) | - |
| 69 | , selectByMouse(false), canPaste(false), canPasteValid(false), hAlignImplicit(true) | - |
| 70 | , textCached(true), inLayout(false), selectByKeyboard(false), selectByKeyboardSet(false) | - |
| 71 | , hadSelection(false) | - |
| 72 | { | - |
| 73 | } executed 1076 times by 6 tests: end of blockExecuted by:
| 1076 |
| 74 | - | |
| 75 | static QQuickTextEditPrivate *get(QQuickTextEdit *item) { | - |
| 76 | return executed 66 times by 1 test: static_cast<QQuickTextEditPrivate *>(QObjectPrivate::get(item));return static_cast<QQuickTextEditPrivate *>(QObjectPrivate::get(item));Executed by:
executed 66 times by 1 test: }return static_cast<QQuickTextEditPrivate *>(QObjectPrivate::get(item));Executed by:
| 66 |
| 77 | - | |
| 78 | void init(); | - |
| 79 | - | |
| 80 | void resetInputMethod(); | - |
| 81 | void updateDefaultTextOption(); | - |
| 82 | void relayoutDocument(); | - |
| 83 | bool determineHorizontalAlignment(); | - |
| 84 | bool setHAlign(QQuickTextEdit::HAlignment, bool forceAlign = false); | - |
| 85 | void mirrorChange() override; | - |
| 86 | qreal getImplicitWidth() const override; | - |
| 87 | Qt::LayoutDirection textDirection(const QString &text) const; | - |
| 88 | bool isLinkHoveredConnected(); | - |
| 89 | - | |
| 90 | void setNativeCursorEnabled(bool) {} | - |
| 91 | void handleFocusEvent(QFocusEvent *event); | - |
| 92 | void addCurrentTextNodeToRoot(QQuickTextNodeEngine *, QSGTransformNode *, QQuickTextNode*, TextNodeIterator&, int startPos); | - |
| 93 | QQuickTextNode* createTextNode(); | - |
| 94 | - | |
| 95 | - | |
| 96 | Qt::InputMethodHints effectiveInputMethodHints() const; | - |
| 97 | - | |
| 98 | - | |
| 99 | inline qreal padding() const { return executed 61284 times by 6 tests: extra.isAllocated() ? extra->padding : 0.0;return extra.isAllocated() ? extra->padding : 0.0;Executed by:
executed 61284 times by 6 tests: }return extra.isAllocated() ? extra->padding : 0.0;Executed by:
| 61284 |
| 100 | void setTopPadding(qreal value, bool reset = false); | - |
| 101 | void setLeftPadding(qreal value, bool reset = false); | - |
| 102 | void setRightPadding(qreal value, bool reset = false); | - |
| 103 | void setBottomPadding(qreal value, bool reset = false); | - |
| 104 | - | |
| 105 | bool isImplicitResizeEnabled() const; | - |
| 106 | void setImplicitResizeEnabled(bool enabled); | - |
| 107 | - | |
| 108 | QColor color; | - |
| 109 | QColor selectionColor; | - |
| 110 | QColor selectedTextColor; | - |
| 111 | - | |
| 112 | QSizeF contentSize; | - |
| 113 | - | |
| 114 | qreal textMargin; | - |
| 115 | qreal xoff; | - |
| 116 | qreal yoff; | - |
| 117 | - | |
| 118 | QString text; | - |
| 119 | QUrl baseUrl; | - |
| 120 | QFont sourceFont; | - |
| 121 | QFont font; | - |
| 122 | - | |
| 123 | QQmlComponent* cursorComponent; | - |
| 124 | QQuickItem* cursorItem; | - |
| 125 | QQuickTextDocumentWithImageResources *document; | - |
| 126 | QQuickTextControl *control; | - |
| 127 | QQuickTextDocument *quickDocument; | - |
| 128 | QList<Node> textNodeMap; | - |
| 129 | - | |
| 130 | int lastSelectionStart; | - |
| 131 | int lastSelectionEnd; | - |
| 132 | int lineCount; | - |
| 133 | - | |
| 134 | enum UpdateType { | - |
| 135 | UpdateNone, | - |
| 136 | UpdateOnlyPreprocess, | - |
| 137 | UpdatePaintNode | - |
| 138 | }; | - |
| 139 | - | |
| 140 | QQuickTextEdit::HAlignment hAlign; | - |
| 141 | QQuickTextEdit::VAlignment vAlign; | - |
| 142 | QQuickTextEdit::TextFormat format; | - |
| 143 | QQuickTextEdit::WrapMode wrapMode; | - |
| 144 | QQuickTextEdit::RenderType renderType; | - |
| 145 | Qt::LayoutDirection contentDirection; | - |
| 146 | QQuickTextEdit::SelectionMode mouseSelectionMode; | - |
| 147 | - | |
| 148 | Qt::InputMethodHints inputMethodHints; | - |
| 149 | - | |
| 150 | UpdateType updateType; | - |
| 151 | - | |
| 152 | bool dirty : 1; | - |
| 153 | bool richText : 1; | - |
| 154 | bool cursorVisible : 1; | - |
| 155 | bool cursorPending : 1; | - |
| 156 | bool focusOnPress : 1; | - |
| 157 | bool persistentSelection : 1; | - |
| 158 | bool requireImplicitWidth:1; | - |
| 159 | bool selectByMouse:1; | - |
| 160 | bool canPaste:1; | - |
| 161 | bool canPasteValid:1; | - |
| 162 | bool hAlignImplicit:1; | - |
| 163 | bool textCached:1; | - |
| 164 | bool inLayout:1; | - |
| 165 | bool selectByKeyboard:1; | - |
| 166 | bool selectByKeyboardSet:1; | - |
| 167 | bool hadSelection : 1; | - |
| 168 | }; | - |
| 169 | - | |
| 170 | - | |
| Switch to Source code | Preprocessed file |