Change CompletionList::data() signature and cosmetics.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23226 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-25 13:11:09 +00:00
parent 32f9f03ebc
commit 962fdc2923
4 changed files with 5 additions and 7 deletions

View 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);

View 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(); }
};

View 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);
}

View 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;