Commit Graph

25350 Commits

Author SHA1 Message Date
Marc Mutz
dd8351b654 QLatin1String: add default ctor
A pending change in uic depends on this.

[ChangeLog][QtCore][QLatin1String] Added default constructor.

Change-Id: Ie6f5dfc7b38683a488b0ff7f31404800ef5ee188
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-20 09:27:21 +00:00
Venugopal Shivashankar
21b1a492ed Doc: Add the Map Viewer example to the highlighted examples list
Now that Qt Location is a fully-supported module in 5.6, it is
worth highlighting an example that demonstrates the new feature.

Change-Id: I70553f84af5587e3604115684ea1ea75203b91ce
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-10-20 08:57:17 +00:00
Laszlo Agocs
5c3cd4a6a1 Move EGLDevice/Output/Stream resolvers into eglconvenience
Needed by Qt Wayland as well.

Change-Id: Ic349f0a79831e9121cbe9885246897efea2701d5
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-10-20 08:54:04 +00:00
Lars Knoll
f4bfdc8610 Add the proper NOTIFY signal to the primaryScreen property
Change-Id: I1c1fa6c93d9c0284b5a9b790c9066a0c8c722d70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-20 06:54:11 +00:00
Maks Naumov
d2648d5f3f QFileSystemModelPrivate::name(): avoid the double-lookup
Change-Id: I67507248220fbbddc67ab60ecb1933e1fbacf5fd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-20 06:45:57 +00:00
Maks Naumov
bfb6a8cd44 QFileSystemModel: avoid detaching
Change-Id: If7e9f11e5514b2f8975e7f83c56b606e67f5952f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-19 17:58:24 +00:00
Marc Mutz
85226dfed3 QLatin1String: add test
QLatin1String wasn't really tested except as a drive-by.
Unearthed a discrepancy with docs. Fixed the docs.

Change-Id: I1246bb33888132edbc4e22da792a480a156357bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-19 15:55:21 +00:00
Rafael Roquetto
c9195ab36d TextEdit example: fix build when clipboard is disabled.
Change-Id: Ib25563e3dc299dc2d23bed8b3071af1ba81150e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 14:56:45 +00:00
Friedemann Kleint
6ea67f52da Image viewer example: Fix broken error message formatting.
Task-number: QTBUG-48851
Change-Id: Ie86bcc498c9dc1f9754192a256a28fa467f6dbc9
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-10-19 14:50:32 +00:00
Marc Mutz
037ba8d7af QGestureManager: use qEnvironmentVariableIntValue()
It doesn't allocate memory, so cannot throw and is a lot faster
than qgetenv().

Change-Id: I863593166db8eff4c4466996110f5cfdb758ec00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-19 11:24:07 +00:00
Marc Mutz
948e88dab2 QMimeBinaryProvider::loadMimeTypePrivate(): avoid an unneeded QStringRef -> QString conversion
Change-Id: Id6baae4b710fd9aa8bdc4721dbe64e2d881163bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-19 11:19:51 +00:00
Friedemann Kleint
c977c687cb QMdiSubWindow: Do not close when doubleclicking on disabled Restore action.
Check whether the action under the mouse is enabled before closing.

Task-number: QTBUG-48493
Change-Id: I2a0669840b9b6c81dacdf179325301c02f1c0c35
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-10-19 11:13:27 +00:00
Friedemann Kleint
2042a091a3 QAbstractItemView::sizeHintForRow()/Column: Check for null delegate.
The delegate may be null in QHeaderView.

Task-number: QTBUG-48543
Change-Id: I4d3ba104b0b57431e8765271dc2dc880be096672
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-10-19 11:06:22 +00:00
Dan Cape
e56938b4bb QLineEdit: Unable to drag selected text when aligned right or center
Created local inSelection function to modify the x value (similar to
xToPos()) before sending it to the control. Ran the QLineEdit test and
manually tested with AlignLeft, AlignRight and AlignCenter.

Change-Id: I088430580dc87f3cfff90c4cd9ff90e6ab215f57
Task-number: QTBUG-48495
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-10-19 11:01:07 +00:00
Jani Heikkinen
9636d8bee0 Add header template for commercial only modules
We need to add header template for commercial only modules in the
upstream now when we are using same ci system for building and testing
all. Without this tst_licenses.pl will fail in coin for those
commercial only modules

Change-Id: Ifb8170818b3b730b10e920012757af42442f0edc
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-10-19 10:37:18 +00:00
Alexander Volkov
59b860450f Polish the complexpingpong example
- Use QDBusServiceWatcher to detect that pong service became available
  (QDBusConnectionInterface::serviceOwnerChanged() signal is deprecated).
- Use new connection syntax.

Task-number: QTBUG-28082
Change-Id: I7b93b961ee6d45aaeefab77fa1d1943e38b4a4c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 10:29:50 +00:00
Friedemann Kleint
3cae29b746 Windows: Open GL blacklist - Disable GMA 3150
The card cannot handle Desktop GL nor ANGLE.

Task-number: QTBUG-43243
Change-Id: I5a349be1b09f1ef2decd36bef87a90b230ca2c04
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-19 08:53:47 +00:00
Gunnar Sletta
2e3ebcd1d4 Don't crash when QOpenGLPaintDevice is created without context.
Change-Id: Ic826158a1570ec49e9847cf040ce897a682048db
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-10-19 08:45:01 +00:00
Kai Koehne
c890fa4787 Remove webkit-guide from examples
Qt5WebKit is now deprecated and removed from the packages.

Change-Id: I176344cb2a6b43ffc44cc0e7ef1abb4e765a35b4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-19 08:44:45 +00:00
Topi Reinio
06d90c14b4 Doc: A simplified style for rendering docs with QTextBrowser
Add a new documentation template, with simplified CSS rules that
work better when using QTextBrowser as a backend for Qt Assistant
or Qt Creator Help.

Select this new template by default for offline documentation
builds, but keep the old offline template as part of the template
files; use JavaScript to switch to the 'standard' CSS when the
generated files are viewed with a web browser.

Task-number: QTBUG-48322
Change-Id: Ib197896200bb482935f6e9f3a38976133a1e804d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-10-19 08:22:19 +00:00
Topi Reinio
afcc26619f qdoc: Conditionally generate the navigation bar items as table cells
The new offline template for Qt 5.6, including simplified CSS rules
suitable for rendering with a QTextBrowser, requires the navigation
bar to be generated as an HTML table instead of the previously-used
unordered list.

Make QDoc select between the two based on the contents of
HTML.postheader .qdocconf variable, which defines the header of
the navigation bar.

Modify the old offline CSS to look good also when the nav. bar
is a table.

Task-number: QTBUG-48322
Change-Id: I00e16c24f436e0be049b85d4bcfc916c33ea6b73
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-10-19 08:22:15 +00:00
Topi Reinio
1735024e9d qdoc: Warn if a topic command is not allowed in a \qmlpropertygroup
Change-Id: Icff1f3a4e85ce1eb2afe0a4d66f0728dc414c6ec
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-10-19 08:22:11 +00:00
Marc Mutz
a769ab22ea uic: updates from running generate_ui (III)
(as of qttools:a7ff0d7d9ac2ff17e540521ef59029bf5cb35e14)

Saves almost 10K of text size on optimized GCC 4.9 AMD64 Linux builds.

Change-Id: Ib059e8b076362dbf81356861bebaec3810af6dcc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 08:21:10 +00:00
Marc Mutz
5c995fbb8f uic: updates from running generate_ui (II)
(as of qttools:1ed9418c0f38190cd839164229eeb7504438f740)

Change-Id: I4a30878450218a56fa6af23b6784b314ab499338
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 08:21:02 +00:00
Lars Knoll
2eb0f8488c Make sure registered schemes are lower case
QUrl::scheme() already returns the scheme in lowercase, so
this should guarantee that the matching works correctly.

Task-number: QTBUG-5552
Change-Id: Ie68e01943c8cb105e11e54b348a090d9ffd5e65b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-19 07:36:27 +00:00
Lars Knoll
3695285fde The C locale should omit group separators by default
Numbers formatted in the C locale should not use group
separators by default.

[ChangeLog][QtCore][QLocale] The C locale does not use group separators
when formatting numbers any more.

Task-number: QTBUG-4044
Task-number: QTBUG-3068
Change-Id: Ia647a72efc11fecd66d22f9253562b1d4ef58168
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-19 07:36:13 +00:00
Samuel Gaist
f7e9e035fd Fix cocoa plugin build with OS X 10.8 SDK
With the 10.8 SDK, NSArray may not respond to firstObject which ends the
build with an error. This implementation doesn't use it and also handles
the case where no screen is available when calling
qt_mac_mainScreenHeight

Change-Id: Idce278423c37cc24d8fc31062a386e78d6487492
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-10-18 21:00:10 +00:00
Thiago Macieira
27361eadf1 Add a deprecation warning to configure about -no-c++11
We'll remove it in Qt 5.7, so people ought to be notified now.

Change-Id: Ib056b47dde3341ef9a52ffff13ef6caa91757a9f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-18 04:47:00 +00:00
Thiago Macieira
b58fc66ed7 configure: Open qconfig.h, qconfig.pri and qmodule.pri only once
Redirecting on every command is wasteful.

Change-Id: I42e7ef1a481840699a8dffff1404fa0602805d1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-18 04:46:12 +00:00
Maks Naumov
25e1f4549a QFileSystemModel: remove unused functor
Change-Id: I5809ebdfcd973336cf42735a1275b57f12e1823c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-17 19:30:41 +00:00
Morten Johan Sørvig
068a545339 Add support for "@3x" image loading.
Implement as generic "@Nx" support in an exported
qt_findAtNxFile function.

3x devices now get one extra file existence test
in cases where @3x versions are not present. 1x
devices are still on the fast path where there are
no extra file system accesses.

Add an @3x image to the highdpi manual test.

Change-Id: I4ce3fc245ada01ea410abe1443ceb1e3abf7c17f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-16 21:47:25 +00:00
Thiago Macieira
9d1fab424e Make the C++11 atomic support the default, if available
Change-Id: Ib056b47dde3341ef9a52ffff13ef1647ccd607b1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-16 18:52:00 +00:00
Morten Johan Sørvig
c751cef8d6 Move QEventDispatcherCoreFoundation to QtCore
Export it for use by the iOS platform plugin. Also
move QCFSocketNotifier, and export for use by the
Cocoa platform plugin.

This is a pure code move with no intended behavior
changes, in anticipation of using the Core Foundation
event dispatcher as the default Qt Core event dispatcher
on OS X.

Change-Id: I43677d2f6f3c1d0ed0415c964225aa97d2f13078
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-10-16 18:07:32 +00:00
Tor Arne Vestbø
40b4c305d8 Check that QPlatformIntegration::createPlatformWindow() doesn't fail
We expect createPlatformWindow() to return a valid platform window. If
it fails we now assert in debug, and emit a warning in release. The only
platform where this is currently possible is on Windows, where the
platform plugin will return 0 if CreateWindowEx for some reason fails.

Change-Id: Ia2461efcfc48d180e073fa372d9c385650129e1c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-16 14:03:01 +00:00
BogDan Vatra
c63f4c5d01 Android: Set "immersive" mode on earlier android versions.
Most of "immersive" flags are available on earlier Android versions.

Change-Id: Ic4f03a3c9491570bc5f8c5afbb61669644b20d8e
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-10-16 14:02:46 +00:00
Timur Pocheptsov
5632375b86 Cocoa integration - fix Qt::WindowFullscreenButtonHint
Window collection behavior changed from OS X <= 10.9 to 10.10 to 10.11:
- the default behavior (0) included fullscreen button before 10.10, did not include
in 10.10, and now it's again included.
- it's not enough to exclude fullscreen - since the defualt is 0,
 0 & ~fullscreen does not help - we also have to set fullscreen
 auxiliary.

Task-number: QTBUG-48759
Change-Id: If427bd5cfa5c3cefc71f09dae7baa0d232601ee4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-10-16 14:00:47 +00:00
Edward Welbourne
1901adbab7 Split two error cases so they get reported distinctly.
If a macro is used with too few parameters, complaining about its
definition using '#' followed by something other than a macro
parameter name is apt to be confusing - reading the definition will
reveal that the name in fact is a macro parameter after all.  The
reader needs attention directed to the invocation, not the definition.

Split the test in two: one to test the prior error message does in
fact get produced for an invalid macro definition, the other to test
the invalid invocation case.

Task-number: QTBUG-46210
Change-Id: Ie177a56d346e553bf9d67e2008a4352633afa1ae
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-10-16 13:59:59 +00:00
Marc Mutz
dde8d5e3a0 QTextStream: add missing op<<(QStringRef)
It simply is missing. We could wait for QStringView to come around, but
I need this function in uic _now_, so let's add it.

[ChangeLog][QtCore][QTextStream] Can now stream QStringRef without converting
to a QString first.

Change-Id: Idd178e0ba8a89c025f4533d46de912cbdb3883d5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-16 12:17:36 +00:00
Tor Arne Vestbø
e9835a3812 Document that QWindow::fromWinId() should be used with caution
Change-Id: I28c58fb720c323048615efe677a920f179ef9d20
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-16 12:13:39 +00:00
Tor Arne Vestbø
b37a548d08 Clarify foreign window documentation a bit
Change-Id: I50193cb0c106bc17a008e6778d2d722545c7cb1c
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-16 12:13:34 +00:00
Maurice Kalinowski
d49c0eb3fc WinRT: Initialize platform services
platformServices has not been created and caused a crash as soon as an
URL gets opened.

Task-number: QTBUG-48740
Change-Id: Ib099a0ff3007b168738e02c0fab8f9ca7bcd25c7
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-16 12:13:30 +00:00
Thiago Macieira
4f829afc61 Turn C++11 on by default if the compiler supports C++11
[ChangeLog][Important Behavior Changes] qmake now enables C++11 support
by default if the compiler is known to support it (unless the compiler
defaults to C++14 or a later edition). To disable this, add to your .pro
file: CONFIG -= c++11. Note that Qt 5.7 will require C++11 support, so
it is a good idea to ensure your code works with that compiler
setting. (Note: it is not possible to disable C++11 support with
Microsoft Visual Studio)

Change-Id: Ib056b47dde3341ef9a52ffff13ef13ee2cf888eb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-10-16 07:25:21 +00:00
Oliver Wolff
ffa7b050a1 winrt: Properly handle when a remote host closes a tcp connection.
Task-number: QTBUG-48476
Change-Id: I1933dfe7e73330a8f0d5ac8d3d7a834e0d77270a
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-10-16 04:34:40 +00:00
Samuel Nevala
49640d417f winrt: Wait for main thread to exit before exit.
This will allow application main to go out of scope and free objects
allocated there.

Change-Id: I7b7199ecf67afe578bac043f16b064c9daaae04a
Task-Id: QTBUG-48760
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-10-16 04:34:32 +00:00
Thiago Macieira
09d9af59f0 Fix left-shift wider than an int's width
The other left shifts in this file already have the Q_UINT64_C wrapper.
This one was missed.

Change-Id: I42e7ef1a481840699a8dffff140d758ac370c402
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-10-16 04:02:32 +00:00
Marc Mutz
aa485aee2f QTextStream: optimize putString()
Instead of filling a QString with the padding characters, use a
QVarLengthArray. Do this only in the code path where it's actually
needed, and mark that code path as unlikely.

Change-Id: I11e04ccc4a07e16e430f2ea6dbb2f0f736908f5b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-15 22:27:31 +00:00
Marc Mutz
035f5478a5 tools: use QStringBuilder
src/tools/bootstrap was already compiled with QT_USE_STRINGBUILDER,
by way of load(qt_module), but the actual apps weren't.

Some apps become smaller, some larger; all (presumably) faster.

Change-Id: Idc8662e62ec14b27e730de9842bec295a1b5566e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-10-15 22:26:28 +00:00
Thiago Macieira
c9e2763909 syncqt: complain if a public header includes a private one
We should even cause syncqt to exit, but that would cause developers
trying to test something to be unable to. So leave it just with an
"ERROR" message. That is hopefully enough.

Change-Id: Ib056b47dde3341ef9a52ffff13ef5f8588b62b99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-10-15 16:20:37 +00:00
Thiago Macieira
c401506ffc QDBusServer: Fix uninitialized member
If you used the QString constructor overload and passed an empty
address, the d pointer would remain uninitialized.

Found by Coverity, CID 11724.

Change-Id: I42e7ef1a481840699a8dffff1407ead3ee703d6e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-10-15 16:20:35 +00:00
Thiago Macieira
7dc0f42e78 QDBusConnection: Remove unused members
I can't find any use, ever, of them.

Change-Id: I42e7ef1a481840699a8dffff1407eb1a93b128a8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-10-15 16:20:32 +00:00