// has a bad memory about it and we have to tell him again and again.
QTreeView * listView = static_cast<QTreeView *>(popup());
listView->header()->setStretchLastSection(false);
- setSectionResizeMode(listView->header(), 0, QHeaderView::Stretch);
- setSectionResizeMode(listView->header(), 1, QHeaderView::Fixed);
+ listView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
+ listView->header()->setSectionResizeMode(1, QHeaderView::Fixed);
listView->header()->resizeSection(1, 22);
// show/update popup
numberingModule->tocTW->headerItem()->setText(0, qt_("Example"));
numberingModule->tocTW->headerItem()->setText(1, qt_("Numbered"));
numberingModule->tocTW->headerItem()->setText(2, qt_("Appears in TOC"));
- setSectionResizeMode(numberingModule->tocTW->header(), QHeaderView::ResizeToContents);
+ numberingModule->tocTW->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
connect(numberingModule->linenoCB, SIGNAL(toggled(bool)),
this, SLOT(linenoToggled(bool)));
connect(numberingModule->linenoCB, SIGNAL(clicked()),
headers << qt_("Package") << qt_("Load automatically")
<< qt_("Load always") << qt_("Do not load");
mathsModule->packagesTW->setHorizontalHeaderLabels(headers);
- setSectionResizeMode(mathsModule->packagesTW->horizontalHeader(), QHeaderView::Stretch);
+ mathsModule->packagesTW->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
map<string, string> const & packages = BufferParams::auto_packages();
mathsModule->packagesTW->setRowCount(packages.size());
int packnum = 0;
// Modules
modulesModule = new UiWidget<Ui::ModulesUi>(this);
modulesModule->availableLV->header()->setVisible(false);
- setSectionResizeMode(modulesModule->availableLV->header(), QHeaderView::ResizeToContents);
+ modulesModule->availableLV->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
modulesModule->availableLV->header()->setStretchLastSection(false);
modulesModule->selectedLV->header()->setVisible(false);
- setSectionResizeMode(modulesModule->selectedLV->header(), QHeaderView::ResizeToContents);
+ modulesModule->selectedLV->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
modulesModule->selectedLV->header()->setStretchLastSection(false);
selectionManager =
new ModuleSelectionManager(this, modulesModule->availableLV,
list_->setRootIsDecorated(false);
list_->setColumnCount(1);
list_->header()->hide();
- setSectionResizeMode(list_->header(), QHeaderView::ResizeToContents);
+ list_->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
list_->header()->setStretchLastSection(false);
list_->setMinimumSize(list_->viewport()->size());
}
-/// FIXME KILLQT4: kill this function
-/// wrapper to hide the change of method name to setSectionResizeMode
-void setSectionResizeMode(QHeaderView * view,
- int logicalIndex, QHeaderView::ResizeMode mode) {
- view->setSectionResizeMode(logicalIndex, mode);
-}
-
-/// FIXME KILLQT4: kill this function
-void setSectionResizeMode(QHeaderView * view, QHeaderView::ResizeMode mode) {
- view->setSectionResizeMode(mode);
-}
-
void showDirectory(FileName const & directory)
{
if (!directory.exists())
void setMessageColour(std::list<QWidget *> highlighted,
std::list<QWidget *> plain);
-/// Qt5 changed setSectionMode to setSectionResizeMode
-/// These wrappers work for Qt4 and Qt5
-void setSectionResizeMode(QHeaderView * view,
- int logicalIndex, QHeaderView::ResizeMode mode);
-void setSectionResizeMode(QHeaderView * view,
- QHeaderView::ResizeMode mode);
/// Shows a directory in OSs file browser
void showDirectory(support::FileName const & directory);
/// handle request for showing citation content - shows pdf/ps or