summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThorbjørn Lund Martsum <tmartsum@gmail.com>2012-04-10 08:22:12 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-11 01:42:12 +0200
commite8b098b6367baafda9e494ec4c9ddd1b7bf661ce (patch)
tree35110d39bf6527750fb1cf6806c422dbb73bd02b /src
parent699f2424eba929d04b081af2a0cad74e2e58e235 (diff)
QHeaderView - remove some (nearly) unused span functions
This removes a couple of functions. Two of them are unused and the last one has its (now) very simple implementation inlined in the only caller. The last function was called something with spans and we would like to get away from using the word 'span' since we no longer uses spans. Change-Id: Icef95166289d52bd958400cba70daceb6fa75913 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/itemviews/qheaderview.cpp5
-rw-r--r--src/widgets/itemviews/qheaderview_p.h18
2 files changed, 2 insertions, 21 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index 444e56d6d0..e6376cef60 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -3415,10 +3415,9 @@ void QHeaderViewPrivate::setHeaderSectionResizeMode(int visual, QHeaderView::Res
QHeaderView::ResizeMode QHeaderViewPrivate::headerSectionResizeMode(int visual) const
{
- int span = sectionSpanIndex(visual);
- if (span == -1)
+ if (visual < 0 || visual >= sectionItems.count())
return globalResizeMode;
- return sectionItems.at(span).resizeMode;
+ return sectionItems.at(visual).resizeMode;
}
void QHeaderViewPrivate::setGlobalHeaderResizeMode(QHeaderView::ResizeMode mode)
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h
index d6e6ab991a..cca81b0c22 100644
--- a/src/widgets/itemviews/qheaderview_p.h
+++ b/src/widgets/itemviews/qheaderview_p.h
@@ -314,10 +314,6 @@ public:
void setDefaultSectionSize(int size);
void recalcSectionStartPos() const; // not really const
- inline int headerSectionCount() const { // for debugging
- return sectionItems.count();
- }
-
inline int headerLength() const { // for debugging
int len = 0;
for (int i = 0; i < sectionItems.count(); ++i)
@@ -325,20 +321,6 @@ public:
return len;
}
- inline void removeSpans(const QList<int> &spans) {
- for (int i = spans.count() - 1; i >= 0; --i) {
- length -= sectionItems.at(spans.at(i)).size;
- sectionItems.remove(spans.at(i));
- }
- }
-
- inline int sectionSpanIndex(int visual) const {
- if (visual < sectionItems.count() && visual >= 0) {
- return visual;
- }
- return -1;
- }
-
int headerSectionSize(int visual) const;
int headerSectionPosition(int visual) const;
int headerVisualIndexAt(int position) const;