equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
547 return m_textLayout.lineAt(0).cursorToX(cursor); |
547 return m_textLayout.lineAt(0).cursorToX(cursor); |
548 } |
548 } |
549 |
549 |
550 inline qreal QLineControl::cursorToX() const |
550 inline qreal QLineControl::cursorToX() const |
551 { |
551 { |
552 return cursorToX(m_cursor); |
552 int cursor = m_cursor; |
|
553 if (m_preeditCursor != -1) |
|
554 cursor += m_preeditCursor; |
|
555 return cursorToX(cursor); |
553 } |
556 } |
554 |
557 |
555 inline bool QLineControl::isReadOnly() const |
558 inline bool QLineControl::isReadOnly() const |
556 { |
559 { |
557 return m_readOnly; |
560 return m_readOnly; |