]> git.lyx.org Git - features.git/commitdiff
Remove GuiToolbar * member from the LayoutBox ctor: Why should we limit a LayoutBox...
authorVincent van Ravesteijn <vfr@lyx.org>
Fri, 14 Aug 2009 22:47:57 +0000 (22:47 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Fri, 14 Aug 2009 22:47:57 +0000 (22:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31041 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp
src/frontends/qt4/LayoutBox.cpp
src/frontends/qt4/LayoutBox.h

index b813d4647fcd66a9df2cf125d5cb527442389750..3d5722c75e4f76a3648c1c242df529be2219a891 100644 (file)
@@ -228,6 +228,8 @@ void GuiToolbar::add(ToolbarItem const & item)
                break;
        case ToolbarItem::LAYOUTS:
                layout_ = new LayoutBox(this, owner_);
+               QObject::connect(this, SIGNAL(iconSizeChanged(QSize)),
+                       layout_, SLOT(setIconSize(QSize)));
                addWidget(layout_);
                break;
        case ToolbarItem::MINIBUFFER:
index 212b484aec777b36502c2ab213fc9ad9b002fa5d..27e19c4dbb663f1c1599b155289b405a864ed7d1 100644 (file)
@@ -45,7 +45,6 @@
 #include <QSortFilterProxyModel>
 #include <QStandardItemModel>
 #include <QTextFrame>
-#include <QToolBar>
 
 using namespace std;
 using namespace lyx::support;
@@ -398,7 +397,7 @@ void LayoutBox::Private::setFilter(QString const & s)
 }
 
 
-LayoutBox::LayoutBox(QToolBar * bar, GuiView & owner)
+LayoutBox::LayoutBox(GuiView & owner)
        : d(new Private(this, owner))
 {
        setSizeAdjustPolicy(QComboBox::AdjustToContents);
@@ -414,8 +413,6 @@ LayoutBox::LayoutBox(QToolBar * bar, GuiView & owner)
        
        QObject::connect(this, SIGNAL(activated(int)),
                this, SLOT(selected(int)));
-       QObject::connect(bar, SIGNAL(iconSizeChanged(QSize)),
-               this, SLOT(setIconSize(QSize)));
 
        d->owner_.setLayoutDialog(this);
        updateContents(true);
index e520e3c0a8dcaf70051d40b953e4b019473e906d..493f931d1b5076b9ac3756232c25eca37fe316ae 100644 (file)
@@ -20,8 +20,6 @@
 
 #include <QComboBox>
 
-class QToolBar;
-
 namespace lyx {
 
 class DocumentClass;
@@ -36,7 +34,7 @@ class LayoutBox : public QComboBox
 {
        Q_OBJECT
 public:
-       LayoutBox(QToolBar *, GuiView &);
+       LayoutBox(GuiView &);
 
        /// select the right layout in the combobox.
        void set(docstring const & layout);