Commit Graph

14799 Commits

Author SHA1 Message Date
Nico Vertriest
3e7c77cfae Doc: minimal qdocconf file with comments
Task-number: QTBUG-31801

Change-Id: Ia94989b066ab2cd4d6dbf64261b5d9b4207db12a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-08-23 09:35:36 +02:00
Uli Schlachter
bd00b51c47 XCB: Fix race with the event thread
The XCB backend runs a thread which gets events out of the XCB event
queue and feeds it to the main thread via another queue. This queue is
protected by a mutex.

However, when the event thread exits, it cleans up after itself and
frees all remaining entries in the queue. This code messed with the
event queue without acquiring the needed mutex and left behind a list
full of stale pointers.

Fix this and protect the freeing with the correct mutex and clear the event
queue afterwards.

Change-Id: Ie49cf6241b76be86d8cebbc931f7226a3f6a14e5
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-23 09:16:41 +02:00
Andy Shaw
1baf293548 Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformTheme
Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is
really only for the native dialogs then the SnapToDefaultButton hint is
moved as it has relevance for all dialogs

Task-number: QTBUG-32631

Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-23 08:42:35 +02:00
hjk
d593d6955c Doc: Remove addressbook-fr
Documentation is generally not translated, this one sticks out.

Task-number: QTBUG-28535
Change-Id: Ib2cdbc8c94a6354af3369ff2dcf4df69cde4c381
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-08-23 01:54:41 +02:00
Takumi Asaki
1f8c179c6c Doc: Add Q_OS_ANDROID macro
Change-Id: If428f0b7c1540e809f756f426a6d222acea5d310
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-23 01:54:38 +02:00
Rafael Roquetto
9de6d1a74f BB10: Do not send deactivate event twice
On BB10, NAVIGATOR_WINDOW_INACTIVE is called before
NAVIGATOR_WINDOW_INVISIBLE, already triggering handleWindowGroupDeactivated()

Change-Id: I7d82c0220fe8dc8e87bfa2b31af6085c7d1d6cee
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-08-22 23:36:40 +02:00
Rafael Roquetto
4994300fe7 Playbook: Fix rendering when thumbnailed/minimized
On Playbook, rendering should happen when the application is thumbnailed,
therefore we need to send a window activated event to resume rendering once
the thumbnail is restored from the minimized state.

Change-Id: I0fa5da483dc101e25f718e52859a66edfe5c66c7
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-08-22 23:36:40 +02:00
BogDan Vatra
425888709d Use dwarf-2 until gdb >7.5 lands on Android NDK.
Gcc 4.8 uses dwarf-4 by default which is not supported
by the GDB that is officially shipped with the NDK.

Change-Id: I913a038e095df52b0defd5d3da2606ef2e5456b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-22 21:34:35 +02:00
BogDan Vatra
b4252802b3 Switch back to thumb for android armeabi.
Add workaround for gcc 4.8 compile bug.

Change-Id: Ie7a81ec25a79764989bbd9eb43dd5a8fbf442dfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-22 21:34:35 +02:00
BogDan Vatra
9863188431 Android: Set default to gcc 4.8
The 4.7 version of the toolchain in the NDK has been
obsoleted by the introduction of version 4.8. The default
can still be overridden if necessary.


Change-Id: I042ded92e50dc5ebc4d54ffccc2e6856fc3edba0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-22 21:34:35 +02:00
Stephen Kelly
48f332f802 Add more comparisons to narrow down error case.
Task-number: QTBUG-32927

Change-Id: I83d6def83c37febd8cd83676bff9d74f364ecfad
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Simo Fält <simo.falt@digia.com>
2013-08-22 19:14:03 +02:00
Gabriel de Dietrich
68563cdabd Cocoa: Fix memory leak in event dispatcher
We retain each modal NSWindow as long as its modal session is running,
and we should release it every time that modal session ends.

Task-number: QTBUG-32728
Change-Id: Ia30c9c2d15be1350e7150a0d3c2f530a2fe4f38b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-08-22 19:14:03 +02:00
Gabriel de Dietrich
10e23c84d5 Style: Remove useless background paint for menu scroller
This would also cause an extra paint in QQuickStyleItem, resulting
in the frame being erased for those styles not having a frame width
set (e.g., fusion and GTK).

Change-Id: I7a9371c540cd31fd9f1400a51c4ec57582996dd2
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-08-22 19:14:03 +02:00
Gabriel de Dietrich
2af8feee92 Cocoa: Bring back old exposure behavior on Mac OS X 10.6
Task-number: QTBUG-31864
Change-Id: Ife2429b2d6b845e5ccca31a03e66351a3ff5ba4b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-08-22 19:14:03 +02:00
J-P Nurmi
61948f84da Fix scrollbar appearance on Win8
Task-number: QTBUG-26503
Change-Id: Id74821e005483d05450467fcaea672bbf35113bc
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-08-22 19:14:03 +02:00
Mitch Curtis
c7c3a78075 Add json/savegame example.
There wasn't any example documentation besides json.html, which doesn't
actually describe usage of the various QJson* classes.

This also makes each QJson* class page link back to json.html.

Change-Id: If5ad6493d2728df0cec7bdbbc5790f0b755f816c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-22 19:14:03 +02:00
Frederik Gladhorn
3abecf2ee9 Accessibility for Android
This enables both modes for TalkBack,
explore-by-touch and the normal swiping mode.

It is partially inspired by the BarGraphView example
of the Google/Android Eyes-Free project.

Note that for any accessibility to work you'll need
a device with api level 16 at least.
Using reflection we should be able to dynamically pick up
the classes if we have the high enough api level.

Change-Id: I11b93bead451483782a1711434d45c8f9a35996f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-22 18:45:24 +02:00
Frederik Gladhorn
59b6a67b94 Remove rowColumnExtents from QAccessibleTableCellInterface
The API is broken and available in individual functions.
Don't make it more complicated than necessary to implement
the interfaces for new widgets.

Change-Id: Ie408c369ef05b2b8e7ac666b25153d090fcf3aae
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-08-22 18:45:24 +02:00
Richard Moe Gustavsen
ce16e70985 iOS: Activate window on touchesEnded instead of touchesBegan
Since we await giving focus to a focus object until a press
release, it also makes sense to await activating a window until
a press release, since they both have to do with focus. By doing
so, the input panel now stays open if the user selects a line edit
in one window when a line edit in another window still has focus. We
also avoid activating a window in case of a touch cancel (e.g as
a result of the user flicking or triggering a gesture).

Change-Id: Ic00c4be69c257fceb10ce2d5a81cb490ea93710f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-08-22 18:45:24 +02:00
Friedemann Kleint
4e04302672 Check for window handle in QBackingStore::flush().
Task-number: QTBUG-33062

Change-Id: Iab4ccc3a2a855ee7f6964659b53b3401af436212
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-08-22 16:44:37 +02:00
Martin Smith
e4df7fc75a qdoc: Fix the qdoc \include command
qdoc's \include command now works as expected.
This command is only for including a file that
contains qdoc comments that contain qdoc commands
to be processed by qdoc. The file to be included
should have the .qdocinc suffix, although qdoc
will accept any suffix now. The file must be in
one of the directories specified by the sourcedirs
variable in the qdocconf file.

Task-number: QTBUG-33046
Change-Id: I45ea08932b4218aae369469968117fb5132f764b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-22 16:11:29 +02:00
Martin Smith
d9b5cead97 qdoc: Make example file names unique
To avoid duplicate files for examples, the files
are named this way. Suppose you have an example
called mandelbrot. The example is in a subdirectory
named mandelbrot, and there is a \example command
somewhere like this:

\example mandelbrot

In this case, the mandelbrot example is in the QtCore
module. Then the name of the example page will be:

"qtcore-mandelbrot-example"

...and the names of the example files will be:

"qtcore-mandelbrot-main-cpp.html"
"qtcore-mandelbrot-mandelbrot-pro.html"
"qtcore-mandelbrot-mandelbrotwidget-cpp.html"
"qtcore-mandelbrot-mandelbrotwidget-h.html"
"qtcore-mandelbrot-renderthread-cpp.html"
"qtcore-mandelbrot-renderthread-h.html"

Task-number: QTBUG-32580
Change-Id: Ic4445fd65b679523d6d94a8b0c19289d049ef0b0
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-22 16:11:29 +02:00
Mitch Curtis
5b4c0d4b0b Fix typo in qkeysequence.cpp code comment.
Change-Id: I833c4da7363d7ae5dcfa5a901dadc0e327080e40
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-08-22 16:11:29 +02:00
Olivier Goffart
8a96679493 moc generated code should compile with QT_NO_KEYWORDS
Don't use the 'emit' keyword in the moc generated code for properties
with MEMBER

Task-number: QTBUG-33094
Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Olivier Goffart
2bd40c53ef moc: Fix related objects containing itself
This may happen when we have namespaces and the qualified name is used
to scope an enum.

Task-number: QTBUG-32933
Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 16:03:28 +02:00
Peter Hartmann
4f7e0fc632 HTTP socket engine: support newer HTTP proxies
After sending authentication, we need to revert all states to be able
to read the HTTP header again. Before, we would not try to read an
HTTP header after sending authentication.

Change-Id: Id4b95eda9881a37bcfbae0570756bb3e4918a568
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns.qt@gmail.com>
2013-08-22 12:37:30 +02:00
Frederik Gladhorn
676a10b3dc Fix bootstrap class path warning (java)
Due to forcing java 6 we need to pass the
bootstrap jar file (android.jar).
https://blogs.oracle.com/darcy/entry/bootclasspath_older_source

Change-Id: I530a7e2a7df40813011a6dde93d6ccc3aaaa61d6
warning: [options] bootstrap class path not set in conjunction with -source 1.6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-22 09:46:36 +02:00
Olivier Goffart
c20b358703 moc: Issue a warning instead of an error when macro argument mismatch
moc's C++ is not 100% accurate, so better process the invalid macro with
a warning rather than an error.

Such errors occurred in the QSKIP macro with variadic arguments since
that macro is defined conditionally.
It is also causing problem in boost header (cf task QTBUG-29331)

Task-number: QTBUG-29331
Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-22 07:11:33 +02:00
Thorbjørn Martsum
e7168ff9fe QMessageBox - merge some mac and non-mac code
I have not located any significant behavior changes in this,
and it is annoying having too much similar code in different
branches.

The main change is a removal of Qt::AlignLeft, but
the icon Label should be in its own column.

Change-Id: Iaf07fc503075e61e2af1a93d5fc9e6e34a24451d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-22 06:47:19 +02:00
Thorbjørn Martsum
5ba72276c4 QMessageBox - move layout handling
This patch moves some layout handling to a new function.
That will be helpful later since we can re-use the new function.

Change-Id: I4cc846f9958d9530ec2b07292093b94bd27ee055
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-22 06:47:05 +02:00
Thiago Macieira
04bc63f2d6 Add x86 arch detection support for AVX512 and SHA instructions
The flags come from GCC commit 201219:
http://gcc.gnu.org/viewcvs/gcc/branches/avx512/gcc/config/i386/i386-c.c?limit_changes=0&r1=201219&r2=201218&pathrev=201219

Clang and ICC don't seem to have support for this yet.

Change-Id: Ic941654a5c56ed110d0e754e436a92dc5deaeb17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-22 02:04:39 +02:00
Thiago Macieira
065cff8311 Define Q_PROCESSOR_X86 to the x86 family
They are:
 3      Intel 80386 or equivalent
 4      Intel 80486 or equivalent
 5      Intel Pentium, Pentium MMX, AMD K6 and a few others
 6      everything since the Intel Pentium Pro and AMD Athlon

By necessity, this means all 64-bit builds have a family of 6. That
matches the family number that the CPUID instruction produces.

Change-Id: I5dc7344976f8da65938f44310b89ade4fe3f1a28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-22 02:04:39 +02:00
Thiago Macieira
c374f4441a Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-22 02:04:39 +02:00
David Faure
85b24bb2de QThreadPool: fix data races in activeThreadCount()
Rather than trying to make it lock-free (which requires double-bookkeeping of
4 atomic ints!), just lock the mutex before calling it.
tst_bench_qthreadpool shows no difference whatsoever between the two
solutions, I get 0.005 msecs per iteration in startRunnables().

Of course looping over calls to activeThreadCount() is a bit slower,
from 0.0002 msecs per iteration to 0.00027 msecs, i.e. 35% more.
But polling activeThreadCount() from the app is a really wrong thing to
do anyway, this benchmark was just for my own curiosity about the
price of a mutex in a function that sums up 4 ints.
What matters is start() performance, which is unchanged (0.00007 msecs
is just noise compared to a 0.005 total, that's 1.4%).

Change-Id: I993444eef8bc68eff9badd581fae3626dfd1cc6d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 23:50:59 +02:00
David Faure
1de1470189 QUrl: Use decoded mode by default for individual getters/setters.
This fixes the wrong value for path() and fileName() when a
path or file name actually contains a '%'.

userInfo() and authority() are not individual getters, they combine
two or more fields, so full decoding isn't possible (e.g. username
containing a ':').

[ChangeLog][Important Behavior Changes][QUrl and QUrlQuery]QUrl now
defaults to decoded mode in the getters and setters for userName,
password, host, topLevelDomain, path and fileName. This means a '%'
in one of those fields is now returned (or set) as '%' rather than "%25".
In the unlikely case where the former behavior was expected, pass PrettyDecoded
to the getter and TolerantMode to the setter.

Change-Id: Iaeecbde9c269882e79f08b29ff8c661157c41743
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:44 +02:00
David Faure
f874a5dd8b QUrl: fix host(FullyDecoded), it shouldn't trigger EncodeUnicode.
Change-Id: I9a62d5eb8b099b659cfcfc591c983b3d73ca9569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:33 +02:00
David Faure
028def2ada Add benchmark for QThreadPool.
The current question is whether activeThreadCount() should be lock-free
(using atomic ints) or mutex-protected, so this tests start()
and activeThreadCount() directly.

Change-Id: Ica4a2ad023c2002e3c7d81558e6b9ee64af7f690
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 23:50:23 +02:00
Nicolás Alvarez
683451e7c7 configure: Abort if Xlib isn't present when building for XCB.
The XCB port is still incomplete and needs Xlib in several places.
The configure script should reflect that and make sure Xlib is present.

Change-Id: I6d81ea6cacef56084cf7ccfbcf908d597aae918f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 23:50:18 +02:00
David Faure
37dc44d499 QThreadPool: fix typos
Task-number: QTBUG-31919
Change-Id: I2718566595622895f182191b5693e91c1ab1e7d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 23:50:10 +02:00
David Faure
e8bc599a74 tst_qgraphicsproxywidget: fix memory leak
Change-Id: Ib449dc05cebd333310d6ea6b434c9db7082bdee9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-21 23:49:59 +02:00
Friedemann Kleint
95e880bd9d Windows: Handle Qt::ForeignWindow.
Task-number: QTBUG-33079

Change-Id: Iec2ddfe07b07b3a921098c7147f26aff316bf6e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 23:00:32 +02:00
Giuseppe D'Angelo
4fbe3eb2a8 Mark qFuzzy* and qIsNull as Q_REQUIRED_RESULT
Calling them and not using the return value makes no sense.
And it's even worse -- in autotests people might call those
functions without wrapping them in QVERIFY(), effectively
not testing anything.

Change-Id: I2c90d1c85963ff1f35f00653d536a9252c2fcc48
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 21:23:16 +02:00
Nicolás Alvarez
2e9345b627 configure: Check for Xrender only when building for XCB.
The XCB platform plugin is the only one that requires Xrender.

Change-Id: Iac2efa31b4b51e38305ee5f635fe38b75c7752de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 21:13:09 +02:00
Thorbjørn Lund Martsum
7523bbb0c0 QComboBox - only react on a mouse-release if we had a mousepress
In delegates we get into trouble with calling showPopup in
setEditorData (edit by double click) - and that is not reasonable.
The user has requested edit - and therefore it is natural to save
a click for the user and show the popup at once.

However that fails since we have the mouse down and as soon as we
release the mouse we will call hidePopup.

This patch ensures that the mouseReleaseEvent, that caused the
problem is only considered if we have had a mousePressEvent.

Change-Id: Ibe031fcb9ad2158f6969e41127bbb5f651b9cae6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 21:08:08 +02:00
David Faure
943ae90744 QHash: fix compilation with gcc-4.2.1 (Mac OS X)
The anonymous union isn't supported and can be replaced with a reinterpret_cast.

Change-Id: Ic76a31f36e61d910db16312d7a6c4bdc728aa825
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 21:08:01 +02:00
Sergio Ahumada
7978cef796 tests: Make the QT assignments more explicit
Remove unused 'QT -= gui' and replace some others with
'QT = core ...'

Change-Id: I2d14fae963afc21dbd21a4acdbba2c30cdf8fa61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-21 19:05:52 +02:00
Friedemann Kleint
bc4ce284ad Windows: Generate expose events for layered transient children.
Layered (translucent/non-opaque) windows do not receive WM_PAINT,
expose events need to be generated. Improve
6800728d09 to handle transient
children as well.

Task-number: QTBUG-17548
Change-Id: Id113604512692dfbea1f2b10d0db3068213cf599
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
8074693425 CMake: Allow specifying a TARGET in invocations of macros.
Forward-port of 9ce60ff509c4ff27fe861fc5b2080f50897a68c4 (Qt4Macros:
Allow specifying a TARGET in invokations of macros., 2013-02-26)
from cmake.git.

This causes the INCLUDE_DIRECTORIES and COMPILE_DEFINITIONS to be
used from the specified target when running moc.

Change-Id: I868a35ade3c6b059e64d226291cf2046709d86d4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Stephen Kelly
ee50096830 Populate INTERFACE_LINK_LIBRARIES property in the cmake files.
This is new in CMake 2.8.12 and replaces the old properties
matching IMPORTED_INTERFACE_LINK_LIBRARIES_<CONFIG>.

Change-Id: I5d4c454972f2535f6792e95718c73d80c56ac24c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-21 16:39:55 +02:00
Friedemann Kleint
4ef8144dd6 QWidget: Apply window opacity set before show.
Task-number: QTBUG-33078

Change-Id: Id9111f223a9dc58c88b072c52e36d42db450573a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-21 16:39:55 +02:00