Commit Graph

12171 Commits

Author SHA1 Message Date
Mark Brand
60c1f9f274 QSqlQuery tests: fix create table failures
Change-Id: Id20517cc68d03ac008650374fadd96cd6626d3fe
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-12 12:42:54 +01:00
Eskil Abrahamsen Blomfeldt
fe6add818e Enablers in fbconvenience for Android port
Additions to make the convenience classes work for the
Qt for Android port.

Change-Id: I25ba0faf93c7e09ab04a3fa0784e04631e5ab036
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-12 12:25:22 +01:00
Thorbjørn Lund Martsum
686dcce5fb Make QGraphicsViewPrivate::updateRubberBand more readable
This patch changes QGraphicsViewPrivate::updateRubberBand to return
at once in case some of the first conditions (which were needed to
do something with the rubberband) are not true.

The indentation after these ifs is fixed, and there are a few style
fixes, but beside the first 2 ifs, there are only white-space
and new-line changes.

Change-Id: I7e2edb7bfd334b35ee8ab246f733d854bff7e0f7
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-12 12:01:16 +01:00
Mark Brand
c6d522532a qpsql: fix spelling in comment
Change-Id: I3d1abd6041a4adf425ba7851146659655fc12183
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-12 10:59:25 +01:00
Mark Brand
46b7c91c81 QSqlQuery tests: fix bool test for postgresql
Change-Id: I60634f89841cbc81058588e435c6482c6c0efed6
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-12 10:56:00 +01:00
Mark Brand
f01caaf64a QSqlQuery tests: fix mysql problems
Change-Id: I82f4e6c8801c7a936b80ad72c229f915e6d2a4de
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-12 10:54:51 +01:00
Pasi Petäjäjärvi
8d2679673e Remove overlapping variable names defined in VxWorks headers
VxWorks has defined variables with same name as in Qt's headers.
Remove these undefines because that has already done in file
src/corelib/kernel/qfunctions_vxworks.h. See related change
f7bd8652ca.

Change-Id: I994ac9d00ca223b9fa955dfcba8ad6c8dcbd0549
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-12 09:40:48 +01:00
Pasi Petäjäjärvi
8840ad56a3 Use stub function rand_r for VxWorks DKM mode
Vxworks DKM mode does not have rand_r function, use function
implementation from qfunctions_vxworks.h/cpp instead.

Change-Id: I8f23c3453ab9f31280eb90f66dd83d7a64ee98c9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-12 09:40:48 +01:00
Samuel Rødal
1f5b10281f Document the QPainter::HighQualityAntialiasing render hint as obsolete.
It was only used in the now removed OpenGL 1.x paint engine.

Change-Id: I2237172de700bfd31ca25279fbed21d601785962
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-12 09:40:48 +01:00
Morten Johan Sørvig
784b965559 Cocoa: Export QImage <-> CGImage conversion funcs.
For implementing to/fromMacCGImageRef in QtMacExtras.

These do not depend on internal Qt state. The main
reason for exporting them is to keep the implementation
in one place to ease maintenance.

Refactor qt_mac_cg_context to support QImage.
Add qt_mac_toQImage.

Change-Id: Ia9c226ed52d087b2c6b47aa8210ed8f2645b9cf2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-12 07:50:03 +01:00
Mitch Curtis
4aa86461eb Ensure QDateTime can handle QDate's full range of julian dates.
Currently, using QDate::maxJd() in tests will fail. This patch changes
some ints to qint64s to prevent overflows where necessary.

Change-Id: I61ebf8f233411a7544689fd5bfa9c3abee54e933
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-12 07:29:36 +01:00
Mitch Curtis
86115848b5 Correctly detect HTML 5 charset attribute in QTextCodec::codecForHtml()
QTextCodec::codecForHtml currently fails to detect the charset for this
HTML:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9,chrome=1">
    <title>Test</title>
    </head>

This patch makes the detection of charsets more flexible, allowing for
the use of the HTML 5 charset attribute as well more terminator characters
("'", and ">").

I also added a *_data function for the unit tests.

Task-number: QTBUG-5451

Change-Id: I69fe4a04582f0d845cbbe9140a86a950fb7dc861
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2013-02-12 01:31:26 +01:00
Thiago Macieira
7abc1a6a82 Simplify a function to fix a warning reported by ICC
ICC thinks that the return statement is missing:
src/plugins/accessible/widgets/itemviews.cpp(867): error #1011: missing return statement at end of non-void function "QAccessibleTableHeaderCell::parent"

Clearly it's wrong, but the function is overly complex for no good
reason. So just simplify it instead.

Change-Id: Ic63029df18b4712d9864a4dc66b6751b2d4574b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-11 23:33:00 +01:00
Thiago Macieira
2d98bd48e5 Add Q_DECL_RESTRICT and Q_ALWAYS_INLINE for MSVC
Change-Id: I598463e5990e91a5a049d1f9f7a4aa80930c0904
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-11 23:33:00 +01:00
Thiago Macieira
f9f0f4aea5 Rename the Q_STATIC_INLINE_FUNCTION macro to Q_ALWAYS_INLINE
That's what the macro did anyway, except it had an extra "static"
keyword. This allows us now to use Q_ALWAYS_INLINE in non-static
contexts, if we wanted to (e.g., certain template cases).

Change-Id: I899d359f46234e93d1912ef9125080dc84e15c93
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-11 23:33:00 +01:00
Peter Hartmann
28d526db74 BB10 systemProxyForQuery: query system proxy also for non-URL requests
... like e.g. in QAbstractSocket::connectToHost().
We can set the scheme on the query URL based on well-known ports; even
if the port is not well-known, we can just query the URL anyhow and let
the netstatus API resolve the right proxy for us.

In addition, return early for local schemes like "file" and "qrc".

Task-number: QTBUG-29425
Change-Id: I900f1ecbac6dd380bb8a77470b39de2c07aa7f6e
Reviewed-by: Andrey Leonov <aleonov@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-02-11 21:36:19 +01:00
Mark Brand
00d8de8589 move QSqlResultPrivate to private header
Change-Id: Ice5464989530d521f65703daa080cb2094afef3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-11 21:23:48 +01:00
Oswald Buddenhagen
46f1c12b9e use install path as fallback when locating tools
all non-installed tools are properly registered, so they don't need the
fallback. conversely, we can assume that non-registered tools are
already installed.

this enables us to build docs in qtbase after an incremental
build+install up to qttools.

Change-Id: I95a55f6b84e01885bcf6dd656caf0dd2b679bb73
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-11 18:00:17 +01:00
Oswald Buddenhagen
d72e1e371b create tool pri file for syncqt
so that *really* all non-installed tools are properly registered.
if some day we have more build scripts, this code should be centralized
in a .prf file.

Change-Id: I5b292a4b30199cb59838319f2dc9f88cd54bb57d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-11 18:00:12 +01:00
Gabriel de Dietrich
d57e9b35c9 QPA Cocoa Menu: Make sure mouse button state is clean after popup
Calling popUpMenuPositioningItem:atLocation:inView: will swallow any
mouse up/released event, if we popup on mouse down/pressed. Since we
cache the button state in QNSView, the safest way seems to be to clear
this button state. Another option would be to send Cocoa mouse up
events for each mouse button, but we prefer to keep things simple.

Change-Id: I7f3f369c45e9f5ed9d2ab693bffd8be4a4596ae6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-11 17:51:24 +01:00
Jon Severinsson
34a3f2cd44 Allow QtTest's QCOMPARE to work with mixed q(u)int32 and q(u)int64
Change-Id: I491edcae84c149775cf3640626ccff8cbf0d69fe
Reviewed-by: Jon Severinsson <jon@severinsson.net>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-11 17:51:19 +01:00
Stephen Kelly
c21ed8ca1f Remove dead code from QPointer.
The compilers checked here are not supported in Qt 5. Additionally,
the QSharedPointer implementation has similar operators without such
guards, so in reality these compilers may not have worked
with Qt 4.6+ either.

Change-Id: I208f3cde7c689770ae15245a555e3a58b749a8a3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-11 17:51:16 +01:00
Andy Shaw
83e6d1fe60 Add support for getting the paper names available for the printer
Task-number: QTBUG-27714

Change-Id: I9bc6f1188f262e43f581add058d7895e1b5bd9e3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-02-11 17:50:56 +01:00
Stephen Kelly
b9c1593435 Fix regex for determining if a path is relative.
Change-Id: I3d638220e16c215b737417c2bf8de02ddf4a8199
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-11 15:17:07 +01:00
Friedemann Kleint
d180560e14 Fix QWindow::setFramePosition() to keep the size.
Change-Id: I14551e0d0573c2e8d86d76eadab4df9f3c8ed5e4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-11 15:17:07 +01:00
BogDan Vatra
78d4c949a4 Also copy checkable property to platform item
Add missing property copy statement.

Change-Id: Ic7cae46becd412194a490d0fe501ce6ebe2737a3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-02-11 13:32:44 +01:00
BogDan Vatra
c4b88b0540 Automatically hide the SIP
Change-Id: I4d63a883941842aed9a9c3806479d7aeeebb9f56
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-02-11 13:32:38 +01:00
Kai Koehne
c927d6b9e1 Rename function to fix symbol clash in static build
Rename qt_gl_read_framebuffer function to qt_gl_read_frame_buffer in
Qt5OpenGL. This fixes an error when linking statically against both Qt5Gui
and Qt5OpenGL:

Qt5Guid.lib(qopenglframebufferobject.obj) : error LNK2005: "class QImage
__cdecl qt_gl_read_framebuffer(class QSize const &,bool,bool)"
(?qt_gl_read_framebuffer@@YA?AVQImage@@ABVQSize@@_N1@Z) already defined in
Qt5OpenGLd.lib(qgl.obj)
   Creating library debug\composition.lib and object debug\composition.exp

The function was duplicated in 6e28e844 .

Change-Id: I9e3b78e0ec5b25264575d563538587b45cd93e86
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-11 12:29:05 +01:00
Frederik Gladhorn
7f15506548 Remove Nokia from ssl linking exception.
Change-Id: I559d4dd8789a249af855f6fe9bfe013ba1d77132
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-11 11:59:22 +01:00
Montel Laurent
c080f1f98a Remove unused variable
Change-Id: I3cef189a668f73c8599958b2c15bf140bd86d091
Reviewed-by: David Faure <david.faure@kdab.com>
2013-02-11 11:12:08 +01:00
Montel Laurent
6230873a65 Fix initialize variables
Change-Id: Iaebd03bebf38cddf84f163703e2820925b69c3d9
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-02-11 11:02:56 +01:00
Aaron McCarthy
0114a99bad Fix missing namespace macro warnings when building Qt Addon modules.
Addon modules may not be in the standard Qt namespace and therefore do
not use the QT_{BEGIN,END}_NAMESPACE macros.  Instead module specific
QT_{BEGIN,END}_NAMESPACE_FOO macros are used.  Extend the syncqt test
to allow for this and ensure that the QT_END_NAMESPACE suffix matches
the QT_BEGIN_NAMESPACE suffix.

Change-Id: I33110c01118b0fb4376307db7447f747fc38bb29
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-11 10:58:25 +01:00
Oswald Buddenhagen
42a6d405e4 exclude bootstrapped tools from lupdate message collection
the translation infrastructure is disabled in the bootstrapped tools, so
the translations are wasted.

Change-Id: Ief5d13f09242e03aaf0d4a3d9b1645f9c7a1ab3a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-11 10:57:46 +01:00
Morten Johan Sørvig
5a46251de3 Fix devicePixelRatio getter for embedded QWindows.
m_nsWindow is not set for non-toplevel QWindows,
causing devicePixelRatio to always return 1.

Use [m_contentView window] instead.

Change-Id: I6689a70812c9484f103b5e706fe4c1b76406b750
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-11 08:35:03 +01:00
Sze Howe Koh
26817211d2 Fix module name format in displayed code
Follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

QtDBus       -> Qt D-Bus
QtMultimedia -> Qt Multimedia
QtWidgets    -> Qt Widgets

Change-Id: I96a1523b37e294b10b203782074943c6ec55e34a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-11 01:43:21 +01:00
Stephen Kelly
5764f10323 When expanding up the tree, there is no need to expand above root.
The index set by setRootIndex is the root of the visible part of the
model. Expanding more than that is not needed.

Change-Id: I0015e313ef046ff63c67338c4f00c37e1aa71ca7
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-10 12:51:43 +01:00
Stephen Kelly
316d8ececa Don't duplicate the 'top-level' include dir in all modules.
This is the <prefix>/include directory which is independent of the
module and which only has to be used once. As everything uses QtCore,
it is enough to set it only there.

The CI system is a special case, in that it tests things before
installation. Handle that case too.

Change-Id: Idcdf9617e199b7d490cb3553cce07f1f464b3bec
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-09 19:35:25 +01:00
David Faure
b61cff8d6e qprocess autotests don't need QtGui
(this isn't true of -all- corelib/ autotests though, e.g. tst_qdatastream
uses QBitmap)

Change-Id: I314fda5d85d45cb5eece8da74156989b83cf0299
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-09 18:44:41 +01:00
Tor Arne Vestbø
98a286cbde Fix segfault when setting a device-pixel-ratio on a null-QPixmap
Change-Id: If3680766a50d5cf78889822d740c9472123191a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-09 17:59:23 +01:00
Mark Brand
8fd7d46b3a QSqlResult::savePrepare() simplify logic
Change-Id: If0b54a4c17f1c71c2bb33ae4d514ad6a9cc17e4c
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-09 17:37:15 +01:00
Thorbjørn Lund Martsum
137906da8e QGraphicsView - remove not needed storeMouseEvent
updateRubberBand is only called from mouseMoveEvent.
The event is not changed. At the end of the event
we call d->mouseMoveEventHandler which calls
storeMouseEvent. There is no need to call it twice.

Beside that this patch also changes the argument
from QMouseEvent* to const QMouseEvent*. The only
reason it needed to be const was the call to
storeMouseEvent.

Change-Id: I01148a6a8d36e782c4d95a90e36435e20b1681e1
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-09 15:58:09 +01:00
Richard Moore
20bde28448 Add support for SHA3 to QCryptographicHash.
This commit adds SHA3 support to QCryptographicHash. Two implementations
are provided, one optimised for 32 bit and one for 64 bits. The code has
been written to make it easy to add further implementations, for example
ones using NEON instructions on ARM.

Change-Id: I3be9c45bbd4fcc2771d697e7f7ae74e48a831e8f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-09 15:58:09 +01:00
Stephen Kelly
aac82954da Include the CMake Extras file and the Macros file only once.
As the Extras file can do things like append to a property (as in
QtCore for include directories), that is something that should be
done only once when the QtCore target is first defined.

Change-Id: I5163912bccfda1ff43a02eb01f67ac59e6f6b24b
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-02-09 15:24:13 +01:00
Samuel Rødal
d1acaf2b1c Fixed QOpenGLFunctions feature/extension detection to check GL version
If the GL version is new enough the extension string won't contain
features that have been standardized. So far we only check for FBOs.

Change-Id: Ib29826f378b394894885717c062872581bd5c9f5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-09 13:55:00 +01:00
Erik van Pienbroek
3798b129c0 Try harder to locate external OpenSSL libraries on win32
When OpenSSL is built using MSVC then the library names are
named ssleay32.dll and libeay32. However, when OpenSSL is built
with GCC then different library names are used like libssl-10.dll
and libcrypto-10.dll (depending on the version of OpenSSL used)

Change-Id: Icb79a5f82d2a511752bfc904f53a58423ce4b86b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-09 13:35:28 +01:00
Peter Hartmann
916f0ff663 QUrl effective TLDs: update table and split into chunks of 64K
The table is there to know which domains are allowed to set cookies
and which are not. There are more than 2000 new entries since the
list has last been generated.
The split to 64K chunks was made because this is the hard limit for
strings in Visual Studio.

Change-Id: I511aec062af673555e9a69442c055f75bdcd1606
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-09 10:12:44 +01:00
Marcel Krems
2e9caa8942 SSL: Use correct signature for SSL_get1_session
This fixes a compilation error with GCC 4.7
which was introduced in b5652df775
In function ‘SSL_SESSION* q_SSL_get1_session(const SSL*)’:
invalid conversion from ‘const SSL* {aka const ssl_st*}’ to ‘SSL* {aka ssl_st*}’ [-fpermissive]

Change-Id: I909f7fb4295b2019283a7af66a038d4711e5f7cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-09 03:01:04 +01:00
Israel Lins
6c151605bc QSqlResult: consolidate SQL parsing for binding
Consolidated SQL parsing for binding values, removing repeated code.

Change-Id: I77aadcfd2673b067f7deb52b826d7b5a2ba2ae2a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-09 01:39:54 +01:00
Mark Brand
f03d4bdae8 QSqlResult: note in doc about misnamed method
Change-Id: I488a915622445527c529b35db639ec3b6e887d1d
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-09 01:39:54 +01:00
Mark Brand
93ed02e3b1 fix QSqlTableModel:revert() for OnFieldChange
revert() should operate in OnFieldChange edit strategy just as
submit() does. The reason in Qt 4 for excluding OnFieldChange
was that there was no opportunity to revert. The model was
refreshed, causing all changes to be lost. In Qt 5 a failed
edit remains in the cache until user action, which could be
to revert.

Change-Id: Ide021c4f83a53834b7ed81f2abfa3aa49317704d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-09 01:39:54 +01:00