Simply allocate objects on the stack instead of the heap.
Change-Id: Ic047d78e49668878821cce1c8ab599a8551b6476
Reviewed-by: David Faure <david.faure@kdab.com>
In QStringListModel, the display and the edit roles are synonyms,
so when one is changed, the other changes with it. However, in
setData() we only emitted a vector with just the role that was
passed in by the user.
Fix by always passing both roles, regardless of which one was used
to set the data.
Change-Id: I498e7cb33796fae266901817b01ad85d861d4bb4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This gives a chance for some cleanups at least.
Change-Id: I3a628e32c6fc8c7fa00943769210c517005f2a0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
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>
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>
(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>
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>
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>
When pressing the Command key, or any other modifier key,
Cocoa will filter whatever the application has set in the
QDrag object. However, Qt is already taking all this into
account, so we should not let yet another voice chime in.
Task-number: QTBUG-55177
Change-Id: I7c56e72d846d10cdfc132776bdfdd6b79799bcff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
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>
- 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>
Visual Studio automatically defines _WINDLL when building a DLL,
regardless of project settings
(https://msdn.microsoft.com/en-us/library/8x480de8.aspx). This define
is therefore widely used to detect DLL vs. static library or executable
build target on Windows.
For makefiles, _WINDLL need to be manually defined, which QMake failed
to do so far.
Task-number: QTBUG-55183
Change-Id: Ic62201666c44e730e6881706d568ce9eaf22b7a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This doesn't cover FBOs bound directly with glBindFramebuffer(),
but it's perfect to create a fast path for code we know uses QOGLFBO,
thus avoiding expensive glGetIntegerv() driver calls.
The use case is to use this in QSG24BitTextMaskShader::activate(), where
we need to check if the current FBO is sRGB capable.
Change-Id: I434eeeb7e6a3d16be9327315536ad7280245085d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
I am not convinced toUpper/toLower is a generally sound solution here;
however, QLocale doesn't make the upper/lower case distinction this
parser does and a bug report shows tr() isn't doing an adequate job.
Task-number: QTBUG-47815
Change-Id: Iaf654d1d76d4c38d74fc647e168d50debb924a8f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
- 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>
... 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>
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>
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>
According to documentation, waitForReadyRead() returns 'true' if
the readyRead() signal is emitted and there is new data available
for reading. Thus, waitForReadyRead() is being blocked in cycle
until canReadNotification() will return 'true'. This patch
adjusts canReadNotification() to return 'true' only when new data
arrives on buffered socket that ensures waitForReadyRead() to
succeed correctly.
Change-Id: Ic38c4a4dd8ef9128f04b6c1d5f3d03068f6c9894
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The deleteLater() call wasn't reliably reached when tests fail,
so use a QScopedPointer with QScopedPointerDeleteLater deleter.
Change-Id: Ica73bc73c2a0ac1e9b77e4804f2aedcad9b662a0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
The test no longer writes to SRCDIR, so don't try to remove
generated files from there, either.
Amends bb5570082e.
Change-Id: I1d5df88b1865f3dbd914ec71147de61e173f2f4e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Value was inverted.
Found by own code review.
Change-Id: I2027d97e1f9d52f6d79fb72ecad9ee2034f9af25
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
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>
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>
the test names should be about the dependency, not the purpose.
Change-Id: I6e45f4caa36e6c6a9e62092416bcab89893db3d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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>
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>
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>
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>
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>
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>
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>