diff options
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 10 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol_p.h | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 4f4a6f70b5..31fe33ef28 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -1177,9 +1177,9 @@ bool QWidgetLineControl::hasAcceptableInput(const QString &str) const that blanks will be used, false that previous input is used. Calling this when no inputMask is set is undefined. */ -QString QWidgetLineControl::maskString(uint pos, const QString &str, bool clear) const +QString QWidgetLineControl::maskString(int pos, const QString &str, bool clear) const { - if (pos >= (uint)m_maxLength) + if (pos >= m_maxLength) return QString::fromLatin1(""); QString fill; @@ -1252,13 +1252,13 @@ QString QWidgetLineControl::maskString(uint pos, const QString &str, bool clear) Returns a "cleared" string with only separators and blank chars. Calling this when no inputMask is set is undefined. */ -QString QWidgetLineControl::clearString(uint pos, uint len) const +QString QWidgetLineControl::clearString(int pos, int len) const { - if (pos >= (uint)m_maxLength) + if (pos >= m_maxLength) return QString(); QString s; - int end = qMin((uint)m_maxLength, pos + len); + int end = qMin(m_maxLength, pos + len); for (int i = pos; i < end; ++i) if (m_maskData[i].separator) s += m_maskData[i].maskChar; diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h index 16eb337416..ca70e2c02f 100644 --- a/src/widgets/widgets/qwidgetlinecontrol_p.h +++ b/src/widgets/widgets/qwidgetlinecontrol_p.h @@ -500,8 +500,8 @@ private: void parseInputMask(const QString &maskFields); bool isValidInput(QChar key, QChar mask) const; bool hasAcceptableInput(const QString &text) const; - QString maskString(uint pos, const QString &str, bool clear = false) const; - QString clearString(uint pos, uint len) const; + QString maskString(int pos, const QString &str, bool clear = false) const; + QString clearString(int pos, int len) const; QString stripString(const QString &str) const; int findInMask(int pos, bool forward, bool findSeparator, QChar searchChar = QChar()) const; |