Commit Graph

30236 Commits

Author SHA1 Message Date
Leena Miettinen
5e921a18b2 Doc: Enable global linking to new Qt Creator VCS subtopics
Each supported version control system is described in
more detail in a dedicated topic since version 4.2.

Change-Id: I666f8c18d31954935c836509e572a3bfd2c2a32e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-11-25 10:52:04 +00:00
Kai Koehne
32b99a38c5 PCRE: Document upstream version
Also update copyright.

Change-Id: I42a23701734c2c8d3ae43f70cc69dfb609b3a7a3
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-19 20:39:47 +00:00
Friedemann Kleint
cb0d8ffdd9 Extend manual test windowflags
Change the main window to contain a QTabWidget and add a log widget
logging relevant events on the top level widgets for testing changes.

In the preview window, add new window flags of Qt 5 and output
geometry, margins and window state in addition.

Change-Id: Icec366223b6c163d58a69034687f3d9323a91533
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-18 18:58:16 +00:00
Mitch Curtis
f817a995b2 tst_qhooks: test that it's possible to chain multiple hooks together
Chaining hooks together was mentioned by Ossi in the comments of
d953d9a4. This patch justs add a test that verifies that it works, and
also serves as an informal example for developers looking how to do it.

Change-Id: I53a014d5663c289ea0559e0926ed301f4e5110e6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-11-18 15:22:32 +00:00
Marc Mutz
1a3a8cf87b QDeadlineTimer: mark more functions nothrow
Change-Id: I3be9c69b46901311e9150a7f718707d8ff523e9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-18 07:43:42 +00:00
Lars Knoll
03c1a6ac71 Remove last traces of opengl es 1 support
Change-Id: I3f86d4892ec3235003d34fdcf3f093f1513c821f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-16 22:00:46 +00:00
Friedemann Kleint
33573bf7ea Manual Dialog test: Fix compilation against Qt 4
Change-Id: I79a90cd252e99fb94c0429a3f03eb1ddacab1786
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 19:26:12 +00:00
Robin Burchell
094b64fb60 QRawFont: Add a qHash overload
This will be used in QtQuick to avoid costly string manipulation (which in turn
involves memory allocations).

Change-Id: I51a67a4cd97cc576f399483c9c0c13da1e1c6e72
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-16 18:13:41 +00:00
Gabriel de Dietrich
e8a41ed866 QCocoaMenu: Force NSMenuValidation when syncing items
When a menu item's enabled state changes after
-[QCocoaMenuDelegate menuWillOpen:] is invoked, i.e.,
during or after QMenu::aboutToShow() is emitted, that
state change may not be taken into account. This is
because the automatic menu validation, upon which Qt
relies, is not made aware of any such change.

By calling -[NSMenu update] when syncing the QPA menu
item, we induce Cocoa to invoke -[QCocoaMenuDelegate
validateMenuItem:] and ensure that previously synced
items, whose state may have changed, will be properly
updated. This, however, has a small side effect, namely
that menu-holding items will also go through the automatic
menu enabling path and may appear disabled since, until
now, they were not properly configured. In order to solve
this, we set the action on those items as well, and make
sure that both of QCocoaMenuDelegate's relevant methods,
validateMenuItem: and itemFired:, properly process
menu-holding items.

Menurama manual test updated accordingly.

Change-Id: I62f955538b8be09b8494ea0ce87fca7910148d38
Task-number: QTBUG-56850
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-16 14:23:49 +00:00
Maurice Kalinowski
3e5e2cd3bd winrt: Do not shadow variable
Change-Id: I70fc9254bfdfe42bf0e8d379537eb60b21be8275
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:21 +00:00
Maurice Kalinowski
7912ac5d67 winrt: move to range based loop
Change-Id: I0694adcff9b591eecf1025074e8b1c478484bd74
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:16 +00:00
Maurice Kalinowski
3e3b22adeb winrt: Fix ill-constructed loop
That loop could never have worked properly.
Identified by analyze compile switch.

Change-Id: I5e987dc9f5c57d3ffbcf054b7b417b506c02e7e1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 13:06:11 +00:00
Liang Qi
b39adf8945 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-16 13:54:01 +00:00
Oswald Buddenhagen
38e935701c make QMAKE_USE obey QMAKE_LIBDIR_*
this is complementary to configure's makeSpec library source type.

this should be sufficient to make QMAKE_USE += {egl,opengl,opengl_es2}
actually work, obsoleting the need for opengl.prf and egl.prf (and the
currently dysfunct openvg.prf).

Change-Id: I2f7595ac89afa087ea7f0f25060e8e47e6148be9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-16 12:05:26 +00:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Kai Koehne
a6fbfea24a Doc: Mention qtmain library in Qt Core overview
The documentation for the qtmain license is right now pretty hidden.
The library is added by qmake independent of the Qt module that are
linked to, but it seems safe to assume people at least link against
Qt Core.

Change-Id: Id474990edde45feab6727bada2bc6a28946216cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-16 11:32:10 +00:00
Maurice Kalinowski
78e33de8e5 winrt: Check for sanity of variables in debug build
Identified as potential issues by analyze mode.

Change-Id: I3f7c63a2349f29cc3de7baa78157fec157b9e561
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-16 08:13:12 +00:00
Gabriel de Dietrich
27aeeac6ee Cocoa Dialog Helpers: Refactor OK-Cancel buttons view
Since virtually all the logic is shared between QNSColorPanelDelegate
and QNSFontPanelDelegate, we extract the added buttons and
layouting logic and move it into its own class. This requires
the two afore mentioned Objective C classes to satisfy the
QNSPanelDelegate protocol.

Change-Id: Ie26e758f5db71920896d930a4f3644b51a1ce3fa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-16 05:19:44 +00:00
Oswald Buddenhagen
1a43199fce configure: turn qtConfOutputPostProcess_*() callbacks into replace functions
now the callbacks don't need to re-export the designated file contents,
which improves the abstraction and removes some boilerplate.

Change-Id: Ifa50313155fc96762025e2610b810ebb71daa373
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:41 +00:00
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
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
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