Commit Graph

10016 Commits

Author SHA1 Message Date
Thomas McGuire
4a755752e9 QNX: Remove workaround for BPS bug
This BPS bug  has been fixed with the latest BB10 release.

Change-Id: I07f86f2d18b1e04f48b95a710d57864c69726c42
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-08 08:33:45 +02:00
Sean Harmer
b72904e854 QNX: Remove the busy loop work around for bps ignoring timeout bug
This commit should now correctly address the throughput issue too.

Change-Id: Ie75d0e6f44500f2720b7af787a58ed6c0a3c8c9d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2012-10-08 08:33:39 +02:00
Julien Brianceau
2f26560027 qpa: Fix rendering issue in blitter paint engine
Take into account brush transformation for TexturePattern fill.
Example : arrows are not rendered propery in
http://www.youtube.com/leanback website.

Change-Id: I5d4bc7410d1d589a27cf17e84062096cfbdb4d6f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-08 08:14:37 +02:00
Thiago A. Correa
9e4e76d2f8 QSettings Windows documentation does not match behavior
QSettings under windows adds "OrganizationDefaults" to the registry
key path when using QSettings::SystemScope.

commit ee2e497f1c missed the change
to HKEY_LOCAL_MACHINE

Task-number: QTBUG-27452

Change-Id: I561f4e57b5beda0f9a511de067eb17fc23e3c856
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-05 08:38:36 +02:00
Stephen Kelly
ef1d18a55f Constify QTableWidget::selectedItems
Task-number: QTBUG-27448

Change-Id: I99175cc2b255b93f698d3c343639c19845c9f5a0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-05 03:16:48 +02:00
Thiago A. Correa
ee2e497f1c QSettings Windows documentation does not match behavior
QSettings under windows adds "OrganizationDefaults" to the registry
key path when using QSettings::SystemScope.

Change platform notes section to document this behavior.

Task-number: QTBUG-27452

Change-Id: I4d00b2da0825efdb360336e4f82080b6b29a54f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-05 03:16:45 +02:00
Thiago A. Correa
b742dbdc3f Fix QSqlQuery::value to use proper index check
Change the validation of index parameter to use -1 constant
instead of QSql::BeforeFirstRow which is unrelated to field index

Change-Id: I43b42bc7ce717bcd9ddc987d2e716f1672c00775
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-10-05 03:16:37 +02:00
Jerome Pasion
bdd3521f83 Qt Network: Cleaned up documentation titles
Task-number: QTBUG-27449
Change-Id: Ib2f99bf4266f0d75cbfeddd3693a84c88676a18e
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-10-05 03:16:32 +02:00
Jerome Pasion
a5feb97c33 Qt SQL: Cleaned up documentation group membership and brief desc.
Task-number: QTBUG-27449
Change-Id: I052c7c9beab344e6c0902f9440c1d6b74e15b0b6
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-10-05 03:16:30 +02:00
Frederik Gladhorn
2147e576ae Expose enabled state in mac accessibility.
Change-Id: I8b368cbdd7ce3bd402170a2bc2419d67a88a41ee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-05 03:16:27 +02:00
Mark Brand
244eeae406 QSqlTableModel::selectRow(): don't expand cache if there is no change
Test added.

Change-Id: Ibd72ef2aeee482abbd22991573460e55dc577457
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure (fixes for KDE) <faure@kde.org>
2012-10-05 03:16:25 +02:00
Mark Brand
c1f15c0485 QSqlTableModel: record(row) must use virtual data()
Commit fbf010a266 introduced a version
of record(row) that includes the generated flags, but it neglected to
populate the values using virtual data() as QSqlQueryModel correctly
does.

Test included lest we forget again.

Change-Id: I49d0f8f87cd0c5078aa6a0e8373b2cffc01f2387
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-05 03:16:22 +02:00
Mark Brand
a97c2d8c83 QSqlTableModel: restore use of virtual setData() in setRecord()
setRecord() should use setData() as intended so that reimplementations
of setData() in subclasses will be respected.

Commit 11bd543d90 failed to consider this.

Test added which should prevent this mistake being repeated.

Change-Id: Ia2d930cd42b5a27521bb389edb1b07fb1bf0fa36
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-10-05 03:16:21 +02:00
Mark Brand
10ff9de91b QSqlTableModel: don't cache unchanged value in setData()
This is good for performance in terms of avoiding unnecessary
database activity and keeping the cache smaller.

Detail:
This change was not included in the big refactoring of QSqlTM. The
idea was that the model shouldn't second guess the intention of the
application and maybe the application wants to cause a submit.
It was a marginal consideration.

Now I think it's clear that our interest in not unnecessarily
expanding the cache outweighs that. In addition, applications can now
call selectRow() if they worry that the database values for the row
have changed and want to set a value back again.

Test added.

Change-Id: I63814dcb63a96c6ba1c8cc227807725a954a0b68
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-05 03:16:19 +02:00
J-P Nurmi
838eadba0b QMacStyle: use proper pimpl
QMacStylePrivate needed to be revised in order for it to have access to
QCommonStylePrivate that is planned to manage style animations in a
generic fashion in the near future.

Change-Id: I03185ae210d2cfc253a236d6b2da35d0201f7e13
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-05 03:16:16 +02:00
Stephen Kelly
356f675592 Add docs to clarify and restrict what the LayoutChangeHint means.
Change-Id: I1b786c5151bcce253b6afa1eebc85e864ed7e91f
Reviewed-by: David Faure <david.faure@kdab.com>
2012-10-05 03:16:14 +02:00
Mark Brand
5fe272f68a QSqlTableModel: fix segfault when overriding selectRow()
The STL-style iteration over the cache in submitAll() assumed the
iterator would remain valid until reaching cache.end(). This failed
to consider that virtual selectRow() might be overridden so that
it removes rows from the cache. For example, it might call select()
which would empty the cache.

The new approach checks at each iteration whether the row is
still in the cache. Using foreach here is justified by its fitness
for purpose and readability.

New test included.

Change-Id: Idee8807ede239c3ba56ff1604574c49f47385ad2
Reviewed-by: David Faure (fixes for KDE) <faure@kde.org>
2012-10-05 03:16:12 +02:00
Fabian Bumberger
c86ed49a79 Use slogger2 for logging on Blackberry instead of writing to stderr
Change-Id: Id0137400f18c8dfe7be7ca44670c16615401d424
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2012-10-04 14:25:47 +02:00
Miikka Heikkinen
c119767790 Fix Windows mouse enter/leave event generation
QWidget::underMouse() did not report correct widget in cases where
mouse was grabbed by popup, which was especially disruptive in case
of QCompleter popup, as that wouldn't close anymore with off-popup
clicks.

Root problem was that mouse capture in Windows caused enter/leave
events for QWindows to be generated incorrectly.
QPlatformWindow documentation specifies that enter/leave events
should be sent independent of explicit mouse grabs and only automatic
mouse grabbing done when button is pressed should suppress
enter/leave events. Updated Windows mouse handling to conform to
this.

Task-number: QTBUG-27283
Change-Id: Iecf786a702f7d29e6026c42ff8ec4c9cbf1b6ac3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-04 14:24:44 +02:00
Friedemann Kleint
dcc2e84fd0 Run per-QWindow native event filter for all events.
Task-number: QTBUG-27101

Change-Id: I064f91e250d68223da3b81d605e522c8b78535f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-04 14:10:21 +02:00
Teemu Katajisto
924aeb2787 Cocoa: fix regressions in cocoa filedialog helper
mOpenPanel is set to 0 if save file dialog is used so call
mSavePanel instead.

Fixes regression introduced in
2e902799df

Change-Id: Idb93e44437731cad3c985d51b57b793a3ff2f292
Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-04 13:31:55 +02:00
Sergio Ahumada
92c756677f test: Remove QSKIP from tst_QToolButton::triggered()
This test actually passes on Mac OS X, so removing the QSKIP

Task-number: QTBUG-24374
Change-Id: I0b761ca9c30afc9d511e9962ee1c0958b863b374
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-04 12:55:23 +02:00
Friedemann Kleint
7474a74bbb Remove unused placeholder from qErrnoWarning().
The intention probably was to use __FUNCTION__, but since
Qt logging can now be configured to print the function name
by setting environment variables, just remove it.

Change-Id: Ic87aebfea633dd91eda7376b33ca3b14d1cab93f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-04 12:20:02 +02:00
Stephen Kelly
f37d3e2cd9 Fix segfault when delegates change properties on editors.
The solution is similar to that
in b84e180263 which affected
QSortFilterProxyModel.

Task-number: QTBUG-25370

Change-Id: I6bbb9d9786bcb2c9fa8027ab8a7cc13664784b8d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-04 12:15:49 +02:00
Gabriel de Dietrich
65f6ad26ed Mac: Safely dispose of scrollbars temporary NSGraphicsContext
When rendering transient scrollbars, we instanciate a specialised
NSGraphicsContext since those need non-opaque rendering. This context
is being used as current context, but it was never properly released
and the previous context never properly restored.

Task-number: QTBUG-27327
Change-Id: I4e867e64a09368dbe64b84b17f07fd8e57bbae24
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-10-04 12:14:15 +02:00
Friedemann Kleint
bf55c0ac3b Windows: Append file suffix in save-dialog.
Task-number: QTBUG-27186
Change-Id: I04304fce1cbf6fb6794f352ff896eb463699d42b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-04 11:58:48 +02:00
Stephen Kelly
d24b867e56 CMake: Improve QT5_GET_MOC_FLAGS macro
We need to handle CMAKE_INCLUDE_CURRENT_DIR for include directories.
Otherwise generated files located in the current binary directory are
not found as expected.

e.g. *.json file as meta data for Qt5's plugins generated at build time.

Change-Id: I14ae1e7013f9d8b485aa990d50db4a03ca4f4b81
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-04 11:58:48 +02:00
Andy Shaw
595deca5c9 Update the window style when the modality changes on Cocoa
On Cocoa if the modality of a dialog changes then the style of the
window needs to change to reflect this. So we add a variable to
cache the windows modality when it is created to compare against when
being made visible.

Task-number: QTBUG-22316
Change-Id: I7bfd016321510a9ec70ccb90672f5203a0f3a468
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-04 11:58:48 +02:00
Thomas Hartmann
1fb3d849e4 compile fix for MSVC 2008 and std::upper_bound
qUpperBound was replaced by std::upper_bound.

Unfortunately the STL of MSVC 2008 enforces
the definition of the operator in both
directions.

Change-Id: I3e0f775c23e43332d106e0847d3611e488da6c06
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-04 11:58:48 +02:00
Frederik Gladhorn
642867d2dd Return if header is 0.
QT-BUG: 184868

Change-Id: Iff041c66fdfb2267e0349bdd47fec0fe63b1799d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-04 11:58:48 +02:00
Arvid Picciani
38f521b0bd native android support with eglfs
Enable eglfs build against any android > 4 tree,
linking to native libs without emulation layers,
running on top of surfaceflinger.
No GNUs where harmed in the process.

Yes, any android.
Tested on maguro, tf300, eeepc-x86
x86-64 compiles but broken elsewhere.

You don't need an Android.mk, but you must compile from within
a shell setup with androids "lunch" or an equivalent that set TOP and OUT.
Since we do callbacks to androids build system,
the same env restrictions apply (must use gnu bash, and gnumake 3.81)

Done-with: Samuel Roedal <samuel.rodal@digia.com>
Done-with: Robin Burchell <robin+qt@viroteck.net>
Done-with: Brian Avery <brian.avery@nokia.com>

Change-Id: Iec0178cdeadbeefc79e4fe6ef449d399ac8ca666
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-04 11:58:48 +02:00
Miikka Heikkinen
8547205fe8 Show widget cursor after restoring last override cursor
qwidget_qpa.cpp was setting cursor directly to platform window, so
QWindow didn't actually know what cursor was supposed to be shown.

Since QWindow now supports setting cursor and has override cursor
handling there, set cursor via QWindow instead of platform window.
Also changed QGuiApplication override cursor handling so that
it will query the cursor from QWindow if there is no override cursor.
With these changes, widget's custom cursor will be properly shown
when final override cursor is restored.

Task-number: QTBUG-24674
Change-Id: I2d2bb1027779256f9d6de560b6533f45e205ffe9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-04 09:13:33 +02:00
Sergio Ahumada
b4bf76fffc tst_QLocale: remove QSKIP, wrap Q_OS_MAC/Q_OS_WIN
Change-Id: I44755379561b98e43dd19c8c01b40349be203e14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-04 09:09:15 +02:00
Leonard Lee
122b09c1d0 Remove #if 0 usage in QElapsedTimer autotest.
Given QElapsedTimer t1, t2 variable, the t1-t2,
t1+1000 (add 1 second) operations not supported.

Task-number: QTBUG-22446
Change-Id: Idd87f778c212831aa7f92242452538d113c9cfcf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-04 03:03:35 +02:00
Leonard Lee
679a4e98c7 Fix #if 0 usage in collections autotest.
Removed inappropriate use of #if 0 in collections autotest.

Task-number: QTBUG-22471
Change-Id: Ibf4e5fae8e671ebfd0dc5734875fcc8879b330af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-04 03:03:17 +02:00
Kai Koehne
abbecca7d4 Rename quick1_debug back to declarative_debug
The library name changed back from quick1 to declarative, so the
debug option should be renamed accordingly.

Change-Id: I192520a0a4de4764cf93da8cdbb14e24ba7de093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-04 03:03:00 +02:00
Frederik Gladhorn
f303320f9e Accessibility: For app claim support for app iface.
Change-Id: Idb7f5971d61885f18d827f6bff3994df7a3860e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-03 17:34:44 +02:00
Frederik Gladhorn
0b6007936a Implement action de-marshalling.
Change-Id: Ie9ae85298fad6217f9f50a018fbba50f028deba2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-03 17:34:42 +02:00
Frederik Gladhorn
375f5b4424 Remove unused function.
Change-Id: Ie8eecf7e4a7475ac84a66b6055149ce92d019785
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-03 17:34:40 +02:00
Frederik Gladhorn
26022a4eee Check for valid model and view in isValid for TableCells.
Change-Id: Iadca5503ed2a1d6411d46ed6fe9d5b9a56461a3a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-03 17:34:38 +02:00
Frederik Gladhorn
2e99f6c48f Make accessibility debug output optional.
On linux with the new plugin debug output was
a bit too generous. Instead use environment var:
If QT_DEBUG_ACCESSIBILITY is set, give the full a11y output.

Change-Id: I1c9e2078e38799f91468cfc2d9ddcaa36ba4fa03
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-03 17:34:35 +02:00
Gabriel de Dietrich
afd66b3cb0 Mac: QComboBox wouldn't receive mouse events when shown within a modal dialog
The mouse events were being stolen by the modal dialog, preventing the
combo box to update itself. Key events were being properly forwarded,
but this was probably due to the different way key events are being
delivered.

Change-Id: I5bfc4800fad9fd4122a212e6fdec13811a7e647b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-03 17:30:52 +02:00
Christian Strømme
403b15488b Fix for integer overflow in QString::replace
Task-number: QTBUG-22967

Change-Id: I604e6a725d46eab4c4369ebb54e8c9ea1350f492
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-03 17:30:30 +02:00
Sean Harmer
394249616c OpenGL: Don't request a context version higher than is supported
The function wglCreateContextAttribsARB will fail if we request a
context version higher than is supported. We therefore upper-bound the
requested version by the version of the static context. This results
in context creation succeeding and having the closest possible match
to the requested format.

The xcb qpa plugin is modified to operate similarly to the windows
plugin in that it now creates a "static" context which is used to
limit the versions of contexts requested by the user.

Change-Id: I277ad7cc82edfdf7b9d8502ad921c8175feb1a4a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-03 17:22:03 +02:00
Eskil Abrahamsen Blomfeldt
84100c9085 Fix issue with mispositioned family name i QFontComboBox
Mac OS X 10.7 comes with the family of Stix fonts, some
of which exposed an ugly layout bug in the QFontComboBox
because the ascent/descent ratio is very large due to
a very high ascent, so centering the text vertically might
cause most of the text to be clipped away.

The solution is to detect when the ascent is larger than the
height of the destination rectangle (hence a large part of the
characters will be clipped) and use the actual bounding rect
for centralizing instead. Since this only happens for a
very few of the fonts, the overhead of getting the bounding
rect should be tolerable.

This is a port of 4679c6901fc7c388fdf6c022d3499708222ef1f1 from
Qt 4.8.

Task-number: QTBUG-26691

Change-Id: Ia2014775e5baf0568df3290f2dc4ad64fb5a74bd
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-03 17:17:29 +02:00
Konstantin Ritt
3d620088b4 Fix QTextBoundaryFinder assignment operator
for the case when the boundary finder is assigned to an invalid one.

Change-Id: I5b60984ff3fd99972fcae21895684bd83b012780
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-03 16:34:32 +02:00
Sergio Martins
9695df4d44 Introducing the PlatformPanel event type.
This event can be used by any platform plugin to implement
special application panels/overlayed menus.

Currently used by QNX only.

This replaces sending fake Qt::Key_Menu presses in the QNX
plugin. Qt::Key_Menu is already used when invoking context
menus with the keyboard.

Change-Id: I9c8f1743fd147a07c11883323800017376915ae1
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-10-03 13:51:43 +02:00
Andy Shaw
c79f0f0fba Change Q_ASSERT to warnings and returns for the menu classes
On Mac usually release frameworks are used during development so asserts
don't tend to get fired. Since the menu code did not crash in Qt 4.8,
it was decided that we should ensure that the same code does not crash
now so instead we warn instead of asserting for those cases.

Change-Id: I923e5591202cb2ad801074ce3ad2a11d7190cee8
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-03 12:12:15 +02:00
Jason Barron
32b72283d0 Define QMAKE_EXTENSION_STATICLIB for MSVC mkspecs.
Change-Id: Ia652001f9be67b0c509495c054875ca1ef8fc049
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-03 09:08:27 +02:00
Thiago Macieira
f89fd779fc Overhaul a little the QUrl error reporting.
Keep the original QString that triggered the parsing error, instead of
just one QChar. This provides more powerful error messages, like:

 Invalid IPv6 address; source was "http://[:::]";  scheme = "http", host = ""
 (QUrl cannot keep invalid hostnames)

 Invalid port or port number out of range; source was "http://example.com:abc";  scheme = "http", host = "example.com"
 (QUrl cannot keep a non-numeric port number)

 Invalid path (character '%' not permitted); source was "foo:/path%?";  scheme = "foo", path = "/path%25%1F"
 (the tolerant parser runs first, so the faulty component is fixed)

This stores the error state in a special structure which is not
allocated under normal conditions, keeping the memory consumption
down. On 32-bit systems, QUrlPrivate does not increase in size; on
64-bit systems, it grows by 8 bytes.

Change-Id: I93d798d43401dfeb9fca7b6eed7ea758da10136b
Reviewed-by: David Faure <faure@kde.org>
2012-10-02 22:34:42 +02:00