diff options
author | Joerg Bornemann <joerg.bornemann@digia.com> | 2012-09-27 12:33:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-27 15:50:23 +0200 |
commit | 0ef459d7a2f067773645ffd247317fe6cc20cc22 (patch) | |
tree | 9f35135806915004c734a84b65f0baf0a9426c88 /src | |
parent | 52e6a908bdf6e21b924d2d712c1786fb31686824 (diff) |
use QLatin1String::size() in qt_setWindowTitle_helperHelper
Change-Id: I0c8193a7c6bf8b5f894da3e20af3c4d23e0b593a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b74cdeaf40..84bb5a6685 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5530,17 +5530,15 @@ QString qt_setWindowTitle_helperHelper(const QString &title, const QWidget *widg return cap; QLatin1String placeHolder("[*]"); - int placeHolderLength = 3; // QLatin1String doesn't have length() - int index = cap.indexOf(placeHolder); // here the magic begins while (index != -1) { - index += placeHolderLength; + index += placeHolder.size(); int count = 1; while (cap.indexOf(placeHolder, index) == index) { ++count; - index += placeHolderLength; + index += placeHolder.size(); } if (count%2) { // odd number of [*] -> replace last one |