Commit Graph

29169 Commits

Author SHA1 Message Date
Thiago Macieira
12eacc3bab Long live QDeadlineTimer
It's like QElapsedTimer, but marks a time in the future instead.

[ChangeLog][QtCore] Added QDeadlineTimer, a counterpart to
QElapsedTimer, used to mark a time point in the future (a deadline) and
determine whether such a deadline has passed.

Change-Id: Ifea6e497f11a461db432ffff144921f7fbc1d1d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-15 03:07:16 +00:00
J-P Nurmi
906fc0f5e3 Add Q_DECLARE_OPERATORS_FOR_FLAGS(QStandardPaths::LocateOptions)
QStandardPaths::LocateOptions was declared with Q_DECLARE_FLAGS(),
but missing Q_DECLARE_OPERATORS_FOR_FLAGS().

Change-Id: Id4ab1b1c86cdc9e79fb324d9b9d4d8deb659f718
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-14 18:43:48 +00:00
J-P Nurmi
af87bf4b14 Register QStandardPaths enums & flags
This allows QML StandardPaths to use the same enums without having to
duplicate them.

Change-Id: Ibfc63a97a8ba31e5c4dc11e3e8fee9d753087c54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-14 12:41:49 +00:00
Marc Mutz
dbea509223 AtSpiAdaptor: eradicate Q_FOREACH
In getActions(), simplify the code some more.

Change-Id: I93699d09f701959a4206f84becfb80d4d2a1d410
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-08-13 17:15:00 +00:00
Marc Mutz
d08db11008 Remove last uses of Java-style (non-mutable) iterators from QtBase
Change-Id: I7531ffd4f2d5b2193bb6231c743ff0a074618b99
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-13 17:14:56 +00:00
Marc Mutz
9c016cefe9 QFuture(Interface): remove unneeded special member functions
The compiler-generated ones are just fine.

This is BC because the class is not exported and
QFutureInterfaceBase (needlessly) contains virtual
functions (the dtor), so this class will never be
trivially copyable. It's also not movable, until I
figure out how to add move special member functions
to QFutureInterfaceBase.

Also made the QFutureInterface(State) constructor
explicit, because a State is not a faithful
representation of a QFutureInterface.

Change-Id: Ifa44f87b41c4ee3c5167c282512ec4860075671d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-13 05:34:51 +00:00
Allan Sandfeld Jensen
fcd3c11945 Improve vectorized bound calculations
Adds a proper bound calculation to vectorized rotated sampling to avoid
checking inside the loop, and fixes the existing bounds check to use
the incrementor fdx instead the float value it was calculated from
which may cause different rounding.

Change-Id: I5226926a142573c026db5504414204b6ee8dd8a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-12 22:27:17 +00:00
Oswald Buddenhagen
4a1bafcc4e get rid of test type 'shell'
it's bound to the bourne shell, which is not readily available on
windows hosts.

on the way, the pch, fvisibility, and bsymbolic_functions tests were
rewritten as regular compile tests. they now just verify that qmake's
built-in support for the tested features actually works.

Change-Id: Ibac246f21b5ececa40da3f576dc789982eaf9fdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-12 22:04:50 +00:00
Oswald Buddenhagen
ce50eb4a73 nuke forgotten orphaned test (xkb)
d520c825f already mentioned it, but failed to actually remove it.

Change-Id: I3aef8f057baad1c1c66aab8b3e5c4e879a544834
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-12 22:04:07 +00:00
Lars Knoll
deeb9f7fde Remove dead code relating to largefile
We set CONFIG+=largefile directly from configure, and there is never
a largefile feature in QT_CONFIG.

Change-Id: I3518c749d674529b272685b6ed6c738e48ee5cd7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-12 22:03:57 +00:00
Oswald Buddenhagen
a60b0d5b12 remove left over debug message
Change-Id: I2750e9561c006e7e9dae569af0e1c9095cb1b8f7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-12 22:03:33 +00:00
Oswald Buddenhagen
2b31f47098 rename the -redo status file to config.opt
configure.cache is really kinda misleading.

the old name is still recognized for backwards compat.

Change-Id: I5ca461e99a0f9336ad70adfa5b8f6bb81ad73bbb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-12 22:03:05 +00:00
Oswald Buddenhagen
2d83e28f08 remove redundant LIBS += -lGAL
it's part of the egl libs.

Change-Id: Id41909f2e1cc5a6a1a22a49d4bf24da43e69a417
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-12 14:48:46 +00:00
Marc Mutz
805cc2cc10 QRegion: mark as shared
For BC reasons, it can only be NOT_MOVABLE_UNTIL_QT6.

Change-Id: I09e158e0f6ce24f47ad4d19ea78832dbd2352db3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-08-12 13:38:44 +00:00
Morten Johan Sørvig
ac899f6d60 Cocoa: use QImage::toCGImage()
Keep behavior of converting via Format_ARGB32_Premultiplied
for unsupported formats

Change-Id: I64083a88a99640dde42a0a201ce8ea08affe5259
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-12 12:33:42 +00:00
Marc Mutz
033ebfae21 QSslDiffieHellmanParameters: make fit for release
- add missing \since 5.8 on free functions
- fix \relates of qHash to point to QSslDHP, not QHash, which is in another module
- API fix: use named instead of unnamed ctors
- share code between ctors
- API fix: add inline move ctor (for now, this requires using a naked d pointer,
  which isn't much of a problem, since the class is immutable).

Change-Id: Ic30f9c3c03b8a3798e0676e38991ead85c587214
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-08-12 12:33:07 +00:00
Kai Koehne
7c5ccdd83b Add list of 3rd party code attributions to Qt Core, Qt GUI, Qt SQL
Also document the current license the modules are available from,
since this is not consistent anymore across Qt.

Task-number: QTBUG-55139
Change-Id: I117fdb0cda7bd7ff92aa825e29c28f22a8a2f96d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-12 06:55:08 +00:00
Kai Koehne
357a35eaf0 Add \externalpage for The Qt Company
Change-Id: If8f8e949c6c6799fbe2e382fee3b1fcccab6a350
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-12 06:55:04 +00:00
Kai Koehne
492ca3e503 Add qt_attribution.json files
The format is documented in

  http://wiki.qt.io/Qt_attribution.json

Also add a LICENSE file in case there is none yet
(usually copied from the source headers).

Task-number: QTBUG-55139
Change-Id: Ib54c73d0bb9946cfd8579e86c6858035184ca516
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-12 06:55:01 +00:00
Simon Hausmann
8e29d463dc Make imageAt and formatAt more robus against different font metrics
Don't try to locate the text by coordinates at the edge of the text but
simply aim at the center vertically _and_ horizontally.

Task-number: QTBUG-52991
Change-Id: Ia9e84fc5d12491840e739c4eea730fe13058f3c7
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
2016-08-12 03:59:23 +00:00
Gabriel de Dietrich
7833f7bc06 QCoreTextFontEngine: Remove calls to deprecated API on macOS
CGContextShowGlyphsWithAdvances has been deprecated since 10.9.
We use instead CTFontDrawGlyphs as recommended by Apple.

Change-Id: I568bf588f403228e3b695e42dfe39de807537a9d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-12 01:00:37 +00:00
Morten Johan Sørvig
b0abe20d4b Darwin: Add QImage::toCGImage() conversion function
(Move QT_FORWARD_DECLARE_CG to qglobal.h)

This function converts to CGImage for supported formats. This
is done by creating a CGImageRef that reuses the QImage data.

The CGImage and QImage ref counting systems are bridged, implemented
by using CGDataProvider that holds a copy of the QImage.

Unlike the previous internal implementation this public version
does not implicitly convert unsupported formats to ARGB32_Premultiplied.

See included documentation for the complete description.

Change-Id: Ie3984a7a8331e02a6f1c42943caaf76854e93538
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-11 21:21:05 +00:00
Laszlo Agocs
dfae6a7593 evdevtouch: Enable touch in multi-screen eglfs environments
Parse the touchDevice property from the KMS/DRM config file. When all
outputs have an explicitly specified index in the virtual desktop, we
can set up a mapping between the device node and the screen index. It
is somewhat fragile (device nodes may change, requires explicit
virtualIndex properties for all outputs, etc.) but better than
nothing.

For example, having the screen on DisplayPort as primary and the
touchscreen on HDMI as the secondary screen breaks by default because
touching the second screen generates touch (and synthesized mouse)
events for the first screen.  Assuming the touchscreen is
/dev/input/event5, the issue can now be fixed by setting
QT_QPA_EGLFS_KMS_CONFIG with a configuration like the following:

  {
    "device": "drm-nvdc",
    "outputs": [
      {
        "name": "HDMI1",
        "touchDevice": "/dev/input/event5",
        "virtualIndex": 1
      },
      {
        "name": "DP1",
        "virtualIndex": 0
      }
    ]
  }

Task-number: QTBUG-54151
Change-Id: If97fa18a65599ccfe64ce408ea43086ec3863682
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-08-11 21:11:43 +00:00
Laszlo Agocs
2afead0211 eglfs: Configurable screen order in the virtual desktop
Say one wants a virtual desktop with the display on HDMI above
the display on DisplayPort:

{
  "device": "drm-nvdc",
  "virtualDesktopOrientation": "vertical",
  "outputs": [
    {
      "name": "HDMI1",
      "virtualIndex": 0
    },
    {
      "name": "DP1"
    }
  ]
}

Undefined virtualIndex values map to INT_MAX and will go after the
explicitly specified ones. However, the sorting is stable so the original
order from the DRM connector list is preserved between such outputs.

Task-number: QTBUG-55188
Change-Id: I204fb08205ea7dbfbcdefd1d22ed22f5387f3e8c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-08-11 21:11:32 +00:00
Timur Pocheptsov
ce2419af89 Document HTTP2Allowed attribute
Change-Id: Ia318bf4b73f4716106f60370ed9ddff94f677eba
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-11 17:47:08 +00:00
Timur Pocheptsov
69ff49e8f1 Enable cleartext HTTP/2 and bring the auto-test back to life
HTTP/2 does not require TLS connection, it can work in a cleartext mode.
Plus at the moment only OpenSSL backend  allows HTTP/2 negotiation
via ALPN/NPN (and none of our CI configurations with OpenSSL supports
these extensions, rendering HTTP/2 auto-test useless). This patch
implements cleartext HTTP/2 ('h2c') in 'direct' mode - this is
allowed if a client has a prior knowledge that HTTP/2 is supported by
a server.

Change-Id: I4978775e9732c40bc77f549b83bb4a5d1761887e
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-11 15:38:20 +00:00
Timur Pocheptsov
193abdfc07 http2frame - do not rely on a socket's buffer
- Whenever we have a read notification, read this data, even if it's not
  enough for a frame's header - otherwise, QNAM can use a socket
  in an Ubuffered mode and FrameReader can potentially fail to read
  anything correctly.

- Do not call/rely on bytesAvailable and do not try to invoke
  _q_receiveReply in Qt::QueuedConnection mode, instead try to read
  until we end up in an incomplete frame or some error.

Change-Id: I7f44ba9e34bc64f3e26bd29080f0050da635b3ae
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-11 12:45:59 +00:00
Oswald Buddenhagen
615616b069 add some unix-specific options understood by configure.exe
it's really a bit weird that the windows configure has more options to
configure unix features than the unix one, even if some are just
workarounds for missing auto-detection.

unlike in configure.exe itself, -posix-iconv is now also understood for
symmetry with -gnu-iconv and -sun-iconv.

Change-Id: Ic15376e5822e43b998bd17f02c11e5dd0567dc2b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:05:55 +00:00
Oswald Buddenhagen
0a434cc00f add missing 'disable' fields to {sun,gnu}-libiconv features
Change-Id: Ieed30c1cf388157c47c8a58979b8c214223d351a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:05:45 +00:00
Oswald Buddenhagen
30cac3ed2d refactor the configure help output
- remove the redundantly listed -no-* options and indicate the defaults
  differently
- completely regroup the options into somewhat logical sections

Change-Id: Iaa87c2f3749944cd3fc2ec18975767c04892f746
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:05:41 +00:00
Lars Knoll
c41dd40bff Fix ssl handling in configure to be compatible with configure.exe
Change-Id: I0fdd3aebaa9d2a4c68ee6ebc0b7a24868f3c2aa5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-11 08:05:37 +00:00
Oswald Buddenhagen
e23471abc0 fix quoting in the basic qmake command construction
... and refactor it to make it less scary.

note that "qmake_args" now basically means "qmake + args".

Change-Id: Ifa5b756642de95e2aadf01606d936ea1d7a18210
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:05:27 +00:00
Oswald Buddenhagen
b093aec1d1 don't use error() for user errors, take 2
missed configure.pri previously.

Change-Id: Ie642526a830ca6471d3f92507c7b22c812db0d86
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:05:05 +00:00
Oswald Buddenhagen
622ab0aca5 use qtLog() to also print command output
Change-Id: I950bc86b0b2dafcb8f2369478f391dc05280194f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:59 +00:00
Oswald Buddenhagen
f18cc7e3cc fix configure qtLog()
its actual function was qtLogCommand(), but all callers outside
configure_base.prf apparently didn't know that. adjust implementation.

Change-Id: I910d4ba33c6f31debc81c37e3bfff1a288190355
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:55 +00:00
Oswald Buddenhagen
615b9c1f06 make sure that we capture the entire test command's output
the command can be a compound statement (usually 'foo && bar' style),
so enclose it in parens before redirecting stderr.

Change-Id: Ib72a2c8ddfd17bf9457e9cfe2652121258ce9a64
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-11 08:04:44 +00:00
Oswald Buddenhagen
46cb5a4dce make it impossible to lie about the feature an output belongs to
overriding an output's 'feature' field would just lead to confusing
error messages. the right way is setting the 'name' field.

adjust the 'dbus' library output to this policy.

Change-Id: I912133f3a0a50fc55f2e16a1ed6bfa464aae8d88
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:29 +00:00
Oswald Buddenhagen
4f8b40d74e make the egl-viv and egl-brcm config tests less convoluted
don't mix in gles2 stuff, and rely on the library definitions from the
mkspec.

Change-Id: Id81b27a8c4f24729866d3ceb5cf97b443def542c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:25 +00:00
Oswald Buddenhagen
1e6b403ecc restore lost egl-mali-2 test
Change-Id: I6e9e8244768d7e702a8a20ed18f5f0293dfefead
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:20 +00:00
Oswald Buddenhagen
337ce2fa68 rename the eglfs-* tests
the test names should be about the dependency, not the purpose.

Change-Id: I6e45f4caa36e6c6a9e62092416bcab89893db3d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:16 +00:00
Oswald Buddenhagen
9945763cab remove redundant x11 handling
one of the effects of CONFIG+=x11 is LIBS+=$$QMAKE_LIBS_X11, so it's
positively pointless for project files to do the same.

Change-Id: I4085acd6254401897b34e131c2cb57f1f76a3638
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:11 +00:00
Oswald Buddenhagen
d520c825f1 delete orphaned config tests
mitshm, xcursor, xfixes, xrandr, xshape, and xsync were dead for a long
time (see also 4cb795cbdb).
glxfbconfig was also dead (see also d54b77d55).
x11/notype and x11/xkb became dead in 4535913c4f.
javascriptcore-jit became dead in 24f1025663.
stdint was another webkit vestige (see also 1b716724f7).

Change-Id: I04f408cb917c767951645c6445f15f24378fa43a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:06 +00:00
Oswald Buddenhagen
08f6545dcb fix over-quoting of OPENSSL_LIBS and QT_HOST_CFLAGS_DBUS
we pass the pre-quoted value directly to the output function, which
adds another layer of quoting. to avoid over-quoting, introduce the
'eval' attribute which sends the value through eval() first, thus
removing the extra quoting.

Change-Id: Ic63a50cb7eccc61b0f730476e124339aeb95586c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:43:02 +00:00
Oswald Buddenhagen
bcd0653e10 fix exit paths when pkg-config is not found
while the previous code actually worked, it's probably more or less
coincidence that running "false" produces the correct result.

Change-Id: Ib332bd6789ac7188570ba1af4676494b4e2c9d8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:57 +00:00
Oswald Buddenhagen
472332559a fix use_gold_linker not being used by compile tests
Change-Id: Ib43ddb5174fd2d9b45f3c1a3e6d90f2b8f0dddd1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:50 +00:00
Oswald Buddenhagen
9987b1dc69 platform-scope the test executables the arch test is looking for
this is clearer, and avoids potential false hits if the target OS
is changed without cleaning the build dir first.

Change-Id: If88f3c555740dc9ff559c172b4b005ed8bfb60ae
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:45 +00:00
Oswald Buddenhagen
52b3a81865 don't distclean before every compile test run in non-clean build dir
due to gmake's Makefile auto-rebuild feature, the distclean would
typically invoke qmake. overall, the step would almost double the run
time of each compile test.

instead, just clean between the regular qmake and make steps. this
deletes the object file the test executable depends on, so this is
sufficient to trigger a full rebuild.

Change-Id: If8e254e172dd169e31fd606d9ef31d9a14f670d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:40 +00:00
Oswald Buddenhagen
a4e1bc5b13 fix 'test' field checking in qtConfOutput_library()
Change-Id: I7cfcc33e188713f32d31e023999f5059c0bd05b1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:33 +00:00
Oswald Buddenhagen
0eff800e81 add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().

Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:29 +00:00
Oswald Buddenhagen
62838f07d4 fix handling of multi-token fields in config test definitions
standardize on the fields in the json structure being single strings in
which separate elements are quoted and space-joined (because quoting
is unlikely to be necessary in the json file itself, and this format
avoids the visual noise of array handling).

the quoting itself is expected to be qmake-compatible, which is assumed
to be the case for the output of pkg-config (it's actually shell-quoted,
but that's the same except in some not-so-relevant corner cases).

Change-Id: Icc1d7abc02c449fa759d9714bc5e56e2b8809585
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-10 15:42:23 +00:00