summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-17 02:56:03 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-17 02:56:03 (GMT)
commit4109badc4321effeeb798dd101479be7dffdbe3d (patch)
treeab69ab72be3d717e681a27b20ea26b61782394b3 /src/gui/widgets
parent219175903f9722bee12271321614cdaeb88eb914 (diff)
parent806d49e49be10ca7a478b1f0afc4fd0c98321480 (diff)
downloadQt-4109badc4321effeeb798dd101479be7dffdbe3d.zip
Qt-4109badc4321effeeb798dd101479be7dffdbe3d.tar.gz
Qt-4109badc4321effeeb798dd101479be7dffdbe3d.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: (23 commits) Fix QGLWidget::renderPixmap for raster engine on Mac Check if OES_texture_npot is present on OpenGL ES 2. Fix tst_QVariant::invalidColor Move QTextCursor::MoveStyle to Qt namespace Move the painting redirection to the unified toolbar surface. Fix misspelled word in comment. Build fix for tst_qrawfont Add some QRawFont related low level functions to avoid extra copying Compile on Mac Rename QGlyphs -> QGlyphRun Fix QRawFont::setPixelSize() on Mac Remove warning from QColor::setNamedColor(). Add internal documentation for QUnifiedToolbarSurface. Fix QPainter::drawGlyphs() with non-affine transformation Remove misspelled comment in tst_qtextdocument.cpp Only enable design metrics for scalable fonts Add a way to retrieve CTFontRef from QFont Include pixel size of font in exported HTML from QTextDocument Fix the autotest condition. Change the repaint() call to an update(). ...
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qlinecontrol.cpp2
-rw-r--r--src/gui/widgets/qlinecontrol_p.h8
-rw-r--r--src/gui/widgets/qlineedit.cpp8
-rw-r--r--src/gui/widgets/qlineedit.h5
4 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp
index 4fb0f0c..2a15555 100644
--- a/src/gui/widgets/qlinecontrol.cpp
+++ b/src/gui/widgets/qlinecontrol.cpp
@@ -1593,7 +1593,7 @@ void QLineControl::processKeyEvent(QKeyEvent* event)
}
bool unknown = false;
- bool visual = cursorMoveStyle() == QTextCursor::Visual;
+ bool visual = cursorMoveStyle() == Qt::VisualMoveStyle;
if (false) {
}
diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h
index 0655276..9764ba9 100644
--- a/src/gui/widgets/qlinecontrol_p.h
+++ b/src/gui/widgets/qlinecontrol_p.h
@@ -160,8 +160,8 @@ public:
int cursorWidth() const { return m_cursorWidth; }
void setCursorWidth(int value) { m_cursorWidth = value; }
- QTextCursor::MoveStyle cursorMoveStyle() const { return m_textLayout.cursorMoveStyle(); }
- void setCursorMoveStyle(QTextCursor::MoveStyle style) { m_textLayout.setCursorMoveStyle(style); }
+ Qt::CursorMoveStyle cursorMoveStyle() const { return m_textLayout.cursorMoveStyle(); }
+ void setCursorMoveStyle(Qt::CursorMoveStyle style) { m_textLayout.setCursorMoveStyle(style); }
void moveCursor(int pos, bool mark = false);
void cursorForward(bool mark, int steps)
@@ -169,11 +169,11 @@ public:
int c = m_cursor;
if (steps > 0) {
while (steps--)
- c = cursorMoveStyle() == QTextCursor::Visual ? m_textLayout.rightCursorPosition(c)
+ c = cursorMoveStyle() == Qt::VisualMoveStyle ? m_textLayout.rightCursorPosition(c)
: m_textLayout.nextCursorPosition(c);
} else if (steps < 0) {
while (steps++)
- c = cursorMoveStyle() == QTextCursor::Visual ? m_textLayout.leftCursorPosition(c)
+ c = cursorMoveStyle() == Qt::VisualMoveStyle ? m_textLayout.leftCursorPosition(c)
: m_textLayout.previousCursorPosition(c);
}
moveCursor(c, mark);
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 43c3f52..3c9874e 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1116,24 +1116,24 @@ void QLineEdit::setDragEnabled(bool b)
\brief the movement style of cursor in this line edit
\since 4.8
- When this property is set to QTextCursor::Visual, the line edit will use visual
+ When this property is set to Qt::VisualMoveStyle, the line edit will use visual
movement style. Pressing the left arrow key will always cause the cursor to move
left, regardless of the text's writing direction. The same behavior applies to
right arrow key.
- When the property is QTextCursor::Logical (the default), within a LTR text block,
+ When the property is Qt::LogicalMoveStyle (the default), within a LTR text block,
increase cursor position when pressing left arrow key, decrease cursor position
when pressing the right arrow key. If the text block is right to left, the opposite
behavior applies.
*/
-QTextCursor::MoveStyle QLineEdit::cursorMoveStyle() const
+Qt::CursorMoveStyle QLineEdit::cursorMoveStyle() const
{
Q_D(const QLineEdit);
return d->control->cursorMoveStyle();
}
-void QLineEdit::setCursorMoveStyle(QTextCursor::MoveStyle style)
+void QLineEdit::setCursorMoveStyle(Qt::CursorMoveStyle style)
{
Q_D(QLineEdit);
d->control->setCursorMoveStyle(style);
diff --git a/src/gui/widgets/qlineedit.h b/src/gui/widgets/qlineedit.h
index 73a736c..e88273f 100644
--- a/src/gui/widgets/qlineedit.h
+++ b/src/gui/widgets/qlineedit.h
@@ -85,6 +85,7 @@ class Q_GUI_EXPORT QLineEdit : public QWidget
Q_PROPERTY(bool redoAvailable READ isRedoAvailable)
Q_PROPERTY(bool acceptableInput READ hasAcceptableInput)
Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText)
+ Q_PROPERTY(Qt::CursorMoveStyle cursorMoveStyle READ cursorMoveStyle WRITE setCursorMoveStyle)
public:
explicit QLineEdit(QWidget* parent=0);
@@ -159,8 +160,8 @@ public:
void setDragEnabled(bool b);
bool dragEnabled() const;
- void setCursorMoveStyle(QTextCursor::MoveStyle style);
- QTextCursor::MoveStyle cursorMoveStyle() const;
+ void setCursorMoveStyle(Qt::CursorMoveStyle style);
+ Qt::CursorMoveStyle cursorMoveStyle() const;
QString inputMask() const;
void setInputMask(const QString &inputMask);