Commit 036263c4 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Remove unused/obsolete HeaderView::setSectionResizeMode() and modes

The default section resize mode of QHeaderView is Interactive and the
mode is never changed.
parent 1b747230
......@@ -64,7 +64,6 @@ public:
Private(HeaderView *qq)
: q(qq),
mousePressed(false),
modes(),
sizes()
{
connect(q, SIGNAL(sectionCountChanged(int,int)), q, SLOT(_klhv_slotSectionCountChanged(int,int)));
......@@ -81,9 +80,6 @@ public:
return;
}
ensureNumSections(newCount);
for (unsigned int i = 0, end = std::min<unsigned int>(newCount, modes.size()); i < end; ++i) {
q->QHeaderView::setSectionResizeMode(i, modes[i]);
}
apply_section_sizes(q, sizes);
}
......@@ -96,16 +92,12 @@ public:
void ensureNumSections(unsigned int num)
{
if (num > modes.size()) {
modes.resize(num, QHeaderView::Interactive);
}
if (num > sizes.size()) {
sizes.resize(num, q->defaultSectionSize());
}
}
bool mousePressed : 1;
std::vector<QHeaderView::ResizeMode> modes;
std::vector<int> sizes;
};
......@@ -174,15 +166,6 @@ std::vector<int> HeaderView::sectionSizes() const
return section_sizes(this);
}
void HeaderView::setSectionResizeMode(unsigned int section, ResizeMode mode)
{
d->ensureNumSections(section + 1);
d->modes[section] = mode;
if (section < static_cast<unsigned int>(count())) {
QHeaderView::setSectionResizeMode(section, mode);
}
}
#if 0
void HeaderView::setModel(QAbstractItemModel *model)
{
......
......@@ -29,7 +29,6 @@ public:
void setSectionSizes(const std::vector<int> &sizes);
std::vector<int> sectionSizes() const;
void setSectionResizeMode(unsigned int logicalIndex, ResizeMode mode);
private:
//@{
/*! Defined, but not implemented, to catch at least some usage errors */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment