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: ...@@ -64,7 +64,6 @@ public:
Private(HeaderView *qq) Private(HeaderView *qq)
: q(qq), : q(qq),
mousePressed(false), mousePressed(false),
modes(),
sizes() sizes()
{ {
connect(q, SIGNAL(sectionCountChanged(int,int)), q, SLOT(_klhv_slotSectionCountChanged(int,int))); connect(q, SIGNAL(sectionCountChanged(int,int)), q, SLOT(_klhv_slotSectionCountChanged(int,int)));
...@@ -81,9 +80,6 @@ public: ...@@ -81,9 +80,6 @@ public:
return; return;
} }
ensureNumSections(newCount); 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); apply_section_sizes(q, sizes);
} }
...@@ -96,16 +92,12 @@ public: ...@@ -96,16 +92,12 @@ public:
void ensureNumSections(unsigned int num) void ensureNumSections(unsigned int num)
{ {
if (num > modes.size()) {
modes.resize(num, QHeaderView::Interactive);
}
if (num > sizes.size()) { if (num > sizes.size()) {
sizes.resize(num, q->defaultSectionSize()); sizes.resize(num, q->defaultSectionSize());
} }
} }
bool mousePressed : 1; bool mousePressed : 1;
std::vector<QHeaderView::ResizeMode> modes;
std::vector<int> sizes; std::vector<int> sizes;
}; };
...@@ -174,15 +166,6 @@ std::vector<int> HeaderView::sectionSizes() const ...@@ -174,15 +166,6 @@ std::vector<int> HeaderView::sectionSizes() const
return section_sizes(this); 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 #if 0
void HeaderView::setModel(QAbstractItemModel *model) void HeaderView::setModel(QAbstractItemModel *model)
{ {
......
...@@ -29,7 +29,6 @@ public: ...@@ -29,7 +29,6 @@ public:
void setSectionSizes(const std::vector<int> &sizes); void setSectionSizes(const std::vector<int> &sizes);
std::vector<int> sectionSizes() const; std::vector<int> sectionSizes() const;
void setSectionResizeMode(unsigned int logicalIndex, ResizeMode mode);
private: private:
//@{ //@{
/*! Defined, but not implemented, to catch at least some usage errors */ /*! 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