Commit Graph

33225 Commits

Author SHA1 Message Date
Edward Welbourne
fcb423d1f2 Q(Date|Time)+: in QDebug's <<, handle invalid explicitly
The output didn't previously make clear that the datum was invalid.
It's now explicitly invalid.  At the same time, use QDebug's space()
and nospace() methods to make spacing choices explicit.
Revised a QDate test to match.

Change-Id: I4699f5897530b4caa31c22fdb07de149832b30f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 18:08:59 +00:00
Edward Welbourne
cc3b9cf3b3 Clarify tst_QDateTime::fromStringToStringLocale() using a macro
Separate the part varying between tests from the common form of all
the tests, so the reader can see the common pattern and know for sure
that there's not a typo or copy-and-paste glitch.

Change-Id: I3145a26ab42c104eb27756d906ac87f937024bad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 18:08:51 +00:00
Edward Welbourne
6d77ed23ef Call sinh() rather than implementing it using exp()
Change-Id: I8dda2f94524b19bcdec640e7541b04d46a6c3941
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-07 18:08:41 +00:00
Edward Welbourne
85a793075c Fix an egregious misnaming, s/deg([XY])/rad$1/g
The angles in question were in radians, not degrees;
we get them from std::atan().

Change-Id: Ifd60efbd975997ffca02e45ae884fb75e59806b4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-07 18:08:32 +00:00
Gabriel de Dietrich
ac8955794f tst_qstyle: Don't fail on empty scroller subcontrols on macOS
macOS hasn't had SC_ScrollBarAddLine and SC_ScrollBarAddLine
since 10.7, when transient scrollbars first appeared.

We also make the warning message a bit more informative.

Change-Id: Idef4684162456d9bc274eea77908a6afe24fa0f5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-07 17:54:53 +00:00
Gabriel de Dietrich
2673d05dc9 QMacStyle: De-Carbonize QScrollBar
Addresses drawing, hit testing, subcontrol rects and one metric.

Also fixes the knob width on hovered transient scrollbars. Since Cocoa
won't help for this (and never will), we do it manually.

For non-transient scrollbars, no more HITheme. That's why we're doing
this after all. It also comes with its own small hack; see how we darken
the knob when hovered.

We had to de-intertwine the logic with QSlider in drawComplexControl(),
which now gets its own full case CC_Slider statements. QSlider will be
addressed next.

Task-number: QTBUG-49585
Change-Id: Iced58d52fff0c11866bdf6eb562dbab36c8f3ef2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-07-07 17:54:39 +00:00
Giuseppe D'Angelo
353fb118c3 Fix detection of QMAKE_DEFAULT_LIBDIRS with Clang under Linux
With 4183475080, Qt fails to build if
qmake is unable to detect the compiler's default include and
library search paths. Clang on non-Darwin systems was missing working
code for the detection.

Unlike GCC, Clang on its own does not print the library search paths
when called with the -v option.

On Darwin, the -Wl,-v option will reach ld64, which will print those paths.
However, neither GNU ld nor gold will print anything useful with just
-v. GNU ld has a --verbose option that does print some search paths, but
those are not the ones used when ld is invoked (via collect2) by GCC or
Clang, so it can't be used.

To make Clang print its library search paths one can use
-print-search-dirs, which however doesn't print include search paths. So
amend the existing code in order to make a second call to clang on
non-Darwin systems. This second call is used for library path detection,
and fixes the build on non-Darwin (tested on Linux).

Change-Id: Ic858f908ee1a2e0eb307abb074daee0ded38abd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 16:23:46 +00:00
Alessandro Portale
f2db946fa4 QWidgets/FusionStyle: Fix menu drawing under HighDPI
Delegating the border painting to qDrawPlainRect ensures that there are
no off-by-one pixel issues.

Task-number: QTBUG-61845
Change-Id: I732795e048cbc2e5b279782e9a19700884f8bc40
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-07 16:23:45 +00:00
Friedemann Kleint
b6d5026b1f QWidgets/drawutils: Handle device pixel ratio != 1
The panel drawing helpers have code drawing shadows that relies
on working with integer coordinates and one pixel lines, which causes
artifacts when Qt High DPI scaling is in effect.

Add code that checks for device pixel ratio != 1 and in that
case reverts out the Qt High DPI scaling transformation and scales
the parameters so that the drawing code used device
pixels.

Task-number: QTBUG-58611
Task-number: QTBUG-59116
Change-Id: I8402044f3fd4dfcd349b31c573dcad12ae1f609f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-07-07 14:25:20 +00:00
Tor Arne Vestbø
9d3cd2268c macOS: Account for fullscreen geometry bug in AppKit on OS X 10.10
Task-number: QTBUG-61776
Change-Id: Ifac502cf422088eafe9211d759f2f5cd9769d0d3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-07-07 10:36:54 +00:00
Simon Hausmann
3fb0852091 Skip the dbus abstract adaptor test on OpenSuSE 42.1
It has been crashing for months...

Change-Id: I1d6077f949d642465771c4d618babc64ebc340f6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-07 09:40:14 +00:00
Friedemann Kleint
d7bfbf3a13 Windows QPA: Further restrict windows for WM_DPICHANGED
Exclude popups among other non-applicable windows types
from resizing in WM_DPICHANGED.

When resizing was enabled for non-fixed size windows
by c854fc5a6b
it turned out that context menus were truncated
when moving an application from a high resolution
to a low resolution monitor.

Factor out a function to check for the applicable window types.

Amends 886ce572d6,
c854fc5a6b.

Task-number: QTBUG-55510
Change-Id: I16fee07f3e11828848ec71cdceadff958cedb13a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2017-07-07 09:29:11 +00:00
Berthold Krevert
e53a57d254 Add Q_FALLTHROUGH
Change-Id: I14efe4dbffb5808f3f9b763f7dae38301a1f6e5c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-07 08:45:49 +00:00
Orgad Shaneh
5772cac426 qmake: Do not default to -pipe on Windows
It is considered slightly faster than the default mode[1],
but on Windows it causes trouble when aborting the build,
it leaves behind zero-sized object files which cause link
error. See discussion in the bug-make mailing list[2].

[1] https://stackoverflow.com/a/1512947/764870
[2] http://lists.gnu.org/archive/html/bug-make/2017-06/msg00066.html

Change-Id: I7aa0b328a8c743fdfe9b0aece02b329066515076
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 08:11:42 +00:00
Orgad Shaneh
e10be52e21 qmake: Separate object_script by Makefile name
If several Makefiles are used in the same directory (for example, for
multiple projects in the same directory or different build configurations),
they all reference the same object_script, which is obviously wrong.

Change-Id: I9b499ceb6b6bd6058f54b452fa44bfb2313eec26
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 08:11:44 +00:00
Friedemann Kleint
db404fea64 QListView: Fix viewport size when checking scroll bar visibility
Subtract the viewport margins from the contentsRect in
QCommonListViewBase::updateHorizontal/VerticalScrollBar(). This
affects list views in icon mode and list mode / ScrollPerPixel.

Task-number: QTBUG-61383
Change-Id: I6f2f7951ac9344ac21cef1eba061780d130e2467
Reviewed-by: David Faure <david.faure@kdab.com>
2017-07-07 08:10:01 +00:00
Thiago Macieira
9bec818ccc Use the namespace-mangled symbol for the qt_version_tag group name
Doesn't affect our current builds since it's just a marker for the
linker on what sections should be merged. Unless you're mixing
namespaced and non-namespaced static builds into one executable.

Change-Id: Ia53158e207a94bf49489fffd14c7bc294fccf8f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 07:22:03 +00:00
Thiago Macieira
c7ea60d1ab QWizard: Fix null pointer dereference if no pixmap was set
The pixmap may be set in QWizardPrivate::updateLayout() if there's a
side widget or a watermark. If neither exists, then no pixmap is set and
this would cause a crash.

Task-number: QTBUG-61423
Change-Id: Ia53158e207a94bf49489fffd14c80dd93415dd0f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-07 07:22:01 +00:00
Thiago Macieira
3509626128 QDeadlineTimer: round milliseconds up instead of down
Code like:
    QElapsedTimer timer;
    timer.start();
    QTest::qWait(30);
    QVERIFY(timer.elapsed() >= 30);

is failing, because qWait sleeps in increments of 10 ms and the last
chunk may be off by less than one millisecond, so we end up sleeping too
little and thus returning before 30 ms have elapsed.

This matches the QElapsedTimer::elapsed() code that rounds down:
    return nsecsElapsed() / Q_INT64_C(1000000);

Task-number: QTBUG-61741
Change-Id: Ic3a088f9f08a4fd7ae91fffd14cea4a91d3f51a8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-07-07 07:21:58 +00:00
Thiago Macieira
bcd19b723a QLocale: fix handling of milliseconds in string format and document
[ChangeLog][QtCore][QLocale] Fixed the conversion of QTime to string
form and parsing from string form to always treat the value as the
decimal fraction of the seconds component. That is, the string format
".z" produces/parses ".2" for 200 milliseconds and ".002" for 2
milliseconds. Use of "z" or "zzz" is discouraged outside decimal
fractions to avoid surprises.

Task-number: QTBUG-53565
Change-Id: Ia19de85ad35e4eb7bb95fffd14792caf9b4a5156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-07-07 07:21:53 +00:00
Friedemann Kleint
e1d7f7dfbc QFileSystemWatcher/Windows: Recreate handle for files
QWindowsFileSystemWatcherEngine uses one change notification
per directory to watch directories or files within that
directory. Adding files and their directories in a sequence
caused the value in QWindowsFileSystemWatcherEngineThread::HandleForDirHash
to be overwritten.
Relax the check for the flags (watcher attributes) to use >= and recreate
the change notification of a directory should its flags be insufficient.
This triggers when a file is added after its directory since files
require more attributes.

Task-number: QTBUG-61792
Change-Id: I371a72f1934fa82c53aaf84beb907825031f1c81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-07 07:02:45 +00:00
Tor Arne Vestbø
a4c8129d09 Relieve platform plugins of having to persist geometry on WM callbacks
We can offload this to QGuiApplication, just like the geometry of the
QWindow is set. This ensures that all platforms behave the same, and
that the documentation of QPlatformWindow::setGeometry is adhered.

Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-07 02:01:22 +00:00
Aram So
06904a7a77 Make calling QCoreApplication::translate() thread-safe
Fixed crash on QCoreApplication::translate() call from qqmlThread while
QCoreApplication::{install,remove}Translator() is called from the GUI
thread.

[ChangeLog][QtCore][QCoreApplication] Calling
QCoreApplication::translate() is now thread-safe.

Task-number: QTBUG-57095
Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-06 18:26:41 +00:00
Tor Arne Vestbø
8143f60026 macOS: Deliver native events to windows, as well as to event filters
Qt has two APIs to intercept native events today:

 - QAbstractEventDispatcher::installNativeEventFilter()
 - Q{Window|Widget}::nativeEvent()

On macOS we only implemented one of them, the native event filter code
path, by calling filterNativeEvent from the Cocoa event dispatcher.

We now also propagate the native event to the corresponding QWindow,
and QWidget if applicable.

It would be nice if there was only one Qt API for this, or at least
only one codepath for platform plugins to care about, but since the
event filter might catch more event types than gets delivered to the
window, we probably need both code paths going forward.

Task-number: QTBUG-40116
Change-Id: I0796bd62a2b7c08b2eaaf6f15db8088e9703af02
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-07-06 18:26:40 +00:00
Tor Arne Vestbø
b282d11873 macOS: Don't deliver events via NSWindow for deleted QCococaWindows
Change-Id: Icb3794f37c929019de1e997e15f7d975492224c2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-06 18:26:38 +00:00
Liang Qi
7f269a5db8 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf

Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
2017-07-06 13:54:25 +02:00
Alexandru Croitor
7beb2bc02b [Windows] Update hMonitor handles when a display is turned off
In a multi-monitor setup, when the main display is turned off or
disconnected, all remaining monitors have their hMonitor handle
changed. Qt did not store these updated handles, which led to not
posting the WindowScreenChanged event when a window was moved
to a different DPI-scaled display, leading to e.g. improperly
scaled popup menus.

The fix consists in updating the hMonitor handles whenever a new
monitor is connected or disconnected.

Change-Id: Id2ca2c128510d9ff3e9746eb33e86dce8f6c4c83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-06 09:15:13 +00:00
Gabriel de Dietrich
e4c39d5e1e QMacStyle: Bring back always visible close button in non-document QTabBar
This case is not supported by the Mac HIG, so we need to improvise
some colors that look better than those used in document mode.

Change-Id: I9858be468680303fdf65e17aa10ca1f90718b236
Task-number: QTBUG-61092
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-06 00:58:27 +00:00
Gabriel de Dietrich
462d26f265 qtabbar manual test: Improve usability
Covers non-document mode, tab icon, and adds a more
useable interface. Some parts are still missing, like
tab orientation and long tab titles.

Task-number: QTBUG-61092
Change-Id: Idbda84f513e3ff7f87fa04ae4476b11bd8bb6bf2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-06 00:58:17 +00:00
Gabriel de Dietrich
eaa54a8f98 QMacStyle: Properly polish and unpolish QTabBar
Task-number: QTBUG-61092
Change-Id: Id8b6caef264c61936a425757c6d8fac63142d5ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-06 00:58:08 +00:00
Thiago Macieira
9ca3443a37 Rename the "sys_auxv" feature to "getauxval"
Change-Id: I8d96dea9955d4c749b99fffd14cdbd1e69940d33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-06 00:23:59 +00:00
Thiago Macieira
d38122f4a2 Rewrite QFileInfo::{created,lastModified,lastRead} using fileTime()
Better code reusal.

Change-Id: I8d96dea9955d4c749b99fffd14cd72a7f4e040c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-06 00:23:57 +00:00
Thiago Macieira
11975fc9ec QFileInfo: use QFile::FileTime instead of our own enum
No need to duplicate the enum in two places.

Change-Id: I8d96dea9955d4c749b99fffd14cd6f887dd48a71
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-06 00:23:55 +00:00
Thiago Macieira
48e35e06ca QFSFileEngine: handle refreshing of file times better
Clear the known times when we write to it and always refresh for the
Access time.

Change-Id: I8d96dea9955d4c749b99fffd14cd6c03b4253197
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-06 00:23:53 +00:00
David Faure
f7aaff01de Fix Qt5DBusMacros.cmake for CMake 3.9
CMake gained support for running AUTOMOC on generated headers,
so we need to mark them with SKIP_AUTOMOC since we're generating
moc files for those already. Otherwise we get duplicated symbols.

Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-07-05 17:11:59 +00:00
Friedemann Kleint
c8602f45cc Remove WinCE-specific sipdialog example
Task-number: QTBUG-52590
Task-number: QTBUG-60635
Change-Id: Ie6d59d1431645faf93d1538fe9f5bf1bea9f3014
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-05 15:32:22 +00:00
Friedemann Kleint
5ed446102a Windows QPA: Take hasBorderInFullScreen into account when checking for fullscreen
Add a margin to the window geometry.

Task-number: QTBUG-61595
Change-Id: I12c557d7cfb1fe954a9845848c0777817c4cbf27
Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-05 15:32:10 +00:00
Thiago Macieira
f6ac7379ae QFileSystemEngine:🆔 use the proper QT_STATBUF/QT_STAT
Just in case.

Change-Id: I1eba2b016de74620bfc8fffd14ccaa801805ae02
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:43:51 +00:00
Thiago Macieira
08a39ecf33 QFileSystemEngine/Unix: use fchmod(2) if the file is open
This protects against the file having been renamed or deleted. We'll
still operate on the open file, regardless the name it may have on the
filesystem.

Change-Id: I1eba2b016de74620bfc8fffd14cca85cfd672e6d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:43:46 +00:00
Thiago Macieira
fb13510681 QFileSystemEngine::fillMetaData: fix apparent use of dangling pointer
It's not dangling only because of QFileSystemMetaData's construction:
the nativeFilePath() function returns a member variable. Since
QByteArray COWs, the pointer that we stored would not be freed.

But this was dangerous, since any change to the "entry" variable could
cause it to invalidate the member variable and the pointer to become
dangling. This line is only as old as this entire file is.

Change-Id: I8d96dea9955d4c749b99fffd14cda4d8e2cc5e5b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-07-05 14:35:20 +00:00
Stephan Binner
f065d0f128 Fix Windows build without features.filesytemiterator
Task-number: QTBUG-61671
Change-Id: I65a96ca51efee303602c836e5b0177b1a63d1a7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 14:03:09 +00:00
Stephan Binner
6a1046e176 Fix macOS build for -no-widgets
Task-number: QTBUG-61780
Change-Id: Icb337c4daeb976a6616dc289a5ffd0ec9345834f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 14:03:06 +00:00
Michael Winkelmann
7d42293d2f QVariant: Print a warning when deserialized user type is unknown
The deserialized user type is now shown to the user to figure which
QMetaType registration is missing.

Change-Id: I4b7624827e479b1bea67065ce3542183b7355165
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-07-05 13:52:11 +00:00
Timur Pocheptsov
594fe5c463 Convert features.localserver to QT_[REQUIRE_]CONFIG
Move all the logic into socket.pri and clean-up source
code. Build local socket/server only if feature 'localserver'
was enabled.

Task-number: QTBUG-61672
Change-Id: I9f9d1a262df4bb020c8706c7cb5a66b926e0240f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 13:44:59 +00:00
Thiago Macieira
d78fd6a1e5 QWinRTFileEngine: Property ItemDate is not the file's last access
The MSDN documentation says that it's a date that reflects the item
type, giving an example the date a photo was taken (probably as stored
in the EXIF metadata).

Change-Id: I8d96dea9955d4c749b99fffd14cd7616cc0da545
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-07-05 13:41:09 +00:00
Olivier Goffart
313c3cabe4 Prevent qmake to run moc on qobjectdefs.h
Change-Id: Ic453c88c36cbeb24f3dc4fa6b6b20aabe5d24e09
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-05 13:22:03 +00:00
Friedemann Kleint
d3d5c22ccb tst_QProcess/tst_QFile: Extend blacklisting to MSVC2017
Extend the blacklisting introduced by
0ebebeb983.

Task-number: QTBUG-48455
Task-number: QTBUG-48504
Change-Id: Idf44948a5ede433435a8d0b61fef6413bb0b69bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-07-05 12:42:14 +00:00
Allan Sandfeld Jensen
d866617ea6 Fix polygon stroking with cosmetic pen
Fix a number of issues that caused polygons to not always be drawn
fully connected.

Ensures the original lastPixel is set when drawing closed polygons,
ensure we don't round away from the original starting point, and add
handling of edges that need to be rounded half a pixel sideways to line
up with endpoints.

Task-number: QTBUG-27053
Change-Id: Ib51ee5623a629996af51a0967096383f04e91e2f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-07-05 12:35:26 +00:00
Jarek Kobus
8e40050efe uic: Don't clear and readd combobox items in retranslateUi
Task-number: QTBUG-61778
Change-Id: If7a15ef69fcfe459f177ff8b671f53a6022ab335
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-07-05 12:20:09 +00:00
Edward Welbourne
8095c33bcd Use qRadiansToDegrees() and qDegreesToRadians() more widely
Especially in examples, where we should show off our convenience
functions, prefer calling these functions over doing arithmetic with
M_PI (or approximations thereto) and 180 (give or take simple
factors).  This incidentally documents what's going on, just by the
name of the function used (and reveals at least one place where
variables were misnamed; the return from atan is in radians, *not*
degrees).

Task-number: QTBUG-58083
Change-Id: I6e5d66721cafab423378f970af525400423e971e
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-07-05 10:15:34 +00:00