summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-08-14 06:37:10 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-08-14 06:37:10 (GMT)
commitc80302a19f43ed1c39675a979762499fc589743a (patch)
treeb4f29d66fa335f28e07f2953fa8c48048f2203ab
parent0c831b8cf84c72ee8673d1d38f4e93e350dddd5f (diff)
downloadQt-c80302a19f43ed1c39675a979762499fc589743a.zip
Qt-c80302a19f43ed1c39675a979762499fc589743a.tar.gz
Qt-c80302a19f43ed1c39675a979762499fc589743a.tar.bz2
spel
-rw-r--r--src/gui/painting/qpainter.cpp10
-rw-r--r--src/gui/painting/qpainterpath.h4
-rw-r--r--src/gui/styles/qmacstyle_mac.mm10
-rw-r--r--tests/auto/qfontmetrics/tst_qfontmetrics.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 2ccb0c5..0762138 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -7487,8 +7487,8 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
QFontMetricsF fm(fnt);
QString text = str;
int offset = 0;
-start_lenghtVariant:
- bool hasMoreLenghtVariants = false;
+start_lengthVariant:
+ bool hasMoreLengthVariants = false;
// compatible behaviour to the old implementation. Replace
// tabs by spaces
bool has_tab = false;
@@ -7510,7 +7510,7 @@ start_lenghtVariant:
has_tab = true;
} else if (chr == QChar(ushort(0x9c))) {
// string with multiple length variants
- hasMoreLenghtVariants = true;
+ hasMoreLengthVariants = true;
break;
}
}
@@ -7634,9 +7634,9 @@ start_lenghtVariant:
}
QRectF bounds = QRectF(r.x() + xoff, r.y() + yoff, width, height);
- if (hasMoreLenghtVariants && !(tf & Qt::TextLongestVariant) && !r.contains(bounds)) {
+ if (hasMoreLengthVariants && !(tf & Qt::TextLongestVariant) && !r.contains(bounds)) {
offset++;
- goto start_lenghtVariant;
+ goto start_lengthVariant;
}
if (brect)
*brect = bounds;
diff --git a/src/gui/painting/qpainterpath.h b/src/gui/painting/qpainterpath.h
index 1adf315..e320c0b 100644
--- a/src/gui/painting/qpainterpath.h
+++ b/src/gui/painting/qpainterpath.h
@@ -298,9 +298,9 @@ inline void QPainterPath::lineTo(qreal x, qreal y)
lineTo(QPointF(x, y));
}
-inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLenght)
+inline void QPainterPath::arcTo(qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength)
{
- arcTo(QRectF(x, y, w, h), startAngle, arcLenght);
+ arcTo(QRectF(x, y, w, h), startAngle, arcLength);
}
inline void QPainterPath::arcMoveTo(qreal x, qreal y, qreal w, qreal h, qreal angle)
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 8736769..08b6ad8 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -4635,12 +4635,12 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
// no longer possible to move it, second the up/down buttons are removed when
// there is not enough space for them.
if (cc == CC_ScrollBar) {
- const int scrollBarLenght = (slider->orientation == Qt::Horizontal)
+ const int scrollBarLength = (slider->orientation == Qt::Horizontal)
? slider->rect.width() : slider->rect.height();
const QMacStyle::WidgetSizePolicy sizePolicy = widgetSizePolicy(widget);
- if (scrollBarLenght < scrollButtonsCutoffSize(thumbIndicatorCutoff, sizePolicy))
+ if (scrollBarLength < scrollButtonsCutoffSize(thumbIndicatorCutoff, sizePolicy))
tdi.attributes &= ~kThemeTrackShowThumb;
- if (scrollBarLenght < scrollButtonsCutoffSize(scrollButtonsCutoff, sizePolicy))
+ if (scrollBarLength < scrollButtonsCutoffSize(scrollButtonsCutoff, sizePolicy))
tdi.enableState = kThemeTrackNothingToScroll;
}
@@ -5109,9 +5109,9 @@ QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc,
// The arrow buttons are not drawn if the scroll bar is to short,
// exclude them from the hit test.
- const int scrollBarLenght = (sb->orientation == Qt::Horizontal)
+ const int scrollBarLength = (sb->orientation == Qt::Horizontal)
? sb->rect.width() : sb->rect.height();
- if (scrollBarLenght < scrollButtonsCutoffSize(scrollButtonsCutoff, widgetSizePolicy(widget)))
+ if (scrollBarLength < scrollButtonsCutoffSize(scrollButtonsCutoff, widgetSizePolicy(widget)))
sbi.enableState = kThemeTrackNothingToScroll;
sbi.viewsize = sb->pageStep;
diff --git a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
index f827bfc..9a743ef 100644
--- a/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
+++ b/tests/auto/qfontmetrics/tst_qfontmetrics.cpp
@@ -71,7 +71,7 @@ private slots:
void elidedText();
void veryNarrowElidedText();
void averageCharWidth();
- void elidedMultiLenght();
+ void elidedMultiLength();
};
tst_QFontMetrics::tst_QFontMetrics()
@@ -203,7 +203,7 @@ void tst_QFontMetrics::averageCharWidth()
QVERIFY(fmf.averageCharWidth() != 0);
}
-void tst_QFontMetrics::elidedMultiLenght()
+void tst_QFontMetrics::elidedMultiLength()
{
QString text1 = "Long Text 1\x9cShorter\x9csmall";
QString text1_long = "Long Text 1";