Revert some changes to QTextCursor constructors
This partially reverts the source and binary incompatible parts of change
d921a9bd15 that made public members in an
exported class private and changed signature in one case.
Task-number: QTBUG-50703
Change-Id: I2719f276256206347d3c27d80a16db34a4ea2888
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
bb10
parent
4c8cb329d4
commit
3f482fad3c
|
|
@ -1072,8 +1072,8 @@ QTextCursor::QTextCursor(const QTextBlock &block)
|
|||
/*!
|
||||
\internal
|
||||
*/
|
||||
QTextCursor::QTextCursor(QTextDocumentPrivate &p, int pos)
|
||||
: d(new QTextCursorPrivate(&p))
|
||||
QTextCursor::QTextCursor(QTextDocumentPrivate *p, int pos)
|
||||
: d(new QTextCursorPrivate(p))
|
||||
{
|
||||
d->adjusted_anchor = d->anchor = d->position = pos;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ class Q_GUI_EXPORT QTextCursor
|
|||
public:
|
||||
QTextCursor();
|
||||
explicit QTextCursor(QTextDocument *document);
|
||||
QTextCursor(QTextDocumentPrivate *p, int pos);
|
||||
explicit QTextCursor(QTextCursorPrivate *d);
|
||||
explicit QTextCursor(QTextFrame *frame);
|
||||
explicit QTextCursor(const QTextBlock &block);
|
||||
QTextCursor(const QTextCursor &cursor);
|
||||
|
|
@ -219,9 +221,6 @@ public:
|
|||
QTextDocument *document() const;
|
||||
|
||||
private:
|
||||
QTextCursor(QTextDocumentPrivate &p, int pos);
|
||||
explicit QTextCursor(QTextCursorPrivate *d);
|
||||
|
||||
QSharedDataPointer<QTextCursorPrivate> d;
|
||||
friend class QTextCursorPrivate;
|
||||
friend class QTextDocumentPrivate;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public:
|
|||
void aboutToRemoveCell(int from, int to);
|
||||
|
||||
static QTextCursor fromPosition(QTextDocumentPrivate *d, int pos)
|
||||
{ return QTextCursor(*d, pos); }
|
||||
{ return QTextCursor(d, pos); }
|
||||
|
||||
QTextDocumentPrivate *priv;
|
||||
qreal x;
|
||||
|
|
|
|||
|
|
@ -1704,7 +1704,7 @@ bool QTextDocumentPrivate::ensureMaximumBlockCount()
|
|||
beginEditBlock();
|
||||
|
||||
const int blocksToRemove = blocks.numNodes() - maximumBlockCount;
|
||||
QTextCursor cursor(*this, 0);
|
||||
QTextCursor cursor(this, 0);
|
||||
cursor.movePosition(QTextCursor::NextBlock, QTextCursor::KeepAnchor, blocksToRemove);
|
||||
|
||||
unreachableCharacterCount += cursor.selectionEnd() - cursor.selectionStart();
|
||||
|
|
|
|||
Loading…
Reference in New Issue