]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/PanelStack.cpp
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / PanelStack.cpp
index 68fb07e73c4f2fb9a1c2931cb30cae16727e8416..ab1a5c6f817601f04d30a5af577c7602572b1217 100644 (file)
@@ -21,7 +21,6 @@
 
 #include <QAbstractButton>
 #include <QApplication>
-#include <QColorGroup>
 #include <QComboBox>
 #include <QFontMetrics>
 #include <QGroupBox>
@@ -61,7 +60,7 @@ PanelStack::PanelStack(QWidget * parent)
        list_->setRootIsDecorated(false);
        list_->setColumnCount(1);
        list_->header()->hide();
-       list_->header()->setResizeMode(QHeaderView::ResizeToContents);
+       setSectionResizeMode(list_->header(), QHeaderView::ResizeToContents);
        list_->header()->setStretchLastSection(false);
        list_->setMinimumSize(list_->viewport()->size());
 
@@ -86,7 +85,7 @@ PanelStack::PanelStack(QWidget * parent)
 
        // Create the output layout, horizontal plus a VBox on the left with the search
        // box and the tree
-       QVBoxLayout * left_layout = new QVBoxLayout();
+       QVBoxLayout * left_layout = new QVBoxLayout;
        left_layout->addWidget(search_, 0);
        left_layout->addWidget(list_, 1);
 
@@ -106,13 +105,13 @@ void PanelStack::addCategory(QString const & name, QString const & parent)
 
        if (parent.isEmpty()) {
                item = new QTreeWidgetItem(list_);
-               item->setText(0, name);
+               item->setText(0, qt_(name));
        }
        else {
                if (!panel_map_.contains(parent))
                        addCategory(parent);
                item = new QTreeWidgetItem(panel_map_.value(parent));
-               item->setText(0, name);
+               item->setText(0, qt_(name));
                depth = 2;
                list_->setRootIsDecorated(true);
        }