Commit Graph

10596 Commits

Author SHA1 Message Date
Morten Johan Sørvig
a890c78980 Use setImage workaround on all OS X versions.
The painting bug that we are working around/fixing
here has been observed on 10.7 as well.

Change-Id: Ic29421bcc84405afa085af2f0ed2bc554c684f98
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-20 08:49:19 +01:00
Caroline Chao
b98b11fa03 SQL: Fix OCI driver's compile errors.
Task-number: QTBUG-27979

Change-Id: I4ae4cdba855c05bc6fab0f845ff16a96c8119fdb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-20 01:10:25 +01:00
Vadim Zakondyrin
adf4e54742 Fixed memory leak in assign operator of QGLBuffer
Change-Id: Icb51dd5a567483b415ab0e8af9eb62221225890d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 23:21:13 +01:00
Vadim Zakondyrin
15f1fe587d Fixed memory leak in assign operator of QOpenGLBuffer
Change-Id: I47f9128b54770bae7a63f82bf66ca16144b67c55
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 23:21:13 +01:00
Konstantin Ritt
da90a3a490 QLocale: replace hard-coded default country-for-language map
...with a generated one in a way similar to what
http://www.unicode.org/reports/tr35/#Likely_Subtags suggests.
The supplemental/likelySubtags.xml contains all the required data.
This changes some default countries to a most-expected ones.

Change-Id: I920a5623601d8661a943e78197d3bcc838191483
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-19 21:18:03 +01:00
David Faure
b256c47d62 Document what the QMimeDatabase constructor really does.
Change-Id: I8d4dcc92296163dea7b78fbb0ceefaee08e57a94
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Allan Sandfeld Jensen <kde@carewolf.com>
2012-11-19 17:12:58 +01:00
Friedemann Kleint
433e7cef1e QSystemTrayIcon/X11: Use display obtained as native screen resource.
Previously, the screen name was used, which contained the
display name. This was changed to return the xrandr-name.

Task-number: QTBUG-5416
Change-Id: I560143d6d459a8051c9640079cf7d39a3caebfec
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-19 17:12:58 +01:00
Friedemann Kleint
e8c677a930 Add QPlatformNativeInterface::nativeResourceForScreen().
Task-number: QTBUG-5416
Change-Id: Ic163a5ff1c7a06869d324acb9aa7c257a0262e72
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-19 17:12:58 +01:00
Thiago Macieira
df3631045c Add a new location for QML 2.x imports
This commits adds a -qmldir configuration option for the configures to
allow the user to change the default location (it defaults to
$archdatadir/qml).

It adds a QLibraryInfo::Qml2ImportsPath value for
QLibraryInfo::location, a qmake property of QT_INSTALL_QML and a qt.conf
configure location entry "Qml2Imports".

At the same time, it makes the qmake .prf files dealing with QML plugins
be the QML 2 version. Those files are new in Qt 5, so we have the option
to choose which version we want to use.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-October/007136.html
Change-Id: I8c1c53e8685a5934ed0a9a42ba5663297b81a677
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-19 15:25:54 +01:00
Kai Koehne
36270e4505 MinGW: Don't add version number '0' to the library name
This fixes linking on MinGW after the library renaming, and is also
in line with the logic in the nmake generator.

Change-Id: Ie25ce6c1d2b8f292c4e454db1cad9bcbbee7a05d
Suggested-by: Erik van Pienbroek
Task-number: QTBUG-27137
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-19 13:35:27 +01:00
Morten Johan Sorvig
cfa0f3bd56 Compile with -no-widgets.
Remove QApplication usage in qcocoasystemtrayicon.mm

Move qt_mac_cg_context from qpaintengine_mac.mm to
qcocoahelpers.mm to make it available in no-widgets
builds.

(Move qt_mac_colorSpaceForDeviceType as well; color
space support needs to be cleaned up later on.)

Change-Id: I724fdb09538d65eae56c26165f3ba53b6814ea78
Reviewed-by: Liang Qi <liang.qi@digia.com>
2012-11-19 08:30:05 +01:00
Morten Johan Sorvig
a0af6c8e4a Remove obsolete Mac mkspecs.
Project Builder was replaced with Xcode in Mac OS 10.3.
The xlc compiler is not in use on OS X any more.

Change-Id: Ie9150243cf5594a70f692a6841ee8221a2fa9ddb
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2012-11-18 23:13:29 +01:00
Aaron McCarthy
7456562e7f Fix error reporting in TDS SQL driver.
The error and message handlers used by the freetds library were getting
reset to back to the default every time a database was opened.  The
Qt TDS SQL driver was calling dbinit() from QTDSDriver::open().  This
had two problems:

1. dbinit() would reset the error handler previously set by a call to
   dberrhandle().  A db error would then cause the application to
   abort.
2. freetds expects dbinit() and dbexit() to be called symmetrically.
   Opening multiple database connections would result in freetds not
   cleaning up on application close.

Solved by moving the dbinit() call into the QTDSDriver constructor.

Change-Id: I59018d83238672c903b96a4d7f3f21b664c3ff4c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-18 23:13:29 +01:00
Thiago A. Correa
597a6024f4 Fix msvc2010 compiler warnings of switch with default but no case labels
Change-Id: I5de4d7405131314c4e2bdb1222d2bb1a2d34a993
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-11-18 21:31:51 +01:00
Oswald Buddenhagen
5276c84933 fix namespaced build
Change-Id: I7ac3f3dc2057914108876241883cf8c7e30d2c33
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-16 17:40:52 +01:00
Oswald Buddenhagen
f2b77e0c3c make qt_tool support building bootstrapped tools
as a "side effect", this fixes the build of bootstrapped tools when
doing a debug build under msvc: qt.prf would add CONFIG+=release after
default_post.prf already loaded debug.prf.

Change-Id: Idd17cf28d358950fd90bb18ca7a8d67e06953bc1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-16 15:59:20 +01:00
Oswald Buddenhagen
4b85211a43 remove pointless TARGET assignments
TARGET defaults to the project file's basename

Change-Id: I0cd204ae6559e6c51d3c987bc38ae372e2b4a3dd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-16 15:59:20 +01:00
Friedemann Kleint
d87eeeb5bd MinGW: Add missing constants for float control.
Change-Id: Ibce64ed1ec2809551b0cd334b53b33ed445f90f7
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-16 15:59:20 +01:00
Rafael Roquetto
3146856389 configure.exe: add inotify auto detection support
This patch complements already existing functionality in the configure shell
script.

Change-Id: I09f4875cbe7ec60d36bb33774d28944a34cc8470
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-16 15:59:20 +01:00
Friedemann Kleint
72a0ce045c Accept subsequent drag moves in QWidgetWindow if enter was accepted.
Add handling similar to QGuiApplicationPrivate::processDrag.

Task-number: QTBUG-28008
Change-Id: I516531da242471cdfbb59418d0052b25f799f373
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-16 14:09:52 +01:00
Giuseppe D'Angelo
11b5c54f55 Remove qSort from QCollator docs
Change-Id: I4523b7e4cd2a7f9e07a39e48e8024ceb0d7eb839
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-11-16 12:06:49 +01:00
Giuseppe D'Angelo
10f1ca72a9 Remove qSort from QList/QSet docs
Change-Id: I82ac7cafbda3bb6d54a0ba26903ab11113640067
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-11-16 12:06:42 +01:00
Giuseppe D'Angelo
8cb319939a Fix QStringList::sort test
Checking that the result of sort() is a specific list is wrong,
as sort() can put equivalent elements in an arbitrary order.

Change-Id: Ib06399cdecedb6cf01e721d4d92048449d66b40d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-16 06:38:01 +01:00
Olivier Goffart
2b308d4cb5 Fix QMutex::tryLock timeout computation on Linux
The timeout is in millisecond. So we just need to divide by 1000 to get
the number of seconds

Regression introduced in f587e8f4fd
Reported in the comments of QTBUG-24795

Change-Id: Id16e05e7d04d33605860926f7516d14cdefd6a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-16 01:37:01 +01:00
Jens Bache-Wiig
162926414d Fix incorrect size hint for abstract spinbox
This size hint was based on strange logic from an alternate
universe. The size hint should only contain the text size
and let the style add what is neccessary for the frame rect etc.
Most styles have worked around this by simply ignoring it,
however some styles could still break a bit.

Note that we add 4 since that is the constant that the old
code 'usually' ended up at and should be compatible with
our existing styles.

Change-Id: Iebdbcb8949dd8b7daa7d8cb96ae5ab7351e4f79d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-11-15 18:15:50 +01:00
Miikka Heikkinen
528de79f4b Missing break in case QEvent::WindowStateChange.
The missing break causes state change event handling to fall through
to tablet event handling, which is clearly wrong.

Change-Id: If19d7b3f794b3614961b9e79952331b0ede1fba1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 18:15:50 +01:00
Samuel Rødal
9b62b01ddd Disable static contents optimization for now.
Since none of the platform backingstore implementations currently
implement this, skip trying to use the optimization for now to avoid
graphical glitches.

Task-number: QTBUG-27971
Change-Id: Ic6d263bb552ef0b4786910d71f965d26d810b7eb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2012-11-15 18:15:50 +01:00
Jens Bache-Wiig
48f3128a7d Add feature to enable rounded line edit on mac
This will not currently be exposed in the widget API but we
can make use of it for qt quick components.

Change-Id: I08300a3bcd58e68df633fe9b36a988eb6176ef9c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-15 18:15:50 +01:00
Jens Bache-Wiig
e9b6eb7795 Improve highligted colorization on mac with Fusion style
This mimics the platform behavior of using blue color when
the system palette is in use.

Change-Id: I9ad6a552614a3466a930ad5b28fc70d9343d2022
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-15 18:15:50 +01:00
Frederik Gladhorn
f7d99ad50f Accessibility: Add documentation
This keeps the docs as internal, but add
information about the events.

Change-Id: I9b961a946a6d799232a756a9ac874c0caf91ecbc
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-15 16:05:17 +01:00
Frederik Gladhorn
581d3adb2b Accessibility Mac: Implement value interface
Change-Id: Iea6e3c69b220d35bddb1798ff991f8e67e1749e3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-15 16:04:12 +01:00
Morten Johan Sorvig
65866bcff5 Implement EditableText accessibility for Mac.
Change-Id: Ibe03975bafc5a6a420b3bd69dfaa93dbf65c9958
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-11-15 16:03:57 +01:00
Friedemann Kleint
2ca6606dca Bring back -nograb/-dograb for debugging.
Task-number: QTBUG-27632

Change-Id: I4b59df01519af4684d9dbe6e4b6c18a5ebd9aeae
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-15 13:56:58 +01:00
Miikka Heikkinen
9ae2159251 Fix QApplication::primaryScreen() in Windows
QPlatformInterface::screenAdded() documentation specifies that first
added screen will be the primary screen, so we need to ensure that
the screen Windows reports as the main display gets added first.

Task-number: QTBUG-27988
Change-Id: Ibc17b05a6c37007ff749fb54ab62d47ffa40f8ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 13:55:00 +01:00
Konstantin Ritt
e4c2a5c29f Assign correct codes to QLocale::AnyCountry and AnyScript
as their meaning, in fact, is unknown (or default) country/script.

Change-Id: Id75a70d4b33c2092de414f3ac357f6bcb627ba47
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-15 13:55:00 +01:00
Konstantin Ritt
1e0e5f2d68 Add a bunch of missed scripts
Change-Id: I078bf95cb50c7ef634f9f3133ab9f9d25439e4ef
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-15 13:55:00 +01:00
Konstantin Ritt
4c83aafc11 Add missing Bodo language introduced in CLDR 1.9.1
Change-Id: I4feb6ba781299d65ff3bf2717f08a0ac7eae7928
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-15 13:55:00 +01:00
Konstantin Ritt
40ed226e53 Misc fixes to the QLocale data parser/generator
Change-Id: I01589eae4e48bc1f484d54277de8f18262ca8f31
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-15 13:55:00 +01:00
Thorbjørn Lund Martsum
fc271b4273 Regression fix to QHeaderView::setDefaultSectionSize
When the sections has been resized we need to calculate new values
for the section start-positions. Otherwise we break visualIndexAt
and sectionPosition.

This fixes a regression introduced in
b800d8b94a

Change-Id: I148dbf44f742208787ed59b70d82b8048d721e90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-11-15 13:55:00 +01:00
Oliver Wolff
46fe591a53 Windows: Fixed mouse events related to size grips
The code which was adapted from Qt4 seems not to work as expected on
current Windows versions. There are no additional mouse move events
after releasing the mouse button from the size grip.

One special behaviour in regards to SizeGrips here seems to be that
there is no WM_LBUTTONUP message but a WM_MOUSEMOVE received when
the mouse button is released from the size grip. Due to mouse event
handling in the Windows plugin that event triggers the desired mouse
release event so everything should be fine.

With the previous implementation the behaviour from the bug report
can be explained by the fact, that the mouseMove event is eaten in
qwindowsmousehandler and so the second mouse click isn't even
delivered. Basically the first click triggers the press event without
a release and the second click does not trigger a press but a release
event.

Task-number: QTBUG-27864

Change-Id: I987c6e01dec4a6b6189ed30959daf7a2fcc17df6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-15 13:55:00 +01:00
Giuseppe D'Angelo
45fecb2472 QHash: constify some QHashNode members
They're read-only member variables (key, hash value of the key)
set only in the ctors, or a "comparison" member function.
All of them can be constified.

Change-Id: Ifd9242577213f38439a4f998b678f5b05413ad21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao@abecasis.name>
2012-11-15 13:55:00 +01:00
Miikka Heikkinen
b8be2e67ea Change to enter/leave policy while grabbing.
Sending enter and leave events to other windows than the grabbing
window is not logical. The policy should be that only the grabbing
window receives enter and leave events.

Changed the documentation accordingly and provided the necessary
changes to Windows implementation.

Also removed explicit leave event generation for widgets when
popup is opened as that is now redundant.

tst_QWidget::underMouse() test was changed to behave according to
new logic.

Task-number: QTBUG-27871
Change-Id: I127fb8685b4a4206d1a319f42cba491ec02bc8ca
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 11:59:34 +01:00
Jan Arve Saether
a6135c55b9 Add comment to resetCursorBlinkTimer to avoid accidental removal of it
Change-Id: Ied4c686ab5f4d4530d4d5ae3ce22c6b9ffc4c1de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 11:32:03 +01:00
Jan Arve Saether
e2942d0a5b Add resetCursorBlinkTimer() back again.
Apparently it was used by QtQuick1

Change-Id: Ia0cf8535cbfed9b09e151b887c243fb173ca300a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-11-15 11:14:39 +01:00
Miikka Heikkinen
90de0c4178 Fix mouse cursor behavior for QMainWindow splitters
The cursor handling has changed in Qt5 somewhat, which made old cursor
logic for splitters invalid, causing the splitter resize cursor to
persist after hovering over splitter, as well as cursor flicker
during splitter drag.

Since the cursor is changed always in dispatchEnterLeave, CursorChange
event can now come for QMainWindow when cursor hasn't actually changed,
so we now check if the cursor is still our adjusted cursor before
updating the old stored cursor. We also ensure that our adjusted cursor
stays visible if cursor is in fact changed - the changed cursor will
be shown when we no longer need adjusted cursor.

Additionally, we skip cursor adjustments while we are dragging the
splitter to avoid cursor flicker, which is caused by splitter actually
moving asynchronously after the mouse event is handled.

Task-number: QTBUG-27970
Change-Id: Id9f6a0e9653563e09b883f21396de056a88f78a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-15 10:56:52 +01:00
Jonathan Liu
aa309b9677 ANGLE: Invalidate client window area when resetting swap chain
Resizing a window larger results in the newly exposed region being
invalidated but the old region is treated as valid. This can result in
the old region no longer updating. This has been observed on Windows 7
64-bit with Aero theme using NVIDIA GeForce GTS 250 and driver version
301.42. Invalidate the entire client window area when resetting the
swap chain so that it updates properly.

Upstream patch: https://codereview.appspot.com/6812076/

Task-number: QTBUG-27822
Change-Id: I0f5d2004576019458baee74c35e52f69b893a219
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-15 10:54:21 +01:00
Miikka Heikkinen
aeb566db73 Windows: Fix autocapture for multiple buttons
Automatic capture of mouse events on button press was released when
the first button was released, even if multiple buttons were pressed.
Changed it so that the capture is released when the last button is
released.

Task-number: QTBUG-28007
Change-Id: Icee59aacaf0ba947820c40cb7ede00193ff46a14
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-15 10:45:29 +01:00
Teemu Katajisto
0a334b2180 Mac: add runtime check for not calling preferredScrollerStyle on 10.6
Task-number: QTBUG-27915
Task-number: QTBUG-27913
Task-number: QTBUG-27911

Change-Id: I1da49c5a1455b30335dec53921a35dc09cd27aa4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-14 14:18:31 +01:00
David Faure
7721c3d27c QMimeDatabase: Fix handling of duplicate mimetype definitions.
When both freedesktop.org.xml and kde.xml define text/x-qml (*.qml),
the XML provider would look up *.qml, see two mimetypes, and treat that
as a glob conflict, and proceed with contents-based-determination,
which for this sample file, would find "C source" due to the C comment.

Fixed by ignoring duplicate pattern-mimetype associations.

The binary-cache provider doesn't have this problem, update-mime-database
already filters out duplicates when generating the on-disk extension tree.

Change-Id: Ie335b0b419e7413fa0550779709513f68c2bfc68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-14 14:18:31 +01:00
Gabriel de Dietrich
9346cb9552 Widgets: Stop cursor blink timer when QLineEdit is read-only
This prevents unnecessary updates, since the cursor is not visible.

Change-Id: Iec54ed338a0cb526a03cd611de4d823e26f3d804
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-11-14 14:18:31 +01:00