Commit Graph

9269 Commits

Author SHA1 Message Date
Marc Mutz
9d4d0708ec QDBusPendingCall: remove unneeded volatile qualification
The variable waitingForFinished is only ever read under mutex protection, so
a volatile qualification isn't necessary.

Change-Id: I17ce3fbfb090c8ae5e43dd2a93e4f48810dbbff3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-03 13:41:55 +02:00
Marc Mutz
20d7763b19 QDBusPendingCall: add a missing QWaitCondition::wakeAll() call
In QDBusConnectionPrivate::waitForFinished(), threads that see
pcall->waitingForFinished == true go to sleep on
pcall->waitForFinishedCondition, but there was no call to
waitForFinishedCondition.wakeAll() anywhere in the code, so add it.

Change-Id: I8d068dc0cc4f20786eb40fd7e2bb9840d8b70c7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-03 13:41:55 +02:00
Marc Mutz
68e04c3ac1 QStringList::join: add an overload taking a single QChar
This overload avoids the needless heap allocation that the traditional
overload incurs due to the implicit QChar -> QString conversion
involved there.

In order to share the implementation between the two overloads,
QStringList_join now takes the separator as a (Char*,int) tuple
instead of as a QString.

Change-Id: I92961f13a3f19099de2a6e2df9f4789a12fc83a0
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-03 13:41:55 +02:00
Danny Boelens
64a8c78538 Rename MAC_CONFIG_TEST_COMMANDLINE to MAC_SDK_FLAG
The Mac OS X SDK is the only thing that variable is
used for, so give it a name that better fits its use.

Change-Id: Ifd9866bc19edda0e9f0bcb17270eb26a8849401e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-03 13:41:55 +02:00
Thiago Macieira
a2f705029c Remove the package macros from qglobal.h
It's the wrong place to have these.

Change-Id: I3b716317ba02ea2baf0f7053c8b16128e4c88e17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-03 13:41:55 +02:00
Stephen Kelly
dcf4d152b5 Change SChar to metatype id 40.
This fills the gap left by QWidgetStar, making the sequence
between FirstCoreType and LastCoreType contiguous, which some
benchmarks assume to be true anyway.

Change-Id: I2d5d202b6246a9065fdf77f325a4a04279dbe4b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-03 11:05:49 +02:00
Shawn Rutledge
d6d7aebd03 Command-line-only examples should not build as .app bundles on OSX
It's confusing when you double-click it and nothing happens.

Task-number: QTBUG-26976
Change-Id: I50c5625a41881bdbcbf29001197ed15da4ee0a28
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-09-03 11:05:49 +02:00
Frederik Gladhorn
812bad17df fix docs
Change-Id: Id57b7932afb89fe9d3f4f6e6c3b558265475d77b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-09-03 11:05:49 +02:00
Frederik Gladhorn
fa1738bddf doc: fix example link
Change-Id: Ie0235281c3a4d5e5dadc6e5823bbf722b7ca411f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-09-03 11:05:49 +02:00
Jason Barron
931c329153 Fix doc errors in QScreen.
- Ensure all args are documented
- Remove signals from \sa tag
- Ensure return values are documented

Change-Id: I1db111d082ee47f046598695bc3fa53d67798333
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-09-03 11:05:49 +02:00
Jonathan Liu
952ea029f4 QWizard/Win: Fix incorrect cached state after all wizards destroyed
If a QWizard is shown when Aero is enabled, the current visual style is
cached in a static member of QVistaHelper. The cached state is updated
by QVistaHelper when it receives WM_THEMECHANGED or
WM_DWMCOMPOSITIONCHANGED events from Windows.

If all QWizard instances are destroyed, there are no instances of
QVistaHelper to receive these notifications and update the cache. If
Aero is now disabled, the cached current visual style in QVistaHelper
isn't updated. If a wizard is now created and shown, a large black
rectangle is shown in the titlebar.

A static instance count is added so that when no wizards are running,
the cached state is not used.

Task-number: QTBUG-27004
Change-Id: Iefe4c8552388280219c9726418ed7476b8ebb15a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-09-03 11:05:49 +02:00
Jonathan Liu
6960fb2f6e Fix MinGW-w64 GCC 4.6.3 compilation
Several IShellLibrary constants and the COMDLG_FILTERSPEC struct are
already defined in newer versions of the MinGW-w64 headers.

Change-Id: I614b35c835123484aeeb4e61e0bae24261584da0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-09-03 11:05:49 +02:00
Sergio Ahumada
8cba00ebf5 Private slots should be named starting with _q_
This is to reduce the risk of collisions with signals/slots in user classes

 q_updateFocusObject(QObject *object) => _q_updateFocusObject(QObject *object)
 q_checkFocusObject(QObject *object)  => _q_checkFocusObject(QObject *object)
 q_connectFocusObject()               => _q_connectFocusObject()
 emitActivated(QPlatformSystemTrayIcon::ActivationReason) => _q_emitActivated(QPlatformSystemTrayIcon::ActivationReason)

Change-Id: I148913f1e24a80fe5cacfd737d1b455b805cfced
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-03 11:05:49 +02:00
Julien
a36efc37a1 qpa: incorrect rendering when stretching and clipping
When using QBlittable with SourceOverScaledPixmapCapability, rendering
through clipAndDrawPixmap is incorrect when stretching: source pixmap
rectangle has to be corrected using scaling factor.

Change-Id: I7026987f5c47094a4578c0da4ccb67a0241d64bd
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Julien BRIANCEAU <jbrianceau@nds.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-09-03 08:37:50 +02:00
Mitch Curtis
ec57b20b65 Properly reflect format changes in calendarwidget example.
This patch ensures that May 1st and the first Friday of each month also
have their formats updated when the corresponding checkboxes are
unchecked instead of just checked.

Task-number: QTBUG-26936
Change-Id: Ib5f77daf8d9000eeb18663b2e07e4842a70d22b6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-09-03 02:40:54 +02:00
Volker Krause
8c1cb66712 Fix moc generating invalid code for slots with reference types as argument.
We can't have T& declared/registered as a metatype (wont compile), but
using it as type for a slot argument is possible. With the recent
introduction of metatype auto-registration we have to make sure that moc
doesn't attempt to auto-register those. Simple types are handled correctly
already, this fixes containers and smart pointers.

Change-Id: Id96857c57d6ebf158a67e9d527c89dc195473b1b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-02 23:41:42 +02:00
hjk
9d4814e18b Introduce hook for text cursor changes in QTextEdit and QPlainTextEdit
Currently it is hard for Q{Plain}TextEdit subclasses to keep track
of changes of the text cursor by direct calls to setTextCursor from
arbitrary code. By redirecting the setTextCursor to a virtual
function subclasses get the chance to intercept such calls.

Change-Id: Id92d9c86928b97285b0f5b7b39790442dfac3e50
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-02 10:09:28 +02:00
Jiang Jiang
e0ce39ea67 checkForCodecs is not used when QT_LOCALE_IS_UTF8 is defined
Change-Id: I3d82863cbd123dbf73eb8f5721ef9294e6365de6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-02 10:09:17 +02:00
Rohan McGovern
6db03bbc63 Add a task number to ctest_testcase insignification
Make sure it doesn't get lost.

Task-number: QTBUG-27087
Change-Id: I8b773cfa4b1b9ab5430096c2cff50911e84b73f7
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
2012-09-01 17:30:31 +02:00
Holger Hans Peter Freyther
08e92ba1e0 mips: Autodetect MIPS DSP rev1 and rev2 instructionset
Not every MIPS SoC has the DSP extensions, auto-detect them by using
builtin GCC functions. Check for the DSP macros and add the result
for rev1 and rev2 to the cpufeatures.

Change-Id: I3d6c950f170f102514c43b349f9a23ee796d801a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-01 15:28:24 +02:00
Frederik Gladhorn
5f5e9b0e04 Find qdoc indexes in relative paths.
Change-Id: Ie717e85bfc3d49173d1ae4caf2a01ad6e9b8b625
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-09-01 11:25:43 +02:00
Frederik Gladhorn
4d78b86731 Use QString() instead of "".
Change-Id: I42c55344663808b8362e2c9185273a00fc1c70b0
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-01 11:24:57 +02:00
Frederik Gladhorn
3ef3c662fe Don't reference widgets/widgets in example doc.
Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-01 11:24:50 +02:00
Casper van Donderen
eede34aa6b Doc: Fix docbuild when not using -developer-build.
https://codereview.qt-project.org/#change,33974 only works in the case
of a developer build. Not in a normal prefix build.

Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-09-01 11:23:56 +02:00
Frederik Gladhorn
7b5f5b2d9f Fix address book example.
Change-Id: I2e0cb03bb7e9585edf44d4464af17848069337ee
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-01 11:22:41 +02:00
Frederik Gladhorn
450912611f Fix graphicsview docs.
Change-Id: I9438e64dbbc859fc60eb41a1bc664af35b762894
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-09-01 11:22:29 +02:00
Samuel Rødal
65f5909df2 Moved gui example documentation to the proper location.
Gui example documentation should be in examples/gui/doc/

Change-Id: I3cd196a2bb5d76b6e275f336b29a2ad1811159dd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-09-01 11:21:46 +02:00
Kim Motoyoshi Kalland
3d04e4965e Doc: Fix some documentation issues.
Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 21:23:38 +02:00
Kim Motoyoshi Kalland
70bc7f8b32 Doc: Add documentation for deprecated function.
Change-Id: If1e76e4ac7f1da5f0362a7774b3341a4fedb31b0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 21:23:38 +02:00
Kim Motoyoshi Kalland
49c8a28563 Doc: Fix wording in \brief section.
Change-Id: I60748a681cce6bd61805376b2a2cd38d2020e68e
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-08-31 21:23:38 +02:00
Kim Motoyoshi Kalland
7ac1b21d05 Doc: Remove documentation for removed function.
Change-Id: I3d2b4078f7c442b636e4848048c41f9f8223c98b
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-08-31 21:23:38 +02:00
Kim Motoyoshi Kalland
49d11e2eb1 Moved snippets from widgets to gui so that they are found by qdoc.
Change-Id: I3245366c26dfffc6c2eb062e9710460c32e4b8d8
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-08-31 21:23:38 +02:00
Jing Bai
32cfff864e add macro wrap for QXmlStream related code
To fix a compile error when QXmlStream is removed by defining macro,
but it is still used in some files.

Change-Id: I776c799732212b7401767440448248fc7b5dc480
Reviewed-by: David Faure <faure@kde.org>
2012-08-31 21:23:38 +02:00
Casper van Donderen
0f409aca96 QDoc: Write SHA1 of .qhp to file.
QDoc should generate a SHA1 hash of the .qhp file to be able to use that
file as a search index. The idea is that we can use the hash as an
identifier to check if the search index was updated.

Change-Id: Ifd19571bcebf7d735ef452dca6c046a14fedc0e2
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-31 21:23:38 +02:00
J-P Nurmi
60783291ff auto tests: updated for new QStyle pure virtuals
QStyle::standardIconImplementation() & layoutSpacingImplementation()
are removed, and standardIcon() & layoutSpacing() made pure virtual.

Change-Id: If8ab6cfef0b639b7973be22dd630ba3e6f39a225
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-08-31 18:56:35 +02:00
J-P Nurmi
50e3da79bf QXxxStyle: override standardIcon() & layoutSpacing()
QStyle::standardIconImplementation() & layoutSpacingImplementation()
are removed, and standardIcon() & layoutSpacing() made pure virtual.

Change-Id: Ibf43323d0cf6c3b6cec4547afe8e826e120f74ba
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-08-31 18:56:35 +02:00
J-P Nurmi
dd299a568b QStyle: make standardIcon() & layoutSpacing() virtual
Removes standardIconImplementation() and layoutSpacingImplementation()
that were added in Qt 4 as a workaround for binary compatibility reasons.

Change-Id: I45292dc6802310d6cda4f443bb7484b061af0138
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-31 18:56:35 +02:00
Sergio Ahumada
531b96f42e test: Mark tst_QFile::writeLargeDataBlock() unstable failure as XFAIL
The test has one unstable failure on Windows, so mark this with QEXPECT_FAIL

Task-number: QTBUG-26906
Change-Id: I2f6c63ddefecacd224d93f83e6951e961a02a051
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-31 18:56:35 +02:00
Stephen Kelly
449d1f620a Don't set empty CMAKE_TOOLCHAIN_FILE or CMAKE_BUILD_TYPE
The CMake Visual Studio 10 generator generates an include() for
the empty CMAKE_TOOLCHAIN_FILE, causing the errors in the bug.

There may be other remaining errors to cause the Windows CMake build
to fail with that generator, but this patch is an improvement
anyway - there is no point in setting empty strings as values for
those variables.

Task-number: QTBUG-27087
Change-Id: I68cce9e3dce07835db5f42777ac02d440f90f967
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-31 16:51:27 +02:00
aavit
b2ae34d9b5 Doc: More fixes of qdoc-reported doc errors
Change-Id: I2dd815c471e56d2c239a63e7c7ad3496af2a585b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-31 16:50:23 +02:00
aavit
f9bf5a8855 Doc: Fixes for several doc errors
Change-Id: I5be9c8e9ff9c17fae0fbbe468f34439411aca06b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-31 16:49:54 +02:00
Jeremy Lainé
28881c0c91 Make QGraphicsView respect scrollbar policies
When calculating the maximum height / width which a QGraphicsView can display,
make sure we only take the scrollbars' dimensions into account if their policy
is set to Qt::ScrollBarAsNeeded:

- if the policy is set to Qt::ScrollBarAlwaysOff, the scrollbar will not be
  displayed at all

- if the policy is set to Qt::ScrollBarAlwaysOn, the scrollbar's dimensions
have already been substracted from the available space by
QAbstractScrollArea::maximumViewportSize()

Task-number: QTBUG-14711
Change-Id: If5d24b41dbe7b089abca2bf61ccbd370d4de79a1
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-31 16:29:43 +02:00
Thiago Macieira
99ef183cb1 Use pkg-config to search for all XCB dependencies
The XCB platform plugin requires several XCB libraries to work. Without
this fix, we get the build error in compileTest only, which is hard to
check.

Change-Id: I6b599f5ad32661e9dc01db11705d702920350cfa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-31 16:23:10 +02:00
Lukas Geyer
9fcf8dc2e8 Force QT_NO_ICONV on win32:!win32-msvc*
This behaviour was changed in Ide9800f6 to suppress
macro redefinition warnings for MSVC, but MinGW
has iconv support and therefore configure does not
set QT_NO_ICONV, which prevents compilation on win32-g++
as QIconvCodec does not support Windows.

Change-Id: Ic3c4ccceb3eaf9542c95b0c27847ca5ab51849b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-08-31 16:10:25 +02:00
Jason Barron
ce4ed8315e Use the right getter for the QScreen::primaryOrientation property.
Change-Id: I408e4941163cd676133b2e41613162f52b685076
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 16:10:25 +02:00
Friedemann Kleint
1e34d3525f Fix updating of drag icons.
Try to find a target widget that accepts drops; ignore the event
if none can be found. Split the handleDrag*() functions
to reduce indentation.

Add an autotest.

Task-number: QTBUG-22987
Change-Id: I516ac5f0c002caaf83c52ac16f821246e565230f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-31 16:10:25 +02:00
Thiago Macieira
9aa67cf0c4 Fix the name of the arguments of qAtan2 to match std::atan2
There is no change in functionality, just swapping of the names x and y.
The std::atan2 function uses (y, x) in that order, so we should too.

Task-number: QTBUG-27090
Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-31 16:10:25 +02:00
Stephen Kelly
0a0157f545 Move the creation of the MODULE_DEFINES variable above the pri file check.
The MODULE_DEFINES is also used by create_cmake.prf, whether there is an existing
pri file or not. In the case of QtWebKit at least, there is still a handwritten
pri file present.

Change-Id: I566c32a36aa6b84a455c2785c0da2bae57ea9091
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-31 16:10:25 +02:00
Stephen Kelly
9ca74072d7 Report a FATAL_ERROR if trying to use Qt 5 with CMake < 2.8.3.
Change-Id: I76cad71c96a5def170715568e6a16b1168cbb2cd
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-31 16:10:25 +02:00
Sergio Ahumada
2994cd41ca Add missing QT_{BEGIN,END}_NAMESPACE
Fix src/network/kernel/qnetworkfunctions_wince.h

Change-Id: Ia59c1e67f9409abb97fce3fcaa3840e0d77c0978
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-31 01:16:56 +02:00