| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/accessible/qaccessiblewidgets.cpp | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | QString qt_accStripAmp(const QString &text); | - | ||||||||||||||||||||||||
| 7 | QString qt_accHotKey(const QString &text); | - | ||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||
| 9 | QList<QWidget*> childWidgets(const QWidget *widget) | - | ||||||||||||||||||||||||
| 10 | { | - | ||||||||||||||||||||||||
| 11 |     if (widget == 0
  | 0 | ||||||||||||||||||||||||
| 12 |         return never executed:   QList<QWidget*>();return QList<QWidget*>();never executed:  return QList<QWidget*>(); | 0 | ||||||||||||||||||||||||
| 13 | QList<QObject*> list = widget->children(); | - | ||||||||||||||||||||||||
| 14 | QList<QWidget*> widgets; | - | ||||||||||||||||||||||||
| 15 |     for (int i = 0; i < list.size()
  | 0 | ||||||||||||||||||||||||
| 16 | QWidget *w = qobject_cast<QWidget *>(list.at(i)); | - | ||||||||||||||||||||||||
| 17 |         if (!w
  | 0 | ||||||||||||||||||||||||
| 18 |             continue; never executed:  continue; | 0 | ||||||||||||||||||||||||
| 19 | QString objectName = w->objectName(); | - | ||||||||||||||||||||||||
| 20 |         if (!w->isWindow()
  | 0 | ||||||||||||||||||||||||
| 21 |               && !qobject_cast<QFocusFrame*>(w)
  | 0 | ||||||||||||||||||||||||
| 22 |               && !qobject_cast<QMenu*>(w)
  | 0 | ||||||||||||||||||||||||
| 23 |               && objectName != QLatin1String("qt_rubberband")
  | 0 | ||||||||||||||||||||||||
| 24 |               && objectName != QLatin1String("qt_qmainwindow_extended_splitter")
  | 0 | ||||||||||||||||||||||||
| 25 | widgets.append(w); | - | ||||||||||||||||||||||||
| 26 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 27 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 28 |     return never executed:   widgets;return widgets;never executed:  return widgets; | 0 | ||||||||||||||||||||||||
| 29 | } | - | ||||||||||||||||||||||||
| 30 | - | |||||||||||||||||||||||||
| 31 | - | |||||||||||||||||||||||||
| 32 | - | |||||||||||||||||||||||||
| 33 | QAccessiblePlainTextEdit::QAccessiblePlainTextEdit(QWidget* o) | - | ||||||||||||||||||||||||
| 34 | :QAccessibleTextWidget(o) | - | ||||||||||||||||||||||||
| 35 | { | - | ||||||||||||||||||||||||
| 36 | ((!(widget()->inherits("QPlainTextEdit"))) ? qt_assert("widget()->inherits(\"QPlainTextEdit\")",__FILE__,97) : qt_noop()); | - | ||||||||||||||||||||||||
| 37 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 38 | - | |||||||||||||||||||||||||
| 39 | QPlainTextEdit* QAccessiblePlainTextEdit::plainTextEdit() const | - | ||||||||||||||||||||||||
| 40 | { | - | ||||||||||||||||||||||||
| 41 |     return never executed:   static_cast<QPlainTextEdit *>(widget());return static_cast<QPlainTextEdit *>(widget());never executed:  return static_cast<QPlainTextEdit *>(widget()); | 0 | ||||||||||||||||||||||||
| 42 | } | - | ||||||||||||||||||||||||
| 43 | - | |||||||||||||||||||||||||
| 44 | QString QAccessiblePlainTextEdit::text(QAccessible::Text t) const | - | ||||||||||||||||||||||||
| 45 | { | - | ||||||||||||||||||||||||
| 46 |     if (t == QAccessible::Value
  | 0 | ||||||||||||||||||||||||
| 47 |         return never executed:   plainTextEdit()->toPlainText();return plainTextEdit()->toPlainText();never executed:  return plainTextEdit()->toPlainText(); | 0 | ||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||
| 49 |     return never executed:   QAccessibleWidget::text(t);return QAccessibleWidget::text(t);never executed:  return QAccessibleWidget::text(t); | 0 | ||||||||||||||||||||||||
| 50 | } | - | ||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||
| 52 | void QAccessiblePlainTextEdit::setText(QAccessible::Text t, const QString &text) | - | ||||||||||||||||||||||||
| 53 | { | - | ||||||||||||||||||||||||
| 54 |     if (t != QAccessible::Value
  | 0 | ||||||||||||||||||||||||
| 55 | QAccessibleWidget::setText(t, text); | - | ||||||||||||||||||||||||
| 56 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 57 | } | - | ||||||||||||||||||||||||
| 58 |     if (plainTextEdit()->isReadOnly()
  | 0 | ||||||||||||||||||||||||
| 59 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 60 | - | |||||||||||||||||||||||||
| 61 | plainTextEdit()->setPlainText(text); | - | ||||||||||||||||||||||||
| 62 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||
| 64 | QAccessible::State QAccessiblePlainTextEdit::state() const | - | ||||||||||||||||||||||||
| 65 | { | - | ||||||||||||||||||||||||
| 66 | QAccessible::State st = QAccessibleTextWidget::state(); | - | ||||||||||||||||||||||||
| 67 |     if (plainTextEdit()->isReadOnly()
  | 0 | ||||||||||||||||||||||||
| 68 |         st.readOnly = true; never executed:  st.readOnly = true; | 0 | ||||||||||||||||||||||||
| 69 | else | - | ||||||||||||||||||||||||
| 70 |         st.editable = true; never executed:  st.editable = true; | 0 | ||||||||||||||||||||||||
| 71 |     return never executed:   st;return st;never executed:  return st; | 0 | ||||||||||||||||||||||||
| 72 | } | - | ||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||
| 74 | void *QAccessiblePlainTextEdit::interface_cast(QAccessible::InterfaceType t) | - | ||||||||||||||||||||||||
| 75 | { | - | ||||||||||||||||||||||||
| 76 |     if (t == QAccessible::TextInterface
  | 0 | ||||||||||||||||||||||||
| 77 |         return never executed:   static_cast<QAccessibleTextInterface*>(this);return static_cast<QAccessibleTextInterface*>(this);never executed:  return static_cast<QAccessibleTextInterface*>(this); | 0 | ||||||||||||||||||||||||
| 78 |     else if (t == QAccessible::EditableTextInterface
  | 0 | ||||||||||||||||||||||||
| 79 |         return never executed:   static_cast<QAccessibleEditableTextInterface*>(this);return static_cast<QAccessibleEditableTextInterface*>(this);never executed:  return static_cast<QAccessibleEditableTextInterface*>(this); | 0 | ||||||||||||||||||||||||
| 80 |     return never executed:   QAccessibleWidget::interface_cast(t);return QAccessibleWidget::interface_cast(t);never executed:  return QAccessibleWidget::interface_cast(t); | 0 | ||||||||||||||||||||||||
| 81 | } | - | ||||||||||||||||||||||||
| 82 | - | |||||||||||||||||||||||||
| 83 | QPoint QAccessiblePlainTextEdit::scrollBarPosition() const | - | ||||||||||||||||||||||||
| 84 | { | - | ||||||||||||||||||||||||
| 85 | QPoint result; | - | ||||||||||||||||||||||||
| 86 | result.setX(plainTextEdit()->horizontalScrollBar() ? plainTextEdit()->horizontalScrollBar()->sliderPosition() : 0); | - | ||||||||||||||||||||||||
| 87 | result.setY(plainTextEdit()->verticalScrollBar() ? plainTextEdit()->verticalScrollBar()->sliderPosition() : 0); | - | ||||||||||||||||||||||||
| 88 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||
| 89 | } | - | ||||||||||||||||||||||||
| 90 | - | |||||||||||||||||||||||||
| 91 | QTextCursor QAccessiblePlainTextEdit::textCursor() const | - | ||||||||||||||||||||||||
| 92 | { | - | ||||||||||||||||||||||||
| 93 |     return never executed:   plainTextEdit()->textCursor();return plainTextEdit()->textCursor();never executed:  return plainTextEdit()->textCursor(); | 0 | ||||||||||||||||||||||||
| 94 | } | - | ||||||||||||||||||||||||
| 95 | - | |||||||||||||||||||||||||
| 96 | void QAccessiblePlainTextEdit::setTextCursor(const QTextCursor &textCursor) | - | ||||||||||||||||||||||||
| 97 | { | - | ||||||||||||||||||||||||
| 98 | plainTextEdit()->setTextCursor(textCursor); | - | ||||||||||||||||||||||||
| 99 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 100 | - | |||||||||||||||||||||||||
| 101 | QTextDocument* QAccessiblePlainTextEdit::textDocument() const | - | ||||||||||||||||||||||||
| 102 | { | - | ||||||||||||||||||||||||
| 103 |     return never executed:   plainTextEdit()->document();return plainTextEdit()->document();never executed:  return plainTextEdit()->document(); | 0 | ||||||||||||||||||||||||
| 104 | } | - | ||||||||||||||||||||||||
| 105 | - | |||||||||||||||||||||||||
| 106 | QWidget* QAccessiblePlainTextEdit::viewport() const | - | ||||||||||||||||||||||||
| 107 | { | - | ||||||||||||||||||||||||
| 108 |     return never executed:   plainTextEdit()->viewport();return plainTextEdit()->viewport();never executed:  return plainTextEdit()->viewport(); | 0 | ||||||||||||||||||||||||
| 109 | } | - | ||||||||||||||||||||||||
| 110 | - | |||||||||||||||||||||||||
| 111 | void QAccessiblePlainTextEdit::scrollToSubstring(int startIndex, int endIndex) | - | ||||||||||||||||||||||||
| 112 | { | - | ||||||||||||||||||||||||
| 113 | - | |||||||||||||||||||||||||
| 114 | (void)startIndex;; | - | ||||||||||||||||||||||||
| 115 | (void)endIndex;; | - | ||||||||||||||||||||||||
| 116 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 117 | QAccessibleTextEdit::QAccessibleTextEdit(QWidget *o) | - | ||||||||||||||||||||||||
| 118 | : QAccessibleTextWidget(o, QAccessible::EditableText) | - | ||||||||||||||||||||||||
| 119 | { | - | ||||||||||||||||||||||||
| 120 | ((!(widget()->inherits("QTextEdit"))) ? qt_assert("widget()->inherits(\"QTextEdit\")",__FILE__,194) : qt_noop()); | - | ||||||||||||||||||||||||
| 121 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 122 | - | |||||||||||||||||||||||||
| 123 | - | |||||||||||||||||||||||||
| 124 | QTextEdit *QAccessibleTextEdit::textEdit() const | - | ||||||||||||||||||||||||
| 125 | { | - | ||||||||||||||||||||||||
| 126 |     return never executed:   static_cast<QTextEdit *>(widget());return static_cast<QTextEdit *>(widget());never executed:  return static_cast<QTextEdit *>(widget()); | 0 | ||||||||||||||||||||||||
| 127 | } | - | ||||||||||||||||||||||||
| 128 | - | |||||||||||||||||||||||||
| 129 | QTextCursor QAccessibleTextEdit::textCursor() const | - | ||||||||||||||||||||||||
| 130 | { | - | ||||||||||||||||||||||||
| 131 |     return never executed:   textEdit()->textCursor();return textEdit()->textCursor();never executed:  return textEdit()->textCursor(); | 0 | ||||||||||||||||||||||||
| 132 | } | - | ||||||||||||||||||||||||
| 133 | - | |||||||||||||||||||||||||
| 134 | QTextDocument *QAccessibleTextEdit::textDocument() const | - | ||||||||||||||||||||||||
| 135 | { | - | ||||||||||||||||||||||||
| 136 |     return never executed:   textEdit()->document();return textEdit()->document();never executed:  return textEdit()->document(); | 0 | ||||||||||||||||||||||||
| 137 | } | - | ||||||||||||||||||||||||
| 138 | - | |||||||||||||||||||||||||
| 139 | void QAccessibleTextEdit::setTextCursor(const QTextCursor &textCursor) | - | ||||||||||||||||||||||||
| 140 | { | - | ||||||||||||||||||||||||
| 141 | textEdit()->setTextCursor(textCursor); | - | ||||||||||||||||||||||||
| 142 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||
| 144 | QWidget *QAccessibleTextEdit::viewport() const | - | ||||||||||||||||||||||||
| 145 | { | - | ||||||||||||||||||||||||
| 146 |     return never executed:   textEdit()->viewport();return textEdit()->viewport();never executed:  return textEdit()->viewport(); | 0 | ||||||||||||||||||||||||
| 147 | } | - | ||||||||||||||||||||||||
| 148 | - | |||||||||||||||||||||||||
| 149 | QPoint QAccessibleTextEdit::scrollBarPosition() const | - | ||||||||||||||||||||||||
| 150 | { | - | ||||||||||||||||||||||||
| 151 | QPoint result; | - | ||||||||||||||||||||||||
| 152 | result.setX(textEdit()->horizontalScrollBar() ? textEdit()->horizontalScrollBar()->sliderPosition() : 0); | - | ||||||||||||||||||||||||
| 153 | result.setY(textEdit()->verticalScrollBar() ? textEdit()->verticalScrollBar()->sliderPosition() : 0); | - | ||||||||||||||||||||||||
| 154 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||
| 155 | } | - | ||||||||||||||||||||||||
| 156 | - | |||||||||||||||||||||||||
| 157 | QString QAccessibleTextEdit::text(QAccessible::Text t) const | - | ||||||||||||||||||||||||
| 158 | { | - | ||||||||||||||||||||||||
| 159 |     if (t == QAccessible::Value
  | 0 | ||||||||||||||||||||||||
| 160 |         return never executed:   textEdit()->toPlainText();return textEdit()->toPlainText();never executed:  return textEdit()->toPlainText(); | 0 | ||||||||||||||||||||||||
| 161 | - | |||||||||||||||||||||||||
| 162 |     return never executed:   QAccessibleWidget::text(t);return QAccessibleWidget::text(t);never executed:  return QAccessibleWidget::text(t); | 0 | ||||||||||||||||||||||||
| 163 | } | - | ||||||||||||||||||||||||
| 164 | - | |||||||||||||||||||||||||
| 165 | void QAccessibleTextEdit::setText(QAccessible::Text t, const QString &text) | - | ||||||||||||||||||||||||
| 166 | { | - | ||||||||||||||||||||||||
| 167 |     if (t != QAccessible::Value
  | 0 | ||||||||||||||||||||||||
| 168 | QAccessibleWidget::setText(t, text); | - | ||||||||||||||||||||||||
| 169 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 170 | } | - | ||||||||||||||||||||||||
| 171 |     if (textEdit()->isReadOnly()
  | 0 | ||||||||||||||||||||||||
| 172 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||
| 174 | textEdit()->setText(text); | - | ||||||||||||||||||||||||
| 175 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 176 | - | |||||||||||||||||||||||||
| 177 | QAccessible::State QAccessibleTextEdit::state() const | - | ||||||||||||||||||||||||
| 178 | { | - | ||||||||||||||||||||||||
| 179 | QAccessible::State st = QAccessibleTextWidget::state(); | - | ||||||||||||||||||||||||
| 180 |     if (textEdit()->isReadOnly()
  | 0 | ||||||||||||||||||||||||
| 181 |         st.readOnly = true; never executed:  st.readOnly = true; | 0 | ||||||||||||||||||||||||
| 182 | else | - | ||||||||||||||||||||||||
| 183 |         st.editable = true; never executed:  st.editable = true; | 0 | ||||||||||||||||||||||||
| 184 |     return never executed:   st;return st;never executed:  return st; | 0 | ||||||||||||||||||||||||
| 185 | } | - | ||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||
| 187 | void *QAccessibleTextEdit::interface_cast(QAccessible::InterfaceType t) | - | ||||||||||||||||||||||||
| 188 | { | - | ||||||||||||||||||||||||
| 189 |     if (t == QAccessible::TextInterface
  | 0 | ||||||||||||||||||||||||
| 190 |         return never executed:   static_cast<QAccessibleTextInterface*>(this);return static_cast<QAccessibleTextInterface*>(this);never executed:  return static_cast<QAccessibleTextInterface*>(this); | 0 | ||||||||||||||||||||||||
| 191 |     else if (t == QAccessible::EditableTextInterface
  | 0 | ||||||||||||||||||||||||
| 192 |         return never executed:   static_cast<QAccessibleEditableTextInterface*>(this);return static_cast<QAccessibleEditableTextInterface*>(this);never executed:  return static_cast<QAccessibleEditableTextInterface*>(this); | 0 | ||||||||||||||||||||||||
| 193 |     return never executed:   QAccessibleWidget::interface_cast(t);return QAccessibleWidget::interface_cast(t);never executed:  return QAccessibleWidget::interface_cast(t); | 0 | ||||||||||||||||||||||||
| 194 | } | - | ||||||||||||||||||||||||
| 195 | - | |||||||||||||||||||||||||
| 196 | void QAccessibleTextEdit::scrollToSubstring(int startIndex, int endIndex) | - | ||||||||||||||||||||||||
| 197 | { | - | ||||||||||||||||||||||||
| 198 | QTextEdit *edit = textEdit(); | - | ||||||||||||||||||||||||
| 199 | - | |||||||||||||||||||||||||
| 200 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 201 | cursor.setPosition(startIndex); | - | ||||||||||||||||||||||||
| 202 | QRect r = edit->cursorRect(cursor); | - | ||||||||||||||||||||||||
| 203 | - | |||||||||||||||||||||||||
| 204 | cursor.setPosition(endIndex); | - | ||||||||||||||||||||||||
| 205 | r.setBottomRight(edit->cursorRect(cursor).bottomRight()); | - | ||||||||||||||||||||||||
| 206 | - | |||||||||||||||||||||||||
| 207 | r.moveTo(r.x() + edit->horizontalScrollBar()->value(), | - | ||||||||||||||||||||||||
| 208 | r.y() + edit->verticalScrollBar()->value()); | - | ||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||
| 210 | - | |||||||||||||||||||||||||
| 211 |     if (!QMetaObject::invokeMethod(edit, "_q_ensureVisible", QArgument<QRectF >("QRectF", r))
  | 0 | ||||||||||||||||||||||||
| 212 |         QMessageLogger(__FILE__, 286, __PRETTY_FUNCTION__).warning("AccessibleTextEdit::scrollToSubstring failed!"); never executed:  QMessageLogger(__FILE__, 286, __PRETTY_FUNCTION__).warning("AccessibleTextEdit::scrollToSubstring failed!"); | 0 | ||||||||||||||||||||||||
| 213 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 214 | - | |||||||||||||||||||||||||
| 215 | - | |||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||
| 217 | - | |||||||||||||||||||||||||
| 218 | - | |||||||||||||||||||||||||
| 219 | QAccessibleStackedWidget::QAccessibleStackedWidget(QWidget *widget) | - | ||||||||||||||||||||||||
| 220 | : QAccessibleWidget(widget, QAccessible::LayeredPane) | - | ||||||||||||||||||||||||
| 221 | { | - | ||||||||||||||||||||||||
| 222 | ((!(qobject_cast<QStackedWidget *>(widget))) ? qt_assert("qobject_cast<QStackedWidget *>(widget)",__FILE__,296) : qt_noop()); | - | ||||||||||||||||||||||||
| 223 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 224 | - | |||||||||||||||||||||||||
| 225 | QAccessibleInterface *QAccessibleStackedWidget::childAt(int x, int y) const | - | ||||||||||||||||||||||||
| 226 | { | - | ||||||||||||||||||||||||
| 227 |     if (!stackedWidget()->isVisible()
  | 0 | ||||||||||||||||||||||||
| 228 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 229 | QWidget *currentWidget = stackedWidget()->currentWidget(); | - | ||||||||||||||||||||||||
| 230 |     if (!currentWidget
  | 0 | ||||||||||||||||||||||||
| 231 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 232 | QPoint position = currentWidget->mapFromGlobal(QPoint(x, y)); | - | ||||||||||||||||||||||||
| 233 |     if (currentWidget->rect().contains(position)
  | 0 | ||||||||||||||||||||||||
| 234 |         return never executed:   child(stackedWidget()->currentIndex());return child(stackedWidget()->currentIndex());never executed:  return child(stackedWidget()->currentIndex()); | 0 | ||||||||||||||||||||||||
| 235 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 236 | } | - | ||||||||||||||||||||||||
| 237 | - | |||||||||||||||||||||||||
| 238 | int QAccessibleStackedWidget::childCount() const | - | ||||||||||||||||||||||||
| 239 | { | - | ||||||||||||||||||||||||
| 240 |     return never executed:   stackedWidget()->count();return stackedWidget()->count();never executed:  return stackedWidget()->count(); | 0 | ||||||||||||||||||||||||
| 241 | } | - | ||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||
| 243 | int QAccessibleStackedWidget::indexOfChild(const QAccessibleInterface *child) const | - | ||||||||||||||||||||||||
| 244 | { | - | ||||||||||||||||||||||||
| 245 |     if (!child
  | 0 | ||||||||||||||||||||||||
| 246 |         return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 247 | - | |||||||||||||||||||||||||
| 248 | QWidget *widget = qobject_cast<QWidget*>(child->object()); | - | ||||||||||||||||||||||||
| 249 |     return never executed:   stackedWidget()->indexOf(widget);return stackedWidget()->indexOf(widget);never executed:  return stackedWidget()->indexOf(widget); | 0 | ||||||||||||||||||||||||
| 250 | } | - | ||||||||||||||||||||||||
| 251 | - | |||||||||||||||||||||||||
| 252 | QAccessibleInterface *QAccessibleStackedWidget::child(int index) const | - | ||||||||||||||||||||||||
| 253 | { | - | ||||||||||||||||||||||||
| 254 |     if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 255 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 256 |     return never executed:   QAccessible::queryAccessibleInterface(stackedWidget()->widget(index));return QAccessible::queryAccessibleInterface(stackedWidget()->widget(index));never executed:  return QAccessible::queryAccessibleInterface(stackedWidget()->widget(index)); | 0 | ||||||||||||||||||||||||
| 257 | } | - | ||||||||||||||||||||||||
| 258 | - | |||||||||||||||||||||||||
| 259 | QStackedWidget *QAccessibleStackedWidget::stackedWidget() const | - | ||||||||||||||||||||||||
| 260 | { | - | ||||||||||||||||||||||||
| 261 |     return never executed:   static_cast<QStackedWidget *>(object());return static_cast<QStackedWidget *>(object());never executed:  return static_cast<QStackedWidget *>(object()); | 0 | ||||||||||||||||||||||||
| 262 | } | - | ||||||||||||||||||||||||
| 263 | - | |||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||
| 265 | - | |||||||||||||||||||||||||
| 266 | - | |||||||||||||||||||||||||
| 267 | QAccessibleToolBox::QAccessibleToolBox(QWidget *widget) | - | ||||||||||||||||||||||||
| 268 | : QAccessibleWidget(widget, QAccessible::LayeredPane) | - | ||||||||||||||||||||||||
| 269 | { | - | ||||||||||||||||||||||||
| 270 | ((!(qobject_cast<QToolBox *>(widget))) ? qt_assert("qobject_cast<QToolBox *>(widget)",__FILE__,344) : qt_noop()); | - | ||||||||||||||||||||||||
| 271 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 272 | - | |||||||||||||||||||||||||
| 273 | QToolBox * QAccessibleToolBox::toolBox() const | - | ||||||||||||||||||||||||
| 274 | { | - | ||||||||||||||||||||||||
| 275 |     return never executed:   static_cast<QToolBox *>(object());return static_cast<QToolBox *>(object());never executed:  return static_cast<QToolBox *>(object()); | 0 | ||||||||||||||||||||||||
| 276 | } | - | ||||||||||||||||||||||||
| 277 | - | |||||||||||||||||||||||||
| 278 | - | |||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||
| 280 | - | |||||||||||||||||||||||||
| 281 | QAccessibleMdiArea::QAccessibleMdiArea(QWidget *widget) | - | ||||||||||||||||||||||||
| 282 | : QAccessibleWidget(widget, QAccessible::LayeredPane) | - | ||||||||||||||||||||||||
| 283 | { | - | ||||||||||||||||||||||||
| 284 | ((!(qobject_cast<QMdiArea *>(widget))) ? qt_assert("qobject_cast<QMdiArea *>(widget)",__FILE__,358) : qt_noop()); | - | ||||||||||||||||||||||||
| 285 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 286 | - | |||||||||||||||||||||||||
| 287 | int QAccessibleMdiArea::childCount() const | - | ||||||||||||||||||||||||
| 288 | { | - | ||||||||||||||||||||||||
| 289 |     return never executed:   mdiArea()->subWindowList().count();return mdiArea()->subWindowList().count();never executed:  return mdiArea()->subWindowList().count(); | 0 | ||||||||||||||||||||||||
| 290 | } | - | ||||||||||||||||||||||||
| 291 | - | |||||||||||||||||||||||||
| 292 | QAccessibleInterface *QAccessibleMdiArea::child(int index) const | - | ||||||||||||||||||||||||
| 293 | { | - | ||||||||||||||||||||||||
| 294 | QList<QMdiSubWindow *> subWindows = mdiArea()->subWindowList(); | - | ||||||||||||||||||||||||
| 295 | QWidget *targetObject = subWindows.value(index); | - | ||||||||||||||||||||||||
| 296 |     if (!targetObject
  | 0 | ||||||||||||||||||||||||
| 297 |        return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 298 |     return never executed:   QAccessible::queryAccessibleInterface(targetObject);return QAccessible::queryAccessibleInterface(targetObject);never executed:  return QAccessible::queryAccessibleInterface(targetObject); | 0 | ||||||||||||||||||||||||
| 299 | } | - | ||||||||||||||||||||||||
| 300 | - | |||||||||||||||||||||||||
| 301 | - | |||||||||||||||||||||||||
| 302 | int QAccessibleMdiArea::indexOfChild(const QAccessibleInterface *child) const | - | ||||||||||||||||||||||||
| 303 | { | - | ||||||||||||||||||||||||
| 304 |     if (!child
 
 
  | 0 | ||||||||||||||||||||||||
| 305 |         return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 306 |     if (QMdiSubWindow *window = qobject_cast<QMdiSubWindow *>(child->object())
  | 0 | ||||||||||||||||||||||||
| 307 |         return never executed:   mdiArea()->subWindowList().indexOf(window);return mdiArea()->subWindowList().indexOf(window);never executed:  return mdiArea()->subWindowList().indexOf(window); | 0 | ||||||||||||||||||||||||
| 308 | } | - | ||||||||||||||||||||||||
| 309 |     return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 310 | } | - | ||||||||||||||||||||||||
| 311 | - | |||||||||||||||||||||||||
| 312 | QMdiArea *QAccessibleMdiArea::mdiArea() const | - | ||||||||||||||||||||||||
| 313 | { | - | ||||||||||||||||||||||||
| 314 |     return never executed:   static_cast<QMdiArea *>(object());return static_cast<QMdiArea *>(object());never executed:  return static_cast<QMdiArea *>(object()); | 0 | ||||||||||||||||||||||||
| 315 | } | - | ||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||
| 318 | QAccessibleMdiSubWindow::QAccessibleMdiSubWindow(QWidget *widget) | - | ||||||||||||||||||||||||
| 319 | : QAccessibleWidget(widget, QAccessible::Window) | - | ||||||||||||||||||||||||
| 320 | { | - | ||||||||||||||||||||||||
| 321 | ((!(qobject_cast<QMdiSubWindow *>(widget))) ? qt_assert("qobject_cast<QMdiSubWindow *>(widget)",__FILE__,395) : qt_noop()); | - | ||||||||||||||||||||||||
| 322 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 323 | - | |||||||||||||||||||||||||
| 324 | QString QAccessibleMdiSubWindow::text(QAccessible::Text textType) const | - | ||||||||||||||||||||||||
| 325 | { | - | ||||||||||||||||||||||||
| 326 |     if (textType == QAccessible::Name
  | 0 | ||||||||||||||||||||||||
| 327 | QString title = mdiSubWindow()->windowTitle(); | - | ||||||||||||||||||||||||
| 328 | title.replace(QLatin1String("[*]"), QLatin1String("")); | - | ||||||||||||||||||||||||
| 329 |         return never executed:   title;return title;never executed:  return title; | 0 | ||||||||||||||||||||||||
| 330 | } | - | ||||||||||||||||||||||||
| 331 |     return never executed:   QAccessibleWidget::text(textType);return QAccessibleWidget::text(textType);never executed:  return QAccessibleWidget::text(textType); | 0 | ||||||||||||||||||||||||
| 332 | } | - | ||||||||||||||||||||||||
| 333 | - | |||||||||||||||||||||||||
| 334 | void QAccessibleMdiSubWindow::setText(QAccessible::Text textType, const QString &text) | - | ||||||||||||||||||||||||
| 335 | { | - | ||||||||||||||||||||||||
| 336 |     if (textType == QAccessible::Name
  | 0 | ||||||||||||||||||||||||
| 337 |         mdiSubWindow()->setWindowTitle(text); never executed:  mdiSubWindow()->setWindowTitle(text); | 0 | ||||||||||||||||||||||||
| 338 | else | - | ||||||||||||||||||||||||
| 339 |         QAccessibleWidget::setText(textType, text); never executed:  QAccessibleWidget::setText(textType, text); | 0 | ||||||||||||||||||||||||
| 340 | } | - | ||||||||||||||||||||||||
| 341 | - | |||||||||||||||||||||||||
| 342 | QAccessible::State QAccessibleMdiSubWindow::state() const | - | ||||||||||||||||||||||||
| 343 | { | - | ||||||||||||||||||||||||
| 344 | QAccessible::State state; | - | ||||||||||||||||||||||||
| 345 | state.focusable = true; | - | ||||||||||||||||||||||||
| 346 |     if (!mdiSubWindow()->isMaximized()
  | 0 | ||||||||||||||||||||||||
| 347 | state.movable = true; | - | ||||||||||||||||||||||||
| 348 | state.sizeable = true; | - | ||||||||||||||||||||||||
| 349 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 350 |     if (mdiSubWindow()->isAncestorOf(QApplication::focusWidget())
  | 0 | ||||||||||||||||||||||||
| 351 |             || QApplication::focusWidget() == mdiSubWindow()
  | 0 | ||||||||||||||||||||||||
| 352 |         state.focused = true; never executed:  state.focused = true; | 0 | ||||||||||||||||||||||||
| 353 |     if (!mdiSubWindow()->isVisible()
  | 0 | ||||||||||||||||||||||||
| 354 |         state.invisible = true; never executed:  state.invisible = true; | 0 | ||||||||||||||||||||||||
| 355 |     if (const
 
  | 0 | ||||||||||||||||||||||||
| 356 |         if (!parent->contentsRect().contains(mdiSubWindow()->geometry())
  | 0 | ||||||||||||||||||||||||
| 357 |             state.offscreen = true; never executed:  state.offscreen = true; | 0 | ||||||||||||||||||||||||
| 358 |     if (!mdiSubWindow()->isEnabled()
  | 0 | ||||||||||||||||||||||||
| 359 |         state.disabled = true; never executed:  state.disabled = true; | 0 | ||||||||||||||||||||||||
| 360 |     return never executed:   state;return state;never executed:  return state; | 0 | ||||||||||||||||||||||||
| 361 | } | - | ||||||||||||||||||||||||
| 362 | - | |||||||||||||||||||||||||
| 363 | int QAccessibleMdiSubWindow::childCount() const | - | ||||||||||||||||||||||||
| 364 | { | - | ||||||||||||||||||||||||
| 365 |     if (mdiSubWindow()->widget()
  | 0 | ||||||||||||||||||||||||
| 366 |         return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||
| 367 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 368 | } | - | ||||||||||||||||||||||||
| 369 | - | |||||||||||||||||||||||||
| 370 | QAccessibleInterface *QAccessibleMdiSubWindow::child(int index) const | - | ||||||||||||||||||||||||
| 371 | { | - | ||||||||||||||||||||||||
| 372 | QMdiSubWindow *source = mdiSubWindow(); | - | ||||||||||||||||||||||||
| 373 |     if (index != 0
 
  | 0 | ||||||||||||||||||||||||
| 374 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 375 | - | |||||||||||||||||||||||||
| 376 |     return never executed:   QAccessible::queryAccessibleInterface(source->widget());return QAccessible::queryAccessibleInterface(source->widget());never executed:  return QAccessible::queryAccessibleInterface(source->widget()); | 0 | ||||||||||||||||||||||||
| 377 | } | - | ||||||||||||||||||||||||
| 378 | - | |||||||||||||||||||||||||
| 379 | int QAccessibleMdiSubWindow::indexOfChild(const QAccessibleInterface *child) const | - | ||||||||||||||||||||||||
| 380 | { | - | ||||||||||||||||||||||||
| 381 |     if (child
 
 
  | 0 | ||||||||||||||||||||||||
| 382 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 383 |     return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 384 | } | - | ||||||||||||||||||||||||
| 385 | - | |||||||||||||||||||||||||
| 386 | QRect QAccessibleMdiSubWindow::rect() const | - | ||||||||||||||||||||||||
| 387 | { | - | ||||||||||||||||||||||||
| 388 |     if (mdiSubWindow()->isHidden()
  | 0 | ||||||||||||||||||||||||
| 389 |         return never executed:   QRect();return QRect();never executed:  return QRect(); | 0 | ||||||||||||||||||||||||
| 390 |     if (!mdiSubWindow()->parent()
  | 0 | ||||||||||||||||||||||||
| 391 |         return never executed:   QAccessibleWidget::rect();return QAccessibleWidget::rect();never executed:  return QAccessibleWidget::rect(); | 0 | ||||||||||||||||||||||||
| 392 | const QPoint pos = mdiSubWindow()->mapToGlobal(QPoint(0, 0)); | - | ||||||||||||||||||||||||
| 393 |     return never executed:   QRect(pos, mdiSubWindow()->size());return QRect(pos, mdiSubWindow()->size());never executed:  return QRect(pos, mdiSubWindow()->size()); | 0 | ||||||||||||||||||||||||
| 394 | } | - | ||||||||||||||||||||||||
| 395 | - | |||||||||||||||||||||||||
| 396 | QMdiSubWindow *QAccessibleMdiSubWindow::mdiSubWindow() const | - | ||||||||||||||||||||||||
| 397 | { | - | ||||||||||||||||||||||||
| 398 |     return never executed:   static_cast<QMdiSubWindow *>(object());return static_cast<QMdiSubWindow *>(object());never executed:  return static_cast<QMdiSubWindow *>(object()); | 0 | ||||||||||||||||||||||||
| 399 | } | - | ||||||||||||||||||||||||
| 400 | - | |||||||||||||||||||||||||
| 401 | - | |||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||
| 403 | - | |||||||||||||||||||||||||
| 404 | QAccessibleDialogButtonBox::QAccessibleDialogButtonBox(QWidget *widget) | - | ||||||||||||||||||||||||
| 405 | : QAccessibleWidget(widget, QAccessible::Grouping) | - | ||||||||||||||||||||||||
| 406 | { | - | ||||||||||||||||||||||||
| 407 | ((!(qobject_cast<QDialogButtonBox*>(widget))) ? qt_assert("qobject_cast<QDialogButtonBox*>(widget)",__FILE__,481) : qt_noop()); | - | ||||||||||||||||||||||||
| 408 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 409 | - | |||||||||||||||||||||||||
| 410 | - | |||||||||||||||||||||||||
| 411 | - | |||||||||||||||||||||||||
| 412 | - | |||||||||||||||||||||||||
| 413 | QAccessibleTextBrowser::QAccessibleTextBrowser(QWidget *widget) | - | ||||||||||||||||||||||||
| 414 | : QAccessibleTextEdit(widget) | - | ||||||||||||||||||||||||
| 415 | { | - | ||||||||||||||||||||||||
| 416 | ((!(qobject_cast<QTextBrowser *>(widget))) ? qt_assert("qobject_cast<QTextBrowser *>(widget)",__FILE__,490) : qt_noop()); | - | ||||||||||||||||||||||||
| 417 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 418 | - | |||||||||||||||||||||||||
| 419 | QAccessible::Role QAccessibleTextBrowser::role() const | - | ||||||||||||||||||||||||
| 420 | { | - | ||||||||||||||||||||||||
| 421 |     return never executed:   QAccessible::StaticText;return QAccessible::StaticText;never executed:  return QAccessible::StaticText; | 0 | ||||||||||||||||||||||||
| 422 | } | - | ||||||||||||||||||||||||
| 423 | - | |||||||||||||||||||||||||
| 424 | - | |||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||
| 426 | - | |||||||||||||||||||||||||
| 427 | QAccessibleCalendarWidget::QAccessibleCalendarWidget(QWidget *widget) | - | ||||||||||||||||||||||||
| 428 | : QAccessibleWidget(widget, QAccessible::Table) | - | ||||||||||||||||||||||||
| 429 | { | - | ||||||||||||||||||||||||
| 430 | ((!(qobject_cast<QCalendarWidget *>(widget))) ? qt_assert("qobject_cast<QCalendarWidget *>(widget)",__FILE__,504) : qt_noop()); | - | ||||||||||||||||||||||||
| 431 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 432 | - | |||||||||||||||||||||||||
| 433 | int QAccessibleCalendarWidget::childCount() const | - | ||||||||||||||||||||||||
| 434 | { | - | ||||||||||||||||||||||||
| 435 |    return never executed:   calendarWidget()->isNavigationBarVisible()return calendarWidget()->isNavigationBarVisible() ? 2 : 1;
 never executed:  return calendarWidget()->isNavigationBarVisible() ? 2 : 1; | 0 | ||||||||||||||||||||||||
| 436 | } | - | ||||||||||||||||||||||||
| 437 | - | |||||||||||||||||||||||||
| 438 | int QAccessibleCalendarWidget::indexOfChild(const QAccessibleInterface *child) const | - | ||||||||||||||||||||||||
| 439 | { | - | ||||||||||||||||||||||||
| 440 |     if (!child
 
 
  | 0 | ||||||||||||||||||||||||
| 441 |         return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 442 |     if (qobject_cast<QAbstractItemView *>(child->object())
  | 0 | ||||||||||||||||||||||||
| 443 |         return never executed:   childCount() - 1;return childCount() - 1;never executed:  return childCount() - 1; | 0 | ||||||||||||||||||||||||
| 444 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 445 | } | - | ||||||||||||||||||||||||
| 446 | - | |||||||||||||||||||||||||
| 447 | QAccessibleInterface *QAccessibleCalendarWidget::child(int index) const | - | ||||||||||||||||||||||||
| 448 | { | - | ||||||||||||||||||||||||
| 449 |     if (index < 0
 
  | 0 | ||||||||||||||||||||||||
| 450 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 451 | - | |||||||||||||||||||||||||
| 452 |     if (childCount() > 1
 
  | 0 | ||||||||||||||||||||||||
| 453 |         return never executed:   QAccessible::queryAccessibleInterface(navigationBar());return QAccessible::queryAccessibleInterface(navigationBar());never executed:  return QAccessible::queryAccessibleInterface(navigationBar()); | 0 | ||||||||||||||||||||||||
| 454 | - | |||||||||||||||||||||||||
| 455 |     return never executed:   QAccessible::queryAccessibleInterface(calendarView());return QAccessible::queryAccessibleInterface(calendarView());never executed:  return QAccessible::queryAccessibleInterface(calendarView()); | 0 | ||||||||||||||||||||||||
| 456 | } | - | ||||||||||||||||||||||||
| 457 | - | |||||||||||||||||||||||||
| 458 | QCalendarWidget *QAccessibleCalendarWidget::calendarWidget() const | - | ||||||||||||||||||||||||
| 459 | { | - | ||||||||||||||||||||||||
| 460 |     return never executed:   static_cast<QCalendarWidget *>(object());return static_cast<QCalendarWidget *>(object());never executed:  return static_cast<QCalendarWidget *>(object()); | 0 | ||||||||||||||||||||||||
| 461 | } | - | ||||||||||||||||||||||||
| 462 | - | |||||||||||||||||||||||||
| 463 | QAbstractItemView *QAccessibleCalendarWidget::calendarView() const | - | ||||||||||||||||||||||||
| 464 | { | - | ||||||||||||||||||||||||
| 465 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(calendarWidget()->children())>::type> _container_((calendarWidget()->children())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QObject *child = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||
| 466 |         if (child->objectName() == QLatin1String("qt_calendar_calendarview")
  | 0 | ||||||||||||||||||||||||
| 467 |             return never executed:   static_cast<QAbstractItemView *>(child);return static_cast<QAbstractItemView *>(child);never executed:  return static_cast<QAbstractItemView *>(child); | 0 | ||||||||||||||||||||||||
| 468 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 469 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 470 | } | - | ||||||||||||||||||||||||
| 471 | - | |||||||||||||||||||||||||
| 472 | QWidget *QAccessibleCalendarWidget::navigationBar() const | - | ||||||||||||||||||||||||
| 473 | { | - | ||||||||||||||||||||||||
| 474 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(calendarWidget()->children())>::type> _container_((calendarWidget()->children())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (QObject *child = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||
| 475 |         if (child->objectName() == QLatin1String("qt_calendar_navigationbar")
  | 0 | ||||||||||||||||||||||||
| 476 |             return never executed:   static_cast<QWidget *>(child);return static_cast<QWidget *>(child);never executed:  return static_cast<QWidget *>(child); | 0 | ||||||||||||||||||||||||
| 477 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 478 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 479 | } | - | ||||||||||||||||||||||||
| 480 | QAccessibleDockWidget::QAccessibleDockWidget(QWidget *widget) | - | ||||||||||||||||||||||||
| 481 | : QAccessibleWidget(widget, QAccessible::Window) | - | ||||||||||||||||||||||||
| 482 | { | - | ||||||||||||||||||||||||
| 483 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 484 | - | |||||||||||||||||||||||||
| 485 | QDockWidgetLayout *QAccessibleDockWidget::dockWidgetLayout() const | - | ||||||||||||||||||||||||
| 486 | { | - | ||||||||||||||||||||||||
| 487 |     return never executed:   qobject_cast<QDockWidgetLayout*>(dockWidget()->layout());return qobject_cast<QDockWidgetLayout*>(dockWidget()->layout());never executed:  return qobject_cast<QDockWidgetLayout*>(dockWidget()->layout()); | 0 | ||||||||||||||||||||||||
| 488 | } | - | ||||||||||||||||||||||||
| 489 | - | |||||||||||||||||||||||||
| 490 | int QAccessibleDockWidget::childCount() const | - | ||||||||||||||||||||||||
| 491 | { | - | ||||||||||||||||||||||||
| 492 |     if (dockWidget()->titleBarWidget()
  | 0 | ||||||||||||||||||||||||
| 493 |         return never executed:   dockWidget()->widget()return dockWidget()->widget() ? 2 : 1;
 never executed:  return dockWidget()->widget() ? 2 : 1; | 0 | ||||||||||||||||||||||||
| 494 | } | - | ||||||||||||||||||||||||
| 495 |     return never executed:   dockWidgetLayout()->count();return dockWidgetLayout()->count();never executed:  return dockWidgetLayout()->count(); | 0 | ||||||||||||||||||||||||
| 496 | } | - | ||||||||||||||||||||||||
| 497 | - | |||||||||||||||||||||||||
| 498 | QAccessibleInterface *QAccessibleDockWidget::child(int index) const | - | ||||||||||||||||||||||||
| 499 | { | - | ||||||||||||||||||||||||
| 500 |     if (dockWidget()->titleBarWidget()
  | 0 | ||||||||||||||||||||||||
| 501 |         if ((!dockWidget()->widget()
 
 
 
  | 0 | ||||||||||||||||||||||||
| 502 |             return never executed:   QAccessible::queryAccessibleInterface(dockWidget()->titleBarWidget());return QAccessible::queryAccessibleInterface(dockWidget()->titleBarWidget());never executed:  return QAccessible::queryAccessibleInterface(dockWidget()->titleBarWidget()); | 0 | ||||||||||||||||||||||||
| 503 |         if (index == 0
  | 0 | ||||||||||||||||||||||||
| 504 |             return never executed:   QAccessible::queryAccessibleInterface(dockWidget()->widget());return QAccessible::queryAccessibleInterface(dockWidget()->widget());never executed:  return QAccessible::queryAccessibleInterface(dockWidget()->widget()); | 0 | ||||||||||||||||||||||||
| 505 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 506 | QLayoutItem *item = dockWidgetLayout()->itemAt(index); | - | ||||||||||||||||||||||||
| 507 |         if (item
  | 0 | ||||||||||||||||||||||||
| 508 |             return never executed:   QAccessible::queryAccessibleInterface(item->widget());return QAccessible::queryAccessibleInterface(item->widget());never executed:  return QAccessible::queryAccessibleInterface(item->widget()); | 0 | ||||||||||||||||||||||||
| 509 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 510 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 511 | } | - | ||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||
| 513 | int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const | - | ||||||||||||||||||||||||
| 514 | { | - | ||||||||||||||||||||||||
| 515 |     if (!child
 
 
  | 0 | ||||||||||||||||||||||||
| 516 |         return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||
| 518 |     if (dockWidget()->titleBarWidget() == child->object()
  | 0 | ||||||||||||||||||||||||
| 519 |         return never executed:   dockWidget()->widget()return dockWidget()->widget() ? 1 : 0;
 never executed:  return dockWidget()->widget() ? 1 : 0; | 0 | ||||||||||||||||||||||||
| 520 | } | - | ||||||||||||||||||||||||
| 521 | - | |||||||||||||||||||||||||
| 522 |     return never executed:   dockWidgetLayout()->indexOf(qobject_cast<QWidget*>(child->object()));return dockWidgetLayout()->indexOf(qobject_cast<QWidget*>(child->object()));never executed:  return dockWidgetLayout()->indexOf(qobject_cast<QWidget*>(child->object())); | 0 | ||||||||||||||||||||||||
| 523 | } | - | ||||||||||||||||||||||||
| 524 | - | |||||||||||||||||||||||||
| 525 | QRect QAccessibleDockWidget::rect() const | - | ||||||||||||||||||||||||
| 526 | { | - | ||||||||||||||||||||||||
| 527 | QRect rect; | - | ||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||
| 529 |     if (dockWidget()->isFloating()
  | 0 | ||||||||||||||||||||||||
| 530 | rect = dockWidget()->frameGeometry(); | - | ||||||||||||||||||||||||
| 531 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 532 | rect = dockWidget()->rect(); | - | ||||||||||||||||||||||||
| 533 | rect.moveTopLeft(dockWidget()->mapToGlobal(rect.topLeft())); | - | ||||||||||||||||||||||||
| 534 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 535 | - | |||||||||||||||||||||||||
| 536 |     return never executed:   rect;return rect;never executed:  return rect; | 0 | ||||||||||||||||||||||||
| 537 | } | - | ||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||
| 539 | QDockWidget *QAccessibleDockWidget::dockWidget() const | - | ||||||||||||||||||||||||
| 540 | { | - | ||||||||||||||||||||||||
| 541 |     return never executed:   static_cast<QDockWidget *>(object());return static_cast<QDockWidget *>(object());never executed:  return static_cast<QDockWidget *>(object()); | 0 | ||||||||||||||||||||||||
| 542 | } | - | ||||||||||||||||||||||||
| 543 | - | |||||||||||||||||||||||||
| 544 | QString QAccessibleDockWidget::text(QAccessible::Text t) const | - | ||||||||||||||||||||||||
| 545 | { | - | ||||||||||||||||||||||||
| 546 |     if (t == QAccessible::Name
  | 0 | ||||||||||||||||||||||||
| 547 |         return never executed:   qt_accStripAmp(dockWidget()->windowTitle());return qt_accStripAmp(dockWidget()->windowTitle());never executed:  return qt_accStripAmp(dockWidget()->windowTitle()); | 0 | ||||||||||||||||||||||||
| 548 |     } else if (t == QAccessible::Accelerator
  | 0 | ||||||||||||||||||||||||
| 549 |         return never executed:   qt_accHotKey(dockWidget()->windowTitle());return qt_accHotKey(dockWidget()->windowTitle());never executed:  return qt_accHotKey(dockWidget()->windowTitle()); | 0 | ||||||||||||||||||||||||
| 550 | } | - | ||||||||||||||||||||||||
| 551 |     return never executed:   QString();return QString();never executed:  return QString(); | 0 | ||||||||||||||||||||||||
| 552 | } | - | ||||||||||||||||||||||||
| 553 | - | |||||||||||||||||||||||||
| 554 | - | |||||||||||||||||||||||||
| 555 | - | |||||||||||||||||||||||||
| 556 | - | |||||||||||||||||||||||||
| 557 | QAccessibleTextWidget::QAccessibleTextWidget(QWidget *o, QAccessible::Role r, const QString &name): | - | ||||||||||||||||||||||||
| 558 | QAccessibleWidget(o, r, name) | - | ||||||||||||||||||||||||
| 559 | { | - | ||||||||||||||||||||||||
| 560 | - | |||||||||||||||||||||||||
| 561 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 562 | - | |||||||||||||||||||||||||
| 563 | QAccessible::State QAccessibleTextWidget::state() const | - | ||||||||||||||||||||||||
| 564 | { | - | ||||||||||||||||||||||||
| 565 | QAccessible::State s = QAccessibleWidget::state(); | - | ||||||||||||||||||||||||
| 566 | s.selectableText = true; | - | ||||||||||||||||||||||||
| 567 | s.multiLine = true; | - | ||||||||||||||||||||||||
| 568 |     return never executed:   s;return s;never executed:  return s; | 0 | ||||||||||||||||||||||||
| 569 | } | - | ||||||||||||||||||||||||
| 570 | - | |||||||||||||||||||||||||
| 571 | QRect QAccessibleTextWidget::characterRect(int offset) const | - | ||||||||||||||||||||||||
| 572 | { | - | ||||||||||||||||||||||||
| 573 | QTextBlock block = textDocument()->findBlock(offset); | - | ||||||||||||||||||||||||
| 574 |     if (!block.isValid()
  | 0 | ||||||||||||||||||||||||
| 575 |         return never executed:   QRect();return QRect();never executed:  return QRect(); | 0 | ||||||||||||||||||||||||
| 576 | - | |||||||||||||||||||||||||
| 577 | QTextLayout *layout = block.layout(); | - | ||||||||||||||||||||||||
| 578 | QPointF layoutPosition = layout->position(); | - | ||||||||||||||||||||||||
| 579 | int relativeOffset = offset - block.position(); | - | ||||||||||||||||||||||||
| 580 | QTextLine line = layout->lineForTextPosition(relativeOffset); | - | ||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||
| 582 | QRect r; | - | ||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||
| 584 |     if (line.isValid()
  | 0 | ||||||||||||||||||||||||
| 585 | qreal x = line.cursorToX(relativeOffset); | - | ||||||||||||||||||||||||
| 586 | - | |||||||||||||||||||||||||
| 587 | QTextCharFormat format; | - | ||||||||||||||||||||||||
| 588 | QTextBlock::iterator iter = block.begin(); | - | ||||||||||||||||||||||||
| 589 |         if (iter.atEnd()
  | 0 | ||||||||||||||||||||||||
| 590 |             format = block.charFormat(); never executed:  format = block.charFormat(); | 0 | ||||||||||||||||||||||||
| 591 | else { | - | ||||||||||||||||||||||||
| 592 |             while (!iter.atEnd()
 
  | 0 | ||||||||||||||||||||||||
| 593 |                 ++ never executed:  iter;++iter;never executed:  ++iter; | 0 | ||||||||||||||||||||||||
| 594 |             if (iter.atEnd()
  | 0 | ||||||||||||||||||||||||
| 595 |                 -- never executed:  iter;--iter;never executed:  --iter; | 0 | ||||||||||||||||||||||||
| 596 | format = iter.fragment().charFormat(); | - | ||||||||||||||||||||||||
| 597 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 598 | - | |||||||||||||||||||||||||
| 599 | QFontMetrics fm(format.font()); | - | ||||||||||||||||||||||||
| 600 | const QString ch = text(offset, offset + 1); | - | ||||||||||||||||||||||||
| 601 |         if (!ch.isEmpty()
  | 0 | ||||||||||||||||||||||||
| 602 | int w = fm.width(ch); | - | ||||||||||||||||||||||||
| 603 | int h = fm.height(); | - | ||||||||||||||||||||||||
| 604 | r = QRect(layoutPosition.x() + x, layoutPosition.y() + line.y() + line.ascent() + fm.descent() - h, | - | ||||||||||||||||||||||||
| 605 | w, h); | - | ||||||||||||||||||||||||
| 606 | r.moveTo(viewport()->mapToGlobal(r.topLeft())); | - | ||||||||||||||||||||||||
| 607 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 608 | r.translate(-scrollBarPosition()); | - | ||||||||||||||||||||||||
| 609 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 610 | - | |||||||||||||||||||||||||
| 611 |     return never executed:   r;return r;never executed:  return r; | 0 | ||||||||||||||||||||||||
| 612 | } | - | ||||||||||||||||||||||||
| 613 | - | |||||||||||||||||||||||||
| 614 | int QAccessibleTextWidget::offsetAtPoint(const QPoint &point) const | - | ||||||||||||||||||||||||
| 615 | { | - | ||||||||||||||||||||||||
| 616 | QPoint p = viewport()->mapFromGlobal(point); | - | ||||||||||||||||||||||||
| 617 | - | |||||||||||||||||||||||||
| 618 | p += scrollBarPosition(); | - | ||||||||||||||||||||||||
| 619 |     return never executed:   textDocument()->documentLayout()->hitTest(p, Qt::ExactHit);return textDocument()->documentLayout()->hitTest(p, Qt::ExactHit);never executed:  return textDocument()->documentLayout()->hitTest(p, Qt::ExactHit); | 0 | ||||||||||||||||||||||||
| 620 | } | - | ||||||||||||||||||||||||
| 621 | - | |||||||||||||||||||||||||
| 622 | int QAccessibleTextWidget::selectionCount() const | - | ||||||||||||||||||||||||
| 623 | { | - | ||||||||||||||||||||||||
| 624 |     return never executed:   textCursor().hasSelection()return textCursor().hasSelection() ? 1 : 0;
 never executed:  return textCursor().hasSelection() ? 1 : 0; | 0 | ||||||||||||||||||||||||
| 625 | } | - | ||||||||||||||||||||||||
| 626 | - | |||||||||||||||||||||||||
| 627 | QString QAccessibleTextWidget::attributes(int offset, int *startOffset, int *endOffset) const | - | ||||||||||||||||||||||||
| 628 | { | - | ||||||||||||||||||||||||
| 629 | - | |||||||||||||||||||||||||
| 630 | - | |||||||||||||||||||||||||
| 631 | - | |||||||||||||||||||||||||
| 632 | - | |||||||||||||||||||||||||
| 633 | - | |||||||||||||||||||||||||
| 634 |     if (offset == -2
  | 0 | ||||||||||||||||||||||||
| 635 |         offset = cursorPosition(); never executed:  offset = cursorPosition(); | 0 | ||||||||||||||||||||||||
| 636 | - | |||||||||||||||||||||||||
| 637 | const int charCount = characterCount(); | - | ||||||||||||||||||||||||
| 638 | - | |||||||||||||||||||||||||
| 639 | - | |||||||||||||||||||||||||
| 640 | - | |||||||||||||||||||||||||
| 641 |     if (offset == -1
 
  | 0 | ||||||||||||||||||||||||
| 642 |         offset = charCount - 1; never executed:  offset = charCount - 1; | 0 | ||||||||||||||||||||||||
| 643 | - | |||||||||||||||||||||||||
| 644 |     if (offset < 0
 
  | 0 | ||||||||||||||||||||||||
| 645 | *startOffset = -1; | - | ||||||||||||||||||||||||
| 646 | *endOffset = -1; | - | ||||||||||||||||||||||||
| 647 |         return never executed:   QString();return QString();never executed:  return QString(); | 0 | ||||||||||||||||||||||||
| 648 | } | - | ||||||||||||||||||||||||
| 649 | - | |||||||||||||||||||||||||
| 650 | - | |||||||||||||||||||||||||
| 651 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 652 | cursor.setPosition(offset); | - | ||||||||||||||||||||||||
| 653 | QTextBlock block = cursor.block(); | - | ||||||||||||||||||||||||
| 654 | - | |||||||||||||||||||||||||
| 655 | int blockStart = block.position(); | - | ||||||||||||||||||||||||
| 656 | int blockEnd = blockStart + block.length(); | - | ||||||||||||||||||||||||
| 657 | - | |||||||||||||||||||||||||
| 658 | QTextBlock::iterator iter = block.begin(); | - | ||||||||||||||||||||||||
| 659 | int lastFragmentIndex = blockStart; | - | ||||||||||||||||||||||||
| 660 |     while (!iter.atEnd()
  | 0 | ||||||||||||||||||||||||
| 661 | QTextFragment f = iter.fragment(); | - | ||||||||||||||||||||||||
| 662 |         if (f.contains(offset)
  | 0 | ||||||||||||||||||||||||
| 663 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 664 | lastFragmentIndex = f.position() + f.length(); | - | ||||||||||||||||||||||||
| 665 | ++iter; | - | ||||||||||||||||||||||||
| 666 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 667 | - | |||||||||||||||||||||||||
| 668 | QTextCharFormat charFormat; | - | ||||||||||||||||||||||||
| 669 |     if (!iter.atEnd()
  | 0 | ||||||||||||||||||||||||
| 670 | QTextFragment fragment = iter.fragment(); | - | ||||||||||||||||||||||||
| 671 | charFormat = fragment.charFormat(); | - | ||||||||||||||||||||||||
| 672 | int pos = fragment.position(); | - | ||||||||||||||||||||||||
| 673 | - | |||||||||||||||||||||||||
| 674 | *startOffset = qMax(pos, blockStart); | - | ||||||||||||||||||||||||
| 675 | *endOffset = qMin(pos + fragment.length(), blockEnd); | - | ||||||||||||||||||||||||
| 676 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 677 | charFormat = block.charFormat(); | - | ||||||||||||||||||||||||
| 678 | *startOffset = lastFragmentIndex; | - | ||||||||||||||||||||||||
| 679 | *endOffset = blockEnd; | - | ||||||||||||||||||||||||
| 680 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 681 | ((!(*startOffset <= offset)) ? qt_assert("*startOffset <= offset",__FILE__,765) : qt_noop()); | - | ||||||||||||||||||||||||
| 682 | ((!(*endOffset >= offset)) ? qt_assert("*endOffset >= offset",__FILE__,766) : qt_noop()); | - | ||||||||||||||||||||||||
| 683 | - | |||||||||||||||||||||||||
| 684 | QTextBlockFormat blockFormat = cursor.blockFormat(); | - | ||||||||||||||||||||||||
| 685 | - | |||||||||||||||||||||||||
| 686 | QMap<QByteArray, QString> attrs; | - | ||||||||||||||||||||||||
| 687 | QString family = charFormat.font().family(); | - | ||||||||||||||||||||||||
| 688 |     if (!family.isEmpty()
  | 0 | ||||||||||||||||||||||||
| 689 |         family = family.replace('\\',([]() -> QString { enum { Size = sizeof(u"" "\\\\")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\\\" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 690 |         family = family.replace(':',([]() -> QString { enum { Size = sizeof(u"" "\\:")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\:" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 691 |         family = family.replace(',',([]() -> QString { enum { Size = sizeof(u"" "\\,")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\," }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 692 |         family = family.replace('=',([]() -> QString { enum { Size = sizeof(u"" "\\=")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\=" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 693 |         family = family.replace(';',([]() -> QString { enum { Size = sizeof(u"" "\\;")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\;" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 694 |         family = family.replace('\"',([]() -> QString { enum { Size = sizeof(u"" "\\\"")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "\\\"" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }()));return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 695 | attrs["font-family"] = QString::fromLatin1("\"%1\"").arg(family); | - | ||||||||||||||||||||||||
| 696 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 697 | - | |||||||||||||||||||||||||
| 698 | int fontSize = int(charFormat.font().pointSize()); | - | ||||||||||||||||||||||||
| 699 |     if (fontSize
  | 0 | ||||||||||||||||||||||||
| 700 |         attrs["font-size"] = QString::fromLatin1("%1pt").arg(fontSize); never executed:  attrs["font-size"] = QString::fromLatin1("%1pt").arg(fontSize); | 0 | ||||||||||||||||||||||||
| 701 | - | |||||||||||||||||||||||||
| 702 | - | |||||||||||||||||||||||||
| 703 | attrs["font-weight"] = QString::fromLatin1(charFormat.font().weight() > QFont::Normal ? "bold" : "normal"); | - | ||||||||||||||||||||||||
| 704 | - | |||||||||||||||||||||||||
| 705 | QFont::Style style = charFormat.font().style(); | - | ||||||||||||||||||||||||
| 706 | attrs["font-style"] = QString::fromLatin1((style == QFont::StyleItalic) ? "italic" : ((style == QFont::StyleOblique) ? "oblique": "normal")); | - | ||||||||||||||||||||||||
| 707 | - | |||||||||||||||||||||||||
| 708 | QTextCharFormat::UnderlineStyle underlineStyle = charFormat.underlineStyle(); | - | ||||||||||||||||||||||||
| 709 |     if (underlineStyle == QTextCharFormat::NoUnderline
 
  | 0 | ||||||||||||||||||||||||
| 710 |         underlineStyle = QTextCharFormat::SingleUnderline; never executed:  underlineStyle = QTextCharFormat::SingleUnderline; | 0 | ||||||||||||||||||||||||
| 711 | QString underlineStyleValue; | - | ||||||||||||||||||||||||
| 712 | switch (underlineStyle) { | - | ||||||||||||||||||||||||
| 713 |         case never executed:   QTextCharFormat::NoUnderline:case QTextCharFormat::NoUnderline:never executed:  case QTextCharFormat::NoUnderline: | 0 | ||||||||||||||||||||||||
| 714 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 715 |         case never executed:   QTextCharFormat::SingleUnderline:case QTextCharFormat::SingleUnderline:never executed:  case QTextCharFormat::SingleUnderline: | 0 | ||||||||||||||||||||||||
| 716 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "solid")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "solid" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 717 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 718 |         case never executed:   QTextCharFormat::DashUnderline:case QTextCharFormat::DashUnderline:never executed:  case QTextCharFormat::DashUnderline: | 0 | ||||||||||||||||||||||||
| 719 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "dash")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dash" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 720 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 721 |         case never executed:   QTextCharFormat::DotLine:case QTextCharFormat::DotLine:never executed:  case QTextCharFormat::DotLine: | 0 | ||||||||||||||||||||||||
| 722 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "dash")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dash" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 723 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 724 |         case never executed:   QTextCharFormat::DashDotLine:case QTextCharFormat::DashDotLine:never executed:  case QTextCharFormat::DashDotLine: | 0 | ||||||||||||||||||||||||
| 725 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "dot-dash")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dot-dash" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 726 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 727 |         case never executed:   QTextCharFormat::DashDotDotLine:case QTextCharFormat::DashDotDotLine:never executed:  case QTextCharFormat::DashDotDotLine: | 0 | ||||||||||||||||||||||||
| 728 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "dot-dot-dash")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "dot-dot-dash" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 729 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 730 |         case never executed:   QTextCharFormat::WaveUnderline:case QTextCharFormat::WaveUnderline:never executed:  case QTextCharFormat::WaveUnderline: | 0 | ||||||||||||||||||||||||
| 731 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "wave")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "wave" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 732 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 733 |         case never executed:   QTextCharFormat::SpellCheckUnderline:case QTextCharFormat::SpellCheckUnderline:never executed:  case QTextCharFormat::SpellCheckUnderline: | 0 | ||||||||||||||||||||||||
| 734 |             underlineStyleValue = ([]() -> QString { enum { Size = sizeof(u"" "wave")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "wave" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 735 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 736 |         default never executed:  :default:never executed:  default: | 0 | ||||||||||||||||||||||||
| 737 | QMessageLogger(__FILE__, 821, __PRETTY_FUNCTION__).warning() << "Unknown QTextCharFormat::​UnderlineStyle value " << underlineStyle << " could not be translated to IAccessible2 value"; | - | ||||||||||||||||||||||||
| 738 |             break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 739 | } | - | ||||||||||||||||||||||||
| 740 |     if (!underlineStyleValue.isNull()
  | 0 | ||||||||||||||||||||||||
| 741 | attrs["text-underline-style"] = underlineStyleValue; | - | ||||||||||||||||||||||||
| 742 |         attrs["text-underline-type"] = ([]() -> QString { enum { Size = sizeof(u"" "single")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "single" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 743 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 744 | - | |||||||||||||||||||||||||
| 745 |     if (block.textDirection() == Qt::RightToLeft
  | 0 | ||||||||||||||||||||||||
| 746 |         attrs["writing-mode"] = ([]() -> QString { enum { Size = sizeof(u"" "rl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp;never executed:  attrs["writing-mode"] = ([]() -> QString { enum { Size = sizeof(u"" "rl")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rl" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }()); | 0 | ||||||||||||||||||||||||
| 747 | - | |||||||||||||||||||||||||
| 748 | QTextCharFormat::VerticalAlignment alignment = charFormat.verticalAlignment(); | - | ||||||||||||||||||||||||
| 749 | attrs["text-position"] = QString::fromLatin1((alignment == QTextCharFormat::AlignSubScript) ? "sub" : ((alignment == QTextCharFormat::AlignSuperScript) ? "super" : "baseline" )); | - | ||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||
| 751 | QBrush background = charFormat.background(); | - | ||||||||||||||||||||||||
| 752 |     if (background.style() == Qt::SolidPattern
  | 0 | ||||||||||||||||||||||||
| 753 | attrs["background-color"] = QString::fromLatin1("rgb(%1,%2,%3)").arg(background.color().red()).arg(background.color().green()).arg(background.color().blue()); | - | ||||||||||||||||||||||||
| 754 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||
| 756 | QBrush foreground = charFormat.foreground(); | - | ||||||||||||||||||||||||
| 757 |     if (foreground.style() == Qt::SolidPattern
  | 0 | ||||||||||||||||||||||||
| 758 | attrs["color"] = QString::fromLatin1("rgb(%1,%2,%3)").arg(foreground.color().red()).arg(foreground.color().green()).arg(foreground.color().blue()); | - | ||||||||||||||||||||||||
| 759 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 760 | - | |||||||||||||||||||||||||
| 761 | switch (blockFormat.alignment() & (Qt::AlignLeft | Qt::AlignRight | Qt::AlignHCenter | Qt::AlignJustify)) { | - | ||||||||||||||||||||||||
| 762 |     case never executed:   Qt::AlignLeft:case Qt::AlignLeft:never executed:  case Qt::AlignLeft: | 0 | ||||||||||||||||||||||||
| 763 |         attrs["text-align"] = ([]() -> QString { enum { Size = sizeof(u"" "left")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "left" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 764 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 765 |     case never executed:   Qt::AlignRight:case Qt::AlignRight:never executed:  case Qt::AlignRight: | 0 | ||||||||||||||||||||||||
| 766 |         attrs["text-align"] = ([]() -> QString { enum { Size = sizeof(u"" "right")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "right" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 767 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 768 |     case never executed:   Qt::AlignHCenter:case Qt::AlignHCenter:never executed:  case Qt::AlignHCenter: | 0 | ||||||||||||||||||||||||
| 769 |         attrs["text-align"] = ([]() -> QString { enum { Size = sizeof(u"" "center")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "center" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 770 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 771 |     case never executed:   Qt::AlignJustify:case Qt::AlignJustify:never executed:  case Qt::AlignJustify: | 0 | ||||||||||||||||||||||||
| 772 |         attrs["text-align"] = ([]() -> QString { enum { Size = sizeof(u"" "justify")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "justify" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return never executed:   qstring_literal_temp;return qstring_literal_temp;never executed:   }());return qstring_literal_temp; | 0 | ||||||||||||||||||||||||
| 773 |         break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 774 | } | - | ||||||||||||||||||||||||
| 775 | - | |||||||||||||||||||||||||
| 776 | QString result; | - | ||||||||||||||||||||||||
| 777 | for (QForeachContainer<typename QtPrivate::remove_reference<decltype(attrs.keys())>::type> _container_((attrs.keys())); _container_.control && _container_.i != _container_.e; ++_container_.i, _container_.control ^= 1) for (const QByteArray &attributeName = *_container_.i; _container_.control; _container_.control = 0) { | - | ||||||||||||||||||||||||
| 778 | result.append(QString::fromLatin1(attributeName)).append(':').append(attrs[attributeName]).append(';'); | - | ||||||||||||||||||||||||
| 779 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 780 | - | |||||||||||||||||||||||||
| 781 |     return never executed:   result;return result;never executed:  return result; | 0 | ||||||||||||||||||||||||
| 782 | } | - | ||||||||||||||||||||||||
| 783 | - | |||||||||||||||||||||||||
| 784 | int QAccessibleTextWidget::cursorPosition() const | - | ||||||||||||||||||||||||
| 785 | { | - | ||||||||||||||||||||||||
| 786 |     return never executed:   textCursor().position();return textCursor().position();never executed:  return textCursor().position(); | 0 | ||||||||||||||||||||||||
| 787 | } | - | ||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||
| 789 | void QAccessibleTextWidget::selection(int selectionIndex, int *startOffset, int *endOffset) const | - | ||||||||||||||||||||||||
| 790 | { | - | ||||||||||||||||||||||||
| 791 | *startOffset = *endOffset = 0; | - | ||||||||||||||||||||||||
| 792 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 793 | - | |||||||||||||||||||||||||
| 794 |     if (selectionIndex != 0
 
  | 0 | ||||||||||||||||||||||||
| 795 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 796 | - | |||||||||||||||||||||||||
| 797 | *startOffset = cursor.selectionStart(); | - | ||||||||||||||||||||||||
| 798 | *endOffset = cursor.selectionEnd(); | - | ||||||||||||||||||||||||
| 799 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 800 | - | |||||||||||||||||||||||||
| 801 | QString QAccessibleTextWidget::text(int startOffset, int endOffset) const | - | ||||||||||||||||||||||||
| 802 | { | - | ||||||||||||||||||||||||
| 803 | QTextCursor cursor(textCursor()); | - | ||||||||||||||||||||||||
| 804 | - | |||||||||||||||||||||||||
| 805 | cursor.setPosition(startOffset, QTextCursor::MoveAnchor); | - | ||||||||||||||||||||||||
| 806 | cursor.setPosition(endOffset, QTextCursor::KeepAnchor); | - | ||||||||||||||||||||||||
| 807 | - | |||||||||||||||||||||||||
| 808 |     return never executed:   cursor.selectedText().replace(QChar(QChar::ParagraphSeparator), QLatin1Char('\n'));return cursor.selectedText().replace(QChar(QChar::ParagraphSeparator), QLatin1Char('\n'));never executed:  return cursor.selectedText().replace(QChar(QChar::ParagraphSeparator), QLatin1Char('\n')); | 0 | ||||||||||||||||||||||||
| 809 | } | - | ||||||||||||||||||||||||
| 810 | - | |||||||||||||||||||||||||
| 811 | QPoint QAccessibleTextWidget::scrollBarPosition() const | - | ||||||||||||||||||||||||
| 812 | { | - | ||||||||||||||||||||||||
| 813 |     return never executed:   QPoint(0, 0);return QPoint(0, 0);never executed:  return QPoint(0, 0); | 0 | ||||||||||||||||||||||||
| 814 | } | - | ||||||||||||||||||||||||
| 815 | - | |||||||||||||||||||||||||
| 816 | - | |||||||||||||||||||||||||
| 817 | QString QAccessibleTextWidget::textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, | - | ||||||||||||||||||||||||
| 818 | int *startOffset, int *endOffset) const | - | ||||||||||||||||||||||||
| 819 | { | - | ||||||||||||||||||||||||
| 820 | ((!(startOffset)) ? qt_assert("startOffset",__FILE__,904) : qt_noop()); | - | ||||||||||||||||||||||||
| 821 | ((!(endOffset)) ? qt_assert("endOffset",__FILE__,905) : qt_noop()); | - | ||||||||||||||||||||||||
| 822 | - | |||||||||||||||||||||||||
| 823 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 824 | cursor.setPosition(offset); | - | ||||||||||||||||||||||||
| 825 | QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType); | - | ||||||||||||||||||||||||
| 826 | cursor.setPosition(boundaries.first - 1); | - | ||||||||||||||||||||||||
| 827 | boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType); | - | ||||||||||||||||||||||||
| 828 | - | |||||||||||||||||||||||||
| 829 | *startOffset = boundaries.first; | - | ||||||||||||||||||||||||
| 830 | *endOffset = boundaries.second; | - | ||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||
| 832 |     return never executed:   text(boundaries.first, boundaries.second);return text(boundaries.first, boundaries.second);never executed:  return text(boundaries.first, boundaries.second); | 0 | ||||||||||||||||||||||||
| 833 | } | - | ||||||||||||||||||||||||
| 834 | - | |||||||||||||||||||||||||
| 835 | - | |||||||||||||||||||||||||
| 836 | QString QAccessibleTextWidget::textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, | - | ||||||||||||||||||||||||
| 837 | int *startOffset, int *endOffset) const | - | ||||||||||||||||||||||||
| 838 | { | - | ||||||||||||||||||||||||
| 839 | ((!(startOffset)) ? qt_assert("startOffset",__FILE__,923) : qt_noop()); | - | ||||||||||||||||||||||||
| 840 | ((!(endOffset)) ? qt_assert("endOffset",__FILE__,924) : qt_noop()); | - | ||||||||||||||||||||||||
| 841 | - | |||||||||||||||||||||||||
| 842 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 843 | cursor.setPosition(offset); | - | ||||||||||||||||||||||||
| 844 | QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType); | - | ||||||||||||||||||||||||
| 845 | cursor.setPosition(boundaries.second); | - | ||||||||||||||||||||||||
| 846 | boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType); | - | ||||||||||||||||||||||||
| 847 | - | |||||||||||||||||||||||||
| 848 | *startOffset = boundaries.first; | - | ||||||||||||||||||||||||
| 849 | *endOffset = boundaries.second; | - | ||||||||||||||||||||||||
| 850 | - | |||||||||||||||||||||||||
| 851 |     return never executed:   text(boundaries.first, boundaries.second);return text(boundaries.first, boundaries.second);never executed:  return text(boundaries.first, boundaries.second); | 0 | ||||||||||||||||||||||||
| 852 | } | - | ||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||
| 854 | QString QAccessibleTextWidget::textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, | - | ||||||||||||||||||||||||
| 855 | int *startOffset, int *endOffset) const | - | ||||||||||||||||||||||||
| 856 | { | - | ||||||||||||||||||||||||
| 857 | ((!(startOffset)) ? qt_assert("startOffset",__FILE__,941) : qt_noop()); | - | ||||||||||||||||||||||||
| 858 | ((!(endOffset)) ? qt_assert("endOffset",__FILE__,942) : qt_noop()); | - | ||||||||||||||||||||||||
| 859 | - | |||||||||||||||||||||||||
| 860 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 861 | cursor.setPosition(offset); | - | ||||||||||||||||||||||||
| 862 | QPair<int, int> boundaries = QAccessible::qAccessibleTextBoundaryHelper(cursor, boundaryType); | - | ||||||||||||||||||||||||
| 863 | - | |||||||||||||||||||||||||
| 864 | *startOffset = boundaries.first; | - | ||||||||||||||||||||||||
| 865 | *endOffset = boundaries.second; | - | ||||||||||||||||||||||||
| 866 | - | |||||||||||||||||||||||||
| 867 |     return never executed:   text(boundaries.first, boundaries.second);return text(boundaries.first, boundaries.second);never executed:  return text(boundaries.first, boundaries.second); | 0 | ||||||||||||||||||||||||
| 868 | } | - | ||||||||||||||||||||||||
| 869 | - | |||||||||||||||||||||||||
| 870 | void QAccessibleTextWidget::setCursorPosition(int position) | - | ||||||||||||||||||||||||
| 871 | { | - | ||||||||||||||||||||||||
| 872 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 873 | cursor.setPosition(position); | - | ||||||||||||||||||||||||
| 874 | setTextCursor(cursor); | - | ||||||||||||||||||||||||
| 875 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 876 | - | |||||||||||||||||||||||||
| 877 | void QAccessibleTextWidget::addSelection(int startOffset, int endOffset) | - | ||||||||||||||||||||||||
| 878 | { | - | ||||||||||||||||||||||||
| 879 | setSelection(0, startOffset, endOffset); | - | ||||||||||||||||||||||||
| 880 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 881 | - | |||||||||||||||||||||||||
| 882 | void QAccessibleTextWidget::removeSelection(int selectionIndex) | - | ||||||||||||||||||||||||
| 883 | { | - | ||||||||||||||||||||||||
| 884 |     if (selectionIndex != 0
  | 0 | ||||||||||||||||||||||||
| 885 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 886 | - | |||||||||||||||||||||||||
| 887 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 888 | cursor.clearSelection(); | - | ||||||||||||||||||||||||
| 889 | setTextCursor(cursor); | - | ||||||||||||||||||||||||
| 890 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 891 | - | |||||||||||||||||||||||||
| 892 | void QAccessibleTextWidget::setSelection(int selectionIndex, int startOffset, int endOffset) | - | ||||||||||||||||||||||||
| 893 | { | - | ||||||||||||||||||||||||
| 894 |     if (selectionIndex != 0
  | 0 | ||||||||||||||||||||||||
| 895 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 896 | - | |||||||||||||||||||||||||
| 897 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 898 | cursor.setPosition(startOffset, QTextCursor::MoveAnchor); | - | ||||||||||||||||||||||||
| 899 | cursor.setPosition(endOffset, QTextCursor::KeepAnchor); | - | ||||||||||||||||||||||||
| 900 | setTextCursor(cursor); | - | ||||||||||||||||||||||||
| 901 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 902 | - | |||||||||||||||||||||||||
| 903 | int QAccessibleTextWidget::characterCount() const | - | ||||||||||||||||||||||||
| 904 | { | - | ||||||||||||||||||||||||
| 905 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 906 | cursor.movePosition(QTextCursor::End); | - | ||||||||||||||||||||||||
| 907 |     return never executed:   cursor.position();return cursor.position();never executed:  return cursor.position(); | 0 | ||||||||||||||||||||||||
| 908 | } | - | ||||||||||||||||||||||||
| 909 | - | |||||||||||||||||||||||||
| 910 | QTextCursor QAccessibleTextWidget::textCursorForRange(int startOffset, int endOffset) const | - | ||||||||||||||||||||||||
| 911 | { | - | ||||||||||||||||||||||||
| 912 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 913 | cursor.setPosition(startOffset, QTextCursor::MoveAnchor); | - | ||||||||||||||||||||||||
| 914 | cursor.setPosition(endOffset, QTextCursor::KeepAnchor); | - | ||||||||||||||||||||||||
| 915 | - | |||||||||||||||||||||||||
| 916 |     return never executed:   cursor;return cursor;never executed:  return cursor; | 0 | ||||||||||||||||||||||||
| 917 | } | - | ||||||||||||||||||||||||
| 918 | - | |||||||||||||||||||||||||
| 919 | void QAccessibleTextWidget::deleteText(int startOffset, int endOffset) | - | ||||||||||||||||||||||||
| 920 | { | - | ||||||||||||||||||||||||
| 921 | QTextCursor cursor = textCursorForRange(startOffset, endOffset); | - | ||||||||||||||||||||||||
| 922 | cursor.removeSelectedText(); | - | ||||||||||||||||||||||||
| 923 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 924 | - | |||||||||||||||||||||||||
| 925 | void QAccessibleTextWidget::insertText(int offset, const QString &text) | - | ||||||||||||||||||||||||
| 926 | { | - | ||||||||||||||||||||||||
| 927 | QTextCursor cursor = textCursor(); | - | ||||||||||||||||||||||||
| 928 | cursor.setPosition(offset); | - | ||||||||||||||||||||||||
| 929 | cursor.insertText(text); | - | ||||||||||||||||||||||||
| 930 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 931 | - | |||||||||||||||||||||||||
| 932 | void QAccessibleTextWidget::replaceText(int startOffset, int endOffset, const QString &text) | - | ||||||||||||||||||||||||
| 933 | { | - | ||||||||||||||||||||||||
| 934 | QTextCursor cursor = textCursorForRange(startOffset, endOffset); | - | ||||||||||||||||||||||||
| 935 | cursor.removeSelectedText(); | - | ||||||||||||||||||||||||
| 936 | cursor.insertText(text); | - | ||||||||||||||||||||||||
| 937 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 938 | - | |||||||||||||||||||||||||
| 939 | - | |||||||||||||||||||||||||
| 940 | - | |||||||||||||||||||||||||
| 941 | - | |||||||||||||||||||||||||
| 942 | QAccessibleMainWindow::QAccessibleMainWindow(QWidget *widget) | - | ||||||||||||||||||||||||
| 943 |     : QAccessibleWidget(widget, QAccessible::Window) { } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 944 | - | |||||||||||||||||||||||||
| 945 | QAccessibleInterface *QAccessibleMainWindow::child(int index) const | - | ||||||||||||||||||||||||
| 946 | { | - | ||||||||||||||||||||||||
| 947 | QList<QWidget*> kids = childWidgets(mainWindow()); | - | ||||||||||||||||||||||||
| 948 |     if (index >= 0
 
  | 0 | ||||||||||||||||||||||||
| 949 |         return never executed:   QAccessible::queryAccessibleInterface(kids.at(index));return QAccessible::queryAccessibleInterface(kids.at(index));never executed:  return QAccessible::queryAccessibleInterface(kids.at(index)); | 0 | ||||||||||||||||||||||||
| 950 | } | - | ||||||||||||||||||||||||
| 951 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 952 | } | - | ||||||||||||||||||||||||
| 953 | - | |||||||||||||||||||||||||
| 954 | int QAccessibleMainWindow::childCount() const | - | ||||||||||||||||||||||||
| 955 | { | - | ||||||||||||||||||||||||
| 956 | QList<QWidget*> kids = childWidgets(mainWindow()); | - | ||||||||||||||||||||||||
| 957 |     return never executed:   kids.count();return kids.count();never executed:  return kids.count(); | 0 | ||||||||||||||||||||||||
| 958 | } | - | ||||||||||||||||||||||||
| 959 | - | |||||||||||||||||||||||||
| 960 | int QAccessibleMainWindow::indexOfChild(const QAccessibleInterface *iface) const | - | ||||||||||||||||||||||||
| 961 | { | - | ||||||||||||||||||||||||
| 962 | QList<QWidget*> kids = childWidgets(mainWindow()); | - | ||||||||||||||||||||||||
| 963 |     return never executed:   kids.indexOf(static_cast<QWidget*>(iface->object()));return kids.indexOf(static_cast<QWidget*>(iface->object()));never executed:  return kids.indexOf(static_cast<QWidget*>(iface->object())); | 0 | ||||||||||||||||||||||||
| 964 | } | - | ||||||||||||||||||||||||
| 965 | - | |||||||||||||||||||||||||
| 966 | QAccessibleInterface *QAccessibleMainWindow::childAt(int x, int y) const | - | ||||||||||||||||||||||||
| 967 | { | - | ||||||||||||||||||||||||
| 968 | QWidget *w = widget(); | - | ||||||||||||||||||||||||
| 969 |     if (!w->isVisible()
  | 0 | ||||||||||||||||||||||||
| 970 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 971 | QPoint gp = w->mapToGlobal(QPoint(0, 0)); | - | ||||||||||||||||||||||||
| 972 |     if (!QRect(gp.x(), gp.y(), w->width(), w->height()).contains(x, y)
  | 0 | ||||||||||||||||||||||||
| 973 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 974 | - | |||||||||||||||||||||||||
| 975 | QWidgetList kids = childWidgets(mainWindow()); | - | ||||||||||||||||||||||||
| 976 | QPoint rp = mainWindow()->mapFromGlobal(QPoint(x, y)); | - | ||||||||||||||||||||||||
| 977 |     for (int i = 0; i < kids.size()
  | 0 | ||||||||||||||||||||||||
| 978 | QWidget *child = kids.at(i); | - | ||||||||||||||||||||||||
| 979 |         if (!child->isWindow()
 
 
  | 0 | ||||||||||||||||||||||||
| 980 |             return never executed:   QAccessible::queryAccessibleInterface(child);return QAccessible::queryAccessibleInterface(child);never executed:  return QAccessible::queryAccessibleInterface(child); | 0 | ||||||||||||||||||||||||
| 981 | } | - | ||||||||||||||||||||||||
| 982 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 983 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 984 | } | - | ||||||||||||||||||||||||
| 985 | - | |||||||||||||||||||||||||
| 986 | QMainWindow *QAccessibleMainWindow::mainWindow() const | - | ||||||||||||||||||||||||
| 987 | { | - | ||||||||||||||||||||||||
| 988 |     return never executed:   qobject_cast<QMainWindow *>(object());return qobject_cast<QMainWindow *>(object());never executed:  return qobject_cast<QMainWindow *>(object()); | 0 | ||||||||||||||||||||||||
| 989 | } | - | ||||||||||||||||||||||||
| 990 | - | |||||||||||||||||||||||||
| 991 | - | |||||||||||||||||||||||||
| 992 | - | |||||||||||||||||||||||||
| 993 | - | |||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |