diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-01-08 11:55:25 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-01-08 11:55:25 (GMT) |
commit | 30d45394f59c25fc2c3e7e30da4e49bf9744de76 (patch) | |
tree | 8483a7b767bb36023f90bca39f8512dc11553f22 /src/corelib/tools | |
parent | d170179f00effe691de23167e02ff5aeecaeb054 (diff) | |
parent | 2e62227f950aac8205f2b67e4d7d046836b2c799 (diff) | |
download | Qt-30d45394f59c25fc2c3e7e30da4e49bf9744de76.zip Qt-30d45394f59c25fc2c3e7e30da4e49bf9744de76.tar.gz Qt-30d45394f59c25fc2c3e7e30da4e49bf9744de76.tar.bz2 |
Merge remote branch 'origin/master'
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qline.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qlocale.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index d0afb7a..8112757 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -574,7 +574,7 @@ qreal QLineF::angle() const const qreal dx = pt2.x() - pt1.x(); const qreal dy = pt2.y() - pt1.y(); - const qreal theta = atan2(-dy, dx) * 360.0 / M_2PI; + const qreal theta = qAtan2(-dy, dx) * 360.0 / M_2PI; const qreal theta_normalized = theta < 0 ? theta + 360 : theta; @@ -814,7 +814,7 @@ qreal QLineF::angle(const QLineF &l) const qreal cos_line = (dx()*l.dx() + dy()*l.dy()) / (length()*l.length()); qreal rad = 0; // only accept cos_line in the range [-1,1], if it is outside, use 0 (we return 0 rather than PI for those cases) - if (cos_line >= -1.0 && cos_line <= 1.0) rad = acos( cos_line ); + if (cos_line >= -1.0 && cos_line <= 1.0) rad = qAcos( cos_line ); return rad * 360 / M_2PI; } diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index c2280c6..3a5de2d 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -1187,14 +1187,14 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const } case DateFormatLong: case DateFormatShort: - return macToQtFormat(getMacDateFormat(type == DateFormatShort + return getMacDateFormat(type == DateFormatShort ? kCFDateFormatterShortStyle - : kCFDateFormatterLongStyle)); + : kCFDateFormatterLongStyle); case TimeFormatLong: case TimeFormatShort: - return macToQtFormat(getMacTimeFormat(type == TimeFormatShort + return getMacTimeFormat(type == TimeFormatShort ? kCFDateFormatterShortStyle - : kCFDateFormatterLongStyle)); + : kCFDateFormatterLongStyle); case DayNameLong: case DayNameShort: return macDayName(in.toInt(), (type == DayNameShort)); |