Commit Graph

11473 Commits

Author SHA1 Message Date
Thiago Macieira
008c455a6a Remove the QtSql driver headers from the API
These headers are technically private API, since they include private
headers. They should be _p.h actually, but that change I'll leave for
5.1.

Change-Id: I2dec222854e147da0fc166de311012472954012e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-01-14 11:35:17 +01:00
Jian Liang
b188d9481b Fix QOpenGLContextGroup object leak
Task-number: QTBUG-29056

QOpenGLContextGroup object is designed to be destroyed by deleteLater(),
but this method will not always work due to the fact that in many cases
event loop will exit before the deferred deletion of the
QOpenGLContextGroup object is queued. Think about the following case:

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QGLWidget w;
    w.show();
    return a.exec();
}

In the above program, the event loop will exit before QGLWidget object's
destruction. This will cause the QOpenGLContextGroup object hold by
QGLWidget object never been deleted.

This patch will delete QOpenGLContextGroup object directly with delete
operator if the current thread is the same as the thread which the
QOpenGLContextGroup lives in.

Change-Id: If835d7482474f4a668763fc7c21b293a27f075fd
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-14 11:35:17 +01:00
Sergio Ahumada
4bd4c811f2 tst_bic: Add bic data for QtConcurrent and QtPrintSupport
Task-number: QTQAINFRA-321
Change-Id: I2699a13c3d8a7df9b12049e0337501a4e24d2d64
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2013-01-14 09:18:43 +01:00
Andy Shaw
ad028c4110 Fix compile when verify is already defined
On Mac if AssertMacros.h has already been included then it defines
verify which conflicts with the verify static function.  Therefore we
just undef this if is already defined.

Task-number: QTBUG-27316
Change-Id: I5960e504c4efa4fc4ff65ba66bbd7decb33ffc62
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-01-14 09:09:03 +01:00
Jian Liang
d41fbea2ba Fix memory leak in windows vista style
Introduce a function named deleteClonedAnimationStyleOption() in
qwindowsvistastyle.cpp to delete style option cloned by
clonedAnimationStyleOption() to prevent object leak which is hold by the
actual style option object.

Change-Id: I1afd95ddab237059ce3460ac0b52a65de102eaa5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-11 21:04:09 +01:00
Shane Kearns
7e91b5a2bc Fix incorrectly disabled autotest
One of the IPv6 autotests was always disabled instead of being disabled
only when the system has no IPv6 support.

Change-Id: I34dffbeae6ba85a706bfeb0cc4750a4514b73a65
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-11 14:01:10 +01:00
Jędrzej Nowacki
63c68cadec Enable tst_qwidgetsvariant test
The test for a magic reason was not build by default.

Change-Id: I21c7fc959d76d6faac0091495f965f3da6d415b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-11 12:02:21 +01:00
Martin Smith
c72cbfc37f qdoc: Fix problem of missing inherited members
This was another bug resulting from modularization.
qdoc is now run twice for each module in Qt 5.
First, qdoc is run with the -prepare flag for each
module. The only thing qdoc generates is the .index
file for each module. Then qdoc is run with the
-generate flag for each module. Here, for each
module, qdoc first reads the .index files for the
modules on which the current module depends. Then
qdoc generates the docs for the module.

qdoc was not reading the index files for the
prerequisite modules, when it was run in the
-prepare phase. This has now been corrected.
qdoc now reads the prerequisite .index files
in both the -prepare phase and the -generate
phase.

Note that this requires that the order qdoc
runs in the -prepare phase must be the same
as the order of building modules when building
Qt 5.

This change also tells qdoc to ignore nodes,
when traversing its main data structure to
output docs, if the nodes came from reading
a .index file, because the docs for these
nodes are generated in the -generate phase
for their respective modules.

Task-number: QTBUG-28508
Change-Id: Id73652ae1c4022e4c9e4f199caab12a854e5f9b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-11 12:02:21 +01:00
Nico Vertriest
d208c8b247 Doc: corrected typo "the the"
Task-number: QTBUG-28756

Spurious repetition of the definite article
Trailing space issue corrected.

Change-Id: I3a051f5dc291e546d8d67d6775e84b388bdc0363
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-01-11 12:02:21 +01:00
Pekka Vuorela
866a035f6e Fix accidental obsolation of Qt::InputMethodQuery
\obsolete for one value was marking the whole enum obsolete.

Change-Id: If022b4af8365e3448556ca11a538203ab5c63c78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-11 09:40:24 +01:00
Friedemann Kleint
c95b0982d5 Clear backingstore for windows with alpha channel.
Fixes painting artifacts in translucent windows.

Task-number: QTBUG-28531

Change-Id: I00a7a86f88a40d356fa3e37bd497a288b2118469
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-11 09:03:59 +01:00
Konrad Rosenbaum
ffd912a51d fix linuxfb crash on program start
the KDGETMODE ioctl should use a pointer to int as param,
not a pointer to pointer to int, otherwise it may crash

Change-Id: Ie255d240f3b6ca1ff5398f972308116135374ae3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 21:51:29 +01:00
Shane Kearns
d3c4296198 Fix socket binding on mingw builds
The mingw headers lack the IPV6_V6ONLY define, depending where you get
them from. Currently the headers provided by mingw-builds are more
complete than those from mingw.org itself.
I have removed the compile time check, defined the macro if it is
undefined, and it should be just a runtime check for if you are running
on windows XP you get no dual stack binding.

Task-number: QTBUG-28787
Task-number: QTBUG-28971
Task-number: QTBUG-28972
Change-Id: Iafadbb55d367c44ba9f812a24115e65591701b54
Reviewed-by: Ilya Sidorov
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-10 17:58:13 +01:00
Jędrzej Nowacki
1327ded747 Fix QVariant in a static build.
The patch cases registration of QVariant handler for widgets.

Task-number: QTBUG-28528
Change-Id: I645e8054bb96db0b92edf5df36f206ec1965ad40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-10 17:58:13 +01:00
Jędrzej Nowacki
0421769e36 Ignore WasDeclaredAsMetaType flag during binary check.
Nobody should break ODR, but we were living with apps breaking it
for at least 8 years. Sure it is an undefined behavior but in many
cases it works. I do not think that Qt should enforce usage of
a proper C++, it is role of a tool chain. Qt can only indicate that
something is going terribly wrong.

Make message a bit more verbose. Sometimes the ODR violation is not
that easy to fix, therefore a hint is a nice addition.

Update documentation of qRegisterMetaType.

Change-Id: I61dcccc840eec80a4ed5b8a212a912807d239d8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-10 17:58:13 +01:00
Leena Miettinen
700363c98c Doc: cleanPath also normalizes separators
Change-Id: I0e5c1cd45ad90fceaed931b7014b4542e8aaa9d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-10 17:58:13 +01:00
Jędrzej Nowacki
3b0ed62435 Protect Q_UNREACHABLE and Q_ASSUME by Q_ASSERT.
Both Q_UNREACHABLE and Q_ASSUME with an invalid condition can produce
really weird side effects and crashes.

Change-Id: I4d808c705ae98388ef5853e6539b70bd5e5ad34b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-10 17:58:13 +01:00
Mehdi Fekari
7ff47c7bfa Add an autotest for Canadian locale(dateFormat)
Change-Id: I68a91a418c418e113ecfe66769a7b3bc46de380c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-01-10 15:52:55 +01:00
Tor Arne Vestbø
aeefa4897f Don't assume QSurfaceFormat's stencil buffer size is >= 0
The value -1 is used to indicate no stencil buffer, so we have to check
for sizes <= 0 when deciding whether or not to triangulate the path in
QOpenGL2PaintEngineExPrivate::fill().

This fixes an issue where filling a path would end up filling the whole
outline of the path, which was very visible with fonts over a certain
size (when we go from using the glyph cache to drawing filled paths
for each glyph).

Change-Id: Iafa96124481936db1e5109bba6166a6038c7ca83
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-10 15:38:13 +01:00
Debao Zhang
ad3536b7ad qmake: Add application icon support for windows
A new qmake's variable RC_ICONS is introduced to specify the icons.
The first one will be used as the application's icon.

Change-Id: I4218db795837d470087dff8526eb0e4cb81ce5ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-10 15:13:46 +01:00
Sergio Ahumada
ef838063b1 qdoc: Fix some old links and references to Nokia
Change-Id: I06535a7e301c3986fb104b7092934e8925bacd39
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-10 14:53:04 +01:00
Andy Shaw
c40a1f6b2f Use pos() if the widget is a child of a native window
If the widget is embedded in a native window then pos() should be used
instead of mapToGlobal() so that the right position is used. This was
reproduced with the qtwinmigrate solution as the dialogs were not
centered correctly.

Change-Id: I2ce7771f8c1a73aa74ab11faf4f9c57b922eefab
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-10 07:09:56 +01:00
Jonathan Liu
724cb5d30f Support MinGW for CTest test cases
Change-Id: I581701f0b830292a21bc805da0398cbc96f82918
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-09 23:51:48 +01:00
Friedemann Kleint
fd372f3866 Update translucency correctly in QtWidgets.
Fixes breakage introduced by cdc436ebe6 .

Top level widgets with translucent backgrounds were invisible since
opacity was set to 0.

Task-number: QTBUG-28531
Change-Id: I97058ac1b971422f3bda3a5ffed479ec55bfe5d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-09 17:23:03 +01:00
Stephen Kelly
eebf42cc0d The executables always go into QT_HOST_BINS.
Task-number: QTBUG-28922

Change-Id: I7afaee292a0026d67866e4f1f711296adee8f8de
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-09 13:39:04 +01:00
Morten Johan Sørvig
90e4bc5fdf Compile in 32-bit mode.
CGRect == NSRect only in 64-bit mode.

Change-Id: I069b5b050ccf02654a65375c3ab0f58f7d5cc659
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-01-09 13:35:34 +01:00
Tor Arne Vestbø
be93c6aeb3 Don't scale 0-region or region without rects
Change-Id: Ieb523dadc5d726e26645b3a90652be95c2707ea8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-09 13:34:18 +01:00
Morten Johan Sorvig
4d670c5747 More explicit QCocoaAccessibleElement memory mngmt
Don't autorelease in the elementWithInterface function,
rename it to createElementWithInterface. The element
can then be released immediately or autoreleased ("delete
later").

Change-Id: I155a85404c34d756c1752eb7c24a7fb0f3cf2e77
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-01-09 13:09:42 +01:00
Sergio Ahumada
bbb9abf7fb tst_bic: Remove 'timex' class from linux-gcc-{amd64,ia32}
'timex' is not a Qt class, so there is no need to check it.

Change-Id: Ic77b3518e5a7eaf2c2bc7dcd98d1f9aebf4b655d
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2013-01-09 09:11:46 +01:00
Oliver Wolff
083d2c8bb8 Removed hardcoded values from tst_qgraphicsview::scrollBarRanges
Instead of testing the "windows" and "motif" styles, that test should
actually test the scrollBarRanges for all available styles. To be able
to do that, the magic numbers 16 (width/height of scrollbars) and 4
(spacing for the faux motif style) were replaced and instead of setting
the explicit values in the data the "number of scrollbars/spacings to
add/remove" is saved in a struct and the value of these (depending
on the style) is obtained in the test run.

This change does not also cause the fusion style to also be tested but
also fixes this test for Windows 7 and 8 (Aero) where the scrollbar
width/height is not 16 but 17.

Task-number: QTBUG-28611
Task-number: QTBUG-29002
Change-Id: I5d103018fde81cee6e6e89cd414426768b2dc8e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-09 08:59:26 +01:00
Thiago Macieira
05659223bf Rename qt_mips_asm_dsp.h to a "_p.h" header
It mustn't be installed and it mustn't be available in the master
include. It's an assembler header anyway.

Also, take the opportunity to add the "We mean it".

Change-Id: Id4233e5bda458714a0d329549afe499d861acc56
Reviewed-by: Adrian Perez de Castro <aperez@igalia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-09 00:01:57 +01:00
Thiago Macieira
932034b3df Define Q_COMPILER_AUTO_FUNCTION for MVSC
This definition was missing. It's clear MSVC supports this feature
because it has been in use in qtconcurrentrun.h under an #ifdef
Q_COMPILER_DECLTYPE, which is defined for MSVC.

Change-Id: Id76198b2be8bba13fd00c65d6d4f73d3ef601449
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-08 21:46:34 +01:00
Sergio Ahumada
d8a3bcc6c4 test: Add bic data for linux-gcc-ia32
Task-number: QTQAINFRA-321
Change-Id: I990f0c525fbd0b0b3818b0f7d86ed99438821baa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-08 19:50:18 +01:00
Andy Shaw
f6841d2583 Fix compile when QT_EVAL is defined
Change-Id: Id1acae0c5941e5409ca540017c0c0139e1cc4d2f
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-01-08 19:07:23 +01:00
Rafael Roquetto
0a977e36e0 Fix QNX QPA plugin clipboard impl
QQnxCliboard::setMimeData was not cleaning the system clipboard aproppriately
when m_mimeData != 0 but m_mimeData->userMimeData == 0, as it would return
early before the empty_clipboard() statement.
Also, we need to emit the dataChanged() signal after the clipboard has been
cleared as well.

Change-Id: Ie06609e6e3a0a0135f1cdb6cf4c90b490ef2fc28
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-08 19:05:24 +01:00
Friedemann Kleint
54fd35b134 Fix warnings about not being able to set Window geometry on Windows.
Fully decorated windows cannot be smaller than 160x30 (Large fonts).
Enlarge Windows or remove Window frame  to get rid of decorations.

Task-number: QTBUG-28611
Change-Id: Idb6ee94fb8d0760d5f97042b3084557f11e9fdf9
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 13:54:04 +01:00
Michael Brüning
41acb58f23 Add auto test for HTTP cache fix for QTBUG-28035.
Adds an auto test that verifies that the replies to POST and PUT
requests are not cached even though they contain a max-age header and
that subsequent GET requests are reloaded from the server.

Change-Id: I188ae1200cb5551e164722c0f479719be8d11bfb
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-01-08 11:13:27 +01:00
Oswald Buddenhagen
a36a19365c don't overquote deps on .pc and .la files
Change-Id: I00c268b1c0316b6deb0c4e1b2a0c7428e312c682
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-08 11:10:24 +01:00
Oswald Buddenhagen
2e35d63fae do not fixify + create QMAKE_{PKGCONFIG,LIBTOOL}_DESTDIR
these variables are somewhat magic: they are relative to DESTDIR, and
they also specify the installation location relative to target.path.
the actual output directories are created by other code.

Change-Id: Iead3006057516f5a49b6fd4bd8996a062c984fce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 11:09:52 +01:00
Debao Zhang
39795b1411 Replace macro qdoc with Q_QDOC
Both qdoc and Q_QDOC are used in source code, which looks not good.

Change-Id: I4f3a71670278b0758d92bfa5db086a07e1b1acfd
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-01-08 10:48:33 +01:00
Sergio Martins
742f0c6e0b Fix DnD when using QSimpleDrag.
qApp->topLevelAt() returns the QShapedPixmapWindow that the DnD
operation created, but what we want is the QWidgetWindow.

QWidgetWindow has the code to handle QDragMove events.

In Qt4, QShapedPixmapWidget had a parent, so was never returned
by qApp->topLevelWidgets().

In Qt5 we must filter it out. Bug is visible in the QNX plugin,
which is the only user of QSimpleDrag.

Change-Id: I920da86f3a1a92ce8e087f5948292fa4c68d4d81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-07 21:57:33 +01:00
J-P Nurmi
25ae390461 QWindowsVistaStyle: fix frame rendering
A regression caused by 79a389 - it should only draw a styled frame for
text input widgets.

Task-number: QTBUG-28876
Change-Id: I5cda920b7db55f35e0ab6cee460c0e27951d29b9
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-01-07 21:57:33 +01:00
J-P Nurmi
2c241d0604 Add QStyleHelper:isInstanceOf()
Task-number: QTBUG-28876
Change-Id: I343dff1c47c52e0431c09b6097da09f34e626f54
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-01-07 21:57:33 +01:00
Mark Brand
99e5496ff7 fix QMAKE_MAKE for qtCompileTest for cross building modules
Cross bulding on unix for mingw exploits the fact that makefiles
generated for mingw work with plain make. There is no mingw32-make, so
this is the only option.

Arguably, plain make could also be used in an MSYS environment,
perhaps detected by MINGW_IN_SHELL, but there might be good reasons I
don't know about not to do this.

Change-Id: I694c74046a307c2887af1c30cca36f95e242adc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-07 19:57:52 +01:00
Friedemann Kleint
64dab1c771 Fix warning about cast from ASCII.
Change-Id: I5434ece3b1bd0c56ca4481a68dd67e914715bc28
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-01-07 16:53:39 +01:00
Thiago Macieira
fa77402089 Fix warnings about unused functions
The operator<= and operator>= overloads for QPoint are used only with
Q_ASSERT. Clang was correct that they are not used.

Even though they are inline, Clang reports the functions as unused
because they were inside an anonymous namespace. So take the off the
namespace. They are correct for external use, should they be exported
by accident (which they aren't now).

painting/qpathsimplifier.cpp:76:13: error: unused function 'operator<='
      [-Werror,-Wunused-function]
inline bool operator <= (const QPoint &a, const QPoint &b)

Change-Id: I67415621e777fd0d59cbdede26c34d8bb13f7346
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-07 13:39:08 +01:00
Sergio Ahumada
a8321f21fb Add bic data for tst_bic
- Add initial set of amd64 data
 - Add QtWidgets to global.cfg

Task-number: QTQAINFRA-321
Change-Id: I9bffaa00ac01976546629988ac69965383eb2efd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-06 19:16:02 +01:00
Mehdi Fekari
33f603c4a3 Update qlocale autotest
Add additional tests for the updates in the Qt4.8 qlocale data (CLDRv2.0) already existing in Qt5 locale data (CLDRv22.1):

- The NumberingSystem for some Indic and Slovak locales.
- The Month/Day name in Irish/Gaelic locale.
- The AM/PM Text in Turkish locale.

Change-Id: Iaea4f13ec79f94ab937b97f8ae60eb8d8f217c4b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-06 14:29:48 +01:00
Stephen Kelly
cf22e8ea4e Tests: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Ifd116dee32a450ff89a9a1011e26b434765d6e95
Reviewed-by: David Faure <david.faure@kdab.com>
2013-01-06 11:23:45 +01:00
Sergio Ahumada
d376a4e578 configure: Remove left over for -nokia-developer option
This seems to be a left over from 52fc6694b8

Change-Id: Ib0d5868a099e53ec2c2af6be749a5496bbf1f145
Reviewed-by: Jeremy Katz <jeremy@panix.com>
2013-01-04 20:43:51 +01:00