Commit Graph

7918 Commits

Author SHA1 Message Date
Rohan McGovern
f4dd033f41 Fixed qsslsocket_onDemandCertificates_{static,member}
This test had been XFAILing since August 2011, but recently started to
XPASS, possibly due to changes in the SSL setup on the tested host
(qt.nokia.com).

Removed QEXPECT_FAIL and replaced qt.nokia.com with
codereview.qt-project.org as a host expected to have working SSL.  (If
SSL on the latter were broken, it would immediately be detected by
any attempts at git over HTTPS.)

SSL setup can be verified as working by:

  openssl s_client -CApath /etc/ssl/certs \
    -connect codereview.qt-project.org:443 </dev/null

Task-number: QTBUG-20983
Change-Id: I9b4146da6545ab4115d6308044b1d242dd52b7f9
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-06-28 02:18:42 +02:00
Friedemann Kleint
2858d85281 Widgets: Apply masks to native windows only.
Do not go searching for a parent window handle in
setMask_sys() as this causes for example MDI areas
to set masks that show the child only.
Fix breakage introduced by 8e280d1e18 .

Change-Id: I57de41d16985ebc8d3fc81153a671f2e2807b1eb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-06-27 14:43:00 +02:00
Thomas McGuire
20e2fd074a QNX: Add support for window states
Now QQuickView::showFullscreen() works as expected.
QQuickView has no fallback for platforms without window state support,
as opposed to QWidget.

Change-Id: I9c41fe563ea1f6d117eaebd3ea1db87465142b85
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-06-27 14:43:00 +02:00
Thomas McGuire
c196f89b7e QNX: Flush after changing rotation
This fixes a painting glitch where the window would stay in the old
position with the old rotation until it got repainted.

Change-Id: Id9de256b525760e8b32e55a87549efeccca151e0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2012-06-27 14:43:00 +02:00
Weng Xuetian
3dbd381e03 Also use x11FilterEvent for auto repeat key in xcb.
filterEvent for QPlatformInputContext is already used for auto repeat
key, x11FilterEvent also need to be filtered.

Task-number: QTBUG-25795
Change-Id: I3db87fdffdb5b01404047e905793ae6e10bb1e90
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
2012-06-27 14:43:00 +02:00
Albert Astals Cid
175c69108a Add const & to foreach 'iterators'
Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-27 14:43:00 +02:00
Stephen Kelly
1b6c83f7a3 Document that the object of a plugin must be default-constructible.
Change-Id: Iaaf56ec3bb0d2423c8ab5deb0627dc1357cee830
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-27 14:43:00 +02:00
Stephen Kelly
c4a05f5e3a Refactor the creation of imported targets into a macro.
This will make it easier to handle cases where the Qt installation
and the build do not match exactly. For example, on Windows, it
would be possible to do:

  ./configure -debug
  make
  make install
  make release
  make release_install

In which case, both debug and release libraries would be installed
even though it was only configured with -debug. On non-Windows, the
debug and release libraries would overwrite each other, so it is
not necessary to support it.

Similarly, we want to handle cases in the future where (on
non-Windows) both static and shared libraries would be
installed (again, not described with a single build configuration).

Change-Id: Ib7916c9664a0f72e40156a03bdfc79a4a6c24350
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-27 14:43:00 +02:00
Albert Astals Cid
7a0f14c569 Remove .values() call in foreach
foreach already knows how to iterate over the values without the need to create an intermediate qlist

Change-Id: I4622a36fbdbf536a75f26b42e32488a77d078f02
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-27 12:46:47 +02:00
Thiago Macieira
9a2dca09a3 Remove deprecated method from new class.
I'm pretty sure I've caught all uses of deprecated methods throughout
the Qt codebase, except for the ItemViews changes and for QtWebKit
(which must still compile with Qt 4).

Change-Id: Ic17801b71434fa41c647f97c9e5e4234ad4f9af0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-27 12:39:53 +02:00
Thiago Macieira
dc56fb18a7 Remove the extra warnings and -Werror from tst_qmimetype
Those belong in headersclean and nowhere else.

Change-Id: Ib7078ef3071266e4c03e3580068f978a9418cbf1
Reviewed-by: David Faure <faure@kde.org>
2012-06-27 12:39:53 +02:00
Friedemann Kleint
bc8cafcf64 Add QPA prefix and version number to QPA plugin factory interfaces.
The interfaces may change in Qt minor versions.

Change-Id: I43bc6245ddbba8232e00313bdc64e8e60c7eab6f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-27 12:39:53 +02:00
Miikka Heikkinen
3812af8ad0 Fix raising and lowering native widgets
Raising or lowering a native widget needs to raise or lower the
associated platform window, too.

Task-number: QTBUG-26344
Change-Id: Ib847d97df86857d92bcc4c9c0dd51219575d8db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-27 12:39:53 +02:00
David Faure
2246e48a76 Add QGuiApplication::setApplicationDisplayName.
This is for use in window titles.

Change-Id: I0070a08abd379ae2edcfab4413c182bd9e840678
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-06-27 09:23:15 +02:00
Shane Kearns
ae7e9a407f Add \since 5.0 to QDir::removeRecursively
Change-Id: I2392f26e666d5e01e71932f1afa48a65704f6d48
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-06-27 03:55:29 +02:00
ABBAPOH
8655f57bb5 Remove debug output
Change-Id: I07270211ee6f0439dc7249c8946795a68025828f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
2012-06-27 03:55:28 +02:00
jian liang
6bf119afc7 Workaround to compile configureapp.cpp with MSVC2010 x64
Remove a non-ascii character from configureapp.cpp to let it to be
compiled successfully with MSVC2010 x64.

Change-Id: I0b016630be49e8731cc438abca4ef959124138be
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-27 03:55:25 +02:00
Lars Knoll
3a8d7b0b9a Remove all references to XLFD fonts
XLFD fonts are no longer supported in Qt 5.

Change-Id: I83400dab417c933d5cd956c0d168c45b9d79dab7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-27 00:46:35 +02:00
Oswald Buddenhagen
989cada8cc don't compile the host tools for wince already in configure
qmake can now produce proper mixed-target projects

Change-Id: I797f055f6e1487b9aefb75eee91d6c2cc4e6e56e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-27 00:46:35 +02:00
James Turner
9315497d2a Convert QPA menus to use QIcon, and enable icons.
Icon support was disabled in QPA menus, now QIcon is in QtGui, convert the QPA interface, enable setting the icon in QMenu, and make the Cocoa implementation use it. (And fix a ref-counting leak if an icon is actually set)

Change-Id: Ica203bf6826b79d8beee58f39febc851b9633a66
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-27 00:46:35 +02:00
Shane Kearns
c0a0b37103 Implement RFC6265 test suite
Tests against the test data from the IETF working group
https://github.com/abarth/http-state

The test data is in the parser.json file, imported from that repository
and with one patch applied to make the ordering0001 test case data match
the raw files which are used by their python test server.

Task-number: QTBUG-18920
Change-Id: I17c1a8d92aef2850907f009667c6574e4c8d0cdb
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
3ff70a838b QNetworkCookie - ignore unparsable expires attribute
As required by RFC6265, if the date can't be parsed then the
attribute should be ignored but not the whole cookie.

Task-number: QTBUG-15794
Task-number: QTBUG-16798
Change-Id: I2ed2fbbaf2d00b194995349c24b174032a599703
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
cf29b7b967 Ignore empty domain attribute in cookies
As recommended by RFC6265.
This fixes the optional-domain0042 test case.

Task-number: QTBUG-15794
Change-Id: I6dd459797afcb52fa2a78437f8481f5abc6f3105
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
058fddd1c0 Use RFC6265 rules for cookie path & path matching
Url encoding of paths is no longer used. This matches the
current release behaviour of Firefox, Chrome and MSIE browsers.
RFC6265 does not allow this type of encoding.

This fixes remaining path test cases in the IETF test suite.
Currently the path0027 test is passed by Firefox but failed by
Chrome and MSIE, so there is a potential compatibility issue.
However it is a corner case with a malformed cookie.

Task-number: QTBUG-15794
Change-Id: I9b02bb5adc32d614f512d314d06f2c60894aa2b0
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
d76bd0d735 QNetworkCookie: Use RFC6265 rules for parsing Set-Cookie
The ';' separator takes priority even inside a quoted string.
Quotation marks have no special meaning, they are not parsed and
regenerated anymore. This means it is not possible to include
the ';' character inside a cookie value.
Other characters are returned transparently, including [",\]

Task-number: QTBUG-15794
Task-number: QTBUG-26002
Task-number: QTBUG-11641
Change-Id: I4eefef5c6ac7753d5a21c226169e264578521fe9
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
7b61e60676 QNetworkCookie - use RFC6265 rules for max-age
If unparsable, ignore the max-age attribute but process the rest of
the cookie normally.
If max age <= 0, set expiration time to "earliest representable time"
To keep this a safe value for conversions, time_t of 0 is used.

This fixes cases 0019 and comma0005 in the test suite.
Due to this change, cookies may be sent after they should have expired
in case the max-age was malformed. Previously they would have been
discarded immediately, which is more likely to break web services.

Task-number: QTBUG-15794
Change-Id: I7882af8eb37db156785e4e358ca639e90c94f8d0
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
57adc1761d QNetworkCookie - ignore unknown attributes
RFC6265 clarifies that unknown cookie attributes should be ignored,
including the version attribute which was defined by RFC2109 but
not used correctly in practice.

This fixes case 0008 in the test suite with minimal risk.

Task-number: QTBUG-15794
Change-Id: I6f15e8e5e2e5f1ed168fc733a5c84d606a452252
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
a32d6834ad qget test - fix null pointer dereference
If the server sends a redirect with no body, the file is null

Change-Id: I49fd1d8a4cdd404497ebef4c7f3b478960776896
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
74d3963c25 Change invalid test case (two cookies separated by ,)
Two cookies in a single Set-Cookie header are no longer allowed.
Check that this header is parsed according to RFC6265 rules instead

Change-Id: Ice48bbe78a9886208f7d1186cf1d8c37f46f1252
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Peter Hartmann
bd38ff3c54 QNetworkRequest autotest: adapt to new cookie parsing (re. commas)
Cookies cannot be separated by commas anymore, but are separated by
new lines.
See "Remove support for multiple cookies in one Set-Cookie header to
follow RFC6265."

Reviewed-by: Martin Petersson
Task-number: QTBUG-21456
(cherry-picked from 5d809703aa2d2a08ae7e9610fd42025b081d3d0c)

Change-Id: If7d1b4e58399a5d678495af6ff280409ba220e86
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-27 00:46:35 +02:00
Jocelyn Turcotte
297a25cc4b Remove support for multiple cookies in one Set-Cookie header to follow RFC6265.
This also allows cookie values to contain commas to increase compatibility like
most popular browsers do even though the RFC still reserves them for future uses.

Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Task-number: QTBUG-21456
(cherry-picked from 8ba781b01e900148fec2e9d26485369b3295487f)

Change-Id: Ib09ab2411dddf7f99de1c0c31680428b7412fc7e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-27 00:46:35 +02:00
Morten Johan Sorvig
e1402c0d27 Add a method for querying window activation status from QPA.
Add QPlatformWindow::isActive(), where the platform
can do further isActive tests, and Windows implementation for it.

Change-Id: I1acfc44d3a4ab36a3aaee52fb7b5f5b40661095e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-27 00:46:35 +02:00
Samuel Rødal
6874a33a75 Fixed missing way of choosing EGL renderable type with QSurfaceFormat.
This has been long overdue, since EGL now lets you choose between
desktop and ES based OpenGL. We also add OpenVG for those who want to
use raw OpenVG with a QOpenGLContext. The underlying EGL API for using
OpenGL / OpenVG is the same, with eglMakeCurrent() and eglSwapBuffers().

Change-Id: Ib0146b3fde5fe632069ebf99e7712f496ee7ea4d
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-27 00:46:35 +02:00
Jan-Arve Saether
cd853c0ad7 Remove some unused variables from QAccessibleWidgetPrivate
Change-Id: I22fd67d63131d48356023c26eb0689587ce96967
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-06-26 22:45:30 +02:00
Giuseppe D'Angelo
a2e65bc4d4 Fix QCOMPARE for QIcon in QtGui
There's no need of QtWidgets for using QCOMPARE on two QIcons, as
QIcon lives in QtGui.

Change-Id: I40c3d4aeb15fb95876449383d9e2dd1ad39aa5f9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-26 22:39:46 +02:00
Markku Heikkila
c508030c4a Clarified documentation for QStandardItem::parent()
Task-number: QTBUG-18785

Change-Id: I91ee8c3dc10c1484376a17e3f13794038d4a648f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-26 22:38:23 +02:00
Kent Hansen
f4b3fa305d Add QAbstractDeclarativeData::isSignalConnected hook
Similar to QAbstractDeclarative::receivers. This hook will allow
QObject::isSignalConnected(QMetaMethod) to return true when there are
QML-managed connections.

It's important that the hook is called from
QObjectPrivate::isSignalConnected(uint), since QML calls that
function.

Change-Id: I9c5e42f2b3e7f985af02905985a3a47101cdee05
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2012-06-26 22:38:23 +02:00
Debao Zhang
744a31fe2a tst_qtextscriptengine: make it compilable under MSVC2010
Source files which contain UTF-8 literals can not be compiled
by MSVC with Chinese/Japanese locale.

Change-Id: I5daa2e45c5e1ceb86da91e72288c24018c49c0f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-06-26 22:38:23 +02:00
Giuseppe D'Angelo
5211f45d58 Fix compilation for XCB-without-Xlib
Commit 6481218da1 broke the build by
removing the #ifdef XCB_USE_XLIB guards, but forgetting to port
Button1 to the XCB equivalent.

Change-Id: I9102feceb4deb0135ce0df318e46b35d1134a0b9
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-26 20:32:07 +02:00
Holger Hans Peter Freyther
8e5b6647a9 mkspecs: Use the right variable name to find the qdevice.pri
Commit 8b822825c5 introduced the
/get version but used the wrong variable name. Fix it by using
QT_HOST_DATA.

Change-Id: Ia4759b8c6ff2de9726f3aebae2f2f39c6644d4ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 20:02:55 +02:00
Robin Burchell
edcca18872 Don't try build devicediscovery if evdev is not available.
Fixes build on Android.

Change-Id: I1e6af972e8c29dd4c38773985e8f201064c2164f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-26 19:45:23 +02:00
Mitch Curtis
98803a76b3 Fix QIODevice warning when running rcc.
When opening a QFile on stdout, for example,
we must not call seek as it is a sequential device.
This has been flagged as a warning since commit Ie3a96d3a
and has resulted in spurious warnings being emitted.

In the case of opening a QFile in Append mode, QIODevice::open
already sets the position marker, so calling seek is redundant.
This is also true for the file engine's open function (called
through openExternalFile()), which also ensures the handle or
descriptor is repositioned appropriately.

Task-number: QTBUG-26104
Change-Id: I71040c399efe54e7538f54433368b432e959e08d
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-26 19:30:00 +02:00
Oswald Buddenhagen
003d294cd6 clean up specdir()
the only callers which used non-default arguments are gone now, so remove
the arguments entirely. this also enables us to re-enable result caching.

Change-Id: I62f76e17e531a4eeafddb9b29716ca0a0eb3dbea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-26 19:29:34 +02:00
Oswald Buddenhagen
851d666bcc fix -spec/-xspec argument re-assembly
the specs in Option are now only fixifiable absolute paths if an actual
path was passed on the command line - otherwise these are just names,
and we should pass them on verbatim.

Change-Id: I5b3535dadf2d6b2b3116331e6636f6e363a5361f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-26 19:29:23 +02:00
David Faure
61162c6e87 Add missing subdirs (the new QUrl unit tests were not compiled and run)
Change-Id: I1b39d92b8a14d5aeca957180858e1980a534894b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-06-26 14:53:46 +02:00
Giuseppe D'Angelo
0db3d6a247 Fix PCRE build under non-__GNUC__ compilers
PCRE's JIT has several paths that end in a #error under compilers that
don't #define __GNUC__.

This is because either
- those platforms were unavailable to PCRE devs so they were not tested;
- the #ifdef guards inline assembly fragments in GCC (AT&T) syntax;
- the #ifdef guards functions present f.i. in ARM's EABI and unavailable
  f.i. under WinCE.

This commit disables PCRE's JIT under ARM and MIPS unless __GCC__ is
defined. The MIPS #define from MSVC (_M_MRX000) is also dropped.

Change-Id: I59f959c321413845ffbdf1ac32740b400422e0ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-06-26 14:53:36 +02:00
Robin Burchell
92455dad4d Remove toRect_normalized().
Seems to have been unused since qt4's fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd.

Change-Id: I7ec88fb4ca8c1ffda469a1c048b4fea17ff042bc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-26 14:42:03 +02:00
David Faure
27d7d7c69e Fix warning when ibus is not available.
This is perfectly ok on a linux desktop, so no reason to abort when
setting QT_FATAL_WARNINGS.

Change-Id: I64ba987679195741631fb204af57ae3d283bb516
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-26 14:40:50 +02:00
Friedemann Kleint
8e280d1e18 QPlatformWindow: Add Window masks.
Add functionality for window masks to QPlatformWindow, which is
required to implement QWidget::setMask() in order to fix
the regression in functionality from Qt 4.8.

Change-Id: I2c2d5629f0b4c6d90e52595ad70b13559aab1f41
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-26 14:40:26 +02:00
Thiago Macieira
799f0841a6 Make QRegion not need to be friends with QVector
This hack was introduced in Qt 4.5 and the intention was to resize
(hopefully, shrink) the QVector without causing it to reallocate
memory. We can accomplish the same by reserving the size: until we
clear() or squeeze(), the container will not free memory.

Change-Id: I03a09537a617be0ce865eefa043005e4051e8706
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-26 11:57:51 +02:00