Commit Graph

16694 Commits

Author SHA1 Message Date
Nico Vertriest
04133551a5 Doc: Move XML example documentation to correct location
Moving the examples documentation to resolve doc linking
issues.

Task-number: QTBUG-34749
Change-Id: I2adb1b5d37911c7df6a78a03741d3d43ab24eafb
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-20 10:37:43 +01:00
Konstantin Ritt
e4a910eb2a Minor optimization
Querying the "extra" fallback fonts (which are hard-coded names, actually)
for family only makes sense for scripts that cover more than just a single WS;
these currently are Common (<-Inherited) and Han.

Change-Id: I37682f1ae51a476a21b933607de48b01255cf1c3
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-12-20 10:07:05 +01:00
David Faure
13c246ee11 QAbstractSocket: fix setReadBufferSize from readyRead slot.
In a slot connected to readyRead, if the app detects that the
buffer size is too small and increases it, it expects that
readyRead() will be emitted again.

setReadBufferSize() doesn't re-enable the socket notifier when
calling from within readyRead, and readyRead itself was missing
the code to do it.

Change-Id: Ia00a3066ad3ba09d5cfae0716adc5691ae96c3fa
Done-with: Thiago
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-20 09:30:05 +01:00
Thiago Macieira
4bbfedd353 Ensure that all .obj wait for the PCH to finish
Otherwise, you get compilation errors like:
c:\Qt\qt5\qtbase\src\corelib\global\qlogging.cpp : fatal error C1083: Cannot open precompiled header file: 'configure_pch.pch': Permission denied

Change-Id: I56401ce7f6aff32e97617c3b4fd5fe06fbeebf58
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-20 00:35:52 +01:00
J-P Nurmi
8fb497d1f4 qmake: do not include GENERATED_SOURCES to dist
Task-number: QTBUG-21910
Change-Id: I4cc3f75f5ee4672f89b0b965055a02ac24c16cc8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-20 00:35:23 +01:00
Andrew Knight
863810eb28 d3dcompiler_qt: Remove directory creation inside the proxy library
Use of mkpath/mkdir is removed in order to make the proxy less
invasive when there is no compiler service running. Creation of the
directory structure is fully the service's responsibility.
Service availability is now only checked once, at the first invocation of
D3DCompile, as it is expected to be started before the application.

Change-Id: Ib8c4f062c418497c2253daf524654e1db30dae47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-19 21:23:48 +01:00
Andrew Knight
1487ec4da0 d3dcompiler_qt: Fix export warning on MSVC
MSVC warns about multiple symbols when using extern "C", but MinGW
requires it. #ifdef it for MinGW.

Change-Id: I8b16ab4ea129312787090e042115d8f709fdd814
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-12-19 21:23:42 +01:00
Giuseppe D'Angelo
492d922207 Upgrade the PCRE bundle to 8.34
New upstream version, changelogs at:
http://pcre.org/news.txt
http://pcre.org/changelog.txt

Qt still requires 8.30.

Change-Id: I76794a3079601b07c469b952367f71f794079edc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-19 17:23:29 +01:00
Konstantin Ritt
260fe98525 Update bundled HarfBuzz sources up to 0.9.25
Most important changes:
- Myanmar, Indic, Javanese / Buginese shaper improvements
- More aggressive shape-plan caching
- Additional OpenType language tags

Change-Id: I54ed62cfe936c06c18589d09ac119a0f5881a235
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-19 05:49:27 +01:00
Konstantin Ritt
4b2c73b476 Fix writingSystems determination by code page range bits
Do exactly what windows font database does to determine
writingSystems in case of non-truetype fonts.

Task-number: QTBUG-13585

Change-Id: I4a1a48d74c36e403c31f20847cf80295d89a34bc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-19 05:49:20 +01:00
Daniel Giurcanu
dbf3c559da tslib: Derive default device value from TSLIB_TSDEVICE environment variable
Most devices that use tslib have the device path defined by
the TSLIB_TSDEVICE env. variable.

Change-Id: I89fc17cb2c7fba7741de2fd348aacd608cb21a2a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-12-18 21:57:44 +01:00
Daniel Giurcanu
1e44ff671e Fix [Linux]/[Linuxfb] screen initialization.
For the linuxfb platform the screen was registered
before its geometry was calculated resulting that
the qpa controller will deal with a screen instance
that has geometry of QRect(0,0,1,1) .
This masks pretty much all the painting and the input.
The fix is to call screen init before registering
the screen instance to the qpa controller.

Change-Id: If84daca6587dc368301b578cdbf7b2a65a56a5b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2013-12-18 20:29:07 +01:00
Morten Johan Sørvig
c8d696eee7 Fix static builds on Mac.
QMacPasteboardMime is a public class in Qt 4. Qt 5 has
two copies, one public QtMacExtras and an internal
one in the cocoa plugin. This causes a symbol collision
when building statically.

Rename the internal copy to QMacInternalPasteboardMime.

Task-number: QTBUG-35310
Change-Id: I891787b451a0b342ed85aa7196e606bc11623e21
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-12-18 20:28:37 +01:00
Rafael Roquetto
ce9ece3b56 Fix qlocale_blackberry buffer initialization
The QVarLengthArray inside qlocale_blackberry.cpp was being preallocated with
512 bytes, that means internally it could grow up to 512 bytes using the
stack before switching to the heap, but its actual semantic size was still 0.
After qt_safe_read(... buffer.data() ...) was being called, data was written
to the QVarLengthArray buffer, but its semantic size was still 0, since it was
not resized or anything. This triggered an assertion when buffer[bytes] = '\0'
was assigned, since 'bytes' > buffer.size() ( == 0) despite buffer.capacity()
== 512.

Change-Id: I5503ee9b02413794f67730700fba05a4c194d465
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-12-17 19:05:50 +01:00
Harald Fernengel
e7d39c9292 Introduce Q_ATTRIBUTE_FORMAT_PRINTF
Removes a lot of copy-paste code for flagging printf style functions.

Change-Id: Iecc1e312d1f28b5cbb6b297039f1cdbbc888f843
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 19:05:50 +01:00
Friedemann Kleint
d1f8a56416 qthread_win.cpp: Fix warnings when waiting for adopted threads.
Task-number: QTBUG-35591

Change-Id: I63169bd8a9758a7dad33d4231d3d6c9d71c7e252
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 16:44:03 +01:00
Alejandro Exojo
be29c4053e Clarify foreach's documentation on valued-containers
- Explain that values() is unnecessary and causes an extra copy.
- Replace "are fastest" with "are faster".
- Briefly explain the snippet.

Change-Id: Iff1d3a0b6140fca1d78157aeeca3d538c4d78b84
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 09:11:49 +01:00
Mark Brand
2975aa39e6 update bundled sqlite to 3.8.2
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)

Change-Id: I41a268bd077e396810965ca27cd572cef7259d58
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-17 09:03:38 +01:00
Konstantin Ritt
e1804dcf3d Fix build with HarfBuzz-NG older than 0.9.20
It is annoying that HB maintains binary compatibility but does not
really care about source compatibility.

Change-Id: Ife7b011919f28527b77858ad8398fe723c65b1b3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-17 08:58:53 +01:00
Konstantin Ritt
3bcba4ceed Fix build with -Werror
Change-Id: I2fe4b006dc0696e5491792846bdb8c99ac31af6e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-12-17 08:58:28 +01:00
Jian Liang
9b079df3f1 Fix QAccessibleStateChangeEvent object leak
Allocate QAccessibleStateChangeEvent object on stack in
QGroupBox::setChecked() to prevent leak.

Change-Id: I6b189b9c4ce6b542d6f9f1041018c39a13a8c31f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-12-17 03:08:00 +01:00
Thiago Macieira
68ff352906 Use the short time format of the current locale on Windows
Windows 7 and later have LOCALE_SSHORTTIME, which is what we need.

Task-number: QTBUG-33718
Change-Id: I4c3f113d17102a37fb752de56f06b312f27c7887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 22:26:37 +01:00
Thiago Macieira
e6abf372c6 Use #pragma warning(push) and pop to control our warnings
Using "default" means "reset to default compiler settings", not "revert
to command-line settings". And even if it did, it's possible some other
headers by the user toggled the settings. We shouldn't affect that.

Task-number: QTBUG-35622
Change-Id: If7c4bd0cc8c210f88ee89e3fa2dd3b7194ad77bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 22:26:37 +01:00
Stephen Kelly
de61c78807 CMake: Generate config-specific moc parameters file.
When using the visual studio generators, a moc parameters file
for each configuration is generated. The content differs because
the -DQT_NO_DEBUG may be added or not, depending on the configuration.

Change-Id: I52eae536289d451df72df2e4dba709851279694a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-12-16 20:57:45 +01:00
Nico Vertriest
d9bad12fc8 Doc: solved link problem for dombookmarks.qdoc
Task-number: QTBUG-34749
Change-Id: I2f2fbf16314e069ab04e5c5ab4bcef9780c008a2
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-16 19:29:52 +01:00
Matt Hoosier
e40cefff94 QNX: avoid composition when possible
Window buffers are currently always created with an alpha channel when
the underlying display supports them. This is the correct thing to to
in order to support translucency. However, the cost is that the
composition manager unconditionally performs blending even when the
use-case in the GUI doesn't make use of it. That is rather expensive,
particularly on hardware which doesn't have extremely efficient
dedicated 2D blitting hardware.

This patch adds inspection of the user's requested window format
and--if no blending is desired--sets an additional Screen window
property which permits Screen to skip blending on the window surface.

Change-Id: I83c100a351a00ef0e8bea1b1d1fec10b7218d1de
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-12-16 19:29:52 +01:00
Albert Astals Cid
2f38bfe0a3 Remove .values() call in foreach
foreach already knows how to iterate over the values without the need to create an intermediate qlist

Change-Id: Icf6bacc3472e09fde6fe3735086cea289ca0fa96
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-12-16 18:19:03 +01:00
Lorn Potter
ec07cdc91e On configuration removal, take it away from foundConfigurations
Prevents derefence of freed QNetworkConfigurationPrivate pointer in
QConnmanEngine::getConfigurations().
original submitter:  Jakub Adam <jakub.adam@jollamobile.com>

Change-Id: Ib915c5a68aeb3196c6ac91c96338ebee9dad30b6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Lorn Potter
bfe005a888 make sure to signal only changed configurations
really use this

Change-Id: I082f8d84da572a2c51f67355dcbc06394940c421
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Lorn Potter
9518c17837 add NetworkSessionRequired to connman caps.
This allows QNetworkAccessManager::get(..) to make a connection,
instead of failing.

Change-Id: If5af707f7e67946357f5530cac724b223441116a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 17:32:33 +01:00
Frederik Gladhorn
3f3be55835 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/gui/kernel/qplatformtheme.h
	tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
	tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp

Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
2013-12-16 16:59:33 +01:00
Frederik Gladhorn
f28ef6a308 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-12-16 15:35:30 +01:00
ABBAPOH
75defbf241 Fix strings in QImageWriter.
Change-Id: Id5ff5f05843a2feb92ff60fce20df699ed4a0476
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-12-16 15:35:30 +01:00
Israel Lins Albuquerque
5193c14536 fix parsing of bound SQL statements for PostgreSQL
PostgreSQL allows bound variables inside square braces.

Task-number: QTBUG-34541

Change-Id: I4f069b3f1078d4cdf172fbac9e0d7d23d20d167a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-16 15:35:30 +01:00
Rafael Roquetto
b3b689edcb BlackBerry: fix sqlite plugin compilation
_QNX_SOURCE needs to be defined in order to ensure posix_fallocate gets
declared by the toolkit header files.

Change-Id: Id60fcf9be3c672bd399c4b71541dfa0fcc4060af
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-16 15:35:30 +01:00
Shawn Rutledge
654a9df4be iOS has native windows but not window management
This will tell QtQuick.Dialogs not to use native windows for dialogs.

Change-Id: Ie2e5878b84a9597e1f730d2cb1ebe2f59be6bc75
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-12-16 15:35:30 +01:00
Lorn Potter
b12bec0fcf always use connman to connect to cellular services
connman provides better error messages.

Change-Id: Ifcfd4a4ff8d632273ab9ff7478a6c43cbf2cde98
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-12-16 13:02:19 +01:00
Liang Jian
9764f86027 Fix QBackingStore object leaking
Check q->isTopLevel() before calling setBackingStore() in
QWidgetPrivate::create_sys() to prevent QBackingStore leaking. This is
because QWidget::setBackingStore() will return if isTopLevel() is true and
the newly created QBackingStore object will be leaked.

Change-Id: I2777acd4c317d5019f5b266feae005042026b8be
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-16 09:54:22 +01:00
Friedemann Kleint
a935b3fbd8 Windows: Fix printing.
Clear custom paper size flag in
QWin32PrintEnginePrivate::updateCustomPaperSize().
Breakage introduced by 3396ba5612 .

Task-number: QTBUG-35500

Change-Id: I7e7708444cd7201af35e0f5d9b16d6c73fee77f6
Reviewed-by: John Layt <jlayt@kde.org>
2013-12-16 07:08:52 +01:00
Laszlo Agocs
fc10bfd550 Correct debug bit setting with WGL
No need to tie the debug bit to OpenGL 3.0+. xcb is correct
in this respect, let's correct the windows plugin too.

Change-Id: I13ea48de067d3fb61575be8f71b97bb547d8eb02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-12-13 13:58:07 +01:00
Robin Burchell
9b621f3861 Partially revert "Move notification of layout change up from QApplication to QGuiApplication."
We can't rely on QGuiApplication::topLevelWindows containing top level QWidgets,
because they only exist as actual windows once QWidgetPrivate::create_sys is
called. Thus, make sure to send notifications to all top level widgets, if a
QApplication is being used.

This reverts commit f82ed5b3e30282bb8dc1da321a0d04ad4d463e59.

Task-number: QTBUG-35589
Change-Id: Iac517089af1c22f20094ba6e185d5ed44ebe3d6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-13 13:45:27 +01:00
Peter Hartmann
ae293c1cb2 QNetworkCookie: allow cookies for IPv6 domains
For IPv6 addresses don't call toAce as it returns the empty string.
We should reflect the behavior of browsers here, which all accept
cookies from IPv6 addresses.

Original-patch-by: David Tapuska <dtapuska@blackberry.com>

Task-number: QTBUG-35022

Change-Id: Ic00369e923d044ec459822b2405865c13e4185b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-13 09:44:25 +01:00
Peter Hartmann
746dddeb9f QNetworkCookie: allow cookies for IPv4 domains
If the domain is an IP address, we should not do any magic regarding
leading dots etc.

Task-number: QTBUG-35022

Change-Id: I7722de4e6027666dde27e9e37b6353e3da775d94
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-13 09:44:13 +01:00
Thiago Macieira
18a36fd6ec PCH stands for "precompiled header", not "prefix"
Change-Id: Ied8148be931992247e446719a0eaeec0dc868330
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-13 09:30:06 +01:00
Thiago Macieira
ee7536876c Add the UTF16-to-Latin1 in-place converter
This is only possible for two important reasons:

1) QString and QByteArray d pointers are both done with QArrayData and
   that class does not care that the alignof(T) changes from 2 to 1,
   so we can give the pointer from QString to QByteArray
   (after adapting the allocated size, which is now double)

2) conversion from UTF16 to Latin1 always has fewer bytes (exactly half)

Change-Id: I17b2690c910f3de8db55156c6d6b5f55be06d827
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:30:04 +01:00
Thiago Macieira
8892e3d0fc Improve the Latin1 conversion in QString a little
First, use Qt::Uninitialized, since we're about to overwrite the memory
anyway with the new Latin 1 string.

Second, move the actual body of the conversion to a static void
function, which seems to improve code generation a little and, of
course, paves the way for the in-place conversion.

Change-Id: Iaed99ba1e52facad676510aa98443223e188d70a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:30:01 +01:00
Thiago Macieira
b0afad8f0b Implement support for ref-qualified QString::toLatin1 & friends
This is the first step in implementing an in-place conversion of QString
to QByteArray. This requires ref-qualifiers in member functions so we
know that we have an rvalue QString.

Converting from UTF-16 to Latin1 always requires half the memory.

For conversion from UTF-16 to UTF-8, the typical string will also need
the same memory or less: characters from U+0000 to U+007F consume one
fewer byte; characters from U+0080 to U+07FF and from U+10000 to
U+1FFFFF occupy the same space in UTF-8 and UTF-16; it's only the ones
from U+0800 to U+FFFF that consume more space in the UTF-8 string.

For the locale's 8-bit codec, we can't be sure and the code (currently)
needs to go through QTextCodec anyway.

This requires a #define set before #include'ing "qstring.h". However,
since qstring.h is included by the QtCore PCH, we need an extra qmake
compiler without the PCH flags to compile this .cpp.

After this change, the distribution of calls in QtCore, Network, Gui,
and Widgets is as follows:

                  const &               &&
 toUtf8           31 (74%)              11 (26%)
 toLatin1         79 (77%)              24 (23%)
 toLocal8Bit      26 (16%)              138 (84%)

Change-Id: Idd96f9ddb51b989bc59f6da50054dd10c953dd4f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-13 09:29:58 +01:00
Stephen Kelly
b7cb0613f0 QMetaType: Fix equality comparison of type-erased iterators.
Task-number: QTBUG-33997

Change-Id: I0d4da562540df0e3732769881ba124cb980f6b82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-13 09:28:38 +01:00
Stephen Kelly
0da7e0fa8f QMetaType: Fix copy of type erased iterator
Behavior differs depending on whether the iterator is a value_type*,
or a different class entirely. Ensure that the correct behavior is
used when copying.

Task-number: QTBUG-33997

Change-Id: Ib6db2a3c4a5aa861b851833a7f0ecb855a3e828f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-13 09:28:30 +01:00
Friedemann Kleint
c0b899b3df tst_qlinedit: Create a new test widget on demand for each test.
The test used a member testWidget that was cleared and reset after each
test, which caused focus fights and side effects. The widget is now
created and shown only when necessary.

Change-Id: I0dc635e9d4cdf4f899994b88206bb0125526f6df
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-12-12 23:21:21 +01:00