Commit Graph

25363 Commits

Author SHA1 Message Date
Tim Blechmann
f7338d86af tools: StringBuilder - silence clang warning
warning: implicit conversion loses integer precision: 'long' to 'int' [-Wshorten-64-to-32]
    a.resize(it - a.constData());
    ~        ~~~^~~~~~~~~~~~~~~

Change-Id: I8c199d69f2e0d41d1c288d452b9d621b201fa98e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-25 07:48:27 +00:00
Thiago Macieira
58d9b42c03 Fix deadlock on disconnectNotify() called from ~QObject
Normally, disconnectNotify() is called at the end of QObject::disconnect
and all the locks have been dropped. That is not the case for the
QObject destructor, so we need to deal with the fact that it there may
be some locks held.

I didn't catch this issue during testing because it depends on the
pointer addresses of the object being destroyed and that of the
QDBusAbstractInterface sender object, as we use one global, non-
recursive mutex pool. For the same reason, this patch is not testable.

The fix is simple: we don't need to remove the relay rules immediately.
It's ok for them to happen later, since the worst case scenario is that
we'll receive a few more signals than we have objects to deliver them
to. If that happens, we'll do a little more work than we have to. But in
the normal case, the amount of work is the same and we get the benefit
of returning more quickly from the destructor. What's more, if the
QDBusAbstractInterface object also gets destroyed, the events are
deleted and QDBusConnectionPrivate will clean everything up.

Task-number: QTBUG-48410
Change-Id: I42e7ef1a481840699a8dffff1406b789ba5217b3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-25 07:45:06 +00:00
Allan Sandfeld Jensen
c9697677f4 Use a power of two division factor
Using a power of 2 instead of power of 10 means the result of the
division can be accurately represented as a floating point instead of
being an approximation that could lead to rounding errors.

Change-Id: I8910c06113ec6b69c60ff95d59894bfb56133186
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-09-24 23:35:11 +00:00
Shawn Rutledge
d72da0b4b2 xcb: fix yet another crash when screens are disconnected
Can't assume that m_screens is not an empty list.

Task-number: QTBUG-42985
Change-Id: I6f9422638c219123dc898813910d03c7afbd1450
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-24 20:16:08 +00:00
Shawn Rutledge
61b608dfb5 QScreen manual test: don't crash when a QScreen is null
Need to survive having screens detached/reattached on X11.

Task-number: QTBUG-42985
Change-Id: I81cf9721f0cb61a29180c60d44d588063266e651
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-24 20:15:35 +00:00
Shawn Rutledge
d0ca16eae1 xcb: get Genius/Waltop tablets working again
It was working at some point, but not in 5.5.0.

Task-number: QTBUG-48370
Change-Id: I8a0e09d4dfa9ace3d69c10c5f88129958d226a9a
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-24 20:15:18 +00:00
Thiago Macieira
d427417c74 Print one warning for the new high DPI variables, not four
For people with non-empty QT_MESSAGE_PATTERNS, the multiple lines would
be unreadable.

This is what it showed for me when starting Qt Creator:

[1442136.587] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
        Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
[1442136.592] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
            QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
[1442136.592] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
            QT_SCREEN_SCALE_FACTORS to set per-screen factors.
[1442136.593] qtcreator(82762 82762)(?libQt5Gui.so.5?|QGuiApplicationPrivate::createPlatformIntegration|QGuiApplicationPrivate::createEventDispatcher|QCoreApplication::init|QCoreApplication::QCoreApplication|QGuiApplication::QGuiApplication|QApplication::QApplication|?qtcreator?|?qtcreator?|__libc_start_main):
            QT_SCALE_FACTOR to set the application global scale factor.

(and imagine it line-broken in a terminal 140 columns wide)

Change-Id: I42e7ef1a481840699a8dffff1406f73dc4d44a41
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-24 19:46:32 +00:00
Thiago Macieira
c61aaa28df QtDBus: update debugging info (QDBUS_DEBUG=1)
Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1a740643ec22e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-24 16:55:14 +00:00
Thiago Macieira
3bcb3c64e2 Use QTypeInfo<T>::isRelocatable in QVariant
Change-Id: Ib306f8f647014b399b87ffff13f1f01c40dc3ef7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-09-24 16:55:10 +00:00
Andrew Knight
90ef875785 Use QMAKE_MOD_LEX/QMAKE_MOD_YACC in lex/yacc features
These variables were defined but never used in the respective qmake
features. Utilizing them allows more control over the output file name.

Change-Id: I5ba96c5cd330b18dc060f563186992fe3bd27b49
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-09-24 13:49:29 +00:00
Andrew Knight
231199798a Build ANGLE dynamically under static builds which have dynamic GL enabled
Task-number: QTBUG-46814
Change-Id: I8108bcd6f8badbb135f593dcf280470e03b11bff
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-24 12:53:52 +00:00
Laszlo Agocs
b46ffbca0c Fix up QOpenGLWidget transparency support
The glColorMask call was troublesome. In addition, the Qt::WA_TranslucentBackground
was misinterpreted and recommended misleadingly in the documentation. The hellogl2
example's --transparent argument was disfunctional in practice.

Replace glColorMask with glBlendFuncSeparate. The hellogl2 example and the docs are
now corrected wrt enabling semi-transparency in a QOpenGLWidget that is not a top-level
(which is the most common case).

Task-number: QTBUG-47276
Change-Id: I6f40e732d455f5efcf158649ac9a52ff9f240e85
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-09-24 12:51:37 +00:00
Friedemann Kleint
bf2c9fd2fd Guard against empty keys in QPlatformInputContextFactory::create().
The code relied on QStringList::split() returning a list
consisting of one empty string when passing an enpty string.
Add a check to prevent the plugin loader from trying to load
in this case.

Change-Id: Iadb418d32fdea1d472d6c00726ad039b4afbf409
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-24 12:35:01 +00:00
Topi Reinio
e87df57abf qdoc: Document macro parameters
QDoc has the ability to accept parameters for macros but it was
never documented.

Change-Id: Iaf9a629c906fbe1552717c7444a0fd52b5655a3f
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-24 12:21:35 +00:00
Ulf Hermann
1765046730 Deliver mouse press and release events on X11 also when dragging
We generally assume that for every mouse press we also get a mouse
release eventually. The event filter installed by QBasicDrag broke this
assumption as it didn't take care of filtering mouse press and mouse
release events symmetrically. We cannot immediately pass on the release
event as that would mean a release event is generated from a press
event (via the blocking drag call), which breaks assumptions in other
places.

Change-Id: If7e48c7dc0ef5265bed4f9a9366a7606ec875d93
Task-number: QTBUG-46361
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-09-24 12:16:50 +00:00
Christian Kandeler
73b8cd879c QSettings: Special-case serialization of QDateTime.
QDateTime values with a UTC offset are not correctly serialized with
QDataStream::Qt_4_0. So use a newer QDataStream format for this type and
mark it with "@DateTime" instead of "@Variant".

Task-number: QTBUG-46551
Change-Id: I211c89e8cd0211c949ec993e6ffd5192d0eebbb3
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-24 11:25:36 +00:00
Joni Poikelin
9f779088f4 Change indicator arrow direction in Fusion style
[ChangeLog][Important Behavior Changes] Arrow indicator now
consistent with platform styles

Task-number: QTBUG-34611
Change-Id: If55e00a37a22288b2179e03fba299aeebad0ebcf
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-09-24 08:13:13 +00:00
Joni Poikelin
61f2e9a9a7 Fix QItemSelectionModel deselection range
Left and right were swapped which caused invalid selection ranges to be
emitted through selectionChanged.

Task-number: QTBUG-48402
Change-Id: I18692c2b50c49ab39065f9b360b37b7615227ee9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-09-24 08:13:07 +00:00
Friedemann Kleint
7183d08095 Tests: Harmonize code checking on platform name.
Use case insensitive comparison and static invocation
of QGuiApplication::platformName().

Change-Id: I8c197c7b4f0669f71c019fbcee09a0f03dfab399
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-24 07:49:30 +00:00
Morten Johan Sørvig
f0f9f309e0 Support non-latin1 platform plugin paths
Replace two instances of QLatin1String() conversion
with QString::fromLocal8Bit()

Change-Id: I04336c47b0c030c69e38db9aa4dcd208d7200b63
Task-number: QTBUG-48399
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-24 07:43:19 +00:00
Christian Kandeler
7a8da57a63 Be more forgiving about arguments to QString::arg(double).
The arguments for the width and precision parameters, that is. There's
no reason to crash if a user sets e.g. a precision of -2.

Task-number: QTBUG-46838
Change-Id: I4afc004a1b8aa1306fd996360b16117b2b643640
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-24 07:40:39 +00:00
Topi Reinio
1ddd33ae66 Doc: Fix QDoc warnings for QTextStream
qtextstream.cpp:2825: warning: Can't link to 'left()'
qtextstream.cpp:2825: warning: Can't link to 'right()'
qtextstream.cpp:2797: warning: Can't link to 'right()'
qtextstream.cpp:2797: warning: Can't link to 'center()'
qtextstream.cpp:2811: warning: Can't link to 'left()'
qtextstream.cpp:2811: warning: Can't link to 'center()'

Change-Id: I613354ca8137030c9f121cb976fe3bc35e1a415b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-09-24 07:38:00 +00:00
Thiago Macieira
0d75f8e95a tst_QDBusAbstractInterface: fix racy test failing every so often
The explanation is in the code comment. Ever since QDBusConnections
began being processed in a separate thread, we were relying on the fact
that the main thread didn't begin processing its event queue until the
second event got posted (the event loop only exits after it has finished
processing all pending events). We had a race between the main thread
starting its processing, at which point it decides which is the last
event it will process, and the QDBusConnectionManager thread posting the
second event.

This is very fragile code, since it depends on the behavior of
QDBusConnectionPrivate (how it stores the signal relays in a hash) and
that of QHash with duplicate keys. This only works because the hash
key between the two connections is the same (it's only dependent on the
method name and interface name). If we ever begin using something that
isn't the same between "control" and "p", then with QHash's randomness,
we'll be racy again.

Change-Id: I42e7ef1a481840699a8dffff1406c3a4674ec3a6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-09-24 07:37:05 +00:00
Jędrzej Nowacki
a153bb232c Stabilize qguieventloop test.
The test assumed that an event loop can be tested for emptiness
multiple times, which is wrong because an event can be delivered any
time.

Change-Id: Ic44245321eeed2091b640ada2c83d205b83a1cc2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-09-24 07:36:25 +00:00
Frederik Gladhorn
493d08aeea Fix tst_qthreadstorage
This test when running on Windows has a race condition since in qthread_win.cpp the
finished signal is emitted before everything is cleaned up.

Change-Id: I3c03d9a245e297e8f79b2be2c34398bf7bac9bae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-09-24 07:34:06 +00:00
Oliver Wolff
d53695501a winphone: Obtain QLocale::uiLanguages properly
The methods are supported on Windows Phone since 8.1 so that the
simplified Windows Phone code isn't needed any more.

Task-number: QTBUG-48140
Change-Id: I21c488fe1a1322e85bbe088fb47e81893fd12d40
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-09-24 07:34:03 +00:00
Louai Al-Khanji
c0c49b8df7 Allow vertical resizing of wizard pages with water mark
The current behavior has been observed to irritate a lot of users, for
instance in the Qt online installer and the Boot2Qt flashing wizard.

Change-Id: Icd7b819a0cbc9fd04b86b4777c5b9e829045d6df
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-24 07:32:11 +00:00
Morten Johan Sørvig
3ea04c7d38 Cocoa: Support Qt::WindowTransparentForInput
Map this to ignoresMouseEvents on NSWindow.

Task-number: QTBUG-45498
Change-Id: I86e518bbf805647d9f12b1af1747355ef55cc167
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-09-24 07:11:47 +00:00
Serge Lysenko
c6c930415b Fix maximum size of .ico files in ICOReader::write()
According to MSDN, a maximum icon size is 256 pixels.

http://blogs.msdn.com/b/oldnewthing/archive/2010/10/18/10077133.aspx

Change-Id: Id87c89a20c9cba6ef041b49f93f84c5e9c3eb79f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
2015-09-24 04:38:35 +00:00
Jan Arve Saether
d797a04adc Speed up printing when drawing opaque primitives.
We only need to merge the rectangles into a region if we are painting
a non-opaque a primitive with alpha.

Performance measurements QT_print_speed_bug.zip:
Excluding patch: 244686 ms
Including patch:   5070 ms

This is an improvement of 48x (for debug build)

Task-number: QTBUG-48334
Change-Id: I03684c6e7d8a5fb039ea6477ed1a860f09e1b08c
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-09-23 16:38:07 +00:00
Romain Pokrzywka
68ea2f7e9b Synchronize QInputDeviceManager touch device count with QTouchDevice
This ensures that the values and signals reported by QInputDeviceManager
for touch devices always have corresponding entries in the list returned
by QTouchDevice::devices().
It also adds proper QTouchDevice unregistration when the underlying
input device gets removed by the evdevtouch QPA plugin.

Change-Id: I7bdf2f7435c775d15bddce8ba1e731afdc1d948a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 16:29:30 +00:00
Thiago Macieira
29bc68cf16 Add code to perform overflow-checking additions and multiplication
Most processors have carry flags which they set on addition overflow, so
it's a good idea to access them whenever possible. Most of them also
have widening multiply instructions that can be used to detect overflow
of the non-widening version.

Tested to compile on:
 Architecture     Compiler
  x86             GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta
  x86-64          GCC 4.9, GCC 5*, Clang 3.6*, ICC 16 beta
  x86-64 ILP32    GCC 4.9, GCC 5*, Clang 3.6*
  IA-64 LP64      GCC 4.8
  ARMv7-A         GCC 4.9, Clang 3.6*
  AArch64         Clang 3.6*
  MIPS            GCC 4.9, Clang 3.6*
  MIPS64          GCC 4.9, Clang 3.6*
  PowerPC         GCC 4.9, Clang 3.6*
  PowerPC 64      GCC 4.9, Clang 3.6*
  SPARC           Clang 3.6*
  SPARCv9         Clang 3.6*

[*] supports the intrinsics

If the compiler does not offer a way to detect an overflow, we do it by
hand. For unsigned additions, that's easy, since the C++ language
specifies the behavior of the overflow. That's also the reason why this
code is implemented only for unsigned integers.

For the multiplication, if the compiler does not support widening
multiplications, we do it with a division instead. This is necessary for
GCC < 4.5 and compilers not compatible with GCC or MSVC.

Change-Id: I049a653beeb5454c9539ffff13e637de0f1338c1
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 16:19:45 +00:00
Albert Astals Cid
0396c7a7d8 Doc: Mention that calling parent class event() is important
If you don't deleteLater and more won't work

Change-Id: I47cbb24f8e22a7f269a0297410e4163878819f82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 15:59:39 +00:00
Laszlo Agocs
867fc30c7c windows: Improve error handling with EGL
When disabling the graphics adapter, things start failing
with context lost and then bad_alloc and bad_access failures
when creating contexts/window surfaces.

Swap buffers now handles context loss. This makes it possible
for Qt Quick to act when the graphics adapter goes away.

Similarly, the window surface creation failure EGL_BAD_ACCESS
is treated the same way as context loss.

Note that this will not really help the main issue, because
rendering is not possible without a GPU (reinit attempts will
fail either at context creation or window surface creation),
but proper logging and context loss reporting improves the
situation somewhat.

Also unify and prettyify the warning and debug prints.
This makes it easier to understand what is going on.

Change-Id: Iec3a9b54f1134e78e87eefcf938525283ec9412a
Task-number: QTBUG-48095
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-23 15:50:52 +00:00
Friedemann Kleint
47e4ae86a8 Polish the settings editor example.
- Set QtProject as organization.
- Remove unneeded member variables.
- Use member initialization in the constructor.
- Use new connection syntax in createActions()
  to assemble the menu there, removing the createMenus()
  function.
- Introduce a QSharedPointer to ensure settings are deleted.
  Previously, the settings were parented on the tree widget,
  which is a hack of sorts.
- Fix OS X macros.

Change-Id: Ibbc6bfb03eb5c7eda077b1a3aa3f1707667f7f13
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-23 13:28:02 +00:00
Morten Johan Sørvig
2e02130e39 Close QWidgetWindows by closing the window
Close the window instead of closing the widget. This will
run the QWidget close implementation followed by the
QWindow close implementation.

Change-Id: Iaba3cf0359410def858363a02fceaeddb7095aaa
Task-number: QTBUG-43344
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 13:02:10 +00:00
Morten Johan Sørvig
470c8b68df QWidgetWindow: call base class close event impl
Call the QWindow close event handler when processing
close events in QWidgetWindow.

Change-Id: I2b8691735962f6a222a30a847bb18cc6c86b55d4
Task-number: QTBUG-43344
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-23 13:02:07 +00:00
Serge Lysenko
a4897c224a Implement the QImageIOHandler::ImageFormat option for ico files.
We need a method to check image format of .ico with QImageReader loader.
That is very useful to filter out low resolution icons.

Change-Id: I2dfe3aa49cbc1e05836be846ae3da30786b98ff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-23 12:59:29 +00:00
Christian Kandeler
a6e2213e00 QDateTime: Remove redundant check.
Change-Id: I1a027526f24707f9431fe60ad08e41b5b07ffea3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 12:57:25 +00:00
Thiago Macieira
113a51b615 Update the Qt 5.5.1 changelog for qtbase
Change-Id: I42e7ef1a481840699a8dffff1405e4154dd6b5dc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-23 06:49:28 +00:00
Thiago Macieira
dc716f2dc2 ICC on Windows: Disable ref-qualified member functions in MSVC <= 2013
Like MSVC, ICC on Windows in debug mode always makes calls to
dllexported functions instead of inlining them. Since MSVC 2013 doesn't
know about ref-qualification of member functions, this creates an
incompatibility between DLL creation and DLL use.

Task-number: QTBUG-48349
Change-Id: I42e7ef1a481840699a8dffff14053b594810fb42
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-09-23 06:49:20 +00:00
Christian Kandeler
c619d2daac QDateTime: Ensure a valid timezone when using the "offset constructor".
The timeZone() function used to assert when called on such an object
(or, for a release build, return an invalid time zone).

Change-Id: I6ae8316b2ad76f1f868e2498f7ce8aa3fcabf4a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-23 06:46:44 +00:00
jian liang
be2e0f75ae Free the QFreeList object allocated memory on exit
This memory allocation was introduced in
314c83c0c2. With a compiler without thread
safe statics support mutex.cpp use a function named freelist() to create
the global QFreeList object. it will be created when the first time it was
accessed, but will never be released. This patch use Q_DESTRUCTOR_FUNCTION
to delete this object.

Task-number: QTBUG-48359
Change-Id: I4e4716930930aa98630101a1f96de6a7672af9cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 23:32:05 +00:00
Thiago Macieira
e01fa5f152 Mark QHostAddress relocatable
Change-Id: Iee8cbc07c4434ce9b560ffff13ca3fb80be56be6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-09-22 22:47:19 +00:00
Thiago Macieira
af6467c532 Fix some -Wcast-qual warnings
This is happening in code I don't usually test (32-bit, non-ICU, etc.)

KeccakF-1600-opt32.c:481:22: error: cast from type 'const unsigned char*' to type 'UINT32* {aka unsigned int*}' casts away qualifiers [-Werror=cast-qual]
KeccakF-1600-opt32.c:217:62: note: in definition of macro 'extractLanes'

Change-Id: I42e7ef1a481840699a8dffff140209823301a07a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-09-22 22:46:27 +00:00
Thiago Macieira
3d7586b760 Auto-detect whether 64-bit std::atomic really works
The C++ standard says it must, but some badly-configured toolchains seem
to be lacking support.

In particular, for some 32-bit platforms without native support for
them, GCC implements 64-bit atomics via out-of-line functions in
libatomic. If that library is missing... well, then std::atomic 64-bit
doesn't work and we mustn't try to use it.

This was found when trying to compile Qt 5.6 for MIPS 32-bit:

Linking library libQt5Core.so.5.6.0
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::load(std::memory_order) const':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:500: undefined reference to `__atomic_load_8'
.obj/qsimd.o: In function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
/opt/poky/1.7/sysroots/mips32r2-poky-linux/usr/include/c++/4.9.1/bits/atomic_base.h:478: undefined reference to `__atomic_store_8'

Yocto bug report: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8274

Change-Id: I42e7ef1a481840699a8dffff140224d6614e5c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-09-22 22:46:08 +00:00
Samuel Gaist
847d5d1309 Implement sessionId/key generation on Windows
sessionId and sessionKey generation on Windows was lost in the
transition of Qt 4 to Qt 5. During the reimplementation of the
QSessionManagement feature, that part has been missed. This patch fixes
that.

Based on Qt 4

[ChangeLog][QtGui][Windows] Fixed a regression where both
sessionId/sessionKey were empty

Task-number: QTBUG-47690
Change-Id: I17b5fbee9d0979d292d30b94b3a2cc3107fc54fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-09-22 21:40:21 +00:00
Samuel Gaist
843199f303 Add shader files to examples documentation file list
Currently the shader code is not accessible from the examples
documentation page. This patch fixes this by adding .glsl to the file
extensions list for examples

Change-Id: Iafe327d1bd99b78641a89863f9dbaf8112651c45
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-22 21:40:13 +00:00
Samuel Gaist
8a0be4007d Doc: update QFileDialog::setSideBarUrls code snippet
The example code uses QDesktopServices::storageLocation which has been
replaced by QStandardPaths. This patch fixes this.

Change-Id: Ifff25fcb9d85b37ef8247cb4cd9c4c1c8d368780
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-22 21:40:07 +00:00
Tor Arne Vestbø
9c71f55ef9 QFontEngine: Read minimum left and right glyph bearings from 'hhea' table
This table has values precomputed based on every single glyph in
the font, not just the subset we use as a fallback, which should
improve both performance and correctness.

The fallback codepath of computing the minimum values based on a
subset of the characters in the font is left in, as we still need
that for bitmap fonts, and some font tables that have invalid
values.

Change-Id: I71aac1e09c9f9de80446b023ba15a9e2afe7d226
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-09-22 21:19:12 +00:00