diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-01-07 21:34:31 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-01-09 17:54:22 +0000 |
commit | a40e2c7d98a5695574bbe5babad904f64cf28efa (patch) | |
tree | cd288c4f0da2e0061eeaa37909c0090397fd4be6 /src/widgets/widgets/qwidgetlinecontrol.cpp | |
parent | b3e4be2d8b9debf217657436139da0152f6f8797 (diff) |
Avoid useless casts to/from uint
Remove some c-style casts from int to uint which were needed in Qt3 (or
earlier?) but nowadays the values are all int.
Change-Id: Iecd739c450873adf952a17f635d7fb6825537907
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol.cpp')
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 10 |
1 files changed, 5 insertions, 5 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; |