Commit Graph

31024 Commits

Author SHA1 Message Date
Paul Olav Tvete
056a35d02f Fix build with -no-feature-menu
Change-Id: I8f9d5ef6b7f7102e56816677f1d3a5b5144b7083
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:34:11 +00:00
Paul Olav Tvete
eae92384b0 Compile with -no-feature-itemviews
Change-Id: I23506f06df35f124f5eb9fcc8426c63b407a0872
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:51 +00:00
Paul Olav Tvete
6d06d4b07c Fix build with -no-feature-graphicsview
Change-Id: I9ae724ddf90efc9e951d475e3332083e6f8207d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:46 +00:00
Paul Olav Tvete
fcab718666 Fix build with -no-feature-dockwidget
Change-Id: Id484b54fd7191715e61ba6708247357b83159f28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:41 +00:00
Paul Olav Tvete
27792ea098 Fix style compilation with -no-feature-...
Change-Id: Ic7fadf0622f98d339322a4a1d4d5c36908f4f7f6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:36 +00:00
Paul Olav Tvete
7cafa85a49 Remove reimplementations of removed features
Avoid the "marked ‘override’, but does not override" compile error.

Change-Id: I4b125f1951614045781f3059fbc5cb65dd26775c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:32 +00:00
Paul Olav Tvete
d82e23e775 Make sure features are defined before testing them
Include the file defining the feature before testing whether
the feature exists. Also use the new feature macro to make
sure this bug doesn't happen again.

Change-Id: I204836fee59b143a7ce7d256a7aed223c4d0ceb1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:27 +00:00
Paul Olav Tvete
447ca99191 Fix printsupport compilation with -no-feature...
Change-Id: I881e736aefd4068965edb2a57f4436ee43d2bb93
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-25 10:33:23 +00:00
Tasuku Suzuki
64e977cfac Fix build without features.temporaryfile
Change-Id: I3f26f122a20aa8e59baaf3f33b89cc776865ff8b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-25 04:54:58 +00:00
Samuel Gaist
0a96d8fb38 Example: migrate the classwizard example to use QRegularExpression
Update the classwizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:41 +00:00
Samuel Gaist
bb42a6741f Example: migrate licensewizard example to use QRegularExpression
Update the licensewizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:37 +00:00
Samuel Gaist
992bffdba5 Doc: Fixed old text still mentioning QRegExp
The example has already been ported to QRegularExpression however part
of the documentation still referred to the QRegExp class. This patch
updates the documentation to match the new version of the code.

Change-Id: Id433d0b28deae0c4f702c0c54d2704174f8c7689
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 20:28:22 +00:00
Samuel Gaist
9170cf9f1d Remove use of deprecated QRegExp from QLibraryInfo
This patch replaces QRegExp by QString search and replace.

Change-Id: I11165afa45f8f9a856e6fb9b64929e4bdacb913d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 20:27:58 +00:00
Laszlo Agocs
e0f0850cd4 Use context as glyph cache key in GL paint engine
Switch from ctx->shareGroup() to ctx. The original intention to use the
same cache instance for sharing GL contexts is reasonable, but can only
work when there are only shareable resources involved. The FBO used by
QOpenGLTextureGlyphCache is not one of these.

Text rendering in Qt Quick already uses the same approach and uses
per-context glyph caches.

Change-Id: Ie7e521769f28b4902ca714eb029acfbf52814309
Task-number: QTBUG-58276
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-01-24 15:14:38 +00:00
Jesus Fernandez
6a3e728e9b Fix possible loss of data warning
warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
while compiling class template member function 'QVarLengthArray<T,Prealloc>::QVarLengthArray(std::initializer_list<T>)'

Change-Id: I36f5ef65ec1f511eac7f3ad1a4717d18f7dc9ce4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-24 15:10:21 +00:00
Alexandru Croitor
91e5c7e1da Inform user that a non-prefix build can't be used on other machines
This implies that using tools like windeployqt and macdeployqt will not
generate a working standalone application.

Change-Id: I002cf6e527e479ccbee2f18df8766648196d6232
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 13:11:05 +00:00
Alexandru Croitor
1b1686d194 Fix mouse extra button mapping on macOS
Previously extra mouse buttons apart from left, right and middle
buttons, were mapped incorrectly with an offset of -1. This resulted in
the first extra button being recognized as the middle button, the
second extra button as the first extra button, etc.

Fix consists in using a binary shift with proper offset to create
the corresponding Qt::MouseButton value.

[ChangeLog][macOS] Fixed extra mouse buttons to be mapped to
correct Qt::MouseButton values.

Change-Id: I9e6084586cd4737a172b7706a805211f0edff749
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-24 13:10:52 +00:00
Friedemann Kleint
fc893d949c model-view-programming.qdoc: Add missing list/endlist
Fixes qdoc-warnings:
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2076: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2077: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2078: warning: Command '\li' outside of '\list' and '\table'
qtbase/src/widgets/doc/src/model-view-programming.qdoc:2079: warning: Command '\li' outside of '\list' and '\table'

Amends change 7adfe7494b.

Change-Id: Ifa1121ba743c17d7223058e780ad03211565e3ff
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-24 12:33:09 +00:00
Allan Sandfeld Jensen
b0649df7d6 Fix MIPS32 processor detection
Gcc defines neither _MIPS_ARCH_MIPS32 nor __mips32 on MIPS32
architectures, instead __mips is defined to 32.

This fix exposed bit-rot in qdrawhelper where qt_memfill32 was set as
a function pointer despite not being one since Qt4.

Change-Id: I87461823e54fa3166223ebf97175fd05d2f2fd16
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-24 11:34:30 +00:00
Samuel Gaist
74819c4ed9 Tutorial: migrate addressbook tutorial to use QRegularExpression
Update the addressbook tutorial to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Ibea9252ab8fe1d12e6fc862fa70229ca6efe0804
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-24 07:24:13 +00:00
Oleg Yadrov
59780d132a Cocoa: fix crash regression in qt_mac_create_nsimage()
The regression was introduced in d8857f21ac. The original change was
meant to fix support for SVG icons, but failed to take into account
a valid QIcon with no sizes, but which is also unable to create
a pixmap for the requested size.

Task-number: QTBUG-58344
Change-Id: I7ac1dbfaf6e3dab8581fe4b33c814e2517fcdba8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-01-23 23:34:44 +00:00
Samuel Gaist
cbd7dea83e Doc: updated QString::fromRawData documentation to QRegularExpression
QString::fromRawData code sample still shows the use of QRegExp. This
patch updates it for QRegularExpression and cleans the code.

Change-Id: Iff0f736cdbdd7d35c65fde1496ce9f838a8f5c6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-23 23:05:56 +00:00
Samuel Gaist
00bbb4d273 Example: migrate network-chat to use QRegularExpression
Update the network-chat example to use the new QRegularExpression class
in place of the deprecated QRegExp.

Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-23 22:53:03 +00:00
Samuel Gaist
acacca859c Doc: update QStringList doc with missing QRegularExpression reference
The documentation of QStringList is missing some mention of
QRegularExpression as well as still using QRegExp in some sample code.
This patch fixes that.

Change-Id: I4a7c9fe8e5ae7c73497192bb71d1fa66ee864bd2
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-01-23 22:52:50 +00:00
Jocelyn Turcotte
dd52fd0024 Ensure a pixel density of at least 1 for Qt::AA_EnableHighDpiScaling
Very large 1080p TVs or any display which is running at an abnormally
low resolution can have a DPI lower than 48, which means that
qRound(dpi/96) will result in a 0 pixel density, causing critical
issues for applications using Qt::AA_EnableHighDpiScaling.

Make sure that we always have a pixel density of at least 1 to allow
applications not having to worry about such displays.

Task-number: QTBUG-56140
Change-Id: I1dafbf7794a99ae6f872984c0337d8ff0d1fc1c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-23 18:42:26 +00:00
Gabriel de Dietrich
aa8fb36089 QMacNativeWidget: Remove Carbon reference from documentation
Change-Id: Ie1f1064a98f202194cad98aa3fa106e87eba7f39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-23 18:30:03 +00:00
Gabriel de Dietrich
40827457a7 QMacCocoaViewContainer: Fix typos, wording in documentation
Also removes reference to Carbon and the old dual backend.

Change-Id: I01292caa7efcbe85526cd7602ec8ac678fd78eab
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-23 18:29:57 +00:00
Eskil Abrahamsen Blomfeldt
df7a65afda Fix license header of QInputControl
The license headers here were accidentally copied from Qt 5.6, since
the files were targeted for that branch originally. This updates them
to the proper LGPLv3 + GPLv2 + commercial.

Change-Id: I0623bdbf8fd4475405500b2687ef8dce2f1dbb6b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-01-23 16:03:31 +00:00
Friedemann Kleint
79352528a1 Windows QPA: Prevent usage of child windows as transient parent
When using foreign window integrations such as MFC/winmigrate,
it is possible that a child window is found which can cause issues
with modality. Loop up to top level.

Task-number: QTSOLBUG-71
Task-number: QTBUG-57159
Change-Id: Ib36e0f8f4f6b1e22ba1240013871facef2c0c1ab
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-01-23 15:36:54 +00:00
Friedemann Kleint
45948967bd tst_QSocks5SocketEngine: Refactor tests
Rewrite tcpSocketNonBlockingTest() and downloadBigFile() to use lambdas for
the slots. This allows for removing the related member variables and slots
of the test class and ensures no leaks of sockets or inconsistent values.
Add an error handler printing the error message to the flaky downloadBigFile()
test.

Change-Id: Ieb64063c41e045a1a50a6d074bef01753ee319ef
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-23 12:22:54 +00:00
Dmitry Shachnev
186a5af82b Doc: do not break the values list by blank lines in qnamespace.qdoc
There should be no blank lines in \value content, otherwise qdoc
ends the list and starts a new one.

Change-Id: Idddc7992317894487445aea36397136df40b9691
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-01-23 11:47:57 +00:00
Friedemann Kleint
4b1d825ddc QGuiApplication: Send QEvent::Window(Un)blocked to embedded window, too
Change 333f641622 modified
QGuiApplication::topLevelWindows() to no longer include embedded windows.
This causes the blocked handling in Active Qt to no longer be triggered.
Fix this by iterating over the list using the same condition as before,
avoiding the construction of a temporary list as a side effect.

Task-number: QTBUG-18099
Change-Id: I06a1a4e324fea9f543ceb5274bb064734f8d56af
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-01-23 11:41:56 +00:00
Aleksei Timofeyev
4d7313a466 QLocalSocket/Win: Fix access to deleted pipeWriter
waitForWrite can emit a signal outside QLocalSocket and pipeWriter
could be deleted there.

Change-Id: Ic35ec6455bd05402fd38fb3e1b219aa4534a0ff6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-23 11:40:26 +00:00
Jesus Fernandez
ecf025f613 Fix dereference before null check in QOpenGLExtensionMatcher
QOpenGLContext pointer was dereferenced before checking if it valid.

Coverity-Id: 11370
Change-Id: I87d83a87d88ad7c055f3ed32096bfda036224ca9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-01-23 10:38:40 +00:00
Mikkel Krautz
00593d8e37 features/resources.prf: fix use of unescaped backslash
Without this, building a project with qmake -Wall will
always produce the following warning:

    mkspecs/features/resources.prf:22: Unescaped backslashes are deprecated

Change-Id: I0aeedbf470958ab458651a263e3f804ea2d1a0f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-23 10:27:07 +00:00
Tasuku Suzuki
92eafefb5a Fix build without features.textcodec
Change-Id: Ia9636db509270db93c2f9e46adaf1def0f157344
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-23 09:23:42 +00:00
Topi Reinio
2597d27732 Doc: Remove specific mention of 'Qt 4' from Model/View documentation
Change-Id: If2101124d1bc772c9412c3d09d2d7753d9b51569
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-01-23 08:37:19 +00:00
Laszlo Agocs
a828a02d9f Fix sanity checks in DRIVE CX and Jetson K1 Pro specs
This amends e58eb3d6.

Task-number: QTBUG-58287
Change-Id: Ia4b5d0cf5f71d1e0977e3c8674ef08929112f7e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-21 08:28:40 +00:00
Laszlo Agocs
ebffedb11d Avoid trashing other contexts' VAOs in destroy()
The following is safe:

QOpenGLVertexArrayObject *vao = ...
vao->create();
switch the current context
delete vao;

because the QOpenGLVAO dtor recognizes that the wrong context
is current, and will temporarily restore the VAO's associated
one in order to safely destroy the vao object.

However, the following has been problematic:

vao.create();
switch the current context
vao.destroy();

simply because all the logic was in the dtor and destroy()
blindly deleted the vao object in whatever context was current.
This can lead to releasing a completely unrelated vao object
that happens to have the same name in another context.

The expectation is for context-dependent wrappers is that a
ctor-create-dtor-ctor-create-dtor-... sequence is equivalent to
create-destroy-create-destroy-..., so move the safe cleanup logic
from the dtor to destroy().

Change-Id: Ie3bddbf4bfeb8629948c4783cc88422c9df03e65
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-01-21 08:28:31 +00:00
Friedemann Kleint
578154c47d tst_QPauseAnimation: Use QTRY_COMPARE for checking the stopped state
Use QTRY_COMPARE with a timeout to check for the stopped state
unless BAD_TIMER_RESOLUTION is defined.
This speeds up the test by 1s and prints diagnostic information
should an interval be too short (as seems to be the case on macOS,
currently).

Change-Id: I8f884cd66ad33314124d3130d9f49606e6dfe9f3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2017-01-20 18:03:34 +00:00
Oleg Yadrov
4d49f94060 Cocoa: fix bug when left mouse button release event delivered as right
The regression was introduced during refactoring by 820e69d6c and the
initial change that added this logic is adc3ef97d.

This condition had become redundant and wrong after refactoring because
m_sendUpAsRightButton flag is set in the proper way in
QNSView::mouseDown() which later calls QNSView::handleMouseEvent()
anyway.

Task-number: QTBUG-58219
Change-Id: I1951cf4067af6f0c1837c1c15b8a09dfe7939493
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Pavol Markovic
2017-01-20 17:44:16 +00:00
Oleg Yadrov
a41677d04c QQuickWidget: fix drag and drop
QQuickWidget did not receive mouse release events after drag and drop
because the logic was so:
1) QWidgetWindow::handleMouseEvent() was called on press and
qt_button_down was set to the corresponding QQuickWidget;
2) After drag started, qt_button_down was set to 0 in
QApplicationPrivate::notifyDragStarted();
3) On mouse release QWidgetWindow::handleMouseEvent() was called again,
but because qt_button_down was 0
QApplicationPrivate::pickMouseReceiver() returned 0 and as a result
QWidgetWindow ignored the event and did not propagate it to QQuickWidget
for further processing.

The step 2 is a widgets-specific fix for QTBUG-26145 that does not work
for QQuickWidget (QtQuick has its own focus system).

Note that because Widgets and QtQuick do not share the sources, there is
no possibility to cast the pointer to check whether qt_button_down is
a QQuickWidget or some other QWidget-derived class object, so we have to
use QObject::inherits() method to check that.

Task-number: QTBUG-56713
Change-Id: I599b843e903c64329e6178752e0dc49f674bb890
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-20 17:43:52 +00:00
Oswald Buddenhagen
5060740fa9 utilize configure results better in native builds
don't ignore detected features for host tools when we're not actually
cross-building.

Change-Id: Id62a3c1c6b7ae422b14efb4fbea0892b05a047cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
2017-01-20 17:06:50 +00:00
Ulf Hermann
8f960badfc Don't ignore major version "0" when resolving targets on windows
This was missed in dd9ec1564, leading to errors for example when building
with separate_debug_info.

Change-Id: Ibeb8020abe32690bcc691c1ca139508775c91db2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 17:05:56 +00:00
Orgad Shaneh
fa6444939c Support QMAKE_PRE_LINK and QMAKE_POST_LINK for static libs on unix
prelink was not supported at all for ar.

postlink was done for most cases, but missing in one particular ar
invocation.

Task-number: QTBUG-57276
Change-Id: Ic72c42a9502c97d7111b3f3941b387024d46a27d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 17:05:33 +00:00
Oliver Wolff
d9203fa534 winrt: Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I57ecfd0751538dcba41ebaf028de1bc5b4debbb7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-20 13:09:16 +00:00
Oswald Buddenhagen
6b8666c7f2 don't separate host and target toolchain when not x-building
there isn't a point to determining the values separately if they are
actually the same things.

Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-20 09:29:59 +00:00
Oswald Buddenhagen
f67afee9e9 determine QMAKE_DEFAULT_{INC,LIB}DIRS separately for host and target
note that in principle this leaves room for a race condition, as the
first project to determine the host config is not going to be the
top-level one.
in qtbase and qtdeclarative, this is naturally serialized via the common
bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d,
qtscxml, and qtwayland all build only one bootstrapped tool each.
qtwebengine makes a fake host build to create files for gyp/gn; the
convert_dict tool is declared a host tool, but isn't actually built when
x-building anyway, and even if, it's serialized on the former. qttools
needs explicit serialization, though. no other host builds exist within
qt as of now.

Task-number: QTBUG-58126
Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-20 09:29:52 +00:00
Oswald Buddenhagen
6834d0eecc prevent configure from putting garbage into .qmake.stash
in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set
up, leading to caching of possibly nonsensical values.

this change also necessitated that msvc-version.conf is loaded only when
toolchain.prf is, which is best done by loading the former from within
the latter. that seems quite appropriate in the first place.

Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 09:29:37 +00:00
Gabriel de Dietrich
d22579f51e QWidget::winId(): Remove documentation bit about macOS
The Carbon port has been removed since 5.0, so there's
only one framework against which we can build Qt.

Change-Id: I38ce410f50cd4eda7abcc50ac4c4c7a23b3e1f45
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-19 23:37:40 +00:00