Commit Graph

25444 Commits

Author SHA1 Message Date
Erik Verbruggen
6f34660340 QStateMachine: fix leak of delayed events.
When a delayed event is queued, the state-machine is responsible for
deleting it. Normal flow will ensure that: after the timer fires, the
delayed event is handled normally, which includes deletion. However,
when a timer cannot be set, the event was leaked. But more important: if
there were unhandled (delayed) events when the state-machine was
destoryed, the events were never deleted.

Change-Id: I7d8a6b572765dc1551ddbdebb446aaa3258680c8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-15 08:25:12 +00:00
Marc Mutz
6951f0e4af QCompleter::splitPath(): don't get tangled up in strings
- Don't store "\\" as a QString just for passing it to QString:.startsWith()
  and prepend(). Keep it a QLatin1String.
  -> one allocation less

- Don't use said QString as a flag, use a bool

- Don't store QDir::separator() in a QString
  -> one allocation less
  -> two indexing operations less

- Don't retrieve QDir::separator() from said QString as QString(sep[0])
  -> one more allocation less

- Don't look for a QChar in a string by using QRegExp; use the QChar
  overload instead
  -> one more allocation (at _least_) less

- Don't convert QDir::separator() with QDir::fromNativeSeparators(); it will
  _always_ be '/'...
  -> one expensive function call less
  -> two QString allocations less
  -> one QString(QChar) introduced
     -> one allocation more
        -> could be removed with QStringLiteral/QString::fromLatin1Char()

Change-Id: I802e66685a95b08cfc557defc63e5f16a7e6306b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-15 00:45:11 +00:00
Thiago Macieira
2d2cb6434f Move the official Qt version from qglobal.h to .qmake.conf
It's easier to parse than qglobal.h. The objective is actually to have
macros with parts of the version number, so the major or minor numbers
could be used in other preprocessor macros.

Change-Id: I42e7ef1a481840699a8dffff1404eda1dd5c308d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-14 20:12:57 +00:00
Alexander Volkov
e912132886 xcb: Use XShape for DnD when a compositing manager is not running
Otherwise transparent areas of the drag'n'drop pixmap are painted
with the black color.

Task-number: QTBUG-45193
Change-Id: I55b7c7caababe13584fa1c7a52835f112e20f920
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-14 18:41:19 +00:00
Oswald Buddenhagen
4b9cdf90ca fix bogus complaints about prl targets without extension in bundles
the library inside a bundle doesn't have an extension.

this doesn't really fix anything except suppressing the error message,
as we discard the result of the operation anyway.

Change-Id: Idfe3d1714dedb59d9d3e86a65f074e516c431389
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-14 15:43:26 +00:00
Friedemann Kleint
957fb9fb82 qt_pixmapFromWinHICON(): Fix crash and leak in case of Win32 API fails.
Release the DC and move alpha-checking into separate function
to prevent it from using invalid width/height.

Task-number: QTBUG-48732
Change-Id: Iaf7cfa89b0f702f5012b0451d24a9e887d832c59
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-14 14:59:17 +00:00
Oswald Buddenhagen
bc00f3c228 fix the trailing-backslash-in-DESTDIR-on-mingw workaround
at least the mingw version we use now interprets the sequence \# as a
literal hashmark, which completely defeats the previous hack.

the new hack escapes the backslash with another backslash, which appears
to work. however, make does *not* remove the additional backslash, so
the result is a bit ugly.

Change-Id: I591a2be443880b162094d04e5a5e624216b59311
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-14 14:57:54 +00:00
Tor Arne Vestbø
233d0a6b8d Add default argument to QPlatformWindow::isEmbedded()
Removes magic 0-pointers at the call sites.

Change-Id: I6740f6b8cc75004ab5f2ebcb3b3c95cbbdc43153
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-14 14:22:54 +00:00
Tor Arne Vestbø
26a89e7bf7 Don't use d_func in QWindow::mapToGlobal
We initialize the variable d at the top using Q_D(const QWindow);

Change-Id: I2de3b33c043024c5599b7cd1ebecae2db0b39d87
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-10-14 14:22:40 +00:00
John Lindgren
5d5e0a4e97 Avoid triggering OpenGL initialization for RasterSurface
Application that do not require OpenGL need a way to opt-out of
GLX/EGL calls completely. The initialization can be expensive and what
is more, some systems may not have functional GLX at all (some VMs are
known to crash when trying to get FBConfigs for the window).

QApplication already has AA_ForceRasterWidgets, which causes the use
of plain RasterSurface everywhere instead of RasterGLSurface. Combined
with a trivial check in the xcb backend to skip all the Xlib+GLX/EGL
path, the attribute will allow apps to ensure that no GLX/EGL calls
are ever made.

This however implies a change in QWindowContainer: the embedded window
must use the same initialization path as the parent otherwise we will
end up with a BadMatch. QWindowContainer can do this transparently to
the applications, unless the QWindow is already created.

Change-Id: I846af7edb8b92b9836cdbd93c6a5eec5a6147a49
Task-number: QTBUG-46765
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-10-14 14:11:14 +00:00
Laszlo Agocs
715a8e6f4e Avoid image copy in toTexture() on GLES 3.0 as well
The default backingstore implementation is now cleaned for ES_2 ifdefs.
All the checks are now done at runtime and ES 3.0+ is included as well
for the efficient, QImage::copy()-less path.

For embedded a customized backingstore is used so the change has to be
done separately there.

This should result in a slight improvement for QOpenGLWidget/QQuickWidget
when running on GLES 3.x.

Task-number: QTBUG-37624
Change-Id: I107330c25a993c5cdcd92e4ebdc17ae172a03da8
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-10-14 14:11:07 +00:00
Tim Blechmann
2811216973 Windows: Open GL blacklist - Add add intel hd graphics 3000 devices
the windows driver for Intel HD Graphics 3000 is buggy (crashes on
initialization) and according to intel, this driver won't receive any
bugfixes. device IDs taken from
http://www.pcidatabase.com/search.php?device_search_str=graphics

Task-number: QTBUG-42240
Change-Id: Ib846d37f67d901060d1318f3f211a5e5dc4f6814
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-14 11:40:11 +00:00
Laszlo Agocs
0a203bf753 Separate KMS and GBM tests
KMS is no longer a platform plugin so the relevant leftover bits are
now removed.

As the introduction of the EGLDevice-based backend for eglfs shows,
using DRM/KMS is not tied to GBM, separate buffer management
approaches, like EGLStreams, work fine as well. Therefore separate KMS
from GBM and remove the EGL and GLES dependency in the tests - this
way there is nothing preventing us from using GBM without GL for
example.

Change-Id: Id7ebe172b44b315f9a637892237d2bb62d99aed2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-10-14 11:39:26 +00:00
Laszlo Agocs
f0d21f6921 Add support for the Jetson TK1 Pro using EGLDevice
For now we pick one crtc and find the corresponding layer. If this is
not desired, set QT_QPA_EGLFS_LAYER_INDEX to override the layer to be
used. Enable qt.qpa.eglfs.kms to get logs about the available layers.

Change-Id: I762783f960739e32966c8cde17d8f55fbe40091f
Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-10-14 11:39:18 +00:00
Laszlo Agocs
bc6d32686c QOpenGLWidget: Fix grabbing multisample framebuffers
Task-number: QTBUG-48450
Change-Id: I0a680e0d682c7c08c3aea40d922bbf2ad66c1de0
Reviewed-by: Joni Poikelin <joni.poikelin@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-10-14 11:39:01 +00:00
Laszlo Agocs
e82e075e51 QOpenGLWidget: Do not recurse when calling grabFramebuffer() from paintGL()
Task-number: QTBUG-48450
Change-Id: I14b1ff40727f705d8b89371b4d3bb5d6adc139fe
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-10-14 11:38:56 +00:00
Liang Qi
e7ab9a1fb9 Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-14 11:38:53 +00:00
Laszlo Agocs
6046458dee eglfs: Handle custom platform window implementations better
Backends may want to subclass QEglFSWindow and reimplement resetSurface()
and similar. Make it possible to do this by moving window creation to
the device integration interface, similarly to screens.

In addition to customizing the windows, some backends may want to disable
the dependency on surfaceless contexts when using offscreen windows
(i.e. pbuffer surfaces). Make this possible too.

Change-Id: Ic5a426e07f821c7a800217b8799f91770ba6a6d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-10-14 11:38:42 +00:00
Morten Johan Sørvig
b63c3d4d9a Make the CoreFoundation event dispatcher depend on QtCore only
In anticipation of moving it to QtCore.

The call to QWindowSystemInterface::sendWindowSystemEvents() has been
moved to QIOSEventDispatcher by making processPostedEvents() virtual.

Change-Id: I9e03be4153a9f5f34e9a0ac942cdff572a44c318
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-13 22:57:12 +00:00
Liang Qi
b7ac036b72 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp

Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
2015-10-13 23:03:51 +02:00
Marc Mutz
967e4f258c QLinkedList/QSet: add {const_,}reverse_iterator, {c,}r{begin,end}()
Now all Qt sequential containers consistently provide reverse iterators.

The associative ones, by way of not returning std::pair from op*, can't
just use std::reverse_iterator. They would miss .key() and .value() methods.
So that has to wait for 5.7.

The reverse versions of the new key_iterators can also just use
std::reverse_iterator, but I'm afraid that after bikeshedding over
keyRBegin() vs. rKeyBegin() vs. reverseKeyBegin() vs. rkbegin()
vs. krbegin() (<-- of course, what else?), it would anyway be too
late for 5.6, so defer, too.

[ChangeLog][QtCore][QLinkedList/QSet] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: I58316fffade469e9a42c61d7aa1455ae3443fd94
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-13 18:07:20 +00:00
Ulf Hermann
0df5d07929 Don't let closed http sockets pass as valid connections
A QAbstractSocket can be close()'d at any time, independently of its
current connection state. being closed means that we cannot use it to
read or write data, but internally it might still have some data to
send or receive, for example to an http server. We can even get a
connected() signal after close()'ing the socket.

We need to catch this condition and mark any pending data not yet
written to the socket for resending.

Task-number: QTBUG-48326
Change-Id: I6f61c35f2c567f2a138f8cfe9ade7fd1ec039be6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 16:40:56 +00:00
Friedemann Kleint
9b6cd2764a Testlib: Output function / total time along with crash dump.
Previously, only QXmlTestLogger had timers to take elapsed times
and log them. Move those into class QTestLog for access by
the loggers and output the times in the crash dump to make it
easier to spot hangs/recursion crashes.

Produces:

QFATAL : foo() Received signal 11
         Function time: 22ms Total time: 23ms

A crash occurred in ...
Function time: 24ms Total time: 26ms

Task-number: QTBUG-47370
Change-Id: Ia530a63104087daffc9a15f68c15d93378b9407e
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-13 16:38:43 +00:00
Friedemann Kleint
bba86a01c9 Libraries: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-13 16:37:37 +00:00
Friedemann Kleint
f9bf737d74 Examples/Doc snippets: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-13 16:37:07 +00:00
Topi Reinio
dab4877a0a qdoc: Improve formatting of function signatures
This is a continuation of the work started in commit
694d300355.

Attach reference ('&') and pointer ('*') qualifiers to the
parameter name, as per Qt coding style.

Previously, function signatures were documented like this:

    QString & QString::append(const QString & str)

After this change, they will appear like this:

    QString &QString::append(const QString &str)

Change-Id: Ie103fc2929635bc32145e50469c600f9f378f97c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-13 11:55:54 +00:00
Topi Reinio
ee634611d4 qdoc: Insert targets for function and enum nodes read from the index
QDoc wrote \target and \keyword information into the index file
properly, but did not read them back in.

This was because the code for handling enum and function elements
read their own child elements (without handling targets), and
marked the remaining children to be skipped.

This commit fixes the issue by refactoring the code for inserting
targets into a new function and calling it from relevant places.

Change-Id: I85d7b26ce54620daec35b19e447d1a065515b863
Task-number: QTBUG-48687
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-13 11:55:46 +00:00
Friedemann Kleint
798128856c qdoc: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I7011ae6ee55107b4788cc434e0dc3618c4213799
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-13 11:11:50 +00:00
Maurice Kalinowski
72d0c62d14 WinRT: Fix native MessageBox not closing
The message box buttons need to be added inside the XAML thread.
Otherwise QWinRTMessageDialogHelper::onCompleted will not be triggered.

To successfully emit the clicked signal across different threads do not
exit the eventloop.

Change-Id: Ie884bdfe0dc64132559755083dae50c2aa43d80b
Task-number: QTBUG-48209
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-13 11:07:48 +00:00
Yoann Lopes
a7297ed85b Fix gstreamer configuration test.
Don't use gst_is_initialized(). It was added in 0.10.31, but we don't
actually require that version.

Change-Id: If5d662e18511cf636861bf93eeccc1f5b69e26f1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-10-13 08:59:04 +00:00
Liang Qi
07800a9727 Merge "Merge remote-tracking branch 'origin/5.5.1' into 5.5" into refs/staging/5.5 2015-10-13 11:14:37 +00:00
Liang Qi
57fead6100 Merge remote-tracking branch 'origin/5.5.1' into 5.5
Change-Id: I2942591e1c1ca86ce0f6476e0a5c3033cdf861ee
2015-10-13 10:09:20 +02:00
Alex Trotsenko
0872156559 QAbstractSocket: fix writing to socket in HostLookup state
After calling connectToHost(), the socket enters HostLookup state. At this
stage, the socket engine was not created yet, and writing to the socket
should result in either data buffering or an error. So, add a check for
d->socketEngine to prevent a crash on unbuffered sockets.

Task-number: QTBUG-48356
Change-Id: I15ea9ce7de97ce6d7e13e358eca5350745b556bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-10-13 05:20:08 +00:00
Tor Arne Vestbø
676edc006e OS X: Forward key events to popup window if present
On OS X we don't treat popup windows as worthy of being activated and
focus windows (key windows). Instead we keep track of the active popup
windows and forward events to them manually.

The forwarding logic is split between QPA, which handles mouse, and
QWidgetWindow and QQuickWindowPrivate, which handles key events.

This commit adds the logic for key events to QPA, which is the right
platform layer for this kind of workarounds. The widget code is left
as is for now, and the QQuickWindowPrivate code can be removed in
a follow up.

Task-number: QTBUG-39415
Change-Id: Iee411fcba9fc81ddcc3a7bc82591184675a6d7a2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-10-12 17:14:00 +00:00
Juha Turunen
a623fe8d2a Fixed a QTimer::singleShot() crash when a functor callback is used
If QTimer::singleShot() is used with a functor callback and a context
object with different thread affinity than the caller, a crash can
occur. If the context object's thread is scheduled before
connecting to QCoreApplication::aboutToQuit(), the timer has a change
to fire and QSingleShotTimer::timerEvent() will delete the
QSingleShotTimer object making the this pointer used in the
connection invalid. This can occur relatively often if an interval
of 0 is used.

Making the moveToThread() call the last thing in the constructor
ensures that the constructor gets to run to completion before the
timer has a chance to fire.

Task-number: QTBUG-48700
Change-Id: Iab73d02933635821b8d1ca1ff3d53e92eca85834
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-12 16:45:04 +00:00
Giuseppe D'Angelo
a2f6ece27f QLockFile: fix errno handling
In case of a lock failure, we potentially pollute the errno value
before printing it. Also, switch to qt_error_string, as strerror
is not reentrant.

Change-Id: I952aac14204637155726bcefc0ed8a21d7fcd501
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-12 15:09:53 +00:00
Marc Mutz
5962c6e37e QtCore: use QStringBuilder in more places
Change-Id: I1a2016039c6cfa35505b987b6d4627bf806500ba
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-12 09:37:41 +00:00
Marc Mutz
690f9a7e74 QtCore: use QStringRef in more places
Apart from removing some unwanted allocations, also reduces
text size by ~800B on Linux AMD64 GCC 4.9 release builds.

Change-Id: Ibcd1d8264f54f2b165b69bee8aa50ff7f4ad3a10
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-12 09:34:03 +00:00
Andy Nichols
2a1ea8f13b DirectFB: Use correct pixel format for Texture Glyph Cache
QImage::Format_Indexed8 -> QImage::Format_Alpha8

Change-Id: I7faa7c9d2cb20306f63a2522e7fa78736b9ee583
Task-number: QTBUG-47490
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-12 09:33:07 +00:00
Christoph Schleifenbaum
0cfdfcc82e QListView: Use correct available size when calculating scrollbars.
Calculation was working as long as one didn't use per pixel scrolling.

Task-number: QTBUG-48579
Change-Id: Ie02e28b008c5c81ed45d7dd17fed96148c23b598
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-10-12 08:41:06 +00:00
Andy Shaw
eb149ec95c Offscreen: Protect against the QT_NO_CURSOR define for changeCursor
If QT_NO_CURSOR is defined then changeCursor() is not implemented in
QPlatformCursor which means that it isn't really being overridden in the
offscreen plugin. Therefore the same define is checked for to prevent a
compiler from having a problem with it.

Change-Id: Id7c104292354cb7462b3161602fc8d382a6dd390
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 19:12:02 +00:00
Marc Mutz
2463b4452d QtCore: don't convert single characters to QString for QTextCodec::fromUnicode()
Use the fromUnicode(QChar *, int size) overload instead.

Saves 0.5KiB text size on Linux GCC 4.9 AMD64 release builds.

Change-Id: I1a1081e09bff4c2116288b8c2616e1bb7ee2bb42
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 12:30:33 +00:00
Marc Mutz
a6ddae873b QtCore: Don't compare QChars to literal 0s
This is prone to ambiguities, even though we currently don't run
into them.

Use QChar::isNull() instead.

Change-Id: I71843878b3f4f8a5deae2ef57a6f6628461be216
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 12:29:44 +00:00
Marc Mutz
48663eafd3 QtCore/qmake: drop some unneeded QChar -> QString conversions
Change-Id: Id2fb5089b0ec51073efb846b59ecc63942cfb60d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-11 12:29:28 +00:00
Friedemann Kleint
c8cd9f1b9a Polish DnD Examples.
- Remove class DragLabel in draggabletext and add a static creation
  function instead since it only has a constructor setting some
  properties.
- Use QRegularExpression instead of QRegExp
- Use new connection syntax.
- Ensure compilation with
  DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
  demonstrating use of QLatin1String vs QStringLiteral.
- Streamline code.

Change-Id: I2e2ddeb40837dba379990836c77fb72ad7263e2d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-09 15:59:21 +00:00
Alexander Volkov
c55a36cb90 xcb: Fix DnD for separate X screens
Recreate QShapedPixmapWindow when the cursor goes to
another X screen.

Change-Id: Ifd4c4281971b23abc45a9f6c0509832a45c31521
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-09 15:45:35 +00:00
Olivier Goffart
de70798859 QMetaProperty::write should reset the property if an empty QVariant is given
[ChangeLog][QtCore][QMetaProperty] write() now resets the property if an
empty QVariant is given, or set a default constructed object if the
property is not resettable

Change-Id: I9f9b57114e740f03ec4db6f223c1e8280a3d5209
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-09 15:26:38 +00:00
Ulf Hermann
54b5287adf Insert leading after each line, not before
Task-number: QTBUG-45791
Change-Id: I763d9d1ba00989d0c6b1e0b955173dadbef26b10
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-09 15:18:11 +00:00
Tor Arne Vestbø
db2c89beae Stop generating implicit suffix rules in Makefiles
Suffix rules are the old-fashioned way of defining implicit rules for make.
We don't need them as we generate explicit rules for all sources we build.

[ChangeLog][qmake] Makefile output no longer contains implicit
suffix rules, as all sources are built using explicit rules.

Change-Id: I4ecfa5b80c8ae33aea8730836f3baf99dd4951dd
Task-number: QTBUG-30813
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-09 15:15:25 +00:00
Tor Arne Vestbø
9ff1310af5 Distinguish between Objective-C and Objective-C++ sources
Instead of lumping both Objective-C (.m) and Objective-C++ (.mm) sources
into the same pile, passing them on to the same compiler as for C++ (CXX),
with the C++ flags (CXXFLAGS), we follow Apple's lead and treat them as
variants of the C and C++ languages separately, so that Objective-C
sources are built with CC and with CFLAGS, and Objective-C++ sources
with CXX, and CXXFLAGS.

This lets us remove a lot of duplicated flags and definitions from the
QMAKE_OBJECTIVE_CFLAGS variable, which in 99% of the cases just matched
the C++ equivalent. The remaining Objective-C/C++ flags are added to
CFLAGS/CXXFLAGS, as the compiler will just ignore them when running in
C/C++ mode. This matches Xcode, which also doesn't have a separate build
setting for Objective-C/C++ flags.

The Makefile qmake generator has been rewritten to support Objective-C/C++
fully, by not assuming that we're just iterating over the C and C++
extensions when dealing with compilation rules, precompiled headers, etc.
There's some duplicated logic in this code, as inherent by qmake's already
duplicated code paths, but this can be cleaned up when C++11 support is
mandatory and we can use lambda functions.

Task-number: QTBUG-36575
Change-Id: I4f06576d5f49e939333a2e03d965da54119e5e31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-09 15:15:17 +00:00