QTextDocumentPrivate: de-inline {add,remove}Cursor()
In a 'ninja qtdeclarative' build, the addCursor() function alone is compiled 458x for a total of almost 10s cumulative compilation time. This makes it one of the top-20 template instantiations in a Clang -ftime-trace build. The removeCursor() function doesn't show up quite as much, but de-inline, too, while we're at it. Pick-to: 6.5 Task-number: QTBUG-97601 Change-Id: I37b920a8b364861efab78f736d71642dc82d8982 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e5a7487c62
commit
436501d877
@ -1419,6 +1419,16 @@ QTextFrame *QTextDocumentPrivate::rootFrame() const
|
||||
return rtFrame;
|
||||
}
|
||||
|
||||
void QTextDocumentPrivate::addCursor(QTextCursorPrivate *c)
|
||||
{
|
||||
cursors.insert(c);
|
||||
}
|
||||
|
||||
void QTextDocumentPrivate::removeCursor(QTextCursorPrivate *c)
|
||||
{
|
||||
cursors.remove(c);
|
||||
}
|
||||
|
||||
QTextFrame *QTextDocumentPrivate::frameAt(int pos) const
|
||||
{
|
||||
QTextFrame *f = rootFrame();
|
||||
|
@ -243,8 +243,8 @@ private:
|
||||
public:
|
||||
void documentChange(int from, int length);
|
||||
|
||||
inline void addCursor(QTextCursorPrivate *c) { cursors.insert(c); }
|
||||
inline void removeCursor(QTextCursorPrivate *c) { cursors.remove(c); }
|
||||
void addCursor(QTextCursorPrivate *c);
|
||||
void removeCursor(QTextCursorPrivate *c);
|
||||
|
||||
QTextFrame *frameAt(int pos) const;
|
||||
QTextFrame *rootFrame() const;
|
||||
|
Loading…
Reference in New Issue
Block a user