Commit Graph

22656 Commits

Author SHA1 Message Date
Konstantin Ritt
9a3754c570 [QCoreTextFontDatabase] Micro optimization
With use of pre-allocated buffer, there is always a good chance
to get the requested data with a single call.

Change-Id: I8fed718e15970ab345ce96a9405578947b59f311
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-07 01:13:24 +00:00
Friedemann Kleint
8f1eb52525 Windows: Fix build of qwindowsfontdatabase.cpp with MinGW 4.9.2/-Werror.
Disable warning:
qwindowsfontdatabase.cpp: In member function 'virtual QFontEngine* QWindowsFontDatabase::fontEngine(const QByteArray&, qreal, QFont::HintingPreference)':
qwindowsfontdatabase.cpp:1111:74: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

Change-Id: Ifce69db7d1f3b78d52e5b4e01db8e7bbfb62b439
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-03-06 22:18:15 +00:00
Katja Marttila
7c3cfdbcb7 Add getter for QSizePolicy to SpacerItem
Change allows to change width and height with
changeSize() method without changing size policy.

Task-number: QTBUG-38518
Change-Id: I3eabb5fbfd9792c57c0a533ce14ec99b64603631
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-06 19:55:20 +00:00
Shawn Rutledge
483328a956 docs: QPlatformWindow::screen() and QWindow::screen() can return null
After change f4b8697c40, it is normal
on X11 to have a null screen when all outputs have been disconnected
or turned off.

Change-Id: I97eeefd86d97701be50f0757fe5c53ca36d79aaa
Reviewed-by: Harri Porten <porten@froglogic.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-06 19:55:07 +00:00
Shawn Rutledge
51ada7734a xcb: do not create a dummy QScreen when there are no outputs
Whenever a QWindow is associated with a QScreen, the screen is expected
to be a real working one, so that rendering continues to be possible.
This partially reverts 52f5e50f11

[ChangeLog][QPA][Xcb] If all QScreens (xcb outputs) are disconnected
while an application is running, QGuiApplication::primaryScreen() will
return null until a screen is connected again.

Task-number: QTBUG-40174
Task-number: QTBUG-42985
Change-Id: Id1b29dd70eaf3f2e7fd477516ce7e2bf24e095f6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-06 19:54:46 +00:00
Laszlo Agocs
d7401c32c5 Avoid crashing when there is no QWindowsIntegration anymore
When destroying the QWindowsIntegration, the global instance is set to
null in the destructor. This is followed by a lot of additional steps
when destroying the members. Some of that cleanup calls to
staticOpenGLContext() which was not handling the case of the integration
global instance being null.

Change-Id: Ib74faf491d4c81635934547968ec91e9dceec6e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-06 19:27:11 +00:00
Oswald Buddenhagen
95d385466d centralize setup of shell-related variables in spec_post.prf
it makes no sense to let every spec do that separately, as it's fixed
by the generator+shell.

putting it into a file which is loaded regardless of the spec also
allows us to remove the hardcoded fallbacks from qmake.

if somebody overrode the values in their spec for some weird reasons,
they'll need to override spec_post.prf.

shell-{unix,win32}.conf are now dummies and print warnings.

Task-number: QTBUG-37269
Change-Id: I66c24fb4072ce4d63fdbfc57618daa2a48fa1d80
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-06 19:08:40 +00:00
Oswald Buddenhagen
6400e4bb10 adjust configure's path output to relative paths
amends 5b27d02c3 (literally - i forgot to push the squashed commit).

Change-Id: I2c588d13d5c79f9d1e4cb1ce46c4637574377c6a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-06 19:08:37 +00:00
Oswald Buddenhagen
1480a9c22b write relative QT_INSTALL_CONFIGURATION also under windows
amends 5b27d02c35.

Change-Id: I5c8679ed746b81ca5a7f33f32c39a74ee1e03d5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-06 19:08:35 +00:00
Tor Arne Vestbø
08f6af608a Xcode: Generate scheme manually, instead of letting Xcode do it
A scheme is required to be able to run tests through Xcode, even from the
command line, but Xcode doesn't auto-generate the schemes until launched
as an application. Xcode also auto-generates schemes for all our targets,
but we only need one for the primary application target.

Change-Id: Ia42f3825aba3ffde3be93be55e165d6284434853
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:43 +00:00
Tor Arne Vestbø
91828af6c5 qmake: Expose iOS/OS X SDK platform path as QMAKE_MAC_SDK_PLATFORM_PATH
Change-Id: I2e58c22301a433208718c26b362b4dda2b891f0e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:42 +00:00
Tor Arne Vestbø
4fb2014657 iOS: Resolve correct SDK as part of sdk.prf instead of default_post.prf
The latter location resulted in the wrong SDK paths being resolved if
sdk.prf was loaded before default_post.prf through an explicit load(sdk)
call.

Change-Id: Ia443260572fbdf5f9ed1daf558c2962703274e32
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:41 +00:00
Tor Arne Vestbø
006fc32ca7 Xcode: Add support for generating XCTest test bundles out of Qt testcases
If the user adds CONFIG+=bundle and doesn't set QMAKE_BUNDLE_EXTENSION,
we interpret that as a request to generate a test bundle.

Change-Id: Id4fbb64d39cddd6f95ac641a910a9d5543c30daa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:40 +00:00
Tor Arne Vestbø
ddf09adeeb iOS: Use qFatal when detecting QApplication before UIApplicationMain
Gives a stack-trace at the point the error was caused, making it easier
to debug what's going on.

Change-Id: I0d65bb5061e9a97c142d41f6c99a1a1803cbe82d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:39 +00:00
Tor Arne Vestbø
b0182069e5 iOS: Define QT_NO_PROCESS, as the platform doesn't allow fork/exec
Change-Id: I0928c4aaa0c308ee86b9611beeba3937b61e226c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-06 19:01:38 +00:00
Friedemann Kleint
d326952b51 Polish the Dir View example.
Add a command line parser so that the directory can be specified.
Resize depending on screen size and make first (name) column larger.

Change-Id: Ied5823b4e8f50345aae792628fb610b8604e37d3
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-06 18:09:42 +00:00
Friedemann Kleint
ed42bf8c05 Fix QMessageBox::aboutQt().
Add missing blanks and prevent line wraps
"...Qt\napplications.." for clarity.

Change-Id: I35932fb296ec47a1832f5c244b9719838621d5be
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-06 07:57:00 +00:00
Thiago Macieira
775d04f97e Add a QHostAddress::toIPv4Address overload taking a bool *ok
This allows one to check whether the conversion is successful without
checking for the return result, as the value of 0 represents the valid
IPv4 address 0.0.0.0.

Change-Id: I637fe55583f2255c85b0d955e5886b61494e0c7c
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-06 07:53:59 +00:00
Thiago Macieira
ab8d36d6f3 QHostAddress: Convert AnyIPv4 to AnyIPv6 instead of ::ffff:0.0.0.0
Unlike localhost (127.0.0.1), there's really no point in using
::ffff:0.0.0.0, since you shouldn't be sending packets to it. Linux
transforms 0.0.0.0 to localhost, but that's non-standard and won't work
on other OSs, so it's still a bad idea.

Change-Id: I5982b21bf953e11e04fc19893f94be90ed29089b
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-06 07:53:55 +00:00
Thiago Macieira
c64d27a9f7 QHostAddress: Revert auto-converting of IPv6 v4-mapped addresses to IPv4
In 85136496bc, Shane made QHostAddress
automatically convert any IPv6 address that was v4-mapped to IPv4 in
QHostAddress. While that is an interesting trick, it prevents us from
being specific about what we want. On some OS (like FreeBSD and OS X),
the distinction is relevant, so keep it.

Moreover, it was inconsistent: it might fail depending on how the
QHostAddress was constructed and the order of comparison.

[ChangeLog][Important Behavior Changes] QHostAddress will no longer
convert IPv6 addresses of type "v4-mapped" to IPv4. To perform this
conversion manually, construct another QHostAddress with the result of
toIPv4Address().

Change-Id: I06afbc7018539804bb3044ef1fe6a49ac7a5f240
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-06 07:53:50 +00:00
Laszlo Agocs
f6e6ef46b3 Fix up signal handling in QFbVtHandler
Start using signalfd where we can. Drop the crash (SIGSEGV, SIGBUS) handling completely.

The crash handling that was in place previously was not async-safe. It also prevented getting
a core dump. So just remove it. There is no safe solution for a single application process since
restoring the keyboard, video modes, etc. all need unsafe calls in the signal handler almost for sure.

We can however improve the handling of non-crash scenarios greatly:

Introduce support for SIGINT, allowing nicely and cleanly restoring the video
mode with the KMS backend when pressing Ctrl+C while QT_QPA_ENABLE_TERMINAL_KEYBOARD
is set.

Same goes for keyboard suspend (SIGTSTP, Ctrl+Z). When QT_QPA_ENABLE_TERMINAL_KEYBOARD is set,
platform plugins now have the possibility to act upon Ctrl+Z. As an example eglfs' KMS backend
is enhanced to handle this by restoring the video mode before suspending the process, and
reinitializing when brought into foreground again (SIGCONT).

SIGTERM is also handled. This is extremely handy when starting an application locally on the embedded
device and then kill-ing it via a remote ssh session. Keyboard and video mode is now cleanly restored.

Finally, when disabling the keyboard, try setting also KDSKBMUTE.

Change-Id: I2b3608dc23c798e2b39f74cb27f12dcb0e958435
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-03-06 07:13:21 +00:00
Gabriel de Dietrich
374c60e046 Make QPersistentModelIndex an internal meta-type
It was already a user meta-type, so it only gets
promoted to internal.

[ChangeLog][QtCore] QPersistentModel index becomes an built-in
meta-type, including QVariant support.

Change-Id: I63d733d1eb66aa61691e7afce27fe7372a83ac00
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-06 07:07:39 +00:00
Thiago Macieira
9a3d7adaad Fix -Wunreachable-code warning from clang in preprocessed Q_ASSERT
Q_ASSERT expands to:
 do {} while (false && (<your condition>))

Which is fine for Clang as long as it's a macro. However, when you
compile as a preprocessed source, the macro is gone and Clang prints the
warning:

 warning: code will never be executed [-Wunreachable-code]
 do {} while (false && (f()));
                        ^
 note: silence by adding parentheses to mark code as explicitly dead

So add the parentheses that it's asking about.

The changelog refers to the full Q_ASSERT change from
ebef2ad136.

[ChangeLog][Important Behavior Changes] Q_ASSERT will now expand the
condition even in release mode when asserts are disabled, albeit in an
unreachable code path. This solves compiler warnings about variables and
functions that were unused in release mode because they were only used
in assertions. Unfortunately, codebases that hid those functions and
variables via #ifndef will need to remove the conditionals to compile
with Qt 5.5.

Change-Id: Ia0aac2f09e9245339951ffff13c8aa70229254d0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-06 06:19:47 +00:00
Laszlo Agocs
4fe9798db3 Optimize egl cursor update events
Avoid invokeMethod on every cursor movement and use an event instead. This is more
lightweight and efficient. Also, there is no need to have a separate QObject just
for this.

Change-Id: I65ae202943eeb1e30cf22926576f84198f2487f8
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-05 16:11:45 +00:00
Friedemann Kleint
87af240c86 Manual dialog test: Add a message box for printer errors.
Task-number: QTCREATORBUG-13742
Change-Id: I137854eee589cde7a6cf3b841b0b63311e031517
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-05 16:01:59 +00:00
Konstantin Ritt
a5d5353b59 Introduce QQuaternion::dotProduct()
Change-Id: I14b9857ca0a43808b7d536fc258a6bb10f611211
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-05 10:46:07 +00:00
David Faure
6c973dee2c Make QCoreApplication::applicationName available after app destruction.
Calling applicationName() in the destructor of a global static (e.g.
via QLockFile) was working when calling setApplicationName explicitly
but otherwise it would suddenly return an empty string.
This led to inconsistencies, the application name switching from
non-empty to empty at saving-on-destruction time.

There was already a global static, used when setting the app name
explicitly before construction. Use it now to store the app name
in all cases (explicitly set, or fallback).

Change-Id: I71d3a0c40158f8bfd022c385b198346a2594b1cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-05 10:29:27 +00:00
Maurice Kalinowski
dce3721f90 WinRT: Update documentation on icon handling
ecf6e34efefcedbff0a457ed4b5e0f4e5d096b37 introduced new values to
specify icons in the manifest.

Change-Id: I8f0cc9790ffd2f50ed2008bc8bab053b3db4965e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-05 10:28:01 +00:00
Laszlo Agocs
d04c3d2079 eglfs: Pluginize RPi, iMX6 and Mali backends
eglfs does not depend on the device makespecs anymore when it comes to these device
integration backends (hooks). Instead, backends are autodetected by configure.

The name of the preferred plugin is still set in the device makespecs. This
is optional. When not set and there is more than one plugin present in the system,
the environment variable QT_QPA_EGLFS_INTEGRATION will have to be set at runtime.
In the absence of that, the order is undefined.

Change-Id: Ie1ced2c9aa1beff2adb13b4fdea7c499cb5a6aab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-03-05 09:51:16 +00:00
Nico Vertriest
c6045db4a6 Doc: fixed links on index page QtConcurrent
Task-number: QTBUG-35199
Change-Id: I1fa81e69d47ea150fb08c653c8569670c40b554a
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-05 09:40:16 +00:00
hjk
dd06d03661 QLockFile: Avoid zero-sized lock file on write error
Failure to write into a successfully opened lock file left the
lock file with size 0 in the filesystem.

Task-number: QTBUG-44771
Change-Id: I561bf629b9f160174d658bf105be828f71d78ff9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-05 09:38:51 +00:00
Laszlo Agocs
b35c389b6a Add Raspberry Pi 2 specs
Change-Id: Ifc99af49398e5d6e057035d2de55fe218c8418d6
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-03-05 09:36:34 +00:00
Eskil Abrahamsen Blomfeldt
c29c6d9003 OS X: Fix mixing writing systems, ligatures and text formatting
In QFontEngineMulti::stringToCMap() we call the primary engine's
implementation of the same function. If this engine does not support
the character in question, then it's supposed to clear the glyph array,
otherwise there may be left-over junk in the glyph array from previous
script items and the font selection algorithm will think it has already
found a match for the character corresponding to the glyph position.
The freetype engine, for instance, clears the respective entries
in the array when it gets a 0 glyph from the font engine.

In particular, this would happen when you had a ligature preceding
an item that was shaped separately. The ligature (e.g. "fi") would
set the first two slots of the glyph array, but later replace
them with a single glyph. The next item would then get an offset
of 1, i.e. pointing to the position in the glyph array where the
glyph for i was originally contained. If this was not cleared,
it would assume the primary engine supported the character. If
the character was of an unsupported writing system, then you would
get a box in place of it instead.

[ChangeLog][OS X][Text] Fixed appending text with a different
writing system and formatting to a latin ligature.

Change-Id: Id8c81cdc8e2d8994cc1a999769fcae452c4f52ae
Task-number: QTBUG-44708
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-03-05 09:34:14 +00:00
Friedemann Kleint
d70492d1ee Remove debug formatting functions obsoleted by the new debug operator for QFlag<T>.
Change-Id: I6d737eb86b790eeefb537ca5e6a075bf30a3dcfb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-05 08:56:43 +00:00
Friedemann Kleint
ae554cb8c2 Windows plugin: Simplify cursor code in platform screen.
Change the shared pointer to store a QPlatformCursor instead of
QWindowsCursor, removing the dependency of qwindowsscreen.h on
qwindowscursor.h.

Change-Id: I8b4bbc9fd4d5046c30ac3784f14229a9cc6d8dc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-05 08:56:35 +00:00
Friedemann Kleint
eee4c6f190 Clean headers in the Windows plugin.
Change-Id: Ibc6b904e6e0b21f5daa0730a7eda2cae43cd3dcf
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-05 08:56:30 +00:00
Friedemann Kleint
e1ae71d3c3 Clean headers in the Direct2D plugin.
Change-Id: Iab85ccdf49ee81214ada87a2e476f650b39a29ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-03-05 08:56:25 +00:00
BogDan Vatra
1ee25cedb4 Android: Make sure applicationState is set correctly
The Activity onResume function is always called before the application
gets initialized and we let the applicationState set to the default
value which is AppicationInactive.

Change-Id: Ifc3c7e3dfc51f2b821f8ca87f8b711f485b6a6f8
Reviewed-by: Peter Rustler <peter.rustler@basyskom.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-03-05 08:50:04 +00:00
Pasi Petäjäjärvi
9d19753bfa Fix disabling libinput feature if libudev is not available
When using default configure value (auto) for libudev + libinput and
libudev is not available, disabling libinput failed and it is enabled
even it requires libudev to work.

Change-Id: Ia2ead66c5cebc8658f2c29445f5c81c9f8b30dc8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-05 08:50:03 +00:00
Friedemann Kleint
8ceb4d9dbc Implement debug operator for QStyle::State using the new operator for QFlags<T>.
Call the new operator and add ### fixme comments for removal.

Change-Id: Ibe4dfe00b6ea1aa5ca5551f10b1f27fdde2114c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-05 08:30:36 +00:00
Shawn Rutledge
918e976d39 xcb: QkeySequence::Quit is control-Q
Until now it was mapped that way only under KDE and Gnome.

Task-number: QTBUG-44772
Change-Id: I65a425bb531909dff4110f086c9aee8ae7a747c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-03-05 08:29:28 +00:00
Christian Strømme
7f5b94b473 Fix shortcut overriding.
Moved to processKeyEvents() on all platforms except OS X.
Previously QWindowSystemInterface::tryHandleShortcutEvent() was called
from inside QWindowSystemInterface, this is considered unsafe as it
ends up calling sendEvent(). On some platforms the call might come from
a different thread then the receiver and cause an assert.

Task-number: QTBUG-44712
Change-Id: Ie80c698f63b9c3d9f52aa94380e539a84caea912
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-03-05 08:15:15 +00:00
Thiago Macieira
212285639d Add missing fetchAndXxx methods to atomic classes based on std::atomic
And add tests for the GCC intrinsics and for std::atomic.

Task-number: QTBUG-43794
Change-Id: Ic5d393bfd36e48a193fcffff13b9b2dbaee80469
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-03-05 00:05:00 +00:00
Thiago Macieira
126d489f7f Adjust the socket address family before bind()/connect()/sendto()
If our socket is already of a given type (probably due to a previous
call to bind()), then constrain the incoming target address to be of the
same family. On some OSs, trying to send or connect to an IPv4 address
from an IPv6 socket will fail with EINVAL, even if the socket is not in
"v6only" mode.

bind() can't be called after already being bound, but the function can
still be called on a socket created by the user and passed on with
setSocketDescriptor().

Change-Id: I209a1f8d0c782c6b6de2b39ea4cfad74d63f3293
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-04 23:58:11 +00:00
Thiago Macieira
9fb68a90af Fix bind+connect in both TCP and UDP
This has been known to be broken for a while. Now it works: you can bind
and you'll retain the port (and the file descriptor) for the connect
call. Incidentally, in fixing the binding for more than one IP for the
hostname (with event loop), this commit fixes the setSocketDescriptor
XFAIL.

[ChangeLog][QtNetwork] Fixed a bug that caused both QTcpSocket and
QUdpSocket to close the socket and lose any bound ports before
connecting. Now bind()/setSocketDescriptor() followed by connect() will
retain the original file descriptor.

Task-number: QTBUG-26538
Change-Id: I691caed7e8fd16a9cf687b5995afbf3006bf453a
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-04 23:58:03 +00:00
Nikita Baryshnikov
29051bce39 QSslSocket: fix compilation error
invalid conversion from ‘unsigned char**’ to ‘const unsigned char**’

Task-number: QTBUG-44744
Change-Id: I6263db106fe28c6aa04db8ca79421b3a9fc5adc9
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-04 23:48:24 +00:00
Thiago Macieira
259b2b6cd7 XCB: Solve crash when plugging a screen with unshown QWindow
If a QWindow has never been shown, it has no platformWindow (it's null).
So it's a valid condition and we need to be sure that the pointer isn't
null before dereferencing it.

Task-number: QTBUG-44766
Change-Id: Ia0aac2f09e9245339951ffff13c7eb024d6a0773
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-03-04 22:43:52 +00:00
Allan Sandfeld Jensen
f4a8dceb67 Remove non-templated pixellayout methods
Removes the non-templated pixellayout methods that were used for
non-c++11 builds, and instead initialize with the templated ones
verbatim.

These versions are faster, and using only those removes duplicate code.

Change-Id: I91a7d9122d2601ad282287a2f5ed6b88877d52fb
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-04 22:41:26 +00:00
Stephen Kelly
1a0dfd93bb Make some QAbstractItemModel API invokable
As QAIM and related classes are becoming more useful in the QML
environment, it makes sense to make these invokable.

Make the access API and the setData method scriptable.  Avoid
making the structure changing APIs scriptable now to be conservative.

Export the ItemDataRole enum through the staticQtMetaObject to make
built-in roles available.

Change-Id: I47b1682e6fa8ba32c7314c73fc10a7bbaa6d1f98
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2015-03-04 22:39:05 +00:00
Stephen Kelly
196fde2ac7 Make the QItemSelectionModel::selection a property.
QML code like this should be possible:

 Text {
     text: selModel.selection.contains(modelIndex) ? "blue" : "yellow"
 }

If the selection is just a Q_INVOKABLE method, then all consumers need
to set up

 Connections {
    target: selModel
    selectionChanged: foo()
 }

That is obviously not the API we want (made more clear by the fact that
the signal is already perfectly named) because it is not declarative but
it can be.  So, make it declarative by making selection a property.

Change-Id: Id1a05ae9b91e45e6d462bea4272b8740571e9fc3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-03-04 22:38:55 +00:00