]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/LayoutBox.cpp
Amend f441590c
[lyx.git] / src / frontends / qt4 / LayoutBox.cpp
index aa22e60eaca8d2290dd4e43d15f7842aa7a2230f..1054a098121fdba9527ae9ee284ce6692ee20631 100644 (file)
@@ -103,9 +103,14 @@ public:
 //
 /////////////////////////////////////////////////////////////////////
 
-struct LayoutBox::Private
+class LayoutBox::Private
 {
+       /// noncopyable
+       Private(Private const &);
+       void operator=(Private const &);
+public:
        Private(LayoutBox * parent, GuiView & gv) : p(parent), owner_(gv),
+               inset_(0),
                // set the layout model with two columns
                // 1st: translated layout names
                // 2nd: raw layout names
@@ -318,7 +323,7 @@ QString LayoutItemDelegate::underlineFilter(QString const & s) const
        layout_->filter();
        for (int i = 0; i < f.length(); ++i) {
                int p = s.indexOf(f[i], lastp + 1, Qt::CaseInsensitive);
-               LASSERT(p != -1, /**/);
+               LASSERT(p != -1, continue);
                if (lastp == p - 1 && lastp != -1) {
                        // remove ")" and append "x)"
                        r = r.left(r.length() - 4) + s[p] + "</u>";
@@ -382,7 +387,7 @@ void LayoutBox::Private::setFilter(QString const & s)
                // We do not call our implementation of showPopup because that
                // would reset the filter again. This is only needed if the user clicks
                // on the QComboBox.
-               LASSERT(!inShowPopup_, /**/);
+               LATTEST(!inShowPopup_);
                inShowPopup_ = true;
                p->QComboBox::showPopup();
                inShowPopup_ = false;
@@ -459,7 +464,7 @@ void LayoutBox::showPopup()
 
        // call QComboBox::showPopup. But set the inShowPopup_ flag to switch on
        // the hack in the item delegate to make space for the headers.
-       LASSERT(!d->inShowPopup_, /**/);
+       LATTEST(!d->inShowPopup_);
        d->inShowPopup_ = true;
        QComboBox::showPopup();
        d->inShowPopup_ = false;
@@ -522,7 +527,7 @@ bool LayoutBox::eventFilter(QObject * o, QEvent * e)
        
 void LayoutBox::setIconSize(QSize size)
 {
-#ifdef Q_WS_MACX
+#ifdef Q_OS_MAC
        bool small = size.height() < 20;
        setAttribute(Qt::WA_MacSmallSize, small);
        setAttribute(Qt::WA_MacNormalSize, !small);
@@ -536,7 +541,7 @@ void LayoutBox::set(docstring const & layout)
 {
        d->resetFilter();
 
-       if (!d->text_class_.get())
+       if (!d->text_class_)
                return;
 
        if (!d->text_class_->hasLayout(layout))
@@ -691,7 +696,7 @@ void LayoutBox::selected(int index)
                d->model_->itemFromIndex(mindex)->text());
        d->owner_.setFocus();
 
-       if (!d->text_class_.get()) {
+       if (!d->text_class_) {
                updateContents(false);
                d->resetFilter();
                return;