mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Let empty() be const.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25961 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
07719210df
commit
221812b6e0
@ -62,7 +62,7 @@ public:
|
||||
* This does always return true on systems that don't have a real
|
||||
* selection.
|
||||
*/
|
||||
virtual bool empty() = 0;
|
||||
virtual bool empty() const = 0;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -96,7 +96,7 @@ void GuiSelection::on_dataChanged()
|
||||
}
|
||||
|
||||
|
||||
bool GuiSelection::empty()
|
||||
bool GuiSelection::empty() const
|
||||
{
|
||||
if (!selection_supported_)
|
||||
return true;
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
void haveSelection(bool own);
|
||||
docstring const get() const;
|
||||
void put(docstring const & str);
|
||||
bool empty();
|
||||
bool empty() const;
|
||||
//@}
|
||||
|
||||
private Q_SLOTS:
|
||||
@ -46,7 +46,7 @@ private Q_SLOTS:
|
||||
private:
|
||||
// Cache which is to speed up selection-status read
|
||||
// (4 calls when openi Edit menu).
|
||||
bool text_selection_empty_;
|
||||
mutable bool text_selection_empty_;
|
||||
// Direct call clipboard()->text(QClipboard::Selection) inside onDataChanged causes
|
||||
// selection to be obtained. Now imagine the some LyX instance A, when making selection -
|
||||
// each change triggers onDataChange in all others instances for each mouse
|
||||
@ -54,7 +54,7 @@ private:
|
||||
// which interferes with the selecting itself. As a result middle button pasting
|
||||
// for more instances don't work and debugging is a hell. So we just schedule
|
||||
// obtaining of selection on the time empty() is actually called.
|
||||
bool schedule_check_;
|
||||
mutable bool schedule_check_;
|
||||
bool const selection_supported_;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user