summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qpoint.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation with Clang on MacOS.Erik Verbruggen2013-02-191-10/+4
| | | | | | | | | | | | | | | | | | | | | | Apparently Clang does not like methods to be declared static inline, and then have their definition somewhere else. Error messages: ../../../include/QtCore/../../src/corelib/tools/qpoint.h:156:37: error: conflicting types for 'dotProduct' Q_DECL_CONSTEXPR inline int QPoint::dotProduct(const QPoint &p1, const QPoint &p2) ^ ../../../include/QtCore/../../src/corelib/tools/qpoint.h:77:40: note: previous declaration is here Q_DECL_CONSTEXPR static inline int dotProduct(const QPoint &p1, const QPoint &p2); ^ ../../../include/QtCore/../../src/corelib/tools/qpoint.h:338:40: error: conflicting types for 'dotProduct' Q_DECL_CONSTEXPR inline qreal QPointF::dotProduct(const QPointF &p1, const QPointF &p2) ^ ../../../include/QtCore/../../src/corelib/tools/qpoint.h:239:42: note: previous declaration is here Q_DECL_CONSTEXPR static inline qreal dotProduct(const QPointF &p1, const QPointF &p2); ^ Change-Id: I041b96d79506d2898daf40d70b37f02459de35bd Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Add static dotProduct methods to the QPoint(F) classesLaszlo Papp2013-01-261-0/+12
| | | | | Change-Id: I66ac9433b74341a83569a60038ea2f7a025e81b1 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Add unary operator+ to QPoint and QPointF.Mitch Curtis2012-07-121-0/+10
| | | | | | | | | | | | | As requested by Winfried Schenke: "QPoint should have an unary operator+ (the unary operator- exists). Classes with arithmetic operators should provide a complete set of operators, because some template code relies on it." Task-number: QTBUG-22913 Change-Id: Ib0c5105975f56c15f00bb48d83c8d911f5a204ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use factor and divisor wording to be consistent with the documentation and restLaszlo Papp2012-07-101-27/+27
| | | | | Change-Id: If05bdcba8f94f4220bae4c40dc5fc3cf44ee41a0 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* mingw: fix a lot of annoying warningsKonstantin Ritt2012-04-201-26/+26
| | | | | | | | | like "QRect::intersected() redeclared without dllimport attribute after being referenced with dll linkage" (-fno-keep-inline-dllexport) Change-Id: Id24e5ee857579ee9f97a60de0ab88ce3db8385cf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtCore: add constexpr to geometric classesMarc Mutz2012-02-221-68/+66
| | | | | | | | | | | | | | This turns code like QPoint(12, 12) into a compile-time expression, under a C++11 compiler, and allows to define arrays of these types that end up in read-only memory, just like PODs would. Some constructors and QLine::pointAt() needed to be adjusted to fit into the empty-body/only-return-expression requirement for constexpr constructors/functions. Change-Id: Id11ee2752c948930c3e40a91d1f6d7c97db7a373 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()Marc Mutz2012-02-201-0/+8
| | | | | | | | | There's no reason for them not to be, and it's a prerequisite for making these functions constexpr. Change-Id: I03c9965147b51014c7af60a4c2d7f25a3f6e21a7 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make QPoint have the same layout on all platformsGunnar Sletta2011-06-201-6/+0
| | | | | | | Change-Id: I8330295761a4440afd81c121039237fb651d9a9c Reviewed-on: http://codereview.qt.nokia.com/487 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+389
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12