Commit Graph

30377 Commits

Author SHA1 Message Date
Oswald Buddenhagen
4d90bd55a5 re-arrange QLibraryInfo::rawLocation() for comprehensibility
swap the branches for (not) reading from qt.conf, and use a state
variable instead of an 'else' for mutual exclusion. this is somewhat
more self-documenting, and allows for a saner handling of the mkspec
fallbacks (which really should have been in a separate [QMake] section
along with Host* and Sysroot, but changing that now is way too much
hassle downstream).

Change-Id: I80a73294022fd1e8d84fe501b737c4fc7758662f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:36 +00:00
Oswald Buddenhagen
c16593fd0b build qmake.exe directly in bin/
so far, qmake.exe was built in qmake/ and then copied to bin/, with
possible errors in the second step ignored. this made no sense.

this unifies the nmake makefile with the unix one; compare 46e51ce1d.

Change-Id: Ieb9c7cd46f0be0501d17e297808ac1cdad1b3c4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:31 +00:00
Oswald Buddenhagen
c05f0a83fd qmake: make discard_from() patch up QMAKE_INTERNAL_INCLUDED_FILES as well
when the file's effects are discarded, the mention of the file should be
as well.

Change-Id: I894b7e2b887dd34d18533b197bfa9d0d84d647e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:27 +00:00
Oswald Buddenhagen
965e861e61 qmake: let discard_from() discard function definitions as well
for completeness.

Change-Id: I3ffc14e041408c773e277442828170e3df04ec8d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:23 +00:00
Oswald Buddenhagen
cff05b398c qmake: add "undecorated" mode to $$prompt()
the normal mode forces the prompt into a pattern which may be
undesirable.

Change-Id: I01689c7a6573415801862348b32bafc6a609ed4a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:18 +00:00
Oswald Buddenhagen
712a041eb8 qmake: don't look for qrc-based qt.conf
we know there is none.

Change-Id: I75bc39f8b900525e7db29664f7dd2117d2bd33d2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:14 +00:00
Oswald Buddenhagen
4e96c4c533 qmake: fix file name treatment in emission of extra targets
that is, adjust path separators and don't quote them. we already did
that to some degree, but totally inconsistently, so it just didn't work
for any targets with "fancy" file names.

note that we don't bother doing that for recursive targets, as these are
assumed to be identifiers.

Change-Id: Ic75f003b71abc6fed03a4121b903ad5ee8253ed2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:09 +00:00
Oswald Buddenhagen
71fd040318 qmake: fix /dev properties with -external-hostbindir
if the externally provided qmake had a different on-device install tree
layout, things would go wrong. of course, that's a rather unlikely case,
so nobody noticed ...

Change-Id: I59f9976a769ccb6099b7237ef42555f0549615aa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:05 +00:00
Oswald Buddenhagen
2b6bcd5ff3 make use of $$QMAKE_QMAKE
there is no need to reconstruct it from scratch.

Change-Id: Ied6f88634f1875b4aa47a39af0d0d89a7ad4a654
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:00 +00:00
Oswald Buddenhagen
d442a9a4e6 ensure that QMAKE_QMAKE always ends in .exe on windows
Change-Id: I72d5eda83250a0c33af505005732c3f370a04c57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:56 +00:00
Oswald Buddenhagen
b5464f4237 bump qmake version
there are plenty new functions, let's do this symbolic act.

Change-Id: Iaeb88afa5e33cacd81dc0ea26e380a16af06a739
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-15 22:43:51 +00:00
Oswald Buddenhagen
6cd358db7e mark up output of called commands in configure log
otherwise it's sometimes quite hard to tell it apart from configure's
own messages.

Change-Id: I2f4908344367a9a3ce38e032bf76486fc4552ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:46 +00:00
Oswald Buddenhagen
5c263bf984 configure: fix parsing of -hostprefix without argument
Change-Id: I94c0bc40e4f995d2c50bea828adcf8ed8bb96a90
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:42 +00:00
Oswald Buddenhagen
d01c774f45 configure: fix caching of includedir results
amends ce7df6ac7.

Change-Id: Id56ee59b5955addb58cc4d0879dc097bdd7841d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:37 +00:00
Oswald Buddenhagen
fa8e467804 fix configure logging when no cache is present yet
this got broken in 2ad4d75754.

however, the new configure system operates from the top-level build dir
anyway, so there is no point in messing with the cache as a reference
point to start with - just use OUT_PWD.

Task-number: QTBUG-57120
Change-Id: I69629bf497931574bff8452939170abb1776ab60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:28 +00:00
Oswald Buddenhagen
e71cf69217 fix directfb build
60985aa42 converted the QT_CONFIG use, not taking into account that the
feature isn't actually known to the configure system - it's coming
directly from the makespec. so revert that hunk (until we have a better
integration between makespecs and configure).

Task-number: QTBUG-57039
Change-Id: Iaf57b5f5339250055f1c378e091da3ab3fcd4292
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-15 22:43:19 +00:00
Allan Sandfeld Jensen
887e260a93 Improve QMake JSON error
We can not improve the result from JSON parsing without changing API,
so instead recalculate the line and column based on input and offset.

Change-Id: I54149233f71023aa5d30deff854d6f3406c5c48c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 17:27:01 +00:00
Martin T. H. Sandsmark
1753d69607 QCss: Fix parsing of charset
When including a CSS file in a HTML file sent to QTextDocument, and the
CSS file starts with «@charset "UTF-8";», which is the correct way of
declaring that, the parsing fails.
If you omit the space, like «@charset"UTF-8";» the parsing succeeds,
which is wrong.

Fix this by expecting and swallowing whitespace after the @charset
tokens.

Task-number: QTBUG-54829
Change-Id: I32044e8d24bda70c1eb06bf74af50d4cabe2211d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-11-15 17:17:08 +00:00
Marc Mutz
083d8caee1 QXbmHandler: fix missing NUL-termination
The buffer is fed into strstr() on the next loop iteration, but
strstr() expects a NUL-terminated string.

In the equivalent code some lines up, the buffer is explicitly
terminated, and we never write the last character of the buffer again,
so we'll not fall off the end of the buffer, but if we read less bytes
than in the last line, we'll parse garbage from the previous line.

Change-Id: I354e1ce1dea71188942305190500b4778a69b4ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-11-15 16:50:42 +00:00
Robin Burchell
f2205c48c2 QFontEngine: Cache whether or not a font can be smoothly scaled
This will be used by QtQuick to correct a performance regression introduced by
592614ea3e -- QFontDatabase::isSmoothlyScalable is
quite computationally expensive; and now it is unconditionally expensive
regardless of the platform.

Change-Id: I82bfa65a963c6c3c276d574f2b379da4a9ba5b69
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-15 16:02:07 +00:00
Allan Sandfeld Jensen
e133f0cca4 Improve error offset in JSON parsing
Do not consume white-space after a token before the token has been
parsed, otherwise we end up with misleading offsets. This also fixes
a wrong error of illegal number in several cases.

Change-Id: I492ca4de0346a1d0ab73b1c23d7a72dba812664c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 14:19:23 +00:00
Lars Knoll
71d21ed500 Fix image format conversion
QImage::convertToFormat() returns the converted image.

Change-Id: Icfd3ff43e04939e6b92c7fa94e5e0af60f633385
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-15 14:00:11 +00:00
Lars Knoll
7d4da559af Remove all Multimedia related configuration options from qtbase
They live in qtmultimedia now.

Change-Id: I1a2ee8be3efb7c4ee9a29d2a8e3fc1f3eea704fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-15 14:00:00 +00:00
Lars Knoll
c442244907 Fixes for findVersionDirectivePosition()
The old code was wrong as it used QString::fromUtf8() to convert the
char * array to a QString. This could lead to wrong positions when trying
to find the #version directive, as any valid utf8 sequence in a comment
before could have lead to wrong offsets compared to the 8 bit data.

Fix this and optimize the code at the same time to avoid creating a copy
of the data and using QRegularExpression.

Also fixes building Qt with -no-feature-regularexpression

Change-Id: I2d84875ef59b3a0fb4d8b069bf56f4372c57ccdc
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-15 13:59:51 +00:00
Maurice Kalinowski
01c3565d3e winrt: Add documentation for verbatim manifest processing
Change-Id: I4a2acc6844bd160b3ccdbcea4be1e1fbc1cc266d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-15 10:45:00 +00:00
Friedemann Kleint
628d367a9d Stabilize tst_QFileDialog2::task143519_deleteAndRenameActionBehavior()
The test relied on the file created being automatically selected,
which sometimes does not happen when executing the entire test.
Explicitly select the file and check the selection.

Use the temporary directory for testing.

Change-Id: Ia58641c1ac32ba21effa8a5ace9623eb5d48a1c2
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-11-15 09:56:31 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Morten Johan Sørvig
246fe27187 Cocoa: Make dictation via speech recognition work
Returning NSNotFound from the NSTextInputClient selectedRange
implementation when there is no selection prevents
dictation from activating (for unknown reasons).

Return an empty {0, 0} range instead. Text input
methods such as Pinyin still work after this change.

[ChangeLog][macOS] Speech to text dictation now works
for Qt text input.

Change-Id: Ibf1729bdd271e8ed5ce3c9d2a0373c8ab3613d8e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-14 20:59:51 +00:00
Palo Kisa
291eba6f80 QClipboard: Fix emitting changed() in XCB
In XCB environment the QClipboard::changed() was not delivered if the
QClipboard::clear() was issued by other Qt app/process.

If the QClipboard::clear() is used, then the owner in
xcb_xfixes_selection_notify_event_t is XCB_NONE, so we need make the
decission to handle this event by the selection_timestamp and our
m_timestamp[mode].

Task-number: QTBUG-56972
Change-Id: If4c486ac02223eac506465cac7ff1a07bd02a187
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-14 19:54:58 +00:00
Lars Knoll
c64e4bf6b4 Make 'use' entries work across module boundaries
'use' entries in the tests and libraries sections of configure.json
files should work acrosss library boundaries, so a test in
qtwayland can refer to a library from qtbase.

Change-Id: Ide02b9985be427a27982a422ca84a29b23145bcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:26 +00:00
Lars Knoll
94f9ee79a6 Clean up some conditions in our pro files
Change qtConfig(opengl(es2)?) to qtConfig(opengl) as that covers
the case without any regular expression.

Change-Id: I935e3150f87e195e8bd3d0e55b4ed43572b131cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:17 +00:00
Lars Knoll
6de11782d0 Allow checking for the existence of modules in configure.json
You can now use 'module.gui' to check whether the Qt Gui module
exists in the current build of Qt.

Task-number: QTBUG-56656
Change-Id: Ic73f162ed0578e07c70e3ec3706f285b6d09a41d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:03 +00:00
Marc Mutz
80842959c4 Revert "Optimize QJsonObject::operator=="
This reverts commit 862fa24179,
which attempted to optimize QJsonObject::operator== under the
assumption that the entries it holds are lexicographically
sorted. They should be, because Object::indexOf() finds them
by binary search, but apparently both fromJson(), as well as
construction through op[] leave (some) entries unsorted.

This behavior should be fixed, because other code relies on
sorted entries, too, but until the problem is more fully under-
stood, revert the patch to unbreak equality comparisons.

Task-number: QTBUG-56843
Change-Id: I5b608c16d1bbcb4f01b75ce93bd58b49ff050be2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-14 16:49:39 +00:00
Hannah von Reth
aeb2768a7c Introduce QMAKE_CD to enable us to cd from one Windows drive to another
On Windows cd does not change the drive. So when you are on drive C:
and type "cd D:\data" it will change the directory on drive D: but not
affect your current working directory.

To also change your drive you have to provide the parameter /d on
Windows, so "cd /d D:\data" will also change the drive.

Task-number: QTBUG-57080
Change-Id: Ib629879534523982eec693cef725f20a535a1a74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 16:03:39 +00:00
Jake Petroules
addf1f45f3 qmake: fix installation of asset catalog files
This strips leading whitespace from asset catalog filenames, which was
causing installation to fail due to incorrectly calculated paths.

Task-number: QTBUG-57090
Change-Id: I80db627262f9d58f4403e2d8ab205bef2113992b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 15:48:41 +00:00
Friedemann Kleint
d91bf00c43 tst_QFileSystemModel::specialFiles(): Remove Windows parts
The test created a Windows shortcut (.lnk) and checked on its existence.
It was not found in the first test since QFileSystemModel returned
the resolved file name (linktarget.txt). When fixing this by querying
QFileSystemModel::fileInfo()::fileName(), the 2nd test failed since
shortcut files are not considered system files.
Amends change 3b093034b6.

Task-number: QTBUG-53890
Task-number: QTBUG-20968
Task-number: QTBUG-29403
Change-Id: Iec58b52532b44d12759eaa6c8d63a8a4dc8d1bc3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-14 15:26:32 +00:00
Oswald Buddenhagen
6bfe30a0bf drop obsolete file
amends 97fcf3bc9 (introduction of official android port).

Change-Id: Iaab596559c5d4c825269cbdda77d956c3650fb09
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Otto Ryynänen <otto.ryynanen@qt.io>
2016-11-14 12:19:21 +00:00
Oswald Buddenhagen
4e1d65071b fix wording issues in license prompt
Task-number: QTBUG-42136
Change-Id: Ie4ff1b38af6e7a74490558e80a0e559fee8a5486
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-11-14 12:19:14 +00:00
Oswald Buddenhagen
9308b7d618 don't create bogus property variants
sysroot, spec, and xspec have no /src and /get variants.

Change-Id: I8548791f8ea6ba9fd9f10c35f914ed6badbea9d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-14 12:19:05 +00:00
Oswald Buddenhagen
8db556d299 fix $$section()'s bad argument count error message
the autotest was also broken, because it was created by pasting the
bogus message into the result ...

Change-Id: I02b8663b96c7d96cdb3c19639e2213e49fd2bcec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-14 12:18:56 +00:00
Eskil Abrahamsen Blomfeldt
104e6d0f54 Freetype: Disable outline drawing when drawing to pixmap cache
When we are anyway caching the rendered glyphs in a texture,
like when doing native text rendering in the scene graph, the
outline drawing fallback does not make sense. In fact, when used
together with a dpr scale factor, it would cause text to be blurry,
since it would first render the QPainterPath at the set pixel size
and then scale the image.

In practice, there isn't any real clients of the internal outline_drawing
property in the Freetype engine anymore, since this is now handled
independently of the font engines in the
QPaintEngineEx::shouldDrawCachedGlyphs(), but in case we at any point
would want to be compatible with the X11 paint engine again, we
might as well keep it around.

Task-number: QTBUG-55856
Change-Id: Ie090c596fe5cda2b598fa152a488881d50f86d2c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-14 11:08:46 +00:00
Eskil Abrahamsen Blomfeldt
8d6522ddd0 Freetype: Fix device pixel ratio with large fonts
When the dpr scale caused pixel sizes to reach 64 pixels and up,
thus triggering the outline drawing fallback, we would render
the glyphs at the original size but scale the glyph positions,
giving broken rendering. This was because we did not actually
pass the matrix to the fallback function when getting the alpha
maps.

Fixing it revealed a different problem, which was that the bounding
box for the glyphs, returned by alphaMapBoundingBox() did not
actually apply the transform when outline drawing was enabled.

[ChangeLog][QtGui][Text] Fixed rendering of large fonts when a
device pixel ratio is set and the Freetype engine is used.

Task-number: QTBUG-55856
Change-Id: I03d9066faf0e4346628a4eb630f0dd74a81ef148
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-14 11:08:37 +00:00
Oliver Wolff
c214379156 winrt: Fix definition of GL_GLEXT_PROTOTYPES in qwinrtbackingstore
We have to make sure that GL_GLEXT_RPOTOTYPES is defined when
qplatformbackingstore.h is included. Without the definition
glBlitFramebufferANGLE will not be set and compilation might fail.

Task-number: QTBUG-57083
Change-Id: I4cacaf4c2851913b3437ebd1f0f2956d0f400553
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-14 10:57:58 +00:00
Oswald Buddenhagen
468eeca88e fix showing lgpl in the license prompt
the response is lowercased, so an uppercase L would never match.

amends c7c7cf636.

Change-Id: Idc796ec9a43bfd23452cd758100cbf1fb6fb252b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-14 10:47:12 +00:00
Allan Sandfeld Jensen
49e3b2f27e Disable PCH for qdrawhelper.cpp with GCC 5
Precompiled headers with GCC 5.3.1 causes internal compiler error in
qdrawhelper.cpp, so compile this specific file without PCH.

Task-number: QTBUG-54154
Change-Id: Id5d9fe99cbeca58a60734510898e4ccb9694c203
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-12 19:03:51 +00:00
Alexander Volkov
839cae0422 doc: Add missing documentation for QXcbWindowFunctions::setWmWindowRole()
Change-Id: I5a457eb19fee011868cdf6d0534713c760fd57d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-12 18:38:20 +00:00
Alexander Volkov
1c08046565 doc: Remove obsolete note for QWidget::paintEvent()
qt_x11_set_global_double_buffer() is dead code since Qt 5.

Change-Id: Ie9a33b6f03dc2e39f12bc790292bb0d227f05c44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-11-12 10:40:42 +00:00
Alexander Volkov
2265fbe7c1 Remove unused variable in QIconLoader::findIconHelper()
Change-Id: Idac0b24631187063445ea5acfd078b2479359d52
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-12 10:40:20 +00:00
Lars Knoll
0038b40053 Unbreak a couple of configurations
Fix compilation with topleveldomain, textodfwriter
and cssparser features disabled.

Change-Id: I3f061fb09eef36cd640256a46cf77dde85a54d3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-11 17:04:47 +00:00
Maurice Kalinowski
dffde23a0a Fix writing into application directory
Tests are not supposed to write into the build/application directory,
but rather should output to the temp directory.

Change-Id: Idcdf51226a2d547514aea2fbb2054998d8a3437e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-11 15:36:10 +00:00