profile/ivi/qtbase.git
12 years agoQMap - remove unused maximumNode() functions
Thorbjørn Lund Martsum [Wed, 26 Sep 2012 13:25:01 +0000 (15:25 +0200)]
QMap - remove unused maximumNode() functions

QMap has 4 different maximumNode() functions, but they are all
unused and just in the way.

Change-Id: I012145cfae32898830ec95e229514d9be838ae2f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRemoved the "tst_QVector::outOfMemory" test.
Christian Strømme [Fri, 5 Oct 2012 14:32:19 +0000 (16:32 +0200)]
Removed the "tst_QVector::outOfMemory" test.

The test is useless as we assert if the requested size exceeds
a certain limit. We could, as an alternative,
throw an exception, but in the end it's the caller's responsibility
to ensure that the requested size is a sane value.

Task-number: QTBUG-27285
Change-Id: I738950a6a2b51671a54e4d25c7e4c3ac0d7f63b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoconfigure: bump gtk version from 2.10 to 2.18 (sep 2009)
J-P Nurmi [Mon, 8 Oct 2012 13:10:44 +0000 (15:10 +0200)]
configure: bump gtk version from 2.10 to 2.18 (sep 2009)

GTK_WIDGET_TOPLEVEL was deprecated in 2.20 and no longer available in
gtk 3. gtk_widget_is_toplevel() was introduced as a replacement in gtk
2.18 => make that the minimum requirement.

Change-Id: Ie5d2d8bd824af916a9764c66a7046f07a77b1748
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
12 years agouic: Map QLCDNumber::numDigits to QLCDNumber::digitCount.
Friedemann Kleint [Mon, 8 Oct 2012 12:22:27 +0000 (14:22 +0200)]
uic: Map QLCDNumber::numDigits to QLCDNumber::digitCount.

QLCDNumber::numDigits was deprecated in Qt 4 and removed in Qt 5.

Task-number: QTBUG-27462
Change-Id: I3772a884f31aeea70121cccd429ac996b2ecbccd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
12 years agoStabilize test qmenu::pushButtonPopulateOnAboutToShow().
Friedemann Kleint [Mon, 8 Oct 2012 09:19:24 +0000 (11:19 +0200)]
Stabilize test qmenu::pushButtonPopulateOnAboutToShow().

Do not leave an allocated menu in member lastMenu behind that
interferes with the consecutive QTBUG7907_submenus_autoselect().

Change-Id: I80fc9de9ca63367264f642023a244c1d7d8ada7f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
12 years agoIntroduce a Tegra2 mkspec to the device specs
Thomas Senyk [Fri, 27 Jul 2012 15:42:25 +0000 (17:42 +0200)]
Introduce a Tegra2 mkspec to the device specs

Change-Id: I16275f2f289a78e3217d765934b999b188005c14
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
12 years agoSimplify the imx6-device-mkspec
Thomas Senyk [Wed, 1 Aug 2012 09:17:59 +0000 (11:17 +0200)]
Simplify the imx6-device-mkspec

This change is possible due to commit 18654058
As it's now possible to use configure's -sysroot without
gcc's --sysroot, it's possible to use configure's pkg-config setup
(which comes with its -sysroot). This gives the possibility to
simplify the mkspec and be in line with the other device-mkspecs

Change-Id: I0f34ec2c5c7b06334ad3c1605001c0803272b027
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
12 years agoHandle additional format ranges when itemizing.
Pierre Rossi [Fri, 10 Feb 2012 19:42:13 +0000 (20:42 +0100)]
Handle additional format ranges when itemizing.

This is useful when the additional formats are used on a
text layout using a raw font. It can also come in handy for
input methods operating on a QTextDocument.
We now consider all format range edges to generate the
associated items. The capitalization can be overridden via
the additionnal formats mechanism.

Adds an autotest that checks that this works with font capitalization.

Change-Id: I782d2c48d05b0dfbad480a9ca77198465292b358
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
12 years agoFix Windows: QStandardPath::findExecutable() to check suffixes.
Friedemann Kleint [Fri, 5 Oct 2012 10:13:54 +0000 (12:13 +0200)]
Fix Windows: QStandardPath::findExecutable() to check suffixes.

Append the Windows executables suffixes from the PATHEXT
environment variable.

The previous code had a bug since the 'break' statement
bailed out of the inner loop only.

Factor search code out into a separate functions, avoiding
repeated invocations of list.constEnd() and variable
assignments in the old code.

Add a static function that is called on Unix and on Windows
for executable names with a suffix.

Call another function applying a candidate list of suffixes
in case an executable name without a suffix is passed.

Lower case the extensions from PATHEXT, streamline code.

Split up the test, add a _data() slot for clarity.

Task-number: QTBUG-27457
Change-Id: I2bf34de52aeadddd3b937ad1e22191c3c850fd26
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
12 years agoremove superfluous include from echoplugin example
Joerg Bornemann [Mon, 8 Oct 2012 12:36:58 +0000 (14:36 +0200)]
remove superfluous include from echoplugin example

Change-Id: I8a53c5e628e43796d7f4b53c311dd4d200527262
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
12 years agoAdd QT.module.docs variable to the module system
Tor Arne Vestbø [Mon, 8 Oct 2012 10:57:51 +0000 (12:57 +0200)]
Add QT.module.docs variable to the module system

Change-Id: Ibe54ee44a06747453bc09e006e27187cbee30b23
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
12 years agodoc: remove old un-used monolithic qdocconf file
Tor Arne Vestbø [Mon, 8 Oct 2012 12:46:45 +0000 (14:46 +0200)]
doc: remove old un-used monolithic qdocconf file

Change-Id: I253fa079928e55e2c3c574e9c98780d2c72086cf
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
12 years agoTools: add QLibraryInfo to the bootstrapped library.
Pierre Rossi [Tue, 2 Oct 2012 17:22:17 +0000 (19:22 +0200)]
Tools: add QLibraryInfo to the bootstrapped library.

For future use by qdoc.

Change-Id: Id9079a6fa581ff16810df9a8f2bb94314ee11ca9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
12 years agostyles.pri: tabs to spaces
J-P Nurmi [Fri, 5 Oct 2012 08:41:33 +0000 (10:41 +0200)]
styles.pri: tabs to spaces

Change-Id: I164368222d89ec2dc557bec02840f1d208e8f276
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
12 years agoFix a bug in how paths are made canonical and relative
Jan Arve Saether [Fri, 21 Sep 2012 13:05:04 +0000 (15:05 +0200)]
Fix a bug in how paths are made canonical and relative

Change-Id: Id9b2de9097cab4520882b48a28fccd382c5e076d
Reviewed-by: Martin Smith <martin.smith@digia.com>
12 years agoImplementation of the BlackBerry Qt Proxy support.
Andrey Leonov [Thu, 4 Oct 2012 23:37:00 +0000 (19:37 -0400)]
Implementation of the BlackBerry Qt Proxy support.

An implementation for BlackBerry devices based on the BPS netstatus API.

Change-Id: I89deed031d2a867bbd6628bee97f61345b58f1ab
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agodoc: Brush up QPaintEngine documentation for Qt 5
Eskil Abrahamsen Blomfeldt [Thu, 4 Oct 2012 12:58:32 +0000 (14:58 +0200)]
doc: Brush up QPaintEngine documentation for Qt 5

The paint engine story has changed drastically in Qt 5,
and we no longer need the reference to Qt 3.

Change-Id: I66090582e5c66d2a3cd9de355c34b33a94b67dfe
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
12 years agodoc: Update Q*PaintDevice docs
Eskil Abrahamsen Blomfeldt [Thu, 4 Oct 2012 08:55:12 +0000 (10:55 +0200)]
doc: Update Q*PaintDevice docs

Minor syntax typo in QPagedPaintDevice.

Some Qt 5 updates in QPaintDevice (QGuiApplication)
and a couple of other changes:

1. Usually, we say an object is "painted" or "drawn" when it is
drawn on top of another object (like drawEllipse()) not when it
is the destination of the draw commands. To be more consistent I
updated the language here.

2. What's commonly called a 32-bit display has 24 bits of color
information and eight bits of opacity information. This gives a
color count which can be accurately represented by int. To avoid
confusion, the exception in the docs for colorCount() has been
generalized a little.

Change-Id: Iabaaed1f3e4a80e7e14dfd8855da8c3cd8b3012f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
12 years agoDoc: Update QThread class ref to reflect changes since Qt 4.4
Sze Howe Koh [Thu, 4 Oct 2012 11:33:39 +0000 (19:33 +0800)]
Doc: Update QThread class ref to reflect changes since Qt 4.4

Remove advice to subclass QThread; promote thinking of QThread as a
thread manager, not a thread; promote event-driven programming over time
micromanagement; warn against common pitfalls.

Result of collaboration in forum (https://qt-project.org/forums/viewthread/20691/)
and mailing list (https://qt-project.org/pipermail/development/2012-September/006738.html)

Task-number: QTBUG-16358
Change-Id: I57e3873976fad489176cbf9f7e680fd6992a8837
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
12 years agoqdoc: Simplification of target ref construction
Martin Smith [Fri, 5 Oct 2012 12:35:00 +0000 (14:35 +0200)]
qdoc: Simplification of target ref construction

This change is being done to simplify qdoc,
but the motivation was to fix a segfault in
qdoc when running the release version of
qdoc on linux. The change improves qdoc by
simplifying the code whether it fixes the
segfault or not.

Change-Id: I2c865f7f1e2a44763aa7349d1bd739ad562f4029
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
12 years agoqdoc: Change to debug output
Martin Smith [Wed, 3 Oct 2012 09:08:39 +0000 (11:08 +0200)]
qdoc: Change to debug output

Only print debug output if -debug is used
on the command line.

Change-Id: I2bdfca1a072f728427da61f05b34e6e07d933183
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
12 years agoqdoc: Change qdoc to use QML terminology
Martin Smith [Wed, 3 Oct 2012 07:53:37 +0000 (09:53 +0200)]
qdoc: Change qdoc to use QML terminology

\since command's output to "This QML type was introduced..."

Task number: QTBUG-24784

Change-Id: I741efb57979eb76f4675915ef1a6b983deb492d9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
12 years agoqdoc: Adding a debug function
Martin Smith [Mon, 1 Oct 2012 12:27:45 +0000 (14:27 +0200)]
qdoc: Adding a debug function

qdoc segfaults for one user, when he runs
the release version of qdoc but not the debug
version. This change adds a -debug option to
the qdoc command line options. If set, qdoc
will print debug messages at useful milestones
so we can see where it is when it goes into
the weeds.

Change-Id: I0e826e74399eaf50091817c68c775d02c6b615d2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
12 years agofixing typo in compile fix for MSVC 2008
Thomas Hartmann [Fri, 5 Oct 2012 08:50:55 +0000 (10:50 +0200)]
fixing typo in compile fix for MSVC 2008

Change-Id: If1955395d9c476a49e6d6f2ae14e6ad6c63a7da7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
12 years agoPrevent crashing on screen deletion.
Samuel Rødal [Mon, 1 Oct 2012 08:10:08 +0000 (10:10 +0200)]
Prevent crashing on screen deletion.

Even child windows need to hook into the screen destroyed signal to
avoid having a dangling screen pointer.

Change-Id: I7b613356c333be6e9dfdf5db45f70a521a9b8fe2
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
12 years agoQApplication::palette missing Q_NO_USING_KEYWORD implementation
Thiago A. Correa [Sun, 7 Oct 2012 05:10:57 +0000 (02:10 -0300)]
QApplication::palette missing Q_NO_USING_KEYWORD implementation

Added inline implementation of QApplication::palette when
Q_NO_USING_KEYWORD is defined.

Task-number: QTBUG-27393

Change-Id: I833efb950a579db28fcb243c931c9e22b28ec431
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
12 years agoQSqlQuery::value string overload
Thiago A. Correa [Thu, 4 Oct 2012 01:52:59 +0000 (22:52 -0300)]
QSqlQuery::value string overload

Introduce value overload to take field name as a parameter.

This allows for terser application code that avoids explicit
calls to QSqlRecord::value().

Change-Id: I02b6712cd5ec41633b902714315b5716c17d1a9b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
12 years agoCocoa: add qWarnining when trying to create 0 width/height CGImages
Teemu Katajisto [Fri, 5 Oct 2012 10:48:43 +0000 (13:48 +0300)]
Cocoa: add qWarnining when trying to create 0 width/height CGImages

Add meaningful warnings when trying to create 0 width/height CGImages.
This way it is easier to track down the place where valid size is not
used.

Change-Id: Id261ddf72d5487afcdb1a2a6d0d9079700888545
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoCocoa: don't animate window transitions for 0 width/height windows
Teemu Katajisto [Fri, 5 Oct 2012 11:20:03 +0000 (14:20 +0300)]
Cocoa: don't animate window transitions for 0 width/height windows

Task-number: QTBUG-26617

Change-Id: I6dfc3f208368ddf6be65259218aee88db9692cfe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoosx: support for QScreen changes at runtime, and physical dimensions
Shawn Rutledge [Mon, 1 Oct 2012 17:26:36 +0000 (19:26 +0200)]
osx: support for QScreen changes at runtime, and physical dimensions

QScreen's physical size and logical DPI come from the operating system.
Physical DPI is calculated as pixel size / physical size.  Whenever the
user changes the display settings, applicationDidChangeScreenParameters
is called; QScreens are created and destroyed when displays are added
and removed, and each QScreen which continues to exist gets updated
properties from the OS.

Change-Id: I7f2e9e32a3ad53d73ea987f39a0c62fa8dd22b05
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoUse jom in tst_qmake.
Friedemann Kleint [Fri, 5 Oct 2012 08:12:08 +0000 (10:12 +0200)]
Use jom in tst_qmake.

Speed up compiling the tests.

Task-number: 26023

Change-Id: Ib5e872cc6cde09ac90f426a8f6e7cfea509d02e2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
12 years agoIncrease tst_qmake more time on Windows.
Friedemann Kleint [Fri, 5 Oct 2012 08:10:46 +0000 (10:10 +0200)]
Increase tst_qmake more time on Windows.

The test compiles examples, which takes a long time.

Task-number: 26023
Change-Id: If794b046aa07737f3076aace8d585dc44027cc6b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
12 years agoQNX: Fix input lag
Thomas McGuire [Fri, 5 Oct 2012 13:55:43 +0000 (15:55 +0200)]
QNX: Fix input lag

We were breaking out of select() too early with a timeout of -1.

Change-Id: Icd47b307a6f3a9d11c862722759e24f560e72e9e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoQNX: Remove workaround for BPS bug
Thomas McGuire [Fri, 5 Oct 2012 13:53:44 +0000 (15:53 +0200)]
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>
12 years agoQNX: Remove the busy loop work around for bps ignoring timeout bug
Sean Harmer [Tue, 28 Aug 2012 14:10:12 +0000 (15:10 +0100)]
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>
12 years agoqpa: Fix rendering issue in blitter paint engine
Julien Brianceau [Fri, 5 Oct 2012 13:41:28 +0000 (15:41 +0200)]
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>
12 years agoQSettings Windows documentation does not match behavior
Thiago A. Correa [Fri, 5 Oct 2012 04:29:34 +0000 (01:29 -0300)]
QSettings Windows documentation does not match behavior

QSettings under windows adds "OrganizationDefaults" to the registry
key path when using QSettings::SystemScope.

commit ee2e497f1c8216a22ddea53ab5ae1fd09bfee363 missed the change
to HKEY_LOCAL_MACHINE

Task-number: QTBUG-27452

Change-Id: I561f4e57b5beda0f9a511de067eb17fc23e3c856
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConstify QTableWidget::selectedItems
Stephen Kelly [Thu, 4 Oct 2012 15:13:33 +0000 (17:13 +0200)]
Constify QTableWidget::selectedItems

Task-number: QTBUG-27448

Change-Id: I99175cc2b255b93f698d3c343639c19845c9f5a0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
12 years agoQSettings Windows documentation does not match behavior
Thiago A. Correa [Thu, 4 Oct 2012 21:09:29 +0000 (18:09 -0300)]
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>
12 years agoFix QSqlQuery::value to use proper index check
Thiago A. Correa [Thu, 4 Oct 2012 16:11:23 +0000 (13:11 -0300)]
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>
12 years agoQt Network: Cleaned up documentation titles
Jerome Pasion [Thu, 4 Oct 2012 14:26:41 +0000 (16:26 +0200)]
Qt Network: Cleaned up documentation titles

Task-number: QTBUG-27449
Change-Id: Ib2f99bf4266f0d75cbfeddd3693a84c88676a18e
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
12 years agoQt SQL: Cleaned up documentation group membership and brief desc.
Jerome Pasion [Thu, 4 Oct 2012 14:15:26 +0000 (16:15 +0200)]
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>
12 years agoExpose enabled state in mac accessibility.
Frederik Gladhorn [Tue, 2 Oct 2012 16:24:54 +0000 (18:24 +0200)]
Expose enabled state in mac accessibility.

Change-Id: I8b368cbdd7ce3bd402170a2bc2419d67a88a41ee
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoQSqlTableModel::selectRow(): don't expand cache if there is no change
Mark Brand [Fri, 28 Sep 2012 10:22:55 +0000 (12:22 +0200)]
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>
12 years agoQSqlTableModel: record(row) must use virtual data()
Mark Brand [Fri, 28 Sep 2012 14:27:45 +0000 (16:27 +0200)]
QSqlTableModel: record(row) must use virtual data()

Commit fbf010a26617b3986e9a76bd9c004403aebfcdc2 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>
12 years agoQSqlTableModel: restore use of virtual setData() in setRecord()
Mark Brand [Fri, 28 Sep 2012 12:21:26 +0000 (14:21 +0200)]
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 11bd543d901f67f79db3f5b5dfaa626c6e8faa45 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>
12 years agoQSqlTableModel: don't cache unchanged value in setData()
Mark Brand [Fri, 28 Sep 2012 08:10:29 +0000 (10:10 +0200)]
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>
12 years agoQMacStyle: use proper pimpl
J-P Nurmi [Thu, 4 Oct 2012 10:33:18 +0000 (12:33 +0200)]
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>
12 years agoAdd docs to clarify and restrict what the LayoutChangeHint means.
Stephen Kelly [Thu, 4 Oct 2012 10:37:07 +0000 (12:37 +0200)]
Add docs to clarify and restrict what the LayoutChangeHint means.

Change-Id: I1b786c5151bcce253b6afa1eebc85e864ed7e91f
Reviewed-by: David Faure <david.faure@kdab.com>
12 years agoQSqlTableModel: fix segfault when overriding selectRow()
Mark Brand [Tue, 25 Sep 2012 21:50:01 +0000 (23:50 +0200)]
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>
12 years agoUse slogger2 for logging on Blackberry instead of writing to stderr
Fabian Bumberger [Tue, 18 Sep 2012 18:15:18 +0000 (14:15 -0400)]
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>
12 years agoFix Windows mouse enter/leave event generation
Miikka Heikkinen [Mon, 1 Oct 2012 14:09:24 +0000 (17:09 +0300)]
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>
12 years agoRun per-QWindow native event filter for all events.
Friedemann Kleint [Thu, 4 Oct 2012 10:30:46 +0000 (12:30 +0200)]
Run per-QWindow native event filter for all events.

Task-number: QTBUG-27101

Change-Id: I064f91e250d68223da3b81d605e522c8b78535f5
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
12 years agoCocoa: fix regressions in cocoa filedialog helper
Teemu Katajisto [Wed, 3 Oct 2012 10:17:12 +0000 (13:17 +0300)]
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
2e902799df6298ad4c75b4c565a0baf9cb7f7ab8

Change-Id: Idb93e44437731cad3c985d51b57b793a3ff2f292
Reviewed-by: Pasi Matilainen <pasi.matilainen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agotest: Remove QSKIP from tst_QToolButton::triggered()
Sergio Ahumada [Tue, 2 Oct 2012 13:48:37 +0000 (15:48 +0200)]
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>
12 years agoRemove unused placeholder from qErrnoWarning().
Friedemann Kleint [Thu, 4 Oct 2012 10:04:54 +0000 (12:04 +0200)]
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>
12 years agoFix segfault when delegates change properties on editors.
Stephen Kelly [Tue, 2 Oct 2012 16:15:33 +0000 (18:15 +0200)]
Fix segfault when delegates change properties on editors.

The solution is similar to that
in b84e180263d0da3d1e6967fcf759225a778ea6ea which affected
QSortFilterProxyModel.

Task-number: QTBUG-25370

Change-Id: I6bbb9d9786bcb2c9fa8027ab8a7cc13664784b8d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
12 years agoMac: Safely dispose of scrollbars temporary NSGraphicsContext
Gabriel de Dietrich [Wed, 3 Oct 2012 11:50:02 +0000 (13:50 +0200)]
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>
12 years agoWindows: Append file suffix in save-dialog.
Friedemann Kleint [Thu, 4 Oct 2012 09:36:11 +0000 (11:36 +0200)]
Windows: Append file suffix in save-dialog.

Task-number: QTBUG-27186
Change-Id: I04304fce1cbf6fb6794f352ff896eb463699d42b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
12 years agoCMake: Improve QT5_GET_MOC_FLAGS macro
Stephen Kelly [Tue, 2 Oct 2012 10:04:00 +0000 (12:04 +0200)]
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>
12 years agoUpdate the window style when the modality changes on Cocoa
Andy Shaw [Tue, 25 Sep 2012 05:04:01 +0000 (07:04 +0200)]
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>
12 years agocompile fix for MSVC 2008 and std::upper_bound
Thomas Hartmann [Tue, 2 Oct 2012 14:50:01 +0000 (16:50 +0200)]
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>
12 years agoReturn if header is 0.
Frederik Gladhorn [Wed, 3 Oct 2012 10:45:38 +0000 (12:45 +0200)]
Return if header is 0.

QT-BUG: 184868

Change-Id: Iff041c66fdfb2267e0349bdd47fec0fe63b1799d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agonative android support with eglfs
Arvid Picciani [Sun, 23 Sep 2012 19:21:12 +0000 (19:21 +0000)]
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>
12 years agoShow widget cursor after restoring last override cursor
Miikka Heikkinen [Wed, 3 Oct 2012 09:06:14 +0000 (12:06 +0300)]
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>
12 years agotst_QLocale: remove QSKIP, wrap Q_OS_MAC/Q_OS_WIN
Sergio Ahumada [Tue, 2 Oct 2012 14:13:12 +0000 (16:13 +0200)]
tst_QLocale: remove QSKIP, wrap Q_OS_MAC/Q_OS_WIN

Change-Id: I44755379561b98e43dd19c8c01b40349be203e14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
12 years agoRemove #if 0 usage in QElapsedTimer autotest.
Leonard Lee [Wed, 3 Oct 2012 12:06:07 +0000 (14:06 +0200)]
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>
12 years agoFix #if 0 usage in collections autotest.
Leonard Lee [Mon, 1 Oct 2012 13:32:44 +0000 (15:32 +0200)]
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>
12 years agoRename quick1_debug back to declarative_debug
Kai Koehne [Fri, 28 Sep 2012 13:31:55 +0000 (15:31 +0200)]
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>
12 years agoAccessibility: For app claim support for app iface.
Frederik Gladhorn [Fri, 28 Sep 2012 18:15:02 +0000 (20:15 +0200)]
Accessibility: For app claim support for app iface.

Change-Id: Idb7f5971d61885f18d827f6bff3994df7a3860e5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoImplement action de-marshalling.
Frederik Gladhorn [Fri, 28 Sep 2012 18:03:55 +0000 (20:03 +0200)]
Implement action de-marshalling.

Change-Id: Ie9ae85298fad6217f9f50a018fbba50f028deba2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoRemove unused function.
Frederik Gladhorn [Fri, 28 Sep 2012 17:56:27 +0000 (19:56 +0200)]
Remove unused function.

Change-Id: Ie8eecf7e4a7475ac84a66b6055149ce92d019785
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoCheck for valid model and view in isValid for TableCells.
Frederik Gladhorn [Fri, 28 Sep 2012 17:22:13 +0000 (19:22 +0200)]
Check for valid model and view in isValid for TableCells.

Change-Id: Iadca5503ed2a1d6411d46ed6fe9d5b9a56461a3a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
12 years agoMake accessibility debug output optional.
Frederik Gladhorn [Fri, 28 Sep 2012 16:04:37 +0000 (18:04 +0200)]
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>
12 years agoMac: QComboBox wouldn't receive mouse events when shown within a modal dialog
Gabriel de Dietrich [Mon, 1 Oct 2012 17:16:04 +0000 (19:16 +0200)]
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>
12 years agoFix for integer overflow in QString::replace
Christian Strømme [Mon, 24 Sep 2012 10:38:44 +0000 (12:38 +0200)]
Fix for integer overflow in QString::replace

Task-number: QTBUG-22967

Change-Id: I604e6a725d46eab4c4369ebb54e8c9ea1350f492
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoOpenGL: Don't request a context version higher than is supported
Sean Harmer [Thu, 27 Sep 2012 14:24:34 +0000 (15:24 +0100)]
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>
12 years agoFix issue with mispositioned family name i QFontComboBox
Eskil Abrahamsen Blomfeldt [Tue, 2 Oct 2012 07:09:26 +0000 (09:09 +0200)]
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>
12 years agoFix QTextBoundaryFinder assignment operator
Konstantin Ritt [Wed, 3 Oct 2012 12:29:16 +0000 (15:29 +0300)]
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>
12 years agoIntroducing the PlatformPanel event type.
Sergio Martins [Tue, 25 Sep 2012 15:46:56 +0000 (16:46 +0100)]
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>
12 years agoChange Q_ASSERT to warnings and returns for the menu classes
Andy Shaw [Wed, 3 Oct 2012 09:45:49 +0000 (11:45 +0200)]
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>
12 years agoDefine QMAKE_EXTENSION_STATICLIB for MSVC mkspecs.
Jason Barron [Tue, 2 Oct 2012 08:19:01 +0000 (10:19 +0200)]
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>
12 years agoOverhaul a little the QUrl error reporting.
Thiago Macieira [Thu, 20 Sep 2012 15:22:01 +0000 (17:22 +0200)]
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>
12 years agoUpdate some error messages in QUrl::errorString()
Thiago Macieira [Thu, 20 Sep 2012 14:30:48 +0000 (16:30 +0200)]
Update some error messages in QUrl::errorString()

Make both invalid hostname messages start with "Invalid hostname". And
split the empty port error from the invalid port one.

Change-Id: I870d1ed6fb07ec494f553871a37ed167141ffc06
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoAdd Q_UNREACHABLE / Q_ASSERT to two conditions that can't happen
Thiago Macieira [Thu, 20 Sep 2012 14:16:27 +0000 (16:16 +0200)]
Add Q_UNREACHABLE / Q_ASSERT to two conditions that can't happen

Just so the code generation is a little better.

Change-Id: I2a43a4df0ae67900c465a6c2b4f2b8ba284dbbaa
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoMove QUrlPrivate to qurl.cpp and mark all methods as inline
Thiago Macieira [Thu, 20 Sep 2012 14:05:30 +0000 (16:05 +0200)]
Move QUrlPrivate to qurl.cpp and mark all methods as inline

They're never accessed outside of qurl.cpp anyway, so let the compiler
know that it doesn't need to generate a full out-of-line copy for them
in case it does inlining.

Change-Id: I2be069b3fd2658eff9ad3023c21c8ae653c389ab
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoChange QUrlPrivate::setAuthority to return void
Thiago Macieira [Thu, 20 Sep 2012 13:59:46 +0000 (15:59 +0200)]
Change QUrlPrivate::setAuthority to return void

It used to return bool because setHost returns bool and, therefore,
setAuthority could fail. However, the return value is never checked,
in either parse() or QUrl::setAuthority(), because there's no error
recovery.

This is a small optimisation.

Change-Id: I25660d66cfad64ca5b9706cc38afa0e97ba3ee0b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoRemove the annoying qWarning when QUrl::setPort is out of range
Thiago Macieira [Thu, 20 Sep 2012 13:46:41 +0000 (15:46 +0200)]
Remove the annoying qWarning when QUrl::setPort is out of range

That's what we have QUrl::errorString() for. This will become evident
especially now that QUrl::toString() / toEncoded() return empty if
there are errors.

Change-Id: I64a84e9c6ee57c0fc38cc0c58f5286ddc1248d1f
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoUpdate QUrlPrivate::setScheme: EmptySchemeError never happens
Thiago Macieira [Thu, 20 Sep 2012 10:54:38 +0000 (12:54 +0200)]
Update QUrlPrivate::setScheme: EmptySchemeError never happens

As the comment says, an empty scheme is not permitted. However, if
that error were to happen, QUrl falls back to parsing the URI as an
"URI reference", starting with the path.

E.g., ":/foo" is a path of ":/foo", which will in turn trigger the
compound "colon before slash" error.

Also, we don't percent-decode in the scheme.

Change-Id: I438a61e17323c7722ddcc64792577a9ecb869c4b
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoMake QUrl::errorString() usable for QtTest output in invalid URLs
Thiago Macieira [Tue, 18 Sep 2012 21:07:46 +0000 (23:07 +0200)]
Make QUrl::errorString() usable for QtTest output in invalid URLs

If an URL is invalid, let's indicate that in the test output. To be
helpful, let's make QUrl::errorString() include the component form of
the URL.

Change-Id: Iaafe16973ded79c7ea688fbb23808d91253e8c14
Reviewed-by: David Faure <faure@kde.org>
12 years agoMake QUrl::toString() / toEncoded() return empty for invalid URLs
Thiago Macieira [Wed, 19 Sep 2012 12:47:09 +0000 (14:47 +0200)]
Make QUrl::toString() / toEncoded() return empty for invalid URLs

Change-Id: I6ebb4ad2901a9bacb09fb81082202f37ebbc2e97
Reviewed-by: David Faure <faure@kde.org>
12 years agoAdd two compound URL invalidity cases for isValid()
Thiago Macieira [Wed, 19 Sep 2012 12:28:25 +0000 (14:28 +0200)]
Add two compound URL invalidity cases for isValid()

These two errors can only happen if one calls setPath() explicitly. They
cannot happen for parsed URLs, which is why they are only caught with
isValid(). It's not possible to set the error condition in setPath()
either because they depend on the presence / absence of the authority
and scheme.

Also update all the unit tests that set a path not starting with a slash
and were just "freeloaders" on the previous behaviour.

Change-Id: Ice58cd4589a850452d7573a5b19667bbab2fb43e
Reviewed-by: David Faure <faure@kde.org>
12 years agoFix DIB image reading.
Friedemann Kleint [Tue, 2 Oct 2012 13:38:29 +0000 (15:38 +0200)]
Fix DIB image reading.

Position the QIODevice correctly for DIB (==BMP without file
header).

Task-number: QTBUG-26690
Change-Id: I7922b4e830a92dcc19f1b52e305ca9ff3fd5d9f5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
12 years agofix #includes
Mark Brand [Sat, 29 Sep 2012 11:12:31 +0000 (13:12 +0200)]
fix #includes

Change-Id: Ia33d7ef08e43bad95d57823e37757a09e53493b9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
12 years agoRemove Cleanlooks as a dependency of QGtkStyle
Jens Bache-Wiig [Mon, 1 Oct 2012 15:41:34 +0000 (17:41 +0200)]
Remove Cleanlooks as a dependency of QGtkStyle

Since we no longer do the sanity checking against
gtk-qt-theme at startup, there
is no longer any need to inherit from cleanlooks.

Cleanlooks should no longer be needed as it has been
completely replaced by Gtk style and this dependency
is not required at this point.

Change-Id: I05b59278cd3ff915df49a7ad2d04494258db0d42
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
12 years agoSet CWD when launched from Finder.
Morten Johan Sorvig [Thu, 9 Aug 2012 11:07:21 +0000 (13:07 +0200)]
Set CWD when launched from Finder.

Like Qt 4. Use the presence of the "-psn_" command-
line argument to detect Finder launches.

Link QtGui against the Cocoa framework due to CFBundle
usage.

Change-Id: I947ae53462072fbdb23afcc0a13ce6b26d02c191
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
12 years agoCocoa: add missing auto release pools
Richard Moe Gustavsen [Tue, 25 Sep 2012 08:57:21 +0000 (10:57 +0200)]
Cocoa: add missing auto release pools

Got complaints while running file dialog example. Adding in
the release pools will fix the problem.

Change-Id: Ib33fddd5aedfc3e4aaa6fdd8995bbc8c8098267c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
12 years agoCocoa: bugfix staysOnTopFlag in combination with transient parent
Richard Moe Gustavsen [Tue, 2 Oct 2012 09:28:58 +0000 (11:28 +0200)]
Cocoa: bugfix staysOnTopFlag in combination with transient parent

A staysOnTop window with a parent would never stay on top. The reason
was that we placed the window on the same level as the parent, which
would undermine the staysOnTop flag.

The fix for this is to always level the window to _at least_ as the same
level as the parent, but never lower. A code path for this already
existed in the windowLevel function for popups. so we factor that out
and use it for all cases.

Task-number: QTBUG-27410
Change-Id: I0c30194be33703f54b6c2fe7f3088a9febcd1e2c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
12 years agoFix a crash with xcb on 64bit systems when hitting any key.
Jocelyn Turcotte [Wed, 26 Sep 2012 14:25:57 +0000 (16:25 +0200)]
Fix a crash with xcb on 64bit systems when hitting any key.

xcb uses 32bits for xcb_keysym_t, but Xlib uses 64bit longs on 64bits
systems for KeySym and all other XIDs on the client side. Passing
an xcb_keysym_t* to XLookupString, expecting a KeySym*, would overwrite
the next 32bits in memory and possibly cause a crash.

This patch makes sure that a KeySym* is passed to XLookupString, and use
the signature declared in Xutil.h to make sure the types are right.
Encapsulate it in qxlibconvenience.cpp since including Xutil.h inside
qxcbkeyboard.cpp causes macro expansion problems.

Change-Id: I68451a24cb44a43dfa4382b5dce1ea7845f14e26
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
12 years agoStop delivering messages when drop has occurred.
Gatis Paeglis [Mon, 1 Oct 2012 11:53:10 +0000 (13:53 +0200)]
Stop delivering messages when drop has occurred.

Task-number: QTBUG-27406

Change-Id: If14c108060ad6de70991658f0e0249eb544b87a0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>