Commit Graph

9188 Commits

Author SHA1 Message Date
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
Sergio Ahumada
ef32abb086 Header contains signals' - use Q_SIGNALS' instead!
Change-Id: I5ee1bfd0ce9c98d64b50cc727d414037fafb91c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-31 01:16:56 +02:00
Mitch Curtis
c2907968ed Document the purpose of QDateTimeParser::cachedDay.
It's useful to know what this member variable is used for, since there
is very little documentation for QDateTimeParser, which makes
maintenance yucky.

Change-Id: I9ecf5aa5ef0b5d778ceb858c323e3bab1ebaa7dc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 01:16:56 +02:00
Casper van Donderen
2e7f06c9bc Doc: Simplify qtbase qdocconfs.
We should be using the global qdocconf for the common variables. This
change also allows you to just specify -installdir without using a
templatedir.

Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-31 01:16:56 +02:00
aavit
244e3e2aa0 Doc: Fix various errors
Change-Id: I07503dd379779148b674ab0f806f6eeac5d7d4b7
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-30 21:43:36 +02:00
aavit
dc5359a312 Fix QScreen::grabWindow() on Windows
Finish up 94ac17c2cc

Task-number: QTBUG-26963

Change-Id: I13f52f0a6cf460d525b53338738aecd4b3cf313c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 21:36:26 +02:00
Jonathan Liu
2b69431d3c Fix MinGW-w64 TDM64-GCC 4.6.1 compilation
This fixes a regression introduced by
f58390e0f4 because __MINGW64_VERSION_MAJOR
is the same in older releases of shobjidl.h that do not declare the
IFileDialogEvents interface.

Task-number: QTBUG-24699
Change-Id: I000a5b9baf52363dfdedff2fb29bbe7ab24df5ca
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 21:35:34 +02:00
Friedemann Kleint
711689fef9 MSVC/OpenGL: Fix warnings about macro redefinition..
Introduced by fc41ee4c92 .

Change-Id: I4c924b0b0a38401ab02c3cc4edb7d78dbd9ef356
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 13:51:22 +02:00
aavit
634c39c1a9 Doc: Fix misc. documentation errors
Change-Id: I9481ed452922ed5ecd159a8f60d7fbcb3683cec1
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-30 13:51:22 +02:00
João Abecasis
ed4939eaac Improve performance of QArrayData::Grow autotest
Doing element-wise insertions for the full range of the test made
testing under valgrind extremely slow. When a reallocation is detected
we now resize() the container close to capacity(), while verifying this
doesn't unnecessarily re-allocate either.

Change-Id: Idf7015cf390e366fe444e7ca14c904a2d54ff48b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 13:51:22 +02:00
Jason Barron
36dd62ecaf Make plugintest util work on Windows.
Command line apps that use stdout need the CONSOLE subsystem.

Change-Id: Ic220f45119ea70372e27b4a364f7264cc649726d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-30 13:51:22 +02:00
James Turner
9597e0d2a2 Avoid a warning from the QNX QPA plugin.
The HDMI display on the Playbook is listed, but (normally) unattached, 
and hence generates an error if we attempt to register for events. This 
patch avoids the warning; a future change will actually watch for screens
being attached / detached and update the QPlatformScreens and event
registration correctly.

Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-08-30 13:51:22 +02:00
Mark Brand
a3963d8bbc QSqlQueryModel: suppress insert and remove signals while resetting
There is no need to emit signals for inserting and removing rows
and columns while resetting the model. Suppress these signals in
such a way that subclasses can benefit without worrying about it.

Change-Id: I04447c87173be54a7323b97608cdd40ae245b80b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Mark Brand
c194b7f345 QSqlQueryModel: fix nested beginResetModel/endResetModel
Follow-up to 83c9ebbd66.

Consider the case where calls to the reset methods on the same object
are nested as in the following sequence:

  1. beginResetModel()
  2. beginResetModel()
  3. endResetModel()
  4. endResetModel()

In such cases, only the outermost calls, i.e., 1) and 4), should emit
signals.

After 83c9ebbd66, 1) and 3) emitted the
signals, which is wrong. This is corrected by keeping track of the
nesting level.

Such sequences can come about when a base class calls the begin/end
methods between the calls made by the subclass.
QSqlTableModel::select() is an example of this.

Test included.

Change-Id: Ia62b45cb1abaab00a32bb8357de4a958bcff83e5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Mark Brand
98c663acd9 docs: remove \reimp from non-virtual methods
It seems we need \internal in this case.

Change-Id: I3f290bb0d22f9f3b5d04d27b13a7ef8961b2dd6c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-30 13:51:22 +02:00
Friedemann Kleint
861786bb50 Fix static plugins for classes in namespaces.
Breakage introduced by 819d0203e6 .

Extend QT_MOC_EXPORT to take the unqualified class name
as well for the function names.

Change-Id: I736097b564caa37c522d723780663d03341f9032
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
2012-08-30 13:51:22 +02:00
Titta Heikkala
1cebd906af Ensure that printer orientation is preserved
After setting the printer name the initialization is no longer done for
a printer with a name. Instead doReinit() method is called to preserve
the orientation (set with setOrientation() method before calling
setPrinterName()). Before the orientation was changed back to default
when setPrinterName() method was called ignoring the orientation set.

Updated also the autotest because the case:
taskQTBUG4497_reusePrinterOnDifferentFiles() is no longer expected to
fail on Windows.

Task-number: QTBUG-26008
Change-Id: Ia6bc9ae14d79a646e61bfc97652f9f5af90738b3
Reviewed-by: Andy Shaw
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 08:54:59 +02:00
Kai Koehne
f7de5b0923 Logging: Remove mutex for OutputDebugString
OutputDebugString seems indeed to be thread safe, at least according
to http://www.unixwiz.net/techtips/outputdebugstring.html . I also didn't
manage to run into any deadlocks on Windows 7 ...

The comment + code was already there (in qcoreapplication_win.cpp) in
the first git commit that imported Qt.

Change-Id: I442e22575558958ef21ab8c6b4cc8b03aee906b2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 06:22:45 +02:00
Kevin Funk
7cea395d1f Make tests/auto/corelib compile on Windows CE
Change-Id: I71987d40ae69d95f645c4c7d26d50add4c799327
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-30 06:22:34 +02:00
Rohan McGovern
42457c2f5f Temporarily mark ctest testcases as insignificant on Windows
The deployment of cmake onto Windows test machines caused test failures
with no changes to the code under test.  Mark all the ctest tests as
insignificant until the failures can be fixed.

Change-Id: If0cd4001ae6ec49fd38b9e0f97dd5326fddae433
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-30 05:45:55 +02:00
Marc Mutz
ca7be5c154 dist/changes-5.0.0: note that QtConcurrent is a separate library these days
Change-Id: Ib8ab6e40d9827697d1061a1b369e150f33d63be9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:29:02 +02:00
Fabian Bumberger
b4075c8ea3 Fixes possible memory leak in QContiguousCache
When inserting an item on a position that is already occupied, the destructor of the old item was never invoked.

Change-Id: I01dc4ec9f2da5027284eba94e1a9ad36b062a50d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:29:00 +02:00
Marc Mutz
c2f10f915f QVarLengthArray: C++11-ify insert/erase signatures
In C++11, container insert and erase operations take const_iterators
instead of iterators. This is a bug fix compared to C++98, where the
mere lookup step of a lookup-or-insert operation had to be done using
(mutable) iterators, which is particularly worrisome for Qt containers
that are implicitly shared, because of the unneeded detach in the positive
case.

QVarLengthArray is not implicitly shared, but for consistency, the signatures
should be changed here, too. The reason this commit contains only the change
to QVarLengthArray is that this is by far the easiest container. The
implictly shared containers are harder, because detaching invalidates other
iterators (more than the sister STL container would).

Change-Id: Ib3d98360bfe376b782b9d1283c5fa3555e8a719e
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:28:51 +02:00
Marc Mutz
6276427438 QString::append: add (const QChar*, int len) overload
Both insert and replace have this overload, so one reason to add it
to append(), too, is consistency. But I can also make good use of
this overload in the the new QStringList::join(QChar) overload, so
it's actually useful in its own right.

Change-Id: Iccd48f9cb84831399e4db7e3e78eba25c0ced30d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-30 02:28:30 +02:00
Richard Moore
7f324c4979 Document how to remove a QGraphicsEffect.
You can remove an effect by setting 0, but this wasn't documented.

Change-Id: I2d86875d8554cb26b4d88b8ce04b4daa9792c5d5
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-29 23:02:05 +02:00
Thierry Bastian
1e97dbaf6c Fixed the QTreeView expansion/collpasing when animated
If you had a QTreeView with expandable items, if you tried to expand and while
the animation was still running you'd try to collpase the node,
the display would be completely broken: the items below that items would
not be visible any more except for a fraction of a second when expanding
or collapsing it again.
The problem is in the fact that when starting an animation the QTreeView
stores the state before animating. And it does that even if an animation
is already running. So the stateBeforeAnimation becomes AnimatingState and
when the animation finishes, AnimatingState is the state that is restored
breaking the painting.
Unit test is included.

Change-Id: I015212c1ed8962e6df705655099a5660f195caf3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-29 20:40:17 +02:00
Samuel Rødal
c1e5f600ab Made QImage::fill(uint pixel) for RGB888 accept QRgb values.
Previously QImage::fill() for Format_RGB888 expected a BGR value
instead of the RGB order defined by QRgb, making it counter intuitive to
use related to the 32-bit formats.

Fixed the QPixelLayout data for RGB888 and changed the byte order of
quint24 based on what the optimized image conversion routines expect.

Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-08-29 16:53:00 +02:00
Samuel Rødal
f3b45ffa61 Added OpenGL example and documentation.
Change-Id: I2d9d4e52caf0a39fef9648d8a9e83a0c1328f650
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-29 16:53:00 +02:00
Andy Shaw
49c251e054 Ensure child items are updated even if the parent item has no content
When a parent item had its visiblity toggled, then the child item would
not update if the parent item had ItemHasNoContents and
ItemClipsChildrenToShape set. This is a common use case in declarative as
the root item has ItemHasNoContents set.

Task-number: QTBUG-26846

Change-Id: Id6592ebc4ba2caa4331a4a71f7247e40993131b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-08-29 16:53:00 +02:00
Jason Barron
48955161b4 Document obsolete functions in QImage to silence qdoc errors.
Change-Id: I78f3335e5c088641c56d5e682425c7e4b26b7d3e
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-29 16:53:00 +02:00
Jason Barron
a39e78710d Fix mistake in docs. Return type should be QSurfaceFormat
Change-Id: I4f4bf2542bb89b28ee84773507d4a121b134e730
Reviewed-by: Shawn Rutledge <shawn.rutledge@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-29 16:53:00 +02:00
Brendan Long
860f95946b Add support for explicit TLS 1.1 and 1.2
Add SslProtocol enums TlsV1_1 and TlsV1_2 and use the appropriate OpenSSL
methods when they're selected (TLSv1_1_client_method, TLSv1_2_client_method,
TLSv1_1_server_method and TLSv1_2_server_method). This allows us to
explicitly use TLS 1.1 or 1.2.

Task-number: QTBUG-26866
Change-Id: I159da548546fa746c20e9e96bc0e5b785e4e761b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-29 14:22:54 +02:00