Commit Graph

3247 Commits

Author SHA1 Message Date
Thiago Macieira
790fe22c52 Autotest: check that the plugin was actually unloaded in QPluginLoader
Change-Id: I66d26da4e86add244d37ff670ad79ff2aff17ca1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-02-27 07:09:13 +01:00
Konstantin Ritt
996db96d5e Fix QString::toUcs4() returns incorrectly resized QVector
...when the string contains surrogate code points.

Task-number: QTBUG-25536

Change-Id: I07251fee641c14f33175678768ddbe551dbe2bb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-27 03:13:30 +01:00
Friedemann Kleint
176383f3ec tst_qfileinfo: Fix invalid preprocessor directive.
Introduced by 5ec342fefd .

Change-Id: I28f9e093567ef1abf3898146e7183a90888262ad
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-26 19:24:36 +01:00
Keith Gardner
3b5600f6ee QStringRef: Added toInt(), toUInt(), etc... functions to QStringRef.
Added the following functions to QStringRef: toShort, toUShort, toInt,
toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and toDouble.
These functions use the corresponding functions found in QLocale.
Updated tst_qstringref.cpp to exercise the new functionality.

Change-Id: I38668a0cc7da0c101a62613fd16cb5a98286617f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-22 21:23:33 +01:00
Olivier Goffart
03b2512598 Fix QMetaType of const references
This fixes QMetaType detection of const reference arguments in signals
while connecting using the new syntax and Qt::QueuedConnection

const references should have the same QMetaType as non references.
That means we need to remove the const reference while getting the
QMetaType.

Change-Id: I9b2688da7fb9ae985aec0d8fa62a1165357ffe71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-02-21 14:54:00 +01:00
Frederik Gladhorn
dcb710dd87 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/features/unix/separate_debug_info.prf
	src/gui/kernel/qwindow_p.h
	src/plugins/platforms/cocoa/qcocoacursor.mm
	tests/auto/tools/moc/tst_moc.cpp

Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
2013-02-20 22:08:29 +01:00
Friedemann Kleint
4606ea5395 QProgressBar: Use localized numbers and percent sign.
Task-number: QTBUG-28751

Change-Id: I56aca3e0ee9c579297110c69d2d832c7a57f1ae7
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Karim Pinter <karim.pinter@digia.com>
2013-02-20 08:15:26 +01:00
Tor Arne Vestbø
443380d97f Don't run qmake test that requires macx makespec on non Mac OS platforms
And update test to use the clang makespec now that it's the default.

Change-Id: Ifdd34c4220ad76f60b91fd6ef39d189f0f6525f9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 00:46:50 +01:00
Richard Moore
5ebc8d3663 Add an encrypted() signal to QNetworkAccessManager and QNetworkReply.
Add an encrypted signal to QNAM and QNetworkReply to allow applications
to perform additional checks on the certificate chain beyond those done
as part of the standard SSL validation. This allows things like
certificate change notification to be implemented for QNAM as they can
be for QSSLSocket currently.

Change-Id: I693e3e6fec8b7040379b7e7f1f819550e6b2617f
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:32 +01:00
Richard Moore
7898080ca7 Add support for intermediate certificates to server sockets.
Add intermediate certificates to our server sockets, and to our client
certs.

Change-Id: Ib5aa575473f9e84f337bebe35099506dd7d7e2ba
Task-Number: QTBUG-19825
Task-Number: QTBUG-13281
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:24 +01:00
Richard Moore
4a07519877 Store the local certificate in a QList.
Instead of storing a single QSslCertificate for a the local cert, store
a list of them. This will allow us to handle server sockets that use a
certificate that is not issued directly from the CA root in future.

Change-Id: I9a36b9a99daa9c0bdd17f61b4ce1a7da746f2e96
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-19 21:37:14 +01:00
Jan Arve Saether
18f9eb797b QStackedLayout: Fix crash when focus widget is destroyed in hide()
We also have to make sure that when moving back to a page
that has a focusWidget(), the focus should go to the focusWidget()

Task-number: QTBUG-18242

Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:07:14 +01:00
Jan Arve Saether
64106705e7 Clean whitespace
Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 21:06:53 +01:00
Tor Arne Vestbø
eb09f9b82c moc: Error out when detecting unterminated macro usage
Exhausting the symbol list while looking for the
final right parenthesis means it is missing.

Task-number: QTBUG-29308
Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-19 20:51:44 +01:00
Oliver Wolff
bf04283b4e Removed unneeded printsupport dependency from qpainter autotest
Change-Id: I906726a3d77572b9e054adbc68c4755dd663ad87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:21:03 +01:00
Oliver Wolff
1a6bea1ceb Check for printsupport module when building according auto tests
Change-Id: I9bade7b31c75331190960cb14dee6840e3582c50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:58 +01:00
Oliver Wolff
53dc49ffc8 Check for network module when building according auto tests
Change-Id: I68013bf8e07be8d202b3253f997d4f4db05335a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:53 +01:00
Peter Hartmann
165926c3ae SSL session sharing auto test: Retrieve smaller file for testing
The "mediumfile" is actually 9.6 MB large, and makes the test slow and
even fail on mobile platforms.

Change-Id: I694d9d38e4d09c8e90a03c1141320fe2a757fdd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
5ec342fefd Fix QFileInfo autotest for VxWorks.
No users/groups/symlinks on VxWorks.

Change-Id: I524a568202db2478b070b16a63ae425224c3aaa0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
7e8cc3b3ba Fix QFile autotest for VxWorks
No users/file permissions. Open function in VxWorks DKM
requires always three parameters.

Change-Id: I93fb075d82aa57e210e224bfe4ede40def82c275
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
10d077fa19 Fix QSettings autotest for VxWorks
No users/groups on VxWorks.

Change-Id: I88912c93fa59dc7c00bdbb973fc34ecd631b3316
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Morten Johan Sørvig
73d32873cf Cocoa: Add QMdiSubWindow size grip back.
Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 08:53:55 +01:00
Tor Arne Vestbø
3988ad95f7 moc: Error out when detecting unterminated macro usage
Exhausting the symbol list while looking for the
final right parenthesis means it is missing.

Task-number: QTBUG-29308
Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-19 07:55:39 +01:00
Keith Gardner
cfc09b6564 QLocale: Added QStringRef overloads to toInt(), toUInt(), etc...
Added the following function overloads to QLocale: toShort, toUShort,
toInt, toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and
toDouble.

Change-Id: I8cd90ca08b88338b08a73a72492f4c91c4f46ea4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 22:24:54 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Yoann Lopes
c7a51f1858 Added QOffscreenSurface class.
Inherits QSurface and allows to use OpenGL from an arbitrary thread.
Platform plugins can implement QPlatformOffscreenSurface, otherwise an
invisible QWindow is used by QOffscreenSurface.
This patch includes an implementation of QOffscreenSurface for XCB
and EglFS platform plugins using pbuffers.

Change-Id: I57b4fc1db417331f34826dcfa754b7698782fde4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-18 13:42:22 +01:00
Tor Arne Vestbø
0768920dbd Remove ifdefs for supporting Mac OS <= 10.5
Qt5 requires Mac OS 10.6, so we can remove checks such as
if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6

Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:31:54 +01:00
Giuseppe D'Angelo
e88011357e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-17 20:31:38 +01:00
Tor Arne Vestbø
2df8884bc6 Skip tst_QSslSocket::setReadBufferSize_task_250027()
It's flakey and is blocking integration. Tracked in QTBUG-29730.

Change-Id: Ia5b8f952314bf2e1aa6dbb5c5c0a97e32e68d0f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:31 +01:00
Tor Arne Vestbø
159f42222d Remove duplicated code for handling OpenGL extensions in QtOpenGL
We now re-use QOpenGLExtensions/Functions from QtGui in the same way
as QtGui uses these classes. There is still some duplicated logic
in qglfunctions.cpp, but this code now at least uses the shared
QOpenGLExtensionMatcher class.

Change-Id: Ie04008c43d430ae805e6ec1c45e7e363deeb3b8f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:30 +01:00
Israel Lins
776c488b6f QSqlResult: fix parsing of bound SQL statements
Parsing for bound SQL parameters now handles identifier quoting using
double quotes (") and square brackets ([]).

The following has only 1 bound value but previously 2 were detected:
SELECT 1 AS "A?b[?']]]de?ghi", ?

Task-number: QTBUG-27159
Change-Id: Icfd02187e1126ff3b5ed11df8d4e599f574e61bf
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-15 15:47:58 +01:00
El Mehdi Fekari
c2bdca2d54 QLocale: add autotest for tamil's AM/PM text
Change-Id: I67e572f16fcabd5833549286be20172e7f2a2337
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-15 15:46:57 +01:00
Frederik Gladhorn
e65cd6f379 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/concurrent/doc/qtconcurrent.qdocconf
	src/corelib/doc/qtcore.qdocconf
	src/corelib/global/qglobal.h
	src/dbus/doc/qtdbus.qdocconf
	src/dbus/qdbusmessage.h
	src/gui/doc/qtgui.qdocconf
	src/gui/image/qimagereader.cpp
	src/network/doc/qtnetwork.qdocconf
	src/opengl/doc/qtopengl.qdocconf
	src/opengl/qgl.h
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/printsupport/doc/qtprintsupport.qdocconf
	src/sql/doc/qtsql.qdocconf
	src/testlib/doc/qttestlib.qdocconf
	src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf
	src/widgets/doc/qtwidgets.qdocconf
	src/xml/doc/qtxml.qdocconf

Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
2013-02-14 14:24:57 +01:00
Samuel Rødal
733430636d Fixed crashes when using QImage in combination with QCoreApplication.
As long as fonts weren't used we supported using QImage in combination
with QCoreApplication in 4.x, and there's no reason we can't continue
doing so.

Task-number: QTBUG-29643
Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-02-14 10:55:33 +01:00
Samuel Rødal
17e8286fef Fixed mouse double click events not bubbling up to parent widgets.
The bug was caused by changes b371f3f943
and 3bb9024952, which removed the event
forwarding that QWidget::mouseDoubleClickEvent() used to do without
making sure to call ignore() on the event like
QWidget::mousePressEvent() does.

Task-number: QTBUG-29680
Change-Id: I98af8052ad3dd1dea15d07a710aa9212ef5e4a68
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-14 10:55:33 +01:00
Frederik Gladhorn
e432d53883 Only compile SSL tests when openssl is available.
Change-Id: I79fc705f30fb84e86bd7d674d90fbbe2d1a124ba
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-13 23:56:41 +01:00
Stephen Kelly
cc7239da8d Make it possible to use QPointer<const T>
This is possible with QWeakPointer, so allow it for migrating
code too.

In the process, replace the QPointerBase with a member variable for
simplicity. The functionality of the QPointerBase is replaced
by a TypeSelector template.

Change-Id: I3b4c77bdeda2b863cc33e84a3da8a25bae928c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-13 15:15:56 +01:00
Stephen Kelly
0fb979fe23 Remove QPointerBase bic check.
QPointerBase is not public or exported and it is to be removed
in Qt 5.1.

Change-Id: I060c6b2ebcde8dedde85dc21404fc393150d452c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-13 15:06:53 +01:00
El Mehdi Fekari
640374d052 QLocale: add autotests for Japanese and Czech locales
Change-Id: Id4351ab49bfbdf91b65ccb5153c5d01f53acdf72
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-12 22:47:14 +01:00
Giuseppe D'Angelo
d57731b0d7 QRegularExpression: print a warning if (?J) is used in a pattern
(?J) inside a pattern string can be used to allow or disallow duplicated
capturing group names in the pattern string itself.
Although PCRE supports duplicated names, in Qt we don't yet.

Change-Id: I21cd0c41273cd7ef42870ced3a0fad6ba7035cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-12 22:40:21 +01:00
Friedemann Kleint
9a74bbf34f Fix developer-build of qsslsocket_onDemandCertificates_member.
Do not include qsslsocket_p.h unless SSL is present.

Change-Id: I7e56b7758729907892d85f97d5a9d3ccaf7a3314
Reviewed-by: Peter Hartmann <phartmann@rim.com>
2013-02-12 17:56:10 +01:00
Samuel Rødal
62d25e4d4f Fixed QPixmapCache associating path with wrong QPixmap.
QPixmap::load() would not detach, so multiple paths could get associated
with the same QPixmap, causing the wrong pixmap to be shown.

Task-number: QTBUG-29639
Change-Id: I064dd6a9611b5996853bec9fb20b6224a0adcf62
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-02-12 15:21:57 +01:00
Samuel Rødal
23b11e792c Added QWindow::Visibility convenience API to QWindow.
This finally makes it possible to make windows fullscreen etc from
QML by doing "visibility: Window.FullScreen". I don't see any reason
from not having the API at the QWindow-level instead of at the
QQuickWindow-level since this way it can benefit other use cases too.

Change-Id: If27344306eb563bc2ccd83296a46b1f2862e2db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-12 15:02:53 +01:00
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
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
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
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
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