]> git.lyx.org Git - features.git/commitdiff
Change CompletionList::data() signature and cosmetics.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 25 Feb 2008 13:11:09 +0000 (13:11 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 25 Feb 2008 13:11:09 +0000 (13:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23226 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiCompleter.cpp
src/insets/Inset.h
src/insets/InsetText.cpp
src/mathed/InsetMathNest.h

index a4cec0dfaf55b7adf8779cdfa8c9d557753b45ab..f594ea376a461672a62ab001a8f9dd6b11f7b76b 100644 (file)
@@ -141,8 +141,7 @@ public:
                                QPixmap p = QPixmap(name);
                                if (!p.isNull()) {
                                        // scale it to 16x16 or smaller
-                                       scaled
-                                       = p.scaled(min(16, p.width()), min(16, p.height()), 
+                                       scaled = p.scaled(min(16, p.width()), min(16, p.height()), 
                                                Qt::KeepAspectRatio, Qt::SmoothTransformation);
                                }
 
@@ -423,8 +422,7 @@ void GuiCompleter::updateModel(Cursor & cur, bool popupUpdate, bool inlineUpdate
        popup()->setItemDelegateForColumn(0, rtl ? rtlItemDelegate_ : 0);
 
        // set new model
-       Inset::CompletionList const * list
-       = cur.inset().createCompletionList(cur);
+       Inset::CompletionList const * list = cur.inset().createCompletionList(cur);
        setModel(new GuiCompletionModel(this, list));
        if (list->sorted())
                setModelSorting(QCompleter::CaseSensitivelySortedModel);
index df78edb5d1b5314dbe5b2c3c254d1c15e654201e..e1dcfbb3a91455551c83872baab95c66a07fb03b 100644 (file)
@@ -307,7 +307,7 @@ public:
                ///
                virtual size_t size() const =0;
                /// returns the string shown in the gui.
-               virtual docstring data(size_t idx) const =0;
+               virtual docstring const & data(size_t idx) const = 0;
                /// returns the resource string used to load an icon.
                virtual std::string icon(size_t /*idx*/) const { return std::string(); }
        };
index cb84d30e97307ef03db6c7eb778f41c775aa0a6f..42d5cff3ced655cc1666705c1adef4e2b65095b5 100644 (file)
@@ -83,7 +83,7 @@ public:
                return buf_.registeredWords().size();
        }
        ///
-       virtual docstring data(size_t idx) const
+       virtual docstring const & data(size_t idx) const
        {
                return buf_.registeredWords().word(idx);
        }
index fab9f8d9ab8ee34e02b29404a2c40ca8d50491b0..937476a568e901bfdc9ed1009aaa8d28f1857622 100644 (file)
@@ -28,7 +28,7 @@ public:
        ///
        virtual size_t size() const;
        ///
-       virtual docstring data(size_t idx) const;
+       virtual docstring const & data(size_t idx) const;
        ///
        virtual std::string icon(size_t idx) const;