aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview.cpp
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-09-19 12:00:18 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2022-09-22 10:07:01 +0200
commitcb13ae75e3f720c790325baae18a7042efe45a64 (patch)
treee562270e09e98751ad4dc33f571be666ec7b1012 /src/quick/items/qquicktableview.cpp
parentde7bd9a24fabcd3b8f74578b9cf5b9277470bfa1 (diff)
QQuickTableView: remove unused code
Remove old and unused code in TableView that was back in the days meant as an initial first step to implement section resizing. Task-number: QTBUG-106792 Change-Id: I84941bd6836e16751299e347abbbe9aa1813ade8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r--src/quick/items/qquicktableview.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index ddc2d358d5..3f261823d1 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -991,10 +991,6 @@ bool QQuickTableViewPrivate::EdgeRange::containsIndex(Qt::Edge edge, int index)
QQuickTableViewPrivate::QQuickTableViewPrivate()
: QQuickFlickablePrivate()
{
- QObject::connect(&columnWidths, &QQuickTableSectionSizeProvider::sizeChanged,
- [this] { this->forceLayout();});
- QObject::connect(&rowHeights, &QQuickTableSectionSizeProvider::sizeChanged,
- [this] { this->forceLayout();});
}
QQuickTableViewPrivate::~QQuickTableViewPrivate()
@@ -2339,10 +2335,6 @@ qreal QQuickTableViewPrivate::getColumnWidth(int column) const
if (syncHorizontally)
return syncView->d_func()->getColumnWidth(column);
- auto cw = columnWidths.size(column);
- if (cw >= 0)
- return cw;
-
if (columnWidthProvider.isUndefined())
return noExplicitColumnWidth;
@@ -2380,10 +2372,6 @@ qreal QQuickTableViewPrivate::getRowHeight(int row) const
if (syncVertically)
return syncView->d_func()->getRowHeight(row);
- auto rh = rowHeights.size(row);
- if (rh >= 0)
- return rh;
-
if (rowHeightProvider.isUndefined())
return noExplicitRowHeight;
@@ -5137,72 +5125,6 @@ void QQuickTableView::setSelectionBehavior(SelectionBehavior selectionBehavior)
emit selectionBehaviorChanged();
}
-class QObjectPrivate;
-class QQuickTableSectionSizeProviderPrivate : public QObjectPrivate {
-public:
- QQuickTableSectionSizeProviderPrivate();
- ~QQuickTableSectionSizeProviderPrivate();
- QHash<int, qreal> hash;
-};
-
-QQuickTableSectionSizeProvider::QQuickTableSectionSizeProvider(QObject *parent)
- : QObject (*(new QQuickTableSectionSizeProviderPrivate), parent)
-{
-}
-
-void QQuickTableSectionSizeProvider::setSize(int section, qreal size)
-{
- Q_D(QQuickTableSectionSizeProvider);
- if (section < 0 || size < 0) {
- qmlWarning(this) << "setSize: section or size less than zero";
- return;
- }
- if (qFuzzyCompare(QQuickTableSectionSizeProvider::size(section), size))
- return;
- d->hash.insert(section, size);
- emit sizeChanged();
-}
-
-// return -1.0 if no valid explicit size retrieved
-qreal QQuickTableSectionSizeProvider::size(int section) const
-{
- Q_D(const QQuickTableSectionSizeProvider);
- auto it = d->hash.find(section);
- if (it != d->hash.end())
- return *it;
- return -1.0;
-}
-
-// return true if section is valid
-bool QQuickTableSectionSizeProvider::resetSize(int section)
-{
- Q_D(QQuickTableSectionSizeProvider);
- if (d->hash.empty())
- return false;
-
- auto ret = d->hash.remove(section);
- if (ret)
- emit sizeChanged();
- return ret;
-}
-
-void QQuickTableSectionSizeProvider::resetAll()
-{
- Q_D(QQuickTableSectionSizeProvider);
- d->hash.clear();
- emit sizeChanged();
-}
-
-QQuickTableSectionSizeProviderPrivate::QQuickTableSectionSizeProviderPrivate()
- : QObjectPrivate()
-{
-}
-
-QQuickTableSectionSizeProviderPrivate::~QQuickTableSectionSizeProviderPrivate()
-{
-
-}
-
QT_END_NAMESPACE
#include "moc_qquicktableview_p.cpp"