diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-02 12:42:39 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-10-09 19:01:19 +0200 |
commit | aa02de3c2a3a41e897814b751ec810074f250893 (patch) | |
tree | 7897c278aecf3dd6b902e994dcfa88684e8656a7 /src/quick/items/qquicktextcontrol.cpp | |
parent | 2d9cf3ef0fc09254b1a63ab04b86d9beb52e71bc (diff) |
Prepare for QTextBlockFormat::MarkerType to be an enum class
Use it in fully scoped form, and treat it as int in qDebug.
Unfortunately since QTextBlockFormat is not a QObject, we can't easily
use Q_ENUM to have moc translate the enum values to strings.
Change-Id: I2eb605e8f2756ce62dcbaffa6bfed237ada4021d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextcontrol.cpp')
-rw-r--r-- | src/quick/items/qquicktextcontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp index 127b3c3516..3c392be751 100644 --- a/src/quick/items/qquicktextcontrol.cpp +++ b/src/quick/items/qquicktextcontrol.cpp @@ -1212,8 +1212,8 @@ void QQuickTextControlPrivate::mouseReleaseEvent(QMouseEvent *e, const QPointF & QTextBlock block = q->blockWithMarkerAt(pos); if (block == blockWithMarkerUnderMousePress) { auto fmt = block.blockFormat(); - fmt.setMarker(fmt.marker() == QTextBlockFormat::Unchecked ? - QTextBlockFormat::Checked : QTextBlockFormat::Unchecked); + fmt.setMarker(fmt.marker() == QTextBlockFormat::MarkerType::Unchecked ? + QTextBlockFormat::MarkerType::Checked : QTextBlockFormat::MarkerType::Unchecked); cursor.setBlockFormat(fmt); } } @@ -1507,7 +1507,7 @@ void QQuickTextControlPrivate::hoverEvent(QHoverEvent *e, const QPointF &pos) emit q->markerHovered(block.isValid()); hoveredMarker = block.isValid(); if (hoveredMarker) - qCDebug(DBG_HOVER_TRACE) << q << e->type() << pos << "hovered marker" << block.blockFormat().marker() << block.text(); + qCDebug(DBG_HOVER_TRACE) << q << e->type() << pos << "hovered marker" << int(block.blockFormat().marker()) << block.text(); } } |