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>bb10
parent
699f2424eb
commit
e8b098b636
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue