summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2011-08-30 08:40:03 (GMT)
committerCasper van Donderen <casper.vandonderen@nokia.com>2011-08-30 08:40:03 (GMT)
commit7f27ebb0383414f15f391151655e5b09952f8ccd (patch)
tree8af7b866af6115924a13896013f5b6f5da686de6 /src/corelib/tools
parent3dccb66b3b81627fb70c7eeccdf32b96d8add8b7 (diff)
parent78c5825cfb7702350636b7624bf79311dbd0dbd5 (diff)
downloadQt-7f27ebb0383414f15f391151655e5b09952f8ccd.zip
Qt-7f27ebb0383414f15f391151655e5b09952f8ccd.tar.gz
Qt-7f27ebb0383414f15f391151655e5b09952f8ccd.tar.bz2
Merge remote branch 'mainline/4.8'
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/corelib/tools/qdatetime.cpp5
-rw-r--r--src/corelib/tools/qline.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 767b713..a8edea4 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -541,7 +541,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
- if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
@@ -561,7 +561,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
- if (len >= (1 << 31) - sizeof(QByteArray::Data)) {
+ if (len >= ulong(1 << 31) - sizeof(QByteArray::Data)) {
//QByteArray does not support that huge size anyway.
qWarning("qUncompress: Input data is corrupted");
return QByteArray();
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 085103c..8e4fb32 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -4040,8 +4040,11 @@ static QDateTimePrivate::Spec utcToLocal(QDate &date, QTime &time)
RTz tz;
User::LeaveIfError(tz.Connect());
CleanupClosePushL(tz);
- res.tm_isdst = tz.IsDaylightSavingOnL(*tz.GetTimeZoneIdL(),utcTTime);
+ CTzId *tzId = tz.GetTimeZoneIdL();
+ CleanupStack::PushL(tzId);
+ res.tm_isdst = tz.IsDaylightSavingOnL(*tzId,utcTTime);
User::LeaveIfError(tz.ConvertToLocalTime(utcTTime));
+ CleanupStack::PopAndDestroy(tzId);
CleanupStack::PopAndDestroy(&tz));
if (KErrNone == err) {
TDateTime localDateTime = utcTTime.DateTime();
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp
index 0f67652..af3b7d5 100644
--- a/src/corelib/tools/qline.cpp
+++ b/src/corelib/tools/qline.cpp
@@ -564,9 +564,8 @@ qreal QLineF::length() const
Returns the angle of the line in degrees.
- The return value will be in the range of values from 0.0 up to but not
- including 360.0. The angles are measured counter-clockwise from a point
- on the x-axis to the right of the origin (x > 0).
+ Positive values for the angles mean counter-clockwise while negative values
+ mean the clockwise direction. Zero degrees is at the 3 o'clock position.
\sa setAngle()
*/