mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
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:
parent
32f9f03ebc
commit
962fdc2923
@ -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);
|
||||
|
@ -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(); }
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user