summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2011-11-08 18:01:49 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-09 15:28:36 +0100
commit67a9b9500929ab9de0802e2236d5e158c151029d (patch)
treee5a45c3999d04bcd131a9ff46005f147533cb405 /src/widgets/styles
parent3c74720f74baa05f19863d7d3310b4d9fe1d2206 (diff)
Remove unnecessary variable self-assignment
Assigning an int variable to itself is unnecessary and pointless, remove them. styles/qplastiquestyle.cpp:932:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ styles/qplastiquestyle.cpp:939:23: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign] width = width; ~~~~~ ^ ~~~~~ Change-Id: I0118874028bf43992bcce07f87b46b48868436cc Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qplastiquestyle.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/widgets/styles/qplastiquestyle.cpp b/src/widgets/styles/qplastiquestyle.cpp
index 278ec2b9cb..799bc95fdd 100644
--- a/src/widgets/styles/qplastiquestyle.cpp
+++ b/src/widgets/styles/qplastiquestyle.cpp
@@ -929,14 +929,12 @@ static QString elliditide(const QString &text, const QFontMetrics &fontMetrics,
int width = fontMetrics.width(leftHalf + ellipsis + rightHalf);
if (width < rect.width()) {
title = leftHalf + ellipsis + rightHalf;
- width = width;
break;
}
rightHalf.remove(0, 1);
width = fontMetrics.width(leftHalf + ellipsis + rightHalf);
if (width < rect.width()) {
title = leftHalf + ellipsis + rightHalf;
- width = width;
break;
}
}