Commit Graph

16534 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
d5d6e0cf99 RValue ref version of QPixmap::fromImage()
When converting from a temporary image we can use inplace conversion
since we don't have to worry about changes made to the original.

This should give a speedup in several places where QPixmaps are made
from
the return values of methods returning QImages.

Change-Id: I1835bcf3fc061c4dbbb3d0507ec84178dc49b29b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-02 18:40:11 +01:00
Simon Hausmann
c2e2e0151e Fix crashes when calling into qdbus interfaces from QML
The meta-call convention for reading properties differs between Qml and QDBus.
QML expects only to provide a pointer to the return value in args[0].  That is
also how the metacall was originally introduced in Qt 4. QDBus also expects
that the caller allocates a QVariant and provides a pointer to it in a[2], in
addition to a[1] being a pointer to an int that is used to report where the
return value can be found (in where a[0] points to or the variant in a[1]) -
this is useful to report errors when reading the property by clearing the
variant.

For performance reasons, QML avoids the creation of a QVariant when reading
properties. As however QDBus expects it, a crash occurs.

This patch changes the QDBus metacall implementation to not rely on the caller
to provide a QVariant.

Task-number: QTBUG-15052
Change-Id: I2f2c5b3ef2c1d93cc72eee1fa32a95d299a104c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-02 16:15:10 +01:00
Allan Sandfeld Jensen
68974f31ff Extend multimedia keys
Extends the Qt keycodes with four missing keys, common on remote controls:
Guide, Info, Settings and Exit.

Change-Id: I6789f13dbb662da4261a3c947757644e12306dd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-01-02 10:29:27 +01:00
Marcel Krems
6c4c2b752c Move struct declaration out of the union to avoid a compiler warning.
Clang 3.3+ warns about this being an extension:
qsqlerror.h:101: warning: anonymous types declared in an anonymous union are an extension [-Wnested-anon-types]

Change-Id: I0350b977ff85558338b3b9db53d3fce7facb7635
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-31 22:27:07 +01:00
Marcel Krems
b276f4e5e8 Remove additional spaces from indentation.
Change-Id: I1f76ed4e2eff64dc133a1fd30a8dc5fd5eb4710e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-31 22:26:27 +01:00
Kurt Pattyn
6aa2273223 Add SO_SNDBUF and SO_RCVBUF to socket options
Added functionality to set SO_SNDBUF and SO_RCVBUF
socket options on QAbstractSocket.

Task-number: QTBUG-34934
Change-Id: I2134fb462d43b9111c039cd7e7d36bd78eafd8bc
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-12-30 16:09:55 +01:00
Łukasz 'sil2100' Zemczak
d351f3a345 Make QKdeTheme constructor public, allowing for custom inheritance
Make QKdeTheme constructor public, allowing for custom inheritance by
other classes. The danger of making it public and not going through the
factory method are close to none, while other developers might want to
slightly enhance KDE-themed platform themes by themselves. Right now
the only choice is to copy-paste the whole code. QKdeTheme might be a
private class, but still it makes no sense to restrict derivation if
someone finds it necessary to do so.

Task-number: QTBUG-35566
Change-Id: Ia3488da71e7c06fe4b7dc6e275605970b435b00e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-30 14:36:16 +01:00
Jan Arve Saether
f0cf47092e Don't translate a null rect.
This was probably because of some forgotten braces, since the
indentation seems to indicate that.
The current behavior might cause a null rect to become not null, which
might cause for QRect::isNull() to give a false positive.
Worst case it might case a program to crash (i.e. div by 0)

Change-Id: Iba49699880250e605b427ff4c1228c68a3471a2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-12-27 10:53:21 +01:00
Marc Mutz
2af6bf1a59 QImageReader: simplify _qt_BuiltInFormats
By construction of the _qt_BuiltInFormatType enum, the .type in
_qt_BuiltInFormats exactly equals its position. So there's no
need to store it explicitly.

Effects on Linux AMD64 GCC 4.9-trunk release stripped:
  text: -16B
  data: -64B
  relocs: +-0 (of course)

Change-Id: Ib68c32de42d264f27bbd8a863538dd78b1ba4507
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-25 20:54:14 +01:00
Roger Maclean
8a5c261954 QNX: Add support for BB10 text highlighting and spell checking
Adds the QPA side of the support for text highlighting during text
entry and for spell checking.  The changes are compatible with
existing Qt text controls though require more advanced ones to have
any effect.

QQnxInputContext has three colors it can now use for highlighting
text during composition to represent the active region, auto
corrected text and reverted text.  If any of these colors is invalid,
that form of highlighting is not used. By default, only the active
region color has a valid default which corresponds to the highlighting
capabilities of classes such as QQuickTextInput.  The QNX QPA native
interface has been augmented with the ability to get a function
pointer that can be used to set any or all of the three colors.  The
set of colors is reset to the default at any time that focus changes
to ensure appropriate behavior if there is a mix of controls.

It's worth noting that while the colors can be changed even when
used with one of the standard Qt text controls, the auto-correct
color will not show up since it is applied immediately before
committing the text.  Appropriate display of this highlighting
requires that the control maintain the highlighting for a period
after committing the text.

Spell checking is provided via another function accessible through
the QNX QPA native interface.  This takes a string and a callback
function to be called once spell checking is complete.

As a slightly unrelated change, toSpannableString now uses
toWCharArray to convert the QString to UTF-32 as required by IMF,
the previous code was invalid in the case of strings containing
UTF-16 surrogate pairs.

Removed some extraneous includes.

Change-Id: Ifdf3744d1990e0560d1923bca5db30953dea0192
Reviewed-by: Roger Maclean <rmaclean@qnx.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2013-12-24 19:17:36 +01:00
Marc Mutz
432674d787 QWizard: Replace another pointer table with char arrays
Like in I53284066, the result of the SIGNALS() macro is handled in a switch
statement, while the other two character pointers in the struct are replaced
by character arrays of 'maximum occurring size'. If this looks wasteful, it
really isn't:

 Linux AMD64 GCC 4.9-pre stripped -O2 effects:
     text size: -280B
     data size: -160B
     relocs:     -21

When adding longer strings, compilers will warn, so this doesn't hurt
maintainability, either.

Change-Id: I5ac1cdffd8ac0ea0a1ede1ea4edcc6d3e22dcaa2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-24 15:33:19 +01:00
Marc Mutz
132e812556 QWizard: Replace a static char* table with a switch statement.
The usual way of concatenating the strings with NUL bytes and
recording the relative offset of each in a separate offset
table doesn't work here, because the entries are the results
of SLOT() and SIGNAL() macros, which might, in debug mode,
inject a runtime function call (to qFlagLocation()).

Linux AMD64 GCC 4.9-pre stripped -O2 effects:
 text size: +16B
 data size: -64B
 relocs:     -6

Change-Id: I532840668bb57ab72ef3fecb01a450c4c46516e9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-24 15:33:10 +01:00
Kurt Pattyn
a2131d6c2f Retain space setting
Change-Id: I4584de9ba51610907c917a0e0ddf5f6f28d304a0
Reviewed-by: David Faure <david.faure@kdab.com>
2013-12-24 13:21:56 +01:00
Frederik Gladhorn
954bb6c35f Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-12-24 10:25:50 +01:00
Simon Hausmann
2b287c7c21 Fix regression in property handling with enums from gadgets
When declaring a Q_PROPERTY(SomeType::SomeEnum foo ...) and SomeType is not a
QObject but a gadget, then we must still include SomeType's meta object in the
list of related meta objects.

Task-number: QTBUG-35657
Change-Id: I46195140cb5d180c4f03bb1fe06a876e3fe11267
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-12-24 08:10:16 +01:00
Frederik Gladhorn
f0fbff4c90 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2defae1904154283446b069d151c3ef57302ec7b
2013-12-24 00:56:59 +01:00
Simon Hausmann
d776937df9 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-12-23 22:44:13 +01:00
Jorgen Lind
0e1ce36ae6 Make wayland-scanner install generated headers
QtWayland uses QtWaylandScanner to generate c++ files which will be
subclassed. This works ok in QtCompositor as it implements the pimple
pattern. However, QtWayland has to expose a library called
QtWaylandClient as a way to create specialized wayland plugins. These
classes don't promise an ABI, and has limited API guarantees, so they
subclass the classes generated by the QtWaylandScanner directly. For
this library to be possible, we have to install the generated files.
Also, it should be possible to use the private API, and that's not
possible without the generated files.

Change-Id: Id55200fe23652587390dabf84ca846e4f39cf70e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-12-23 21:14:34 +01:00
Marc Mutz
e14503d353 QTextDocument: avoid relocations
Hand-roll a string table here, since there's opportunity for
sharing string data between string entries.

Effects on Linux AMD64 GCC 4.9-trunk release stripped:
  text:   -88B
  data:   -64B
  relocs:  -5

Maintainability is hurt somewhat, but it is expected that the
contents of this string table do not change much, so the
overall effect is still very low.

Change-Id: I2a22da4c8548c53ef31c33319b4652f3cb6f62f5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-12-23 19:37:41 +01:00
Thiago Macieira
883444f16b Ensure proper order of includes in qglobal.h
QAtomic will now depend on QTypeInfo, so shuffle the order to make
sure the includes are right.

The first set do not require anything but the macros from qglobal.h,
then qflags.h requires qtypeinfo.h and qtypetraits.h, qatomic.h
requires qtypeinfo.h and qglobalstatic.h requires qatomic.h.

Of those, only qatomic.h isn't in global/, so we could even consider
using "" includes, but I recall MSVC not honoring them correctly.

Change-Id: I76c150254a99cdea8857445bdebf2e724eaa76bd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-12-23 15:20:16 +01:00
Thiago Macieira
154b539465 Move the SUBLIBS target from qmake away from between clean/distclean
Right now, the sublib targets, if any, show up between clean and
distclean targets. That's silly.

I doubt anyone is using sublib targets anyway, but...

Change-Id: I2beffc69f68fa7626ff4aa4a7cc1169b2c6c69a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-23 15:20:13 +01:00
Shawn Rutledge
8fa6cb83c6 cocoa: avoid sending windowNotification to a non-QNSView
Then it's possible to embed native cocoa widgets without crashing.

Task-number: QTBUG-35629
Change-Id: Ic212c36178282b4d090c6ce0470012adc8e0c2bb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-12-23 12:16:57 +01:00
Oswald Buddenhagen
443bdb5042 clean out some garbage in CONFIG
- thread was duplicated
- x86 & ppc are obsolete and don't actually do anything
- incremental was just plain nonsense (it does something entirely
  different, and it's better to hide this "feature" from public view)
- resources is basically an implementation detail (it's on by default if
  qtcore is used)

Change-Id: I9163af6e8db7988382ccf993d4be280f7faec1f2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-12-22 22:42:55 +01:00
Oswald Buddenhagen
dd9444523d make qmake auto-rebuild after path reconfiguration
while the dependencies in the manual projects are crappy anyway, it is
still worth to cover the case of the user changing the install paths.

Change-Id: I0a7ca5c8ba660c689d6d7af6b65d878390d6456f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-12-22 22:42:37 +01:00
Oswald Buddenhagen
224436f208 fix confusion surrounding debug, release & debug_and_release
Done-with: Leena Miettinen <riitta-leena.miettinen@digia.com>
Change-Id: I1e031402bc3d857cf29782957e5340e3c82f1ed2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-12-22 22:41:52 +01:00
Oswald Buddenhagen
9bebb025af handle configure's -I flags like configure.exe does
it's more correct that way.

Task-number: QTBUG-35588
Change-Id: I8dc55d6cd7dc08ebafd458b3df54fd69c3d91849
Reviewed-by: William Gallafent <william@gallaf.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-12-22 11:54:03 +01:00
Thiago Macieira
6ce5533172 Doc: suppress documentation of methods users shouldn't use
Change-Id: Ib905c9c54c236831f76a5c2925e7477cd7d6184c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-12-21 19:24:39 +01:00
Tor Arne Vestbø
ed22c1721b iOS: Fix C++11 build
Change-Id: Ib7dc8dcbeca7e85d97b8c7fb04d2cf42e5245298
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-12-21 15:29:07 +01:00
Tor Arne Vestbø
8a5827f706 Don't try to build qt_app in release against debug-only Qt builds
Change-Id: I575e019db76dadcf7586e18809e6f67545759974
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-12-21 15:28:58 +01:00
Jan Arve Saether
28b85835bb Add deleteItems(), needed by QtQuick.Layouts
(Picked from QGridLayoutEngine in qtquickcontrols)

Change-Id: Ieb00f7fb0166669e6831f3d3dbe3a9ef78b57453
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-12-21 13:28:28 +01:00
Andy Shaw
d54af5d3f6 Prevent a crash when there is no accessible interface
Change-Id: I058b76ff9d40b75eb51f9a6b1b89032ead629aed
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-12-21 00:23:15 +01:00
Marcel Krems
14170bbf09 QSqlError: Set error code for psql-driver.
Task-number: QTBUG-142
Change-Id: I4a68da595b7c8869188225958eaa88f789d4c3bf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-20 23:33:07 +01:00
Sérgio Martins
436270e104 Fix warnings about forward declarations (-Wmismatched-tags)
These are structs in gbm.h.

Change-Id: I448ddc072c3aa924672f802dca42b2183470519e
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2013-12-20 17:50:02 +01:00
Marcel Krems
106316198d Enable QSqlError to handle alphanumeric error codes.
Some database systems (like PostgreSQL) use alphanumeric error codes.
Introduce a new method nativeErrorCode() which replaces number().
If the error code cannot be converted to int, number() will return 0.

Task-number: QTBUG-142
Change-Id: Ic7fba841737674b75c0c01c2263f51d2041da497
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-20 16:27:41 +01:00
Nico Vertriest
edef249602 Doc: added qtquick to depends statement in qttestlib.qdocconf
Task-number: QTBUG-34749
Change-Id: I150cbf0e7077f725579cdcd3151ce684b1f64172
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-20 14:23:49 +01:00
Maurice Kalinowski
e35c2c57cf apply WinRT store certification linker flags
Those flags are required to pass the Windows Store App Certification
process. Otherwise apps are not allowed to be published.

The SAFESEH option is only required for x86.

According to documentation APPCONTAINER only talks about the
executable, but when running through the certification, the Qt modules
are reported to be errornous as well.

Change-Id: I5450687dcd5bc537149e331332e253c4617df55d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2013-12-20 11:23:14 +01:00
Jan Arve Saether
c4e56250eb Add baseline support to QGridLayoutEngine
(Picked from QGridLayoutEngine in qtquickcontrols)

Change-Id: Ifc912c3c90127edfeae2f874e0a061227371d01f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-12-20 11:16:13 +01:00
Oliver Wolff
8e2f95e5a2 Fixed another assert in qwindowskeymapper
When we get a WM_CHAR message we do not need to add anything to the key
map as these messages already contain the character code in question.

Task-number: QTBUG-35532

Change-Id: If73993cd873b7c616876b9ba52ceba6b27a6a7b1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-12-20 11:11:34 +01:00
Marcel Krems
a14f26234b Move QSqlError private members into a pimpl class.
This allows us to add new members without breaking BC.

Change-Id: I59236cd5eeacdcfc490849a18b3bdf70d7a501bf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-12-20 10:46:12 +01:00
Nico Vertriest
ac90b4c46f Doc: corrected broken links
Task-number: QTBUG-34749

Corrected link to drag and drop example.
Corrected link to {mandatory fields}
Created target referring to macros for defining plugins

Change-Id: I387a2d9bab428b2eacd8d371f08c72f42f7e2be2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-20 10:38:01 +01:00
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