Commit Graph

12809 Commits

Author SHA1 Message Date
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Martin Smith
a19c22ebf8 qdoc: Initialize an uninitialized variable
qdoc already ignores QML signal handler comments
and does not report errors for missing QML signal
handler documentation. but the test case for this
bug revealed a separate bug. The test case contains
no import statements, which, technically is legal
but probably won't happen. Still, qdoc failed to
generate output for the test case QML file because
it didn't contain an import statement before the
first qdoc comment. This was caused by an
uninitialized variable, which has now been fixed.

Task-number: QTBUG-30043
Change-Id: Iafa2087b85a6c9e354b2be86c779bbd191181218
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-03-07 11:27:49 +01:00
Laszlo Papp
0e8520d18f Update the documentation for C++11 initializer lists support
The documentation was written for 4.8 when the C++11 standard did not have the
name yet.

Change-Id: I08640a5ae62385b09e181eefafd4cc831e4de456
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-07 11:14:20 +01:00
Samuel Rødal
341fb50d5b Fixed android-no-sdk build by excluding platformsupport/jniconvenience.
Change-Id: I02e45523a0e35aad3afdbef4a4b3a00de32663f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 09:18:53 +01:00
Samuel Rødal
c2f17ad937 Fixed build of SSL when using android-no-sdk.
Introduced Q_OS_ANDROID_NO_SDK which makes more sense than
Q_OS_LINUX_ANDROID when Q_OS_ANDROID also defines Q_OS_LINUX.

Change-Id: Id2aa228b66daffba82776a12c91a264a360afd86
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 09:18:43 +01:00
Axel Waggershauser
6b68be9587 Let QMetaObject::connectSlotsByName(o) also check for signals of o
QMetaObject::connectSlotsByName(QObject* o) creates a list of all
children to look for signals that match slots of o. This changeset
simply adds the object o itself to that list.

The motivation is to finally fix the long standing QtCreator bug
QTCREATORBUG-6494. Where executing 'Go to slot...' and choosing
'accepted()' for a simple QDialog named 'MyDialog' will add a
on_MyDialog_accepted() slot to MyDialog. That slot never gets
connected. More details may be found in the linked QTBUG-7595.

Task-number: QTBUG-7595
Task-number: QTCREATORBUG-6494

Change-Id: I35f52761791af697eabb569adb5faee6fae50638
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-07 08:37:26 +01:00
Alberto Mardegan
079e3b4f3e Add manual tests for X11 embedding
Since we currently implement only half of the XEMBED protocol (we lack
the container part), we use a simple XEMBED container built with Gtk+
and PyObject. Using an interpreted language as Python helps us avoiding
a build dependency on Gtk+.

Change-Id: Ibc6282371c6f767e481c8a8ba2b5ca9cdd0d8b82
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 08:37:26 +01:00
Thorbjørn Martsum
3222db0937 QVector - removeLast optimize
In case somebody uses QVector as a stack, it is not fair to have
takeLast, removeLast and pop_back to do way too much work.

This is still very slow compared to std::vector::pop_back
(mostly due implicit sharing), however it is more than a
factor faster than before.

Change-Id: I636872675e80c8ca0c8ebc94b04f587a2dcd6d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-07 08:37:26 +01:00
Friedemann Kleint
583349de03 Stabilize tst_qclipboard.
If the process terminates while QApplication::processEvents()
runs, the subsequent waitForFinished() returns false and the test
fails.

Task-number: QTBUG-29951
Change-Id: I41f461358920ad430951613dd919885f68ae212c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-03-07 07:10:35 +01:00
Thorbjørn Martsum
ab52e72292 QVector - add functions takeFirst and takeLast
This patch adds takeFirst and takeLast which are functions
that QList also has.

Change-Id: I761f90b529774edc8fa96e07c6fcf76226123b20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-07 06:13:06 +01:00
Thorbjørn Martsum
510660080d QVector - add remove functions
This patch adds the functions removeFirst() and removeLast().
Functions that QList has.

Beside making these functions, pop_back and pop_front are
redirected to these rather than calling erase.

Change-Id: Ifc5f8a78e33f436f06f21095a920ec5d4311fd6f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-07 06:12:59 +01:00
Samuel Rødal
a12f6ba302 Fixed dashes being rendered differently depending on system clip.
We need to clip lines to the unclipped device rect in the case of
dashing, since otherwise the dashes will be shifted and rendered
differently when partial repaints are done.

Task-number: QTBUG-24762
Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 02:54:08 +01:00
Samuel Rødal
7128bcbbd5 Attempt to stabilize tst_qgl::graphicsViewClipping().
Make sure the graphics view is exposed and has been painted before
trying to grab the framebuffer.

Task-number: QTBUG-29943
Change-Id: I2945cb78b58265864744a0d5fc99fb430306b578
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-07 00:45:04 +01:00
Mitch Curtis
a8c6708260 Correct QLocale(const QString &) documentation.
Change-Id: I6430ff2636083204fa12437980626260f848e269
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-07 00:44:21 +01:00
Oswald Buddenhagen
3f5633bc25 remove some cryptic code relating to output directories
the purpose of it is truly elusive - the output directory is maintained
by the surrounding code anyway.

Change-Id: Id1a481d85a7b83ab0676ef650c900414d0ba83b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-07 00:42:56 +01:00
Rafael Roquetto
d1308232d3 Qnx: Add BlackBerry Playbook config token
Change-Id: I31367b6c9b20fdfce1c60c4b9f0b213aba1872e4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
408fa1e2b9 Add support for attributes in the -perfcounter argument
Five attributes are supported, matching what the perf(1) tool
supports. The 'p' attribute (precise IP reporting) wasn't added
because we don't do assembly-level debugging with benchlib.

Change-Id: I726f735a5bcc0c97e62cde0fbe0843597068ad7c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
3963ab9d73 Store the performance counter attributes globally
This will allow us to modify more attributes from the command-line

Change-Id: I84d4933cbfa2b69c4e1009eaf3e005cfc3e7e01c
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
914b56dbf5 Add support for the cache-related operations counters in benchlib
This adds support for checking cache accesses and misses, per
operation (read, write and prefetch) as well as per cache level (L1
for data, L1 for instructions, last level).

The branch prediction unit (BPU) is also accessed via the cache
monitor subsystem.

Change-Id: I8fa96b141cc777c9d231bd57fa36bca33ae7bdfd
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
051f68c2d3 Add support for more performance counters in QBenchlib
Added support for most hardware and software counters available on
Linux 3.3. The cache-based counters are missing because they need
special handling.

Also added an option that lists available counters. Note that the list
is of counters the library knows about, not the counters that the
hardware can measure.

Change-Id: I9f6fb09b5460bf4ac6082081611c1d6ff806a3fa
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
93fe3895cf Add more events for QBenchlib, based on the Linux perf counters
Change-Id: Ic7e7e122bfe3995eb7ea033c744fd501579ea8fa
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
c63420a117 Implement the Linux Perf Counter backend for benchlib
Currently, we only support one event type: counting CPU cycles with
hardware counters. There are no fallbacks if this hardware counter is
not available, and there is currently no way to specify other
counters.

Benchlib only supports reporting one event per benchmark, even though
the event counter interface allows specifying more than one. Still,
the hardware usually has limitations on how many events it can monitor
at a time, and we'd prefer to have the counter running at 100% of the
time, so this will not change.

Change-Id: I79858a3ad1e696dc4b7b72c420e5a04b67cd55de
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
9d72259f94 Add the skeleton Linux perf events counter for QtTest
Currently, it only prints "perf available" if you use the -perf option
and perf is available. The implementation comes in the next commits.

Change-Id: Ic6cdee70e21df25780799a4bc31ca2c2d923b9f8
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-03-06 21:50:28 +01:00
Thiago Macieira
24f059eed0 Import the Linux header linux/perf_event.h
Imported from linux's own git, at v3.7:include/uapi/linux/perf_event.h
(blob SHA-1 is 4f63c05d27).

We cannot rely on the file being shipped by distributions. Older
versions did not have all fields in the perf_event_attr structure. If
those bits are enabled at runtime, the kernel will simply reject the
perf_open call (-EINVAL). Currently, this can only happen with the
non-default options exclude_guest and exclude_host.

Change-Id: Ib329e52c21d6969406da0cf33de823d721d94206
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-06 21:50:28 +01:00
Kevin Ottens
2d1f3d7c51 Add methods to convert lists of QKeySequence to/from strings
QKeySequence provides conversion to and from strings. But a similar
convenience was missing for QList<QKeySequence>. It would come in handy
when you want for instance to save/restore the shortcuts of a QAction.

Change-Id: I9e4f2001c58a595392a5019a57c564992c39bf88
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-03-06 21:50:28 +01:00
Axel Waggershauser
6d0a685fc6 Simplify further extension of tst_QObject::connectSlotsByName
I changed the existing test-case code to make it more scalable
in terms of adding more connectSlotsByName related tests. The
old "manual list of ints"-method was really not developer friendly.

This is a preparation for a subsequent modification of
connectSlotsByName behavior.

Change-Id: Ib760e52631ce4b5ae2a3ebdb4854849ff6c93bfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
c4a07f039d Aero-Style-QWizard: Hide/Show back-button correctly.
Task-number: QTBUG-29904

Change-Id: Id832594be4bc15c868f11bd762390803c8f9c158
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
3fa77de5c9 Aero-Style-QWizard: Fix drawing when used as a child widget.
Introduce function to retrieve HDC with transformation.
Paint Vista-style items at correct location when used
as a child widget (for example, in Qt Designer).
Disable special drawing that works only for top-levels.

Task-number: QTBUG-29904

Change-Id: Ic902fd30e8050317b24ab7f7e2757ef1e16407f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
872a84c2e6 Aero-Style-QWizard: Do not use parent window handle.
If no window exists at the time QWizard::setWizardStyle() is
set, further delay initialization of the Aero style until show().
If the wizard is a child window, just adapt the geometry.

Task-number: QTBUG-29904
Change-Id: I3805331ae726a0aa2020815d5bff571ca407efbc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
3c329b09fa Aero-Style-QWizard: Set custom margins only for Areo-Style.
Task-number: QTBUG-29904

Change-Id: Ifaf4d5e692f97436535feb1af44dc29d3512c5ea
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
c2530a0f59 Fix warnings about unused variables in sub-attaq-example (CLANG).
Change-Id: Icad46a03a8d5875c128bd1f1bc97127e0ee05622
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
e1d39c6bfc Fix warning about float truncation in scroller example (CLANG).
Change-Id: I66913c43fb668da128b994f44d3f180e1ce3abbe
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
04285d94e8 Fix warning about float truncation in tst_qdatastream.
Change-Id: I8e6af7e6534272d1385020212ad7348d9d74b38d
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
a6d339fd18 Fix loop condition in tst_qhash (CLANG).
Change-Id: Ic841abdf45cd2543500b3dc4030bea5f6fd88174
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
90a277bce3 Fix warning about tautological comparison in tst_qstandarditem (CLANG).
Change-Id: I87e3705b8e03ca84c90783b29f95ad19e5f33b74
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Friedemann Kleint
d8e767e928 Fix warnings about unused field variables (CLANG).
Change-Id: I488ad18eb0389d1e9b8b695b7a02eca47bee687e
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-03-06 21:50:28 +01:00
Gabriel de Dietrich
083c8ce840 Cocoa: Pick right rectangle when rendering window mask
Ususally, the object setting the mask knows better than the window,
since the latter may not have had its size set by then.

Task-number: QTBUG-29856
Change-Id: Ib24d452a98a76b57f5d9236d5fa1ba4755cf0840
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 20:07:41 +01:00
Gabriel de Dietrich
544f1cbe27 Cocoa: Fix shadowless popups
The window shadow was never invalidated after setting the transparency
mask. We now do it right after the first draw after setting the mask.

Change-Id: Icc5c6002d25abeb25d58ee4d1f868e928121ae9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 20:07:41 +01:00
Friedemann Kleint
69e2739c9a QAndroidStyle: Fix warnings and compilation on Windows.
Change-Id: I0ce4545bdc40a5e1a8297a225c2a656076df4580
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-06 19:52:12 +01:00
Friedemann Kleint
bbbe9dcb72 Fix export of QAndroidStyle.
Change-Id: I779323403f6721ca904c517b7ffd78aff29d0a96
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-06 19:52:03 +01:00
Olivier Goffart
507ee19e07 moc: Remove VC6 workaround
Change-Id: I9022eee72235309303ca384f2d52fc24256af6ec
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-06 19:40:04 +01:00
Jan Arve Saether
aa2d10750a Fixed QTreeWidgetIterator to work with sorted QTreeWidget
We cannot access children directly, since that won't ensure that
the pending sort is executed. However, the functions we need are
there already and actually makes the code nicer.

Task-number: QTBUG-29903

Change-Id: I6899284275dd79b991896a5f08486b58d95f819d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-03-06 19:13:28 +01:00
Gabriel de Dietrich
5f948eb62d qtbase: Fix duplicate symbol errors in static build on Mac
There is some code duplication between QMacStyle anf the Cocoa QPA
plugin regarding painting and bridging with Cocoa.

Task-number: QTBUG-29725
Change-Id: I347407a9bca47b6fccd77fb924688bd35135d96b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 19:04:31 +01:00
Tor Arne Vestbø
75ee22dab0 Fix build of host_build when a -sdk was passed to configure
qdevice.pri is not target/host specific yet, so we were loading
it and overriding QMAKE_MAC_SDK to iphonesimulator eg., even
for host tools such as moc.

Change-Id: I10277e60e1da84dda239e32a6f19b40dc48f084a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-03-06 19:03:39 +01:00
Morten Johan Sørvig
c6a689f64f Make .prl file generation work for iOS again.
d28073d9 creates a distinction between "mac" and
"macx". The latter is not set on iOS, which caused
MakefileGenerator::target_mode to be set to TARG_UNIX_MODE.

Check for the "mac" active config instead of "macx".
Rename TARG_MACX_MODE -> TARG_MAC_MODE.

Change-Id: I7192788c33f5723034ba76da2492379dd454f0ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-06 19:03:21 +01:00
Morten Johan Sørvig
6c55e55307 Compile.
d28073d9 enables the Mac style on all "mac" platforms,
including iOS where it does not compile.

Disable the mac style on all platforms except
"macx" (Mac OS X).

Change-Id: I67685f745b1a0910b05794cddeaf27cdaa31cbfd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-06 19:02:36 +01:00
Tor Arne Vestbø
a8021ed985 Fix Xcode version lookup in xcode.conf
We want the second member from 'Xcode 4.x', and $$first() gave us
'Xcode' instead of the version number.

Change-Id: Iaf0ed9dc89a03f7918290a61bddade82651ad0f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-06 19:02:16 +01:00
Alberto Mardegan
b5bdd31de4 Implement XEmbed protocol
Add a static QWindow::fromWinId(WId id) constructor which can be used to
create a QWindow object representing windows created by other processes.
Then, QWindow::setParent() can be used to embed a window into a foreign
window socket and QWindow::setTransientParent() to stick the current
window on top of a foreign window.

The changes in the QtWidgets module ensure that the focus chain (TAB
navigation) correctly works when a QtWidgets-based window is embedded
into another application.

As far as the platform implementation is concerned, this commit only
implements the embedding functionality in the XCB plugin. So, this is
roughly equivalent to the Qt4 QX11EmbedWidget functionality.

Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 18:59:07 +01:00
Thorbjørn Martsum
f0533ba8c2 QMap - add multiInsert with hint
This provides a fast multiInsert in QMap (and a fast insert in
QMultiMap) when providing a correct hint.

Change-Id: I3c864c3a7842765fe63f8ecb4b54d0e8c9fd22d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 18:56:30 +01:00
Thorbjørn Lund Martsum
ca6a4258d0 QMap - add insert overload that provide a hint
This adds a fast insert on QMap when providing a correct hint.

Change-Id: I256bba342932c1d4f24c6e65074e1bf47b519537
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-06 18:56:17 +01:00