summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol.cpp
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2022-01-06 16:03:21 +0100
committerKai Köhne <kai.koehne@qt.io>2022-02-14 12:50:59 +0100
commit8275611766bceecf045c75a59487d46c8f8a8d4b (patch)
tree3f26b881fea9f19acd540d5aa5a2dc67dcdc9547 /src/widgets/widgets/qwidgettextcontrol.cpp
parentb99fdae5f520dbd10b94a2124ea950723c162efb (diff)
Core: Remove 'properties' feature
Even QtCore alone cannot be built without the properties feature since Qt 5.5. While fixing this is easy, other modules like dbus, networking are also using QObject::property() and friends liberally. All in all I doubt that anybody will miss the feature (otherwise it would have been fixed in the last decade). Change-Id: Iaf3cc20bda54ee2ff3b809fac8fa82b94ecc88c0 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index ef1158b8ce..159262f953 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -1433,9 +1433,7 @@ QRectF QWidgetTextControlPrivate::rectForPosition(int position) const
int cursorWidth;
{
bool ok = false;
-#ifndef QT_NO_PROPERTIES
cursorWidth = docLayout->property("cursorWidth").toInt(&ok);
-#endif
if (!ok)
cursorWidth = 1;
}
@@ -2468,24 +2466,16 @@ void QWidgetTextControl::setOverwriteMode(bool overwrite)
int QWidgetTextControl::cursorWidth() const
{
-#ifndef QT_NO_PROPERTIES
Q_D(const QWidgetTextControl);
return d->doc->documentLayout()->property("cursorWidth").toInt();
-#else
- return 1;
-#endif
}
void QWidgetTextControl::setCursorWidth(int width)
{
Q_D(QWidgetTextControl);
-#ifdef QT_NO_PROPERTIES
- Q_UNUSED(width);
-#else
if (width == -1)
width = QApplication::style()->pixelMetric(QStyle::PM_TextCursorWidth, nullptr);
d->doc->documentLayout()->setProperty("cursorWidth", width);
-#endif
d->repaintCursor();
}