Commit Graph

10879 Commits

Author SHA1 Message Date
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
Jerome Pasion
6e345bbfc3 Doc: Removed "class=" in an /div.
-not valid XML

Change-Id: I832490e87113d9143b2280127b539c68a46b0e94
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-11-16 18:23:42 +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
Martin Smith
a5f2a0816b qdoc: Handle extra imahes exactly like styles
The values of the extraimages variable in the qdocconf file
must now be paths that are relative to the location of
the qdocconf file, just like for styles. They can be
absolute paths, of course, but if they are relative,
they must be relative to the qdocconf file containing
the extraimages variable.

The extraimages variable is for including images used
in the HTML heard and footer that are not referred to
in the documentation.

Task-number: QTBUG-27878
Change-Id: If5e0d1dee7ba231a9c1a73f02a1bbaeb7bfe52c8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-16 14:57:59 +01:00
Martin Smith
b75980d7f5 qdoc: Handle scripts exactly like styles
The values of the scripts variable in the qdocconf file
must now be paths that are relative to the location of
the qdocconf file, just like for styles. They can be
absolute paths, of course, but if they are relative,
they must be relative to the qdocconf file containing
the scripts variable.

Task-number: QTBUG-27878
Change-Id: Iec12d1937ca9db540a2aa5e378fadc60de0a2d8c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-16 14:11:46 +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
Martin Smith
0f4a1d4421 qdoc: Removed debug code
Just removing calls to qDebug().

Task-number: QTBUG-27878
Change-Id: I592ddbb8541b5b65aee9e0f940b50217e84b3a5e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-16 12:06:33 +01:00
Jerome Pasion
46b28abc90 Doc: Removed "templatedir" from qdocconf file.
No longer needed as the paths are resolved relative to the file.

Change-Id: Id4012336b7de00a5dcf8686e44f7a972e2b8b284
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-16 11:51:24 +01:00
Martin Smith
d4f1f4a56b qdoc: better copying of .css files
This change ignores templatedir for css files.
It assumes that the paths in the stylesheets
variable are relative to the qdocconf file that
contains the stylesheets variable.

Task-number: QTBUG-27878
Change-Id: I2155e58f352e17d710c93ad4e92679beb169d823
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-16 11:43:05 +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
Martin Smith
6326746d22 qdoc: better copying of .css files
This fix searches for the css files specified in the
stylesheets variable. It searches for them in the
directory specified as the templatedir. It copies
them into the style subdirectory of the outputdir.

It also tests QT_INSTALL_DOCS before setting it to
the library info. If it was set on the command line,
it is not set from the library info.

This change also includes some debug code, which
will be removed after testing.

Task-number: QTBUG-27878
Change-Id: I7a9469b840e13b966aca44b99aebba102e5d4f0c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-14 13:29:17 +01:00
Richard Moe Gustavsen
85ff27d9ec Cocoa: application menu items sometimes get duplicated
Under some circumstances, the same menu item appears several times
in the application menu in the menu bar. This can be seen in Qt creator,
where "About Qt Creator" appears twize.

The reason is that QCocoaMenu::syncMenuItem does not take into account
that merged items cannot be found in the QCocoaMenu that owns the
menuItem, but rather inside the application menu. And because of this,
it fails cleaning up the old item when it changes from e.g
TextHeuristicRole to ApplicationRole.

This patch will fix this.

Change-Id: Ia84f552d1788d80d778c7dded3393412b9d2d8cb
Reviewed-by: Chris Meyer <cmeyer1969@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-14 12:29:01 +01:00
J-P Nurmi
9cdcd2f639 qtAddModule(): define PRE_TARGETDEPS for static modules
This ensures that for example the platform plugins get properly
re-linked when the static platform-support lib changes.

Change-Id: Iad493d4de30d6f6977f80aa56d0b27d05e9e3770
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-14 12:29:01 +01:00
Friedemann Kleint
39a0952687 Send enter to the child at the position of the QEnterEvent.
This was apparently done so in each of the widget_<platform>.cpp
in Qt 4.8. This then causes the cursor to be updated in
dispatchEnterLeave() on Windows and Linux.

Task-number: QTBUG-27871
Task-number: QTBUG-27585
Task-number: QTBUG-26424
Change-Id: Idf14cd96ccb36f7c2607853ed8b0024c36a5413c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-11-14 10:36:38 +01:00
Samuel Rødal
4334e0fcc6 Added expose and configure event compression in xcb platform plugin.
We had this in 4.x to prevend swamping the event queue and causing a lot
of needless processing of stale events.

Task-number: QTBUG-27734
Change-Id: I020fe44885569f5a68c07220fcb44bea3e138089
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-14 10:36:38 +01:00
Oliver Wolff
5055183bc5 Windows: Fixed handling of key events containing ctrl modifier
QKeyEvent::key() returned the wrong value if the ctrl modifier was used
in that key event. That was due to the fact that ToUnicode might not
return the correct code for these events/keyboard states. While it works
for alt+shift+= (us layout) and gives '+' as unicode value it just
claims that it cannot translate the given state for ctrl+shift+=. So if
the control modifier is used and ToUnicode return 0 toKeyOrUnicode
should try again without the control modifier.

Task-number: QTBUG-10781

Change-Id: I5eb9c200701b4c98a8089fc0ab1ebaa385dbeea8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-14 10:36:38 +01:00
Richard Moe Gustavsen
26db7de13d Cocoa: QPrintDialog does not show/closes down immediatly
This happends if an event loop recursion ends before
the native print dialog gets executed (in the same scope).

The reason is that the event dispatcher gets interrupted as the
first recursion ends. And (because of the big difference between
how AppKit implements modal windows compared to Qt) this sets a flag
in the dispatcher that gets handled on the next callback to
QCocoaEventDispatcher::processPostedEvents. This will tell
the dispatcher to break out of the current modal session.
But since it cannot detect that an alien (native) session is now
running, it closes down that session by accident instead.

While code can be written in the event dispatcher to detect this
problem, it ends up more clean to just work around the problem
from the native dialogs instead. This to avoid making the
dispatcher more complex than it already is. Native dialogs is
a bit messy already, and the work-arounds needed should be
isolated inside those components, and not inside the dispatcher.

Change-Id: Ibfde9db4c98401562e7628da1db18d6bed619245
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-11-14 08:37:50 +01:00