summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qabstractitemdelegate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qabstractitemdelegate.cpp')
-rw-r--r--src/widgets/itemviews/qabstractitemdelegate.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/src/widgets/itemviews/qabstractitemdelegate.cpp b/src/widgets/itemviews/qabstractitemdelegate.cpp
index c5b22b5667..52d7d54595 100644
--- a/src/widgets/itemviews/qabstractitemdelegate.cpp
+++ b/src/widgets/itemviews/qabstractitemdelegate.cpp
@@ -45,7 +45,9 @@
#if QT_CONFIG(whatsthis)
#include <qwhatsthis.h>
#endif
+#if QT_CONFIG(tooltip)
#include <qtooltip.h>
+#endif
#include <qevent.h>
#include <qstring.h>
#include <qdebug.h>
@@ -345,28 +347,6 @@ bool QAbstractItemDelegate::editorEvent(QEvent *,
return false;
}
-#if QT_DEPRECATED_SINCE(5, 13)
-/*!
- \obsolete
-
- Use QFontMetrics::elidedText() instead.
-
- \oldcode
- QFontMetrics fm = ...
- QString str = QAbstractItemDelegate::elidedText(fm, width, mode, text);
- \newcode
- QFontMetrics fm = ...
- QString str = fm.elidedText(text, mode, width);
- \endcode
-*/
-
-QString QAbstractItemDelegate::elidedText(const QFontMetrics &fontMetrics, int width,
- Qt::TextElideMode mode, const QString &text)
-{
- return fontMetrics.elidedText(text, mode, width);
-}
-#endif
-
/*!
\since 4.3
Whenever a help event occurs, this function is called with the \a event
@@ -391,7 +371,7 @@ bool QAbstractItemDelegate::helpEvent(QHelpEvent *event,
return false;
Q_D(QAbstractItemDelegate);
switch (event->type()) {
-#ifndef QT_NO_TOOLTIP
+#if QT_CONFIG(tooltip)
case QEvent::ToolTip: {
QHelpEvent *he = static_cast<QHelpEvent*>(event);
const int precision = inherits("QItemDelegate") ? 10 : 6; // keep in sync with DBL_DIG in qitemdelegate.cpp