Commit Graph

4719 Commits

Author SHA1 Message Date
Frederik Gladhorn
ff334fd574 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-05-13 16:08:01 +02:00
Jędrzej Nowacki
ec4c93a852 Remove unsused local variables from tst_collections
Change-Id: I4ca1862d29432ca83b90024664b548ea0eef26c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Jędrzej Nowacki
ac660a0f8b Fix gcc warning in tst_collections.
warning: typedef 'Foo' locally defined but not used [-Wunused-local-typedefs]

Change-Id: Ifb1213414feb3aa5a5e46dac163e51ccd4925498
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Jędrzej Nowacki
36d5f80d97 Move tst_collections test to corelib/tools.
There is no reason to have the test separated from other tools tests.

Change-Id: Ie5b19961c383f5e4bc1ad4452cba7b92153fc303
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-13 16:08:01 +02:00
Frederik Gladhorn
b5552bab40 Merge remote-tracking branch 'origin/stable' into dev
Manually changed enum to LibGL in
    src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: If34ee6cce3d1d51fb4bb1fdfa59c30389ea0d207
2014-05-13 14:21:22 +02:00
Richard J. Moore
50e8e95385 Add support for loading PKCS#12 bundles.
Add support for loading certificates and keys from PKCS#12 bundles
(also known as pfx files).

Task-number: QTBUG-1565

[ChangeLog][QtNetwork][QSslSocket] Support for loading PKCS#12
bundles was added. These are often used to transport keys and
certificates conveniently, particularly when making use of
client certificates.

Change-Id: Idaeb2cb4dac4b19881a5c99c7c0a7eea00c2b207
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
2014-05-11 23:50:03 +02:00
Laszlo Agocs
0b5c0ad2ef Support adopting an existing EGLContext in eglfs and xcb
Add also a manual test application. For GLX there is an autotest since
that is likely to be run on one of the CIs. For EGL and especially
eglfs this is likely not the case so a manual test is better.

Task-number: QTBUG-37552
Change-Id: Ib09db5d909befb68d16f69abd401a56abe55f28a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-09 13:24:55 +02:00
Frederik Gladhorn
9cfdd66b64 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-05-08 20:31:31 +02:00
Jan Arve Saether
1677826916 Don't repeat Tab names in the QTabBar
Task-number: QTBUG-38503
Change-Id: I1f7e599b46526a8c4b8e0f3534be9c717727a4aa
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-08 16:51:24 +02:00
Friedemann Kleint
c82668d39d Speed up tst_QXmlSimpleReader.
Increase the chunk size of the server and remove hard-coded
interval when waiting for the server to listen.
Unmodified, the test takes 170s on Windows.

Change-Id: I65bdc93ff78e1b4fb429fcafd0fdc5e80bb281f9
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-08 16:06:11 +02:00
Friedemann Kleint
7a2547164d Fix tst_QStyleSheetStyle::toolTip().
Use the correct palette and enforce Fusion style to prevent
the Vista style from clobbering the tooltip palette in polish().

Task-number: QTBUG-38183
Change-Id: Id19d548f818d801c4914a343e08207195c343888
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-05-08 09:36:21 +02:00
Friedemann Kleint
ca17c06294 Revive tst_qstylesheetstyle on Desktop platforms.
Task-number: QTBUG-21468
Change-Id: I37f741d9709b17ad31b01078e10538f0f6bff01a
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-05-08 09:36:11 +02:00
Keith Gardner
43f52f93b5 Updated corelib's unit tests to use QSignalSpy's functor constructor
The intent is to provide compile time validation of signals and to help
detect signal overloading in the future.

Change-Id: I9d5d46ed4b70c5d0cd407deb5928b1e76d37e007
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-08 04:22:54 +02:00
Frederik Gladhorn
1326cd15f7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	mkspecs/qnx-x86-qcc/qplatformdefs.h
	src/corelib/global/qglobal.h
	src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
	src/opengl/qgl.cpp
	src/opengl/qglpixelbuffer.cpp
	src/opengl/qglshaderprogram.cpp
	tests/auto/opengl/qglthreads/tst_qglthreads.cpp

Change-Id: Iaba137884d3526a139000ca26fee02bb27b5cdb5
2014-05-06 16:50:03 +02:00
Friedemann Kleint
85aef2dd4b Fix visual index lookup in QTreeViewPrivate::adjustViewOptionsForIndex().
Determine the visual index by looking up the column of the QModelIndex
in the logicalIndices array instead of looping.

Task-number: QTBUG-37813
Change-Id: I5c3c73c67537877b03cdc2c36a52041d99f7f49d
Reviewed-by: David Faure <david.faure@kdab.com>
2014-05-06 16:35:56 +02:00
Friedemann Kleint
d915432c23 QFileDialog: Return empty QUrl from the static get..FileUrl() functions.
Task-number: QTBUG-38672
Change-Id: Idf554cd93d1a79db7c82f3165bd128fb31ead3e5
Reviewed-by: David Faure <david.faure@kdab.com>
2014-05-06 16:35:56 +02:00
Richard J. Moore
9b1746c499 Add autotest for the QSslCertificate QIODevice constructor.
Change-Id: I92fa083665509932b75ff1037904a6f78a950fd6
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-06 16:35:56 +02:00
Richard J. Moore
1d6695451f Add an autotest the QSslCertificate::version() method works.
Change-Id: Ife5b7206fd3d7af57cfca3c0f28f56bb53ede7a7
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-06 16:35:56 +02:00
Frederik Gladhorn
3b8d140558 Accessibility: Do not report popup for QLineEdit
Nothing else seems to report this state and on windows
for example it results in NVDA reading subMenu which makes
little sense.
Task-number: QTBUG-38500
Change-Id: I64820d9f2ea9174034f01da42cb2266a19c19465
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-06 16:35:56 +02:00
Liang Qi
feca69e89f Revert "Ignore tst_QStyleSheetStyle::hoverColors() failures on Mac OS X"
This test doesn't fail on Mac any more.

This reverts commit 36493a7a41.

Task-number: QTBUG-23685
Change-Id: Ib7c56494b07de9839b3287758fe228f799bc343c
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-06 07:38:24 +02:00
Thiago Macieira
fe70367fe0 Include the duplicated attribute name in the error message
Task-number: QTBUG-36467
Change-Id: Ic2610bd7c8df12fce4ec2ce14bd96f4595bd38af
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-05-06 01:20:19 +02:00
David Faure
31ce6f50c6 Add QUrl::fromUserInput overload with a cwd argument.
Useful for any application that can take URLs on the command-line, so that
full paths and relative paths can also be accepted.

Change-Id: I8a2c50f36d60bdc49c065b3065972fd5d45fa12a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-06 01:20:17 +02:00
Giuseppe D'Angelo
260f24228b QRegularExpression: add ways to force an immediate optimization
The fact that we kick in a pattern study and possibly a JIT compilation
after an undocumented number of usages is suboptimal, for a number
or reasons: users may want to JIT compile a pattern immediately,
and at the same time they may not want a random delay in the program
(due to the pattern getting optimized at a random usage).

So: add an optimize() call to force an immediate pattern optimization,
and a pattern option to force an optimization on the first usage.

Change-Id: I95efdecfd31f11ca7cceb9c05037df613601a11c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-06 00:10:55 +02:00
Frederik Gladhorn
9922dafb23 Use sched_yield instead of pthread_yield
sched_yield is standardized and on linux pthread_yield is implemented as sched_yield.
Building Qt for Android on OS X doesn't compile with the pthread version.

Change-Id: I1913afa83769805291e987f55b8f452299a43dce
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-05-05 22:40:49 +02:00
Frederik Gladhorn
e6286ca289 Merge remote-tracking branch 'origin/release' into stable
Manually fixed up: isES -> isOpenGLES
src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp

Change-Id: I57d2ef26c3d4a7b40ace09f4e8560b7686650ea5
2014-05-03 00:56:41 +02:00
Fabian Bumberger
721543e464 QNX: Fix QLineEdit autotest
Change-Id: I84c386a146dd484db844fa93165b28e19e4cefd7
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
2014-05-02 17:36:45 +02:00
Fabian Bumberger
637b6e1097 Ignore the fullscreen state of a QMdiSubWindow
On some platforms all windows are by default forced into fullscreen mode when show() is executed.
In QMdiSubWindow we cannot handle the fullscreen state and should ignore it. Otherwise
the window will be forced in "normal" state and ignore any previously
executed geometry changes.

Change-Id: I09ce6507a1eac6a0adb3405ca3f423642d30f801
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
2014-05-02 17:36:45 +02:00
David Faure
532b94e98f Add support for -qwindowicon command line argument.
[ChangeLog][QtGui][QGuiApplication] Add support for -icon command line
argument on X11, add -qwindowicon on all platforms.

Change-Id: Iacc602466699bf634d8b34aab7ed73c83fd9844f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-02 10:03:31 +02:00
Frederik Gladhorn
ccc6efb6e9 Merge remote-tracking branch 'origin/release' into stable
This merge adds the opengl rename.

Change-Id: I84ea0b6abee9780ebb2cf3f64ab9e3fdf2acab3e
2014-05-01 13:08:42 +02:00
Eskil Abrahamsen Blomfeldt
7eae50a52d Fix assert on justification of QTextLine with only spaces
In the justification code, we unconditionally subtracted one
from the line_length, but then compared the result to 0 afterwards,
so we did not support when the line_length is 0 initially, which
can happen if it only consists of spaces (in which case
trailingSpaces will be non-zero and line_length will be zero.)
The fix is to bail out for both strings of length 1 and length 0.

[ChangeLog][Text] Fixed an assert when justifying a QTextLine
which only contains spaces.

Task-number: QTBUG-38520
Change-Id: Ib04993f47eb2f9f7fc49c4a5400f18f9682a72f2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-30 18:23:33 +02:00
Simon Hausmann
12eb3b51c4 Fix incorrect repaints with plain text edit
The plain text edit's smart repaint logic in
QPlainTextDocumentLayout::documentChanged assumes that during a change inside
just one block, the block is in the state before the edit and a call to
layoutBlock() is going to bring it up-to-date. Then only a comparison of the
bounding rect - before and after - is going to allow for smart repaints.

The assumption of the layout being in the same state as before the edit got
broken by commit cc57a2e90f, which introduced
code to use a QTextCursor within a slot connected to QTextDocument's
contentsChange signal. The usage of the QTextCursor there ends up updating the
layout of the block ahead of time, breaking the assumption and therefore the
optimization, in the sense that during changes in the preedit that cause a
change of height / line count, the old bounding rect in
QPlainTextDocumentLayout::documentChanged and the new bounding rect will be the
same. This causes a repaint of only the edited block, missing repaints of the
following blocks, even though the line count effectively changed.

So what's causing QTextCursor to mess with the layout is the attempt of
updating the vertical movement x property. This patch inhibits the update,
marking it as dirty for initialization later. This means that slots connected
to this low-level signal cannot rely on the cursor's visual x position, but
that doesn't seem useful anyway and isn't required for commit
cc57a2e90f.

Task-number: QTBUG-38536
Change-Id: I5fae12d646a4b2d2cc22b9f2d021e5dc8cfdda94
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-04-30 18:23:23 +02:00
Friedemann Kleint
7e14e69fd5 Stabilize tst_QAbstractItemView::task250754_fontChange().
Increase window size when verifying that the scrollbar disappears
when using a small font on Windows 8.1

Change-Id: I7d4520bc5882d8ccd59db3f5bff7e9d6d68a4827
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-04-30 16:53:55 +02:00
Daniel Molkentin
ae7bbe3400 Provide new API: QSslCertificate::isSelfSigned()
Change-Id: I382a017a0b865b849667301aff8b2f87b676ecc6
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-30 01:30:08 +02:00
parihaaraka
f1eefd6cf9 Fix PSQL column's metadata
Fixed libpq's PQfmod() interpretation inside QPSQLResult::record()

Task-number: QTBUG-12477
Change-Id: I0e4c94ca1b06fd6a8e5b5702235cdd6d9736f8bf
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-29 14:42:26 +02:00
Friedemann Kleint
f3bc9f5c5c Add locations AppDataLocation, AppLocalDataLocation to QStandardPaths.
On Windows, DataLocation currently returns the value obtained by
passing CSIDL_COMMON_APPDATA to SHGetSpecialFolderPath(). This is
the local non-roaming path. For actually storing settings, the roaming
path should be used (CSIDL_APPDATA). Introduce new AppDataLocation to
return that path and AppLocalDataLocation for the local path and deprecate
DataLocation.

[ChangeLog][QtCore][QStandardPaths] QStandardPaths now has new
enumeration values AppDataLocation, AppLocalDataLocation to be able
to differentiate between roaming and local paths on the Windows
operating system. DataLocation is deprecated in favor of AppDataLocation.

Task-number: QTBUG-38483
Change-Id: Ib1de8c7031a863ed5eac10c747de6f7ff1a090c7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-04-29 12:28:16 +02:00
Friedemann Kleint
9f6a0300a5 Observe case insensitive file systems in QFileDialog::selectFile().
When stripping the root path from a file name that cannot be found
in the model, use case sensitive comparison depending on
file system.

Task-number: QTBUG-38162
Change-Id: I28e28973fca2da35a5768fdd00cc258b9669a15a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-29 03:27:26 +02:00
Frederik Gladhorn
386292837b Add press action to QAccessibleCombobox
VoiceOver expects press to open the combobox.

Task-number: QTBUG-37922
Change-Id: Iee7b7974db097e4e2444202c703bd587e1576fe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-28 22:25:50 +02:00
Laszlo Agocs
33d0a8d753 Remove direct OpenGL calls from QtOpenGL
Task-number: QTBUG-36483
Change-Id: I96dea5649c0a49a11cd2ff31da659cd2067e769d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-28 18:19:34 +02:00
Friedemann Kleint
d7d12bc1eb Fix crash when accessing QFileDialog::selectedFiles() before widgets exist.
Discovered while investigating:

Task-number: QTBUG-38414
Change-Id: I764195254ba4b54c86079c6e8ef750d6249960d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-28 13:47:40 +02:00
Israel Lins Albuquerque
3e6e70bddd [QSqlQuery] misbehavior of seek in special query positions
When QSqlQuery::at() == QSql::BeforeFirstRow and seek(1, true) (seek to
next record) is called the expected result is go to first row.
When QSqlQuery::at() == QSql::AfterLastRow and seek(-1, true) (seek to
previous record) is called the expected result is go to last row.

But in all cases the first and last are skipped.

Change-Id: I584138b3d397ce1c790bf89688ee92289a99611c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-26 20:22:42 +02:00
Peter Hartmann
8369f6d3ea QTcpSocket auto test: Temporarily disable Socks5 tests
... because they are too unstable. We can check whether they are more
stable once the new network tests server is in place.

Task-number: QTBUG-38385
Change-Id: I5ced7cc1f89290812aa88f174a41965fd2ef7252
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-25 10:55:31 +02:00
Frederik Gladhorn
dda9b5325f Add missing #ifndef QT_NO_SSL
Change-Id: I2912dcca77270582f6e989b8b3fb72b82f6f70d6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-25 10:55:31 +02:00
Jani Heikkinen
16501e32eb Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-04-25 10:55:31 +02:00
Laszlo Agocs
f9d323279a Rename new QOpenGLContext APIs
isES() becomes isOpenGLES(). The library type enums are changed
DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now
unnecessary version number, the confusing "desktop" term and provides
better readability.

The old function/values are kept until the related qtdeclarative
changes are integrated.

Task-number: QTBUG-38564
Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-25 10:07:45 +02:00
Friedemann Kleint
61ce16d25c Stabilize tst_qfilesystemmodel::rowsInserted() on Windows.
Introduce QTRY_COMPARE to let the sorting finish instead
of a hard-coded time-out.

Task-number: QTBUG-29403
Change-Id: I813bf6bcfe7110f49a5b95db589ed8a3f559db89
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-04-25 06:58:27 +02:00
Friedemann Kleint
403a9d97d6 Stabilize tst_qfilesystemwatcher::watchFileAndItsDirectory().
Use QTRY_COMPARE for dirChangedSpy, remove all unneeded
remove()/setPermission() calls (originating from the time
the test did not use QTemporaryFile), add more QVERIFY()
and messages for the other operations.

Task-number: QTBUG-30943
Change-Id: Ib3b78b1c6922539fd5e9238aa017fcdb554aacc8
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-04-25 06:58:27 +02:00
Friedemann Kleint
d8cd99992f Stabilize tst_qfiledialog.
selectFile(): Ensure dialog is destroyed before the temporary file
to prevent leak.

selectFiles(): Introduce scopes to prevent co-existence of 2
instances of QFileDialog, which causes warnings from file watchers
and occasional crashes in accessibility.

Discovered while investigating:

Task-number: QTBUG-38414
Change-Id: I94d2bb3e05538416286641cb08a88d8b3837a8a6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-04-25 06:58:27 +02:00
Olivier Goffart
89ecac4607 QSqlError: Mark deprecated functiond with QT_DEPRECATED
And move the default argument from the deprecated constructor to
the new one

Also make sure that the error number is consistent across the
two constructor

Change-Id: I3721266b39ab493f0add35b2d1f892b2f6094992
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-25 06:37:06 +02:00
Thiago Macieira
ec74461e9d Ensure we try the UTF-8 conversions with longer strings
The SSE2-based conversion only kicks in with strings with 8 characters
or more in length.

Change-Id: Ic1daad0845571be03547553cc001d83550f0c89c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-25 01:27:33 +02:00
Thiago Macieira
9a07ea69d6 Again to fix compilation after b0afad8f0b
Commit 125bb81bef wasn't enough. Let's
just make it simpler and use a regular function.

Change-Id: I9627dedaa87873b4b138224afd182e4fd9a55265
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-25 01:27:19 +02:00