Commit Graph

10283 Commits

Author SHA1 Message Date
Thorbjørn Lund Martsum
cfc3eeea1b QMap - use hint on insert in QMap::toStdMap
Giving the std-map a hint (normally) improves insert performance.
There seems to be no reason not to provide this hint.

Change-Id: I4344607ebf54574a3ae9666d87a41a3c14762361
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-27 07:35:48 +02:00
Sergio Ahumada
67a0f546c5 test: Remove dead code from tst_QPixmap
Change-Id: I1945a0f431364f47a43cf7f600ad38fdba5f4a08
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-27 00:24:16 +02:00
Samuel Rødal
d998469740 Prevent potential crash in QXcbCursor::queryPointer().
xcb_get_setup might return 0, but we already have it in QXcbConnection.

Task-number: QTBUG-27686
Change-Id: I58418aedd6bc121ae2b9605389beb3f6612d7fb7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-26 22:39:39 +02:00
Samuel Rødal
fe4068a12b Check the EGL error before calling eglTerminate().
Otherwise we always get EGL_SUCCESS, which is not very informative.

Change-Id: I25311c14108ae385913aa9dc159a1f5fad142342
Reviewed-by: Rainer Keller <rainer.keller@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2012-10-26 22:39:30 +02:00
Bernd Weimer
9dacccd039 Removed usage of pipe in Blackberry event dispatcher
Using a pipe for thread wake-ups is inefficient and can introduce significant
latency. Replaced the pipe by directly sending a BPS event.

Refactored the wake-up code in the private class of the UNIX event dispatcher.

Change-Id: Ic073b0b56c3cbf8327fc6bc3c37132cc3583ef86
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2012-10-26 20:49:01 +02:00
Jon Severinsson
02dacc2c06 Change one int to qint64 in QDateTime::setMSecsSinceEpoch(qint64)
This one was missed when the QDate range was extended.

Change-Id: I0dbcc9fdebca88f7397203d8e539429dcff9ac30
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-26 20:49:01 +02:00
Mark Brand
5ca03eddd3 QSqlRelationalDelegate: remove setEditorData reimplementation
Since commit 84787d82ee
QItemDelegate::setEditorData() works out of the box
on QComboBox.

Change-Id: Ic9839f7eccccbdb787ce204fe98311335ee16b92
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 18:57:54 +02:00
Stephen Kelly
bb8c83986f Set the Directory flag when we find a directory.
Change-Id: I103a0b8e7b7ba673d00f920944026d7d04fac193
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-26 18:57:54 +02:00
Oswald Buddenhagen
ae789544e4 simplify determination of static plugin link line
qt_debug & qt_release are dead, so collapse the respective paths and use
an existing function.

Change-Id: Ie800be477186a6eab72682d367b24e83c3b9bbc0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-26 18:57:54 +02:00
Sergio Ahumada
f224d073d5 test: Don't fail if the network test server is not set up
Leftover from 704a4e4747

Change-Id: I437da91be31259a748303bd7cf20ff0c8bcf53b4
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-26 17:08:03 +02:00
Jerome Pasion
9bf0176802 Qt Core: Adding a landing page and sorted the documentation.
-Added \annotatedlist for the groups
-Sorted and placed the pages on the index page.

Change-Id: Id1a4344c0b39f00036f5ac29b1fcb869d5602d2b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-26 17:08:03 +02:00
Cyril Oblikov
38e02188ee Possibility to change custom Drag&Drop cursors while dragging something. Implementation for Windows and X11.
Additional checks to figure out if new Drag&Drop cursors where set. This means it is possible now to keep QDrag object in your program and call setDragCursor() method every time we need to change cursor depending on context.

Change-Id: I4be69e44b2863371a7ffbb29efc17c18210d6cde
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 17:08:03 +02:00
Friedemann Kleint
80e87c0241 Remove compatibility headers for QPA classes.
The handling of deprecated headers in syncqt causes those
headers to end up in the <QtGui> master include when
shadowbuilding on another drive on Windows.

Task-number: QTBUG-27497
Change-Id: I9318ae670c50bc010b6bf97cd5fd003e08db84c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Peter Kümmel <syntheticpp@gmx.net>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 17:08:03 +02:00
Jonathan Liu
8900bc778f QGLTextureGlyphCache: Fix text rendering artifacts on NVIDIA
Check GL_VENDOR to test whether using NVIDIA graphics. On Linux,
GL_VERSION and GL_VENDOR contains "NVIDIA". On Windows, only
GL_VENDOR contains "NVIDIA".

Task-number: QTBUG-27658
Change-Id: I5e74d07ecb9522d1a86ac2953415a51bbdbe8c49
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 15:25:32 +02:00
Mark Brand
5bddaf76e0 QComboBox: new signal currentTextChanged
Adds NOTIFY to currentText property.

Test included.

Change-Id: I3e92b585ad6697891d61537c82f6ab9e8beb1a00
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:24:19 +02:00
Mark Brand
84787d82ee QComboBox: fix use in QDataWidgetMapper/QItemDelegate
QItemDelegate and QDataWidgetMapper use the WRITE method on the USER
property to set a value in a widget. This did not work for QComboBox
whose USER property currentText lacked a WRITE method.

This change adds the missing setter and flags it as the WRITE method.

The setter setCurrentText() simply calls setEditText() if the combo
box is editable. Otherwise, if there is a matching text in the list,
currentIndex is set to the corresponding index.

Test included.

Follow-up to 816c554017 which restored
currentText as the USER property.

Task-number: QTBUG-26501
Change-Id: I5f2f999e60b09728ca03ead4e28fe36d1f3ee189
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:24:00 +02:00
Thorbjørn Lund Martsum
4fbdb969fb QHeaderView 5.0 - no emit of sortIndicatorChanged when unchanged
There is no reason to emit this when there is no change.

Change-Id: I34f0ceec7c4b0959b77bc5be3ce2c2ad55864598
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:23:46 +02:00
Thorbjørn Lund Martsum
67cabd464d Qt 5.0 - Add QHeaderView refactor to changes notes.
Some widgets users could get the picture that nothing has
happened in that area. So lets at least write that something
has been improved.

Change-Id: Ic314ab06d28e687986a8ab472d8b58830cb0ad90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:23:39 +02:00
Stephen Kelly
49555e3ac9 Add a CMake macro to test module includes
The variations of includes which should work are tested. For example,
in the case of testing the QtCore module and QObject include, the
following includes are generated and compiled:

      #include <QObject>
      #include <QtCore/QObject>
      #include <QtCore>
      #include <QtCore/QtCore>

As the private include directories are not available to the compiler,
this also tests that private headers are not included from public ones.

Change-Id: Id03d0fe290c9691e0f7515015892991d1701ab72
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-26 15:23:30 +02:00
Andy Shaw
356f3c89b8 Fix syncing of visibility and enabled for menus on Cocoa
Fixed menu handling on Cocoa so if a menu is enabled/disabled or made
visible or not then it will keep this in sync with the appropriate
native menu entry.

Change-Id: If269185fcf065fb1b2f60d6ef8c27c107eb4509f
Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com>
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-10-26 14:53:09 +02:00
Oswald Buddenhagen
a3941c2f6e escape constructed command for makefiles
Change-Id: Iec7f2bd7b02d03bf6a99dde363a41578924e523c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-26 14:33:15 +02:00
Sergey Borovkov
8c22c9be3e Remove unnecessary call to png_set_sBit when writing png files
According to libpng documentation - PNG files reduce possible bit depths
to 1, 2, 4, 8, and 16. If data is of another bit depth, it's possible to
write an sBIT chunk into the file so that decoders can recover the
original data if desired. Since we hardcode depth to 8 there is no need
to call png_set_sBit

Change-Id: I8e3941675019b920051775128ff4cf2bf1ca7c4a
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2012-10-26 14:20:21 +02:00
Yuchen Deng
3ab4afb743 Angle: Fix shadow build
Change-Id: I4ce4741ba1aa4009bd4984b4fad5a1b407d2cce5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-26 12:27:47 +02:00
Peter Hartmann
b9551c1b47 Blackberry bearer plugin: Only Report working interfaces as active
Some interfaces might be connected but not working (e.g. no IP address,
no gateway etc.)

In practice, this prevents the USB interface (among others) from
being reported as active and thus the QNetworkConfigurationManager
as being reported as online.
We only want Wifi and 3G etc. connections to be reported as online
when they are up.

Change-Id: I59fbe53bed8392d363a0191d589737f2304c853f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andrey Leonov <aleonov@rim.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-26 12:25:08 +02:00
Rafael Roquetto
c89dc4fdd2 QNX: Query dynamic buffer count at runtime
While unlikely, there are cases in which QQnxWindow::renderBuffer() is
called before the window buffers have been created. Without this check, the
program will abort on QQnxBuffer constructor, since the value that will be
passed to it will be of an invalid buffer.

Change-Id: I9ad5926dca856570032dcf10b6975e8f3364c284
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-26 12:24:56 +02:00
Oswald Buddenhagen
e8170aee1f move QMAKEMODULES addition to .qmake.super to qt_build_config.prf
this is qt module specific magic that has no business in the generic
default_pre.prf.

a side effect is that every qt module now needs to have a .qmake.conf
(unless it sets MODULE_QMAKE_OUTDIR, like webkit does).

Change-Id: Id9e5f6eee2d8ec0c711e7217d9e1893fc9c88132
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-26 12:20:52 +02:00
Oswald Buddenhagen
938dbe1d93 remove last traces of qpluginbase.pri
Change-Id: Idafdab98016cd20f0605a46bf9cb8938da41a99e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-26 12:20:48 +02:00
Oswald Buddenhagen
315c58509d fix 'qmltypes' targets
should now actually work for all build types

Change-Id: I2dc1f8231737c13e95ce8aab1330b4f063951547
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-26 12:20:43 +02:00
Oswald Buddenhagen
b229eff08c make qmltypes target properly respect debug vs. release
Change-Id: Ia4f5ccb2b795a7594b74ea95aa0cc56a91aa7043
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-26 12:20:38 +02:00
Zeno Albisser
9214b39beb Add glxContextForContext function to QXcbNativeInterface.
This change enables receiving the native GLXContext object that is used
by a QOpenGLContext in case of GLX.
This clearly is non-public api that is only meant to be used as a
last resort for cases where it is really necessary to get hold of
a native context object.

Change-Id: I7f1f974f18063ed334b8034a0c0192c875c10cec
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 12:09:28 +02:00
aavit
03967c4f0b Adjust autotest files for raster engine to new default pen
Fix those test scripts that assumed cosmetic default pen, and
improve testing coverage of cosmetic vs non-cosmetic pens in general.
Ref. I04d910e9700baf7f13a8aac07a3633014bb9283e

Change-Id: I2bb3525c21a8e9c8dd1f16e7dcd225195df43c1b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-26 11:53:12 +02:00
aavit
08a64a2e75 Drop Symbian Carbide settings from .gitignore
Change-Id: I429343246714e26690ffd9748e5e6873509c6625
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-10-26 11:53:06 +02:00
Friedemann Kleint
d0aa81ee10 Fix a crash in QFileDialog when selecting an invalid name filter.
When nameDetailsVisible is set to false and an invalid/empty
string is passed to selectNameFilter(), the regexp used to
strip the filter off the suffixes returns empty and a crash
occurs.

Change-Id: I926ea49514ff25a103977d8121fca1cf83d647f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-26 11:51:56 +02:00
Miikka Heikkinen
8ac2ea94d3 Fix enter/leave event generation between native widgets when grabbing.
Removed enter/leave event generation when moving between between
related windows in QWidgetWindow (i.e. native widgets) while some
widget was explicitly grabbing the mouse input. This makes enter/leave
event generation identical to non-native widgets.

Task-number: QTBUG-27551
Change-Id: I4996007bd7922e073a2957ad267a6373e8f3fecc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-26 11:18:12 +02:00
Cyril Oblikov
0f14ea3f3a New-style Windows cursors when dragging object from outside
New-style drag&drop cursors are used now on Windows when user drags
object to application from outside (e.g. image from Explorer). This is
achieved by using IDropTargetHelper.

Change-Id: I67e1db73cf433e235fce891eef0093cd4e605904
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-26 11:00:04 +02:00
Kevin Funk
0e39a0efd4 Make compile on WCE after c3b9398
Change-Id: I594893eb80ecade903e592c41c7117b08bc946a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-26 10:59:44 +02:00
Oliver Wolff
deac55becd Properly check for widget's visibility in doublespinbox autotest
Change-Id: If9e08ab5c84090729537e2a060257564c62fda9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-26 00:26:35 +02:00
Mark Brand
9b710bc13b correct spelling in comment
Change-Id: I6ffa96ac9cda0701c99f839804f400a167fcf9a7
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-25 22:41:24 +02:00
Jens Bache-Wiig
c6151b75b0 Remove Windows as a dependency of mac style
There is not need to have this dependency any more
since mac is overriding anything we depend on in Windows
style anyway.

Change-Id: I8fe0e0cc949265170947b492e04e08fdd4cf5027
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-25 19:26:18 +02:00
Jocelyn Turcotte
4b1e476da0 Happy Eyeballs: Make sure that we commit the address type for SSL connections
_q_connected checks if pendingEncrypt is false before committing the
address type. This could be used to delay the commit but nothing is done
later in _q_encrypted, so the commit is avoided completely.

This causes SSL connections on a network without IPV6 support to hang
if the domain name record contains both IPV4 and IPV6 addresses.

As SSL is handled a few layers above IP, there should be no reason to
avoid/delay committing the address type if the TCP connection was
established surccessfully. Thus this patch is removing the check completely.

Change-Id: If56a3365f9f51712b4aae3f7902711711ace86fd
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-10-25 16:23:49 +02:00
Sergio Ahumada
b8dd9e3041 test: Remove QSKIP from tst_QFileDialog2
In task227930_correctNavigationKeyboardBehavior()

Task-number: QTBUG-23602
Change-Id: I07f40dbc3840c232e09ff1327f00e3fd9c16c22f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-25 16:22:50 +02:00
Sergio Ahumada
c3237f58ab test: Remove tst_QPixmap::grabWindow() function
QPixmap::grabWindow() was deprecated by 41914453d3

Task-number: QTBUG-20863
Change-Id: I7e675c124cd96cf1815b65e57f3fba19e5065066
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-25 16:22:43 +02:00
Caroline Chao
044f5b7fb8 Test: remove QSKIP from tst_qstring
Instead omit the whole tests when appropriate.

In particular:

- When Q_CC_HPACC is defined the tests fromStdString and toStdString are
crashing. Omit the tests in this configuration since the compiler is not
supported.

- Clean the localeAwareCompare() by removing the code where Q_OS_WIN is
defined but not Q_OS_WINCE. System and user locale cannot be set on
Q_OS_WIN other than Win CE and some code could never be reached.

Change-Id: I72ae3246bf8c2a73d14cce45dde14bcb8001d8b3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-10-25 16:22:39 +02:00
Simon Hausmann
f45d6414ad Fix qmake's pro file cache to interact correctly with write_file
When writing a file with write_file() we have to inform the pro file parser
cache to discard the file if it's existant in the cache, to ensure that
calling include() after write_file() always works.

Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-25 16:22:00 +02:00
Jens Bache-Wiig
79a389c346 Remove widget dependencies on Vista style animations
This patch will make it possible to get animations on
desktop components without using the widget pointer.

Change-Id: I2d2eca111dab0d96f276ff3627505c0652c4b4e5
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-25 16:09:34 +02:00
Konstantin Ritt
38630bc35a QTextEngine: Support SMP code points when case changing
Semi-related to QTBUG-17337

Change-Id: I6b42c0f7e588bbeab27bf410fcdfa1a6f80e4ac2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-10-25 16:01:03 +02:00
Konstantin Ritt
f42283669f Remove stale QT_MODULE() usage cases
As of Qt5, this macro is defined to be empty; simply get rid of these leftovers.

Change-Id: I167ccb4c9e92ec9b5e4faeb02bf9c5ef5d982b50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-25 16:00:52 +02:00
Stephen Kelly
dee57bc910 Core/kernel: Make some signals private.
There are more opportunities in QtCore and the rest of Qt to make signals
private instead of public. This is a test-dart to see if there is any
reason not to do this.

It would be nice to make QObject::destroyed private, but as it has a
default argument it would be source incompatible to anyone connecting
to the SIGNAL(destroyed()) instead of SIGNAL(destroyed(QObject*)).

Currently the function-pointer-based connect syntax does not accept
a functor (or lambda) with a different number of arguments than the
signal. Olivier says a fix for that might come in 5.1, but for now
the qfiledialog2 test is changed to not use that anymore.

Also, the function pointer for a private signal can not be assigned to
a local variable, so the qmetamethod test is changed to not do so
anymore.

Change-Id: Iaf776b822f9ba364f2c184df0c6b23811da56e44
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-25 15:56:14 +02:00
Gabriel de Dietrich
611c0081ff Mac: Non-editable QComboBoxes shouldn't get focus by default
On Mac, only line edits and list views always get tab focus. It's only
when we enable full keyboard access that other controls can get tab
focus. When it's not editable, a combobox looks like a button, and it
behaves as such in this respect.

Change-Id: Ia31b0ad01b48a47c1b81180364681d8614863106
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-25 14:10:04 +02:00
J-P Nurmi
50e7a5b723 QStyleAnimation: writable duration & delay properties
These will be needed by upcoming QFadeStyleAnimation and QBlendStyleAnimation.

Change-Id: Ibc5092d5dbd834cb9b16353d3e83b95b04d9484b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-25 14:10:04 +02:00