Commit Graph

13244 Commits

Author SHA1 Message Date
Mark Brand
af35ee291a qsql_odbc: fix SQLGetStmtAtt usage
Failure to initialize the variable can cause spurious non-zero
values.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx

"..value can either be a SQLULEN value or a null-terminated character
string. If the value is a SQLULEN value, some drivers may only write the
lower 32-bit or 16-bit of a buffer and leave the higher-order
bit unchanged. Therefore, applications should use a buffer of SQLULEN
and initialize the value to 0 before calling this function. Also, the
BufferLength and StringLengthPtr arguments are not used."

Follow-up to 1509316a37

Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-24 01:30:20 +02:00
Stephen Kelly
4341ae32f4 Enable OpenGL library detection for mac.
Change-Id: If99d3faf2b08ac5109d619ff69efdaa3857c007f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-24 01:30:20 +02:00
Peter Hartmann
e145b67fbd SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.

Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-23 23:22:43 +02:00
Stephen Kelly
3467320378 Don't list all QMAKE_LIBS in QMAKE_LIBS_OPENGL_ES2.
There is no need to, and it confuses the generation of cmake files.

Change-Id: I00c8751990e707cf32652babcb9af3e4b681561a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-23 23:22:43 +02:00
Thomas McGuire
e0cf3fcd8f Fix retrieving of the generic system proxy via environment variables
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.

Add a unit test that is enabled for those platforms that use the generic
system proxy.

Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-04-23 21:02:50 +02:00
David Faure
1ea1abeb91 Implement startup notification spec again.
This functionality was in Qt4's qapplication_x11.cpp and was missing
from the XCB QPA plugin. Ported the code from xlib to xcb.

This code was actually tested (with plasma), unlike the Qt-4.8 code which
skipped every other character...
    for (uint i = 0; i < 20 && i + sent <= length; i++)
        xevent.xclient.data.b[i] = message[i + sent++];

Provide a QPA native-function for accessing the startup id, for cases where
an application doesn't show a window, but starts another app instead, or asks
a running app to show the window on its behalf.

Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 21:02:50 +02:00
David Faure
71a1ff39bc qxcb: output clear error message when running on an 8-bit display
Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth)
outputs a stream of error messages, starting with:
QWidget::paintEngine: QWidget::paintEngine: Should no longer be called

Better output clearly the reason why we end up in that method: painting
on a null image, due to the unsupported image format.

Maybe this should even be a qFatal...

Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-23 21:02:50 +02:00
Konstantin Ritt
3821047e6c Fix memory access violation
The pointer returned by unicode() was deleted right afterwards.

Change-Id: I7cef72386d02c7be42e71134f616926506d37ea6
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 21:02:50 +02:00
hjk
01cbd7e4b5 Remove QLocalePrivate::m_localeID
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.

This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.

The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.

Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 18:57:45 +02:00
Jan Kundrát
adec3f4eaf Do not talk about make confclean in the top-level directory
The configure script does not actually produce a "confclean" make target.

Task-number: QTBUG-27735
Change-Id: Ia0f9e33e50c35cc6bb2941853e518a40fc9edaee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-23 18:57:45 +02:00
hjk
649da796f5 QDataStream: Be a bit more verbose about operator>>(char *&)
This also fixes a few "sloppy" mentionings of "new" into "new []".

Task-number: QTBUG-30777
Change-Id: I3f4add07777b59cd09cac97b672c73273b3b97eb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-23 18:57:45 +02:00
hjk
32629676b9 Use a QVector<QDateTime> instead of an array in QFileInfoPrivate
Since QDateTime is pimpled, default allocation is expensive and
regularly shows up in profiles of code using QFileInfo.

For Qt 6, QDateTime's data members should be put into the class
proper, and this change here reverted.

Change-Id: I94a50e467b12772e1076181eb2ac6031984d8802
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
38bf6da7dd Cocoa: Fix disabled minimize button on main windows
Task-number: QTBUG-30775

Change-Id: Idec64f2cc6181e6889498171ead676d33c66e537
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-23 18:57:45 +02:00
Morten Johan Sørvig
56cc59110a Don't crash on a null window pointer.
Task-number: QTBUG-30731

Change-Id: Id256b915012b43d1eb85bba62cbc1d42cfb58b34
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
f2fa65e4bf Cocoa: Add setAlertState(), isAlertState(), beep() functions
Also, fix operator precedence error in QApplication::alert().

Change-Id: I140ccfba29638d24bc1c97f5f9a9611f66eb6b8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-23 18:57:45 +02:00
Samuel Rødal
1f6ab6a661 Fixed QGLWidget not being able to be made current with a context.
If the QGLWidget's creation is triggered by a sibling or similar being
created it would end up without the surface type OpenGLSurface. We need
to make sure the QWindow has the correct surface type to prevent
QOpenGLContext::makeCurrent() from failing.

Task-number: QTBUG-30811
Change-Id: Ifc85f9120d89bd0bed4a3911233799830cb3a0f3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-23 18:57:45 +02:00
Jan Arve Saether
146658a10f Fixed QLayout::addChildLayout(QLayout *l) when l had a parent
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.

Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-23 18:57:45 +02:00
Friedemann Kleint
ad3b61554b Move Mac translations to .cpp file for lupdate to pick them up.
Task-number: QTBUG-30125

Change-Id: I4e56fd3021b4ef5f344d4d36ae594dd88e2aa1bd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Stephen Kelly
ecc11ccd65 Set the sysroot if cross compiling the cmake tests.
Change-Id: Iae268f30b86a67fcf978983ca9b12f850948dd24
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Stephen Kelly
839e275249 Use the CMake list separator for content in a CMake list.
Change-Id: I664c31d256d395d4afec81de66a84dc79ed10b9d
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Thiago Macieira
06b6784c28 Fix header check: you must #include qconfig.h before QT_NO_OPENGL
Change-Id: I50518bd1b721d19e4712a6c11afb0a93afeaa7ea
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-04-23 16:38:09 +02:00
Frederik Gladhorn
9c47a273ff Accessibility: Ignore negative child indices in main window
Change-Id: I6b3d0b066bf20a09b43d6d80255fb8d428d38df1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 14:10:05 +02:00
Stephen Kelly
93aa83e074 Fix typo in docs
Change-Id: I3ee3e3d061fc87c0c2ea05197b37a952c8d63dd2
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-23 14:07:50 +02:00
Stephen Kelly
38fea4d642 Fix build with QT_NO_CLIPBOARD
Change-Id: I138a29e1099e691770b9e3e094a108fc8c52f8cb
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-04-23 14:07:37 +02:00
Friedemann Kleint
a961204d28 File dialog manual test: Remove dot from default suffix.
Change-Id: Icadfd2103bb89b5f9ea167737d9e6af05d7a6b86
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-23 13:55:18 +02:00
J-P Nurmi
a7dc708eb5 Fix QAbstractItemModel::moveColumn()
Task-number: QTBUG-30346
Change-Id: I3d6dbe1e88bb5e2748eadabb2663f30be16f8d18
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-23 13:35:31 +02:00
Gabriel de Dietrich
e324f5bc0e Fix crash when deleting a QMenu on exit
If the application object is an ancestor of QMenu, dereferencing qApp
in its destructor will cause a crash.

Task-number: QTBUG-30756
Change-Id: I31a33db0fd783bb210a420618911ea8b412e9a0f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 13:12:33 +02:00
Frederik Gladhorn
a7ce34dba4 Accessibility: Menu item should keep track of owner being valid
The QAction may stay around while the parent/owner gets deleted.
This is for example the case for some dynamically created menus.

This is required for fixing QTBUG-30792

Change-Id: I7b6122edec6def69aed77502403134e1568e21c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 13:11:22 +02:00
Liang Qi
8d60a10462 QWindow: expose active as property
And add activeChanged signal for it.

Change-Id: I9ebe9263e99863267c3a81b9286eaa5b29222085
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:32 +02:00
Liang Qi
941f7a5283 Make requestActivate() as a slot in QWindow
Then it could be used in QML world.

Task-number: QTBUG-28667
Change-Id: Ib65ad3b271a07ba50d3ca50d61f486f829f69119
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:30 +02:00
Kai Koehne
a6e903299b Fix def files for Mingw (32 bit)
Add missing symbols.

Change-Id: I73579f13b0cbc8b4b405a50b3745785e088cf82d
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:22 +02:00
Kai Koehne
43e1c61a19 Add missing intrin.h include for __cpuid
This is already fixed upstream in

https://codereview.appspot.com/8615046/patch/1/2

Change-Id: I4b9e865f6b5622c484418a8381334381bc256887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:16 +02:00
Libor Tomsik
2fbfad8b0d Added grabbing option for qevdevkeyboard and mouse.
Added option grab=1/0 which allows user to choose using environment variable
if the application will exclusively grab the input device or let
the OS read it in paralel(default).

Task-number: QTBUG-30004

Change-Id: If3caa8419584be46f320931ddb152a41893d8693
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-04-23 12:39:14 +02:00
Gabriel de Dietrich
3b992f8319 Enforce focus policy in item delegate's editor
Focus policy can be wider in this case given the limited scope of the
editor widget. This helps workaround platform specific focus policies,
like on Mac, were focus can be restricted depending on the widget type.

Task-number: QTBUG-30715
Change-Id: I69acf8ebff4ba16d473964c91680a1cb0235e3cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 12:32:47 +02:00
Mitch Curtis
7dd81686e8 Fix QKeySequence::toString() returning gibberish for Qt::KeypadModifier
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.

Task-number: QTBUG-4022

Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 12:26:13 +02:00
Morten Johan Sørvig
f898614b76 Don't show a separate inspector for child windows.
Change-Id: I5cd0060cdfe1990e2620010d2f0eb281fd225142
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 07:45:22 +02:00
Morten Johan Sørvig
8a8d47d061 Use qAccessibleRoleString to stringify roles.
Change-Id: I886d48aa094aee6ac2abe2ec1f938071281d1676
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 07:44:53 +02:00
Morten Johan Sørvig
f9ecaa8825 Return GroupRole for unknown accessibility roles.
UnknownRole draws attention from the screen reader
and makes it focus on the unknown item. GroupRole
is ignored and passes focus to child items.

Change-Id: If7b4cd9ec02b1890929a709b84d897f452c39587
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 07:44:20 +02:00
Morten Johan Sørvig
d576d77f03 Don't set WA_AcceptTouchEvents on Mac OS X.
Setting this flag causes scroll event lag, so we want
to keep it off for all widgets that do not need touch
events. QPanGestureRecognizer is installed on all
QAbstractScrollAreas. Prevent it from setting the
flag.

Change-Id: Idd4fcc545ff26377607b56f75db75c2865a5fc82
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 07:44:02 +02:00
Stanislav Ionascu
44d415b334 Configure: Provide -no-gui option for Windows host builds.
Change-Id: I5f1fd9c39db31410c6e17f3e0dd90a27d35428ed
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-22 20:41:29 +02:00
Thiago Macieira
ccb7db2ee3 Document that the mutex passed to QWaitCondition::wait must be locked
Simply say that the behaviour is undefined if you don't do what you must
do. I don't want to introduce a check: it can't be done reliably anyway.

Task-number: QTBUG-30806
Change-Id: Iba1bbbdfe62ffcb133f9c52215efdcc0ee7bd9bd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
e5e54a9ceb Accessibility Windows: always check for negative child ids
Some screen readers will pass in child id's that are negative
as response to notifications.
We should always check for negative id's on incoming calls.

Task-number: QTBUG-30792
Change-Id: Idaba3d1931d35ed068cfd9f20e70aa26da427616
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
Stephen Kelly
bc4fbcd215 Add IMPORTED targets for the GL libraries used by Qt.
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.

In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.

This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.

On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.

Task-number: QTBUG-29132

Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
d257e69a79 Accessibility Mac: Implement accessibilityFocusedUIElement
Change-Id: I17b5b1f741a8b340d8f4b16f4ec39cc9a8159bfa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
J-P Nurmi
00b11ccdea Fix QTableView::doItemsLayout()
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).

Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Eskil Abrahamsen Blomfeldt
241ee2ee42 Read correct font hinting config on Gnome/Unity
Fixes regression against Qt 4. This tries to recreate the logic
from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we
on Gnome would override the default hint style specified in
FontConfig with Xft.hintstyle settings. This is the configuration
used for changing the hint style in the Gnome Tweak Tool.

Task-number: QTBUG-29582
Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-22 18:35:52 +02:00
Sergio Ahumada
d64274d4ff test: Disable tst_uic when -no-widgets is used
uic doesn't get compiled when -no-widgets is used, so disabling
its test.

Change-Id: I8c81ec468e40841548dacb356fd87ecf85d7b6ac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-22 16:24:44 +02:00
Morten Johan Sørvig
353f7340a1 Revert "Don't warn on 0x0 sized windows."
This reverts commit 88272d6c04,
which accidentally re-introduced a crash.

Change-Id: Ie60bcf55f940b24f982eed4f20c6af3320b040a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:53:39 +02:00
Richard Moe Gustavsen
8a00a42d0d iOS: don't delete m_touchDevice, QPA takes ownership
When registering m_touchDevice with QWindowSystemInterface, it
will also transfer ownership to it. It will eventually be
deleted in clenupDevicesList on qtouchdevice.cpp.

This patch will also stop the app from crashing when telling it
to quit.

Change-Id: I97070efdf16b4db7d076935fbec62e60f094a7df
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:38:28 +02:00
Kai Koehne
38f6467b81 ANGLE: Fix compilation with MinGW
Make sure ImageSSE2.cpp is compiled with the right flags (-msse2)

Change-Id: I410bbd1fd78112d01ebd486908cd22d827e2e472
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-22 14:30:03 +02:00