Bradley T. Hughes [Tue, 29 May 2012 05:14:23 +0000 (07:14 +0200)]
Remove unnecessary forward declaration in std namespace
qiterator.h doesn't use std::bidirectional_iterator_tag or
std::random_access_iterator_tag, so remove the forward declarations.
(These actually confuse clang when building with C++11 support enabled).
Change-Id: Idd0daa0840a0995e6e5b0ffc01ddcdf06f048149
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thiago Macieira [Thu, 24 May 2012 14:45:11 +0000 (16:45 +0200)]
QtDBus: compile with QT_STRICT_ITERATORS
Unlike most other modules, QtDBus in its use of QVector also needs to
check if the item isn't null, which makes for some special changes.
Change-Id: Ia22ad2a6b26c9c34dc09ab882d81323a941d166a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Thiago Macieira [Thu, 24 May 2012 14:08:54 +0000 (16:08 +0200)]
Make qdoc compile with QT_STRICT_ITERATORS
Change-Id: I2923315678d1aef516b35a8c83fe734367723a28
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Giuseppe D'Angelo [Fri, 11 May 2012 00:58:30 +0000 (01:58 +0100)]
QtOpenGL: remove \link usages
Change-Id: I34509eaf87a91bf31a78b08c91d9a57e704d8989
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Giuseppe D'Angelo [Fri, 11 May 2012 00:55:56 +0000 (01:55 +0100)]
QtXml: remove \link usages
Change-Id: Ifcf1e66bad04e312c29de623fee47fabb91cc108
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Giuseppe D'Angelo [Fri, 11 May 2012 00:53:30 +0000 (01:53 +0100)]
QtWidgets: remove \link usages
Change-Id: I9887a24485233f29d07054b3110d4db9e499b9f4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Giuseppe D'Angelo [Fri, 11 May 2012 00:47:46 +0000 (01:47 +0100)]
QtGui: remove \link usages
Change-Id: Ib8cca14a8fa35fbc631bfea9b4873225eac3677f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Giuseppe D'Angelo [Fri, 11 May 2012 00:38:45 +0000 (01:38 +0100)]
QtCore: remove \link usages
Change-Id: I0de764b51a972de0b6eb2bf3c04d2b190f581f52
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Rohan McGovern [Tue, 29 May 2012 06:20:22 +0000 (16:20 +1000)]
Set explicit testcase.timeout for slow tests
We'd like to decrease the default timeout for tests in the Qt Project CI
so that we waste less time waiting for hanging tests.
Tests which genuinely take a long time to run, such as these, should
have their timeout explicitly set in their .pro file.
Change-Id: I4fe6249e9efa764b230251d73a1115c24411e168
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Rohan McGovern [Tue, 29 May 2012 00:18:51 +0000 (10:18 +1000)]
Make tst_qfiledialog2 closer to parallel-safe.
Use a QTemporaryDir instead of the system-wide temporary directory.
The test is still not entirely parallel-safe (at least on X11) due to
requiring the shown dialog to have keyboard focus.
Change-Id: I628dc6ab52dda49f6957a301eea8944bb9d81453
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Rohan McGovern [Tue, 29 May 2012 00:58:41 +0000 (10:58 +1000)]
Make tst_selftests parallel-safe.
Use a QTemporaryDir for temporary files, instead of the current working
directory.
Change-Id: Ifeb2944238f785a1f7beb0dc2a7c1e092d121db5
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Rohan McGovern [Tue, 29 May 2012 01:11:12 +0000 (11:11 +1000)]
Mark tst_qsharedpointer as parallel-safe.
This autotest seems to be parallel-safe. It was not marked as such due
to an issue which rarely causes the test to hang on exit on Windows, but
that appears unrelated to whether or not the test is run in parallel.
Change-Id: I30bac75be3ddc14139594605481eb6af3f6795e7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Rohan McGovern [Tue, 29 May 2012 04:08:07 +0000 (14:08 +1000)]
Marked tst_qmake as parallel-safe
This autotest fails a parallel-stress test because it writes into its
own source/build directory. However, by inspection, it appears not
likely to cause issues with any tests other than itself.
Change-Id: I13789ba14bab240d34c22c5b77d6407995423afc
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Bradley T. Hughes [Wed, 23 May 2012 08:26:07 +0000 (10:26 +0200)]
QMutex: de-inline lock(), unlock(), and tryLock()
See the discussion of this topic on the mailing list:
http://lists.qt-project.org/pipermail/development/2012-May/003943.html
The consensus is to not have these methods have inline code to actually
acquire the lock (i.e. no atomic test-and-set or similar). QBasicMutex
is unchanged, and continues to have inlined lock(), tryLock(), and
unlock(). QMutexLocker has been changed to always call QMutex::lock()
(even though the constructor takes a QBasicMutex parameter).
Change-Id: Ic7d2d9d581e6b254c84fdfdd8ce6c425535a8078
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Rohan McGovern [Mon, 28 May 2012 23:54:13 +0000 (09:54 +1000)]
Make tst_qfilesystemmodel parallel-safe.
Changed one testfunction to use the test's own QTemporaryDir instead of
the system-wide temporary directory.
Change-Id: I6740a7f4ba7f53174cd0730239d8dc088e5111ba
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Rohan McGovern [Mon, 28 May 2012 23:33:15 +0000 (09:33 +1000)]
Make tst_qnetworkreply parallel-safe.
Ensure we always use a unique filename when writing to test files.
The test already contained code for this, but it was not applied in a
couple of places.
Change-Id: I1e29ee162c390e014688ab46e3658e2a463d203e
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
John Layt [Fri, 25 May 2012 18:28:37 +0000 (19:28 +0100)]
QtPrintSupport: Change QPrinterInfo::defaultPrinter() behaviour
In Qt4 QPrinterInfo::defaultPrinter() has inconsistant behaviour
depending on the platform. On Mac and Unix if no default printer
is set in the system then the first available printer is returned.
but on Windows it returns a null QPrinterInfo.
Currently Qt5 returns the first printer on all platforms, but this
causes an inconsistency if you call isDefault() on the returned
QPrinterInfo.
The apidox is slightly ambiguous, but does seem to imply no printer
will be returned if no default is set.
The only place in Qt the public api is used is in QPrinter which is
coded expecting that defaultPrinter() may return null but for there
still to be availablePrinters().
Change-Id: I1bbef8cba259b7d51980a0199e9fd6d5466d921f
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
John Layt [Fri, 25 May 2012 19:24:50 +0000 (20:24 +0100)]
QtPrintSupport: Fix QPrintDialog assert
Fix an assert that wasn't changed when the "Print to PS" option was
removed
Change-Id: Ife7350976707059861660a74dc2f89d302d861f0
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Jiewen Wang [Fri, 25 May 2012 13:41:03 +0000 (09:41 -0400)]
Eliminate QTreeWidget drag crash
In QTreeViewPrivate::adjustViewOptionsForIndex() wrong index had been
used when referencing to array of viewItems. Variable row is set to the
index of the QModelIndex, however it is not as same as the index in
viewItems[] when there was hidden item in treeWidget. Index of viewItems[]
should be used here. Unit test is added as well.
Change-Id: Idc7eda979e7d09c5a07bd6dffd92b7abbac10e67
Task-Id: QTBUG-25333
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Rohan McGovern [Thu, 24 May 2012 08:05:55 +0000 (18:05 +1000)]
Add CONFIG+=parallel_test to suspected parallel-safe tests.
These tests have passed a parallel stress test on all three of Linux,
Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run
them in parallel, saving time.
Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Rohan McGovern [Mon, 28 May 2012 00:33:26 +0000 (10:33 +1000)]
Marked tst_qprocess insignificant on mac
tst_qprocess::lockupsInStartDetached sometimes locks up on mac.
Mark this as a known issue.
Task-number: QTBUG-25895
Change-Id: I08b1bcf39f2bf373e74509a06415d9ba514b8993
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Jędrzej Nowacki [Mon, 21 May 2012 08:13:24 +0000 (10:13 +0200)]
Replace QVariant::typeToName usage by QMetaType::typeName call.
Type information is kept in QMetaType class. QVariant is delegating
operations, so it is better to use QMetaType directly.
Change-Id: I91209fa1c9dc4303d6bd47c96824d3cd64ce5291
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mitch Curtis [Mon, 21 May 2012 08:30:58 +0000 (10:30 +0200)]
Fixed unused function warning in qtextdocumentfragment test.
Change-Id: I74bb961bf23c4ca1e8e5dc77e870d43fcecc5c09
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Simon Hausmann [Sun, 27 May 2012 19:37:44 +0000 (21:37 +0200)]
Fix compiler warnings when simply including qgraphicsscene.h
Commit
02b80ebb52b957ae65cc23f5c9464633d9de868d marked itemAt(x, y) and
itemAt(point) as deprecated, causing a warning when code calls the function.
Unfortunately the itemAt(x, y) overload calls the itemAt(point) overload,
causing a compiler warning even when not using any functions from
qgraphicsscene.h at all.
This commit fixes itemAt(x, y) to not call itemAt(point) but use the
non-deprecated items() function directly.
Change-Id: I9c4d3a070d65f3406cdab00345c56d4fc62e76c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Gatis Paeglis [Wed, 16 May 2012 13:24:24 +0000 (15:24 +0200)]
Fix To-Do's in QGraphicsScene.
Mark obsolete functions with QT_DEPRECATED.
Task-number: QTBUG-25092
Change-Id: I89d9e508479b75ad2d8bf131c69f6158b71fcda8
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Gatis Paeglis [Wed, 23 May 2012 10:04:17 +0000 (12:04 +0200)]
Qt 5 to-do in QXcbKeyboard
Rescheduling to Qt 6 since Qt 5.0 was decided to have as little source incompatible changes as possible.
Change-Id: I47cd3e236dd90717efb287aef8fbbedacea1bc0f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Gatis Paeglis [Tue, 22 May 2012 18:08:00 +0000 (20:08 +0200)]
Fix Qt 5 to-do's in QGraphicsProxyWidget
Task-number: QTBUG-25091
Change-Id: Ic4160f90f69167d40ee1e569562d25eb009615aa
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Mitch Curtis [Thu, 24 May 2012 08:42:44 +0000 (10:42 +0200)]
Clarify QByteArray::size() documentation.
QTBUG-25438
Change-Id: I8cf9bfb295195548b6f7d4410682e4d675181a65
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Johannes Zellner [Fri, 25 May 2012 17:07:11 +0000 (10:07 -0700)]
devicediscovery: add more sophisticated discovery
Detect devices based on bit testing through evdev ioctl api. As this is
for the udev replacement, the bit testing is done similar to what udev
does. The current keyboard detection is based on testing if the KEY_Q is
available. This might be adjusted in the future.
Change-Id: I3f4176681a351e33d90a1425f1afedc8ce3640b8
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Sean Harmer [Wed, 25 Apr 2012 12:16:24 +0000 (13:16 +0100)]
QNX: Adding native file dialog support for Blackberry
This patch enables use of native file dialogs in the application
modal case.
The native file open dialog is reasonable but the native file save
dialog could do with some improvements to make it more usable.
Perhaps providing our own "native" dialog UI would be an option
once the widget style is finished.
Change-Id: If5fb7cf73d27e52db7bfa6d97d8f8fb7912960bb
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Thiago Macieira [Thu, 24 May 2012 14:42:11 +0000 (16:42 +0200)]
Itemviews: compile with QT_STRICT_ITERATORS
Just a few mixed up iterators.
Change-Id: I19f62457ee24bc844fadd182ba61866e259e9636
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Tasuku Suzuki [Wed, 16 May 2012 20:16:10 +0000 (05:16 +0900)]
Fix xcb plugin compilation for -qconfig large
Change-Id: I1ee1fb9c140396e83272d607ee4dd63ce2c50b8d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Konstantin Ritt [Wed, 23 May 2012 13:35:07 +0000 (16:35 +0300)]
Declare typeinfo-s for QLatin1String, QStringRef, and QCharRef
Change-Id: I05e0f866c632f2a7e966e6bae9c73eeb77d99217
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Wed, 23 May 2012 02:02:13 +0000 (05:02 +0300)]
Replace `const QCharRef &` with `QCharRef` where appropriate
in order of consistency with QChar
Change-Id: I8a7cf8960eb64ef177113d4569f1c49ae31c828e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Wed, 23 May 2012 00:49:57 +0000 (03:49 +0300)]
Replace `const QLatin1String &` with `QLatin1String` where appropriate
Task-Id: QTBUG-24502
Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Wed, 23 May 2012 13:31:10 +0000 (16:31 +0300)]
Move QLatin1String up to QString
This is needed for the change that follows
Change-Id: I05611defe422fa4bbb5be27b102e39b1f61a1cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Fri, 11 May 2012 15:41:56 +0000 (18:41 +0300)]
Centralize C-string and QByteArray string length calculation
QString::from{Ascii|Latin1|Utf8|Local8Bit} does the string length calculation for us,
so let's use that and don't repeat the copy-paste bugs like the previous commit has fixed.
Change-Id: If0bced3ebaf75b56dde6be1266c47c3fbf89dab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Fri, 11 May 2012 15:35:33 +0000 (18:35 +0300)]
QString: get rid of public qStringComparisonHelper()
Unify all it's overloads into a single private helper functionand use this new helper
where possible - so we could optimize all those operators in one step some later
(this also fixes `QBytArray("a\0b") < "a"` didn't respect the \0 while operator==
handles nul(s) correctly);
Add operators <,>,<=,>=(const char*) to QStringRef so that they doesn't create a temporary QString object;
Add missing QT_NO_CAST_FROM_ASCII
Change-Id: I8b6562a92fdb96e67aadee181f23f823d206f5fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Konstantin Ritt [Mon, 21 May 2012 12:51:37 +0000 (15:51 +0300)]
Move ScriptSentinel enum from header to .cpp
Change-Id: Ic74e8e2471e92aa2014735f6ab0bb4f3b88de206
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Thiago Macieira [Thu, 24 May 2012 14:43:38 +0000 (16:43 +0200)]
Gestures & events: compile with QT_STRICT_ITERATORS.
There are a few mixed up iterators that needed cleaning up. We're
missing a constUpperBound and constLowerBound function, though...
This commit sneaks in one change to qtextformat related to
QT_STRICT_ITERATORS but not to gestures and events.
Change-Id: I8c7c840fb5f46c790adbf52952c6009c5b5f2f43
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Friedemann Kleint [Fri, 25 May 2012 10:50:21 +0000 (12:50 +0200)]
OpenGL/HelloWindow example: Fix resource leaks.
Change-Id: Icf776b5581b3a632e8cef19af1059503146c158c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Jiewen Wang [Fri, 25 May 2012 12:13:11 +0000 (08:13 -0400)]
QStatusBar::showMessage will always take new timeout
There is a message check in QStatusBar::showMessage causing the call exits
early if the new 'message' is the same
as the current message. The check has been removed, and new timeout will
always take effect. Unit test is added as well.
Change-Id: I3a03c6842835824caba4adc37c3ed834952c4bb2
Task-Id: QTBUG-25492
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Friedemann Kleint [Fri, 25 May 2012 10:59:47 +0000 (12:59 +0200)]
XCB/EGL: Free display.
Fix valgrind reporting resource leaks.
Change-Id: I4c2038f61b63dc5b6bc0c7eca43f0f339ddf723a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Friedemann Kleint [Fri, 25 May 2012 14:36:42 +0000 (16:36 +0200)]
Fix warnings about unused variables.
Change-Id: Ie95f032981d2ce68b1193725ab55ac207d187525
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Tarja Sundqvist [Fri, 25 May 2012 05:39:08 +0000 (08:39 +0300)]
QTBUG-16850: QLineEdit::setSelection removes blank characters
Changed checking of the start position so that it does not call d->control->text() because this removes blank characters when an input mask is used. Thus the
selection fails. Instead d->control->end() is used for checking the start position.
Task-number: QTBUG-16850
Change-Id: I62992fb81bd47d432bade9f219782d48eb309956
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Konstantin Ritt [Fri, 25 May 2012 03:23:15 +0000 (06:23 +0300)]
Fix potential access beyond the array end
addNextCluster() advances position up to "end" that equals to
eng->layoutData->string.length() if current script item is the last one
Change-Id: I173286f3002c9c64dd1a89b902958699b6273d68
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Martin Smith [Thu, 24 May 2012 10:23:59 +0000 (12:23 +0200)]
qdoc: Fixed pure doc parser
This parser was meant to parse any file for
qdoc comments only, ignoring everything else
that is not inside a qdoc comment. But it
wasn't doing that. It was parsing all code,
regardless of the language, using the C++
parser. Now it has been corrected to look
at qdoc comments and skip over everything
else.
Note thast this means qdoc will expect a
qdoc topic command in each and every qdoc
comment in the file. The posiution of the
qdoc comment with respect to the code it is
meant to document is not taken into account
in the pure doc parser. This is in contrast
to the QML and C++ parsers which do take
comment location into account in some cases.
Change-Id: I0804a4149baa942b463e0b6990c71e4039ac1a50
Reviewed-by: Keith Isdale <keith.isdale@nokia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Tasuku Suzuki [Sun, 20 May 2012 12:38:16 +0000 (21:38 +0900)]
Fix QtCore compilation for -qconfig large
Q_UNUSED(encoding) line removed because the variable is not declared.
translate() removed because the function is previously implemented.
Change-Id: I24da0105d72635ea19b26439776416655f3213df
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Girish Ramakrishnan [Mon, 21 May 2012 22:41:55 +0000 (15:41 -0700)]
eglfs: use GL API directly in QEglFSCursor
The upcoming hardware cursor support for pi requires the cursor
code to render with it's own context. This is because the cursor
rendering happens in the input event (gui) thread which may be
different from the the scenegraph thread.
Currently, Qt can be informed about the current opengl context by
using QOpenGLContext::makeCurrent(). All of Qt's helper OpenGL
classes complain if that function has not been called. Usage of
makeCurrent API requires a QSurface. A big rewrite of EGLFS is
needed to make such a QSurface (QEglFSWindow) available to the
cursor code. There is no other way around this since Qt
has no other API to inform it that an opengl context is active.
The solution is not use Qt's OpenGL helper classes and use GL API
directly.
Change-Id: If47030d9a289686ebf2e758f90445323d1733dc0
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Oswald Buddenhagen [Mon, 21 May 2012 12:17:43 +0000 (14:17 +0200)]
fix QT_GCC_*_VERSION definition after exception option removal
sometimes it pays off to actually check where variables are used ...
Change-Id: Ia91c89cb963ace50f432c54ffe5f57366ccd5603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Sean Harmer [Thu, 24 May 2012 10:03:43 +0000 (11:03 +0100)]
QNX: Rationalise the usage of qDebug() to remove lots of #ifdef's
Change-Id: I097e4af86a6a0941f4fd7e122970f88ba536ab38
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
Morten Sorvig [Fri, 25 May 2012 09:51:54 +0000 (11:51 +0200)]
Add Mac OS 10.8 QSysInfo enums
Change-Id: I79ce06ead836478ff6816e6631742db91ba256fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Stephen Kelly [Wed, 7 Mar 2012 22:35:51 +0000 (23:35 +0100)]
Fix comments to refer to the root, not the top level.
Change-Id: If0fc8a18973a2fe15197437734f15f3d445d1b6c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
John Layt [Fri, 11 May 2012 20:58:15 +0000 (21:58 +0100)]
QtPrinterInfo: Improve QPrinterInfo Testing
Much of the current QPrinterInfo tests fail due to being dependent on
specific physical or network printers being attached. This change
removes all printer specific tests and replaces them with generic
tests that will use whatever printers are installed.
Note if no printers are installed then the tests will still pass. A
later change will add virtual printers to test returned results are
correct.
Windows test code is also required and will come later.
This does not yet remove the "insignificant" status from the test,
further improvements and code fixes are still required.
Change-Id: I60802445924edb126aadf78337a8cb6f2f3b3d37
Reviewed-by: John Layt <jlayt@kde.org>
Stephen Kelly [Wed, 7 Mar 2012 22:42:33 +0000 (23:42 +0100)]
Fix some spelling errors.
Change-Id: I1f730c843e77d68ab17715175af53da577cb3695
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Donald Carr [Thu, 24 May 2012 17:58:53 +0000 (17:58 +0000)]
Introduce a Snowball mkspec to the device specs
Change-Id: I7aa2f1a719c424079d7f0d7b3410f293cee05fa9
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Thiago Macieira [Wed, 23 May 2012 14:03:40 +0000 (16:03 +0200)]
Make QLocale "unload" the ICU libraries upon exit
Right now, valgrind reports that there is some reachable memory in
QLibrary because we don't call unload() in the libraries we loaded. So
do unload() them.
Unfortunately, ICU seems to have some global statics it doesn't free. If
we really unload the libraries, valgrind will report a leak. So use the
PreventUnloadHint, which causes libdl to not actually unload the
libraries.
Change-Id: I273f09627e27b9116366ddc427e1f3f53ea0f61a
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Mitch Curtis [Wed, 23 May 2012 13:56:33 +0000 (15:56 +0200)]
Write QList unit tests for movable, complex, etc. types.
Change-Id: I641ada39f7c84cd221ec1e235cdb0c86270d49fc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Corentin Jabot [Thu, 17 May 2012 08:35:32 +0000 (10:35 +0200)]
Implement QWindow::setWindowIcon
Since QIcon has been moved back to QtGui, QWindow::setWindowIcon can
use it. That way, the api is exactly the same as in QWidgets and one
can deal properly with multi-sized icon.
I added a getter so the api is consistent with QWidget
(Maybe there should be properties for windowIcon and windowTitle)
Change-Id: I2f463dbe39673f41a3201ef8fed27b3fcac2125f
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Rafael Roquetto [Mon, 7 May 2012 09:55:30 +0000 (11:55 +0200)]
Implementation of the Blackberry bearer engine.
An implementation for Blackberry devices based on the BPS netstatus APIs.
Change-Id: I2c019efecb7296b6db626b626d4618ded4d3df37
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Miikka Heikkinen [Thu, 24 May 2012 10:55:34 +0000 (13:55 +0300)]
Windows: Fix verbose debug output
The isEmpty() check for environment variable contents was inverted.
Change-Id: Ic220f4eed9e45539d6e89fe1e0d37976f7757eda
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Friedemann Kleint [Thu, 24 May 2012 13:53:09 +0000 (15:53 +0200)]
QtWidgets: Fix QT_FLUSH_UPDATE for Windows.
Change-Id: I09fd1ca6e7691b326760b83aad612e9a26717379
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Sean Harmer [Wed, 23 May 2012 11:01:11 +0000 (12:01 +0100)]
QPA: Refactor QFileDialogPrivate::qt_clean_filter_list for QPA
Allows QFileDialog and QPA plugins to access this helper function.
Needed by the Cocoa and QNX plugins. This commit fixes up the
Cocoa plugin. The QNX support will be in a follow-up commit.
Change-Id: I8dd08a9f3dc27d85edd0dc9dad9629406c1e677a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Girish Ramakrishnan [Wed, 23 May 2012 15:50:03 +0000 (08:50 -0700)]
-device: remove redundant check for empty CROSS_COMPILE
Remove the check from ST7540 and PNX8473 specs since
it's already checked in deviceSanityCheckCompiler
Change-Id: I2accb12f9e692e253f76194ca68b1f4cc673a833
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Kevin Ottens [Tue, 22 May 2012 11:08:27 +0000 (13:08 +0200)]
QNX: Recreate EGL surface when the window geometry changes
Change-Id: Ic578e9c3f4d8f70bcac0d95f59942cd2724aee51
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Kevin Ottens [Tue, 22 May 2012 11:07:13 +0000 (13:07 +0200)]
QNX: Make sure calls to (create/destroy)Surface are symmetric
As a matter of fact also reduces state duplication with QQnxWindow
by getting rid of m_surfaceSize.
Change-Id: I47f5af0f00a317d3bb246c0c9161e2219fbd3263
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Kevin Ottens [Mon, 21 May 2012 10:55:03 +0000 (12:55 +0200)]
QNX: Advertise geometry changes to Qt event system
Some QWindow subclass rely on those events to be sent to know when
the window geometry changes (e.g. QQuickCanvas).
Change-Id: I16d3928803d09761f265544fdf10a5d080fccc17
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Kevin Ottens [Tue, 22 May 2012 15:36:13 +0000 (17:36 +0200)]
QNX: Force windows resizing when the screen orientation changes
Change-Id: I82e464df86b55f04498a8f6f5c1cc5011cac0bd6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Kevin Ottens [Mon, 21 May 2012 10:52:26 +0000 (12:52 +0200)]
Provide convenience method to resize maximized windows
Maximized/fullscreen windows geometry should follow screen geometry,
so provide a convenience method implementing this behavior. It is
meant to be used in platform plugins where the platform doesn't
automatically resize said windows on screen geometry changes.
Change-Id: Id9128fee1ddf587a7d96aa294d2d1e6eb6d6d11b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Morten Johan Sorvig [Wed, 23 May 2012 10:31:39 +0000 (12:31 +0200)]
Add QMacPasteboardMime::count(QMimeData*).
As QTBUG-25076 points out, the ### comment indicates
that we want to add virtual function to
QMacPasteboardMime.
The default implementation returns 1. Reimplement
for QMacPastebardMimeUrl and return the url count.
Change-Id: Ie300574eab9991af625986805d2b030914291cc0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Samuel Rødal [Thu, 24 May 2012 12:02:31 +0000 (14:02 +0200)]
Compile fix for kms platform plugin.
Change-Id: Ieed141c390920d118f8bb34fa884574ba308d23e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
Thiago Macieira [Wed, 23 May 2012 13:57:06 +0000 (15:57 +0200)]
Use the QT_STRINGIFY macro
This macro is now left defined from qglobal.h, so we don't need to
redefine it everywhere (and risk getting it wrong).
Change-Id: I2a11d10fe0434b85e79d0dda5f11fa90e2edc431
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Kent Hansen [Mon, 21 May 2012 11:15:28 +0000 (13:15 +0200)]
Populate MetaData:Keys for compat plugins
QFactoryLoader::indexOf() expects the meta-data to contain a Keys
entry, if there were any keys. For compat plugins, the result of
the plugin's keys() function should be stored here.
Change-Id: Ifd04f90cbfce2598d71548c469baa55ca6b0b338
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
John Layt [Mon, 14 May 2012 19:17:16 +0000 (20:17 +0100)]
QtPrintSupport - Modify Platform Plugin QPrinterInfo api
Change the way the printsupport plugin creates QPrinterInfo
objects, provide platform api to return a named printer, and
expose this as static public api in QPrinterInfo.
Only the Mac plugin used the old api, the other plugins will
have direct support added in separate commits, but will use
the default implementation for now.
Change-Id: I7d6b6556eb39919cfb15bc0e814afbaf13c5712c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Johannes Zellner [Mon, 21 May 2012 22:41:58 +0000 (15:41 -0700)]
udev: UDevHelper becomes DeviceDiscovery
Rename QUDeviceHelper to QDeviceDiscovery and add a static device
discovery fallback in case we dont have udev. The fallback so far only
scans /dev/input/event* and /dev/dri/card* at startup and detects device
nodes only by device path.
Change-Id: I7a423910b30ae16a10d8f1f47b86c6b4d2c2ec36
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Pekka Vuorela [Tue, 22 May 2012 14:09:28 +0000 (17:09 +0300)]
Initialize member variable in QXcbWindow
Change-Id: Iddf3f70ae2cb7be0703c0084da87e41412ad1d06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Holger Hans Peter Freyther [Tue, 15 May 2012 17:03:56 +0000 (19:03 +0200)]
bcm97425: Fix linking the directfbegl QPA plugin
directfbegl requires libQtPlatformSupport to provide some EGL
helper functions. Enable EGL by adding it to the QT_CONFIG variable
in the qmake.conf.
Change-Id: I80d3163d9da4b9eb232aea72ba7d4388453f8247
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Martin Petersson [Wed, 23 May 2012 12:39:27 +0000 (14:39 +0200)]
QNetworkReplyHttpImpl: code cleanup
When the QNetworkAccessHttpBackend was merged into the
QNetworkReplyHttpImpl there was some code and comments comming from the
backend that was left in the new class. This removes some of these
leftovers from the QNetworkAccessHttpBackend.
Change-Id: Ifa118160438e2740fb9bf52907066096d8de9ae7
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Rohan McGovern [Wed, 23 May 2012 02:53:57 +0000 (12:53 +1000)]
tst_qmetatype: avoid slow compilation with some MSVC2010
MSVC2010 32-bit (with and without service pack 1) takes about 1 hour to
compile this file in some builds, since
1c7421ad14f9321422cdfeede3902552a34ccf3b.
Avoid the relevant portion of the code just for these compilers.
Change-Id: Icbb4fa12a6d563a7cdc882c30cdb5705675bedb0
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Friedemann Kleint [Tue, 22 May 2012 13:25:02 +0000 (15:25 +0200)]
Fix compiler warnings in QtGui, QtWidgets.
- Unused variables.
- Deprecated headers.
Change-Id: I8fb5d5f2cc02aca145a8c857358527592b7491ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Friedemann Kleint [Wed, 23 May 2012 13:04:16 +0000 (15:04 +0200)]
QEGLPlatformContext: Add accessors for display and config.
Change-Id: I4a7c033691ed83698ac161c034f795f1ac3b0ade
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
John Layt [Mon, 14 May 2012 19:27:21 +0000 (20:27 +0100)]
QtPrintSupport - Fix Mac printerName() use
Mac in Qt4 and 5 has been using the PMPrinter Name for the QPrinter
and QPrinterInfo printerName() value, but this is incorrect. This
is in fact the CUPS Description field, is in human readable form
and is not guaranteed to be unique. The CUPS Name field is the
PMPrinter ID value and should be used as the unique identifier
when accessing printers. This has worked up to now due to an
undocumented feature in the OSX api that accepted the Name when
the ID should be used.
Changing all uses of PMPrinterGetName to PMPrinterGetID fixes this
and allows the QPrinterInfo test of names to pass without
munging the names.
Change-Id: I25322aa1a924bed9f67f4ad5e208274c8b700e17
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Kevin Ottens [Mon, 21 May 2012 10:51:17 +0000 (12:51 +0200)]
QNX: Post orientation change events
Change-Id: I4dc13e5388e065c2425641c7efabcdee8f94800e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Girish Ramakrishnan [Wed, 23 May 2012 18:08:09 +0000 (11:08 -0700)]
remove exec-bit from qplatformmenu.h file
The file was added with 'x' bit incorrectly in 1f55af8.
It was then changed to the correct mode in
6af65edcb.
But it got back the 'x' bit again in 98dbaec.
Change-Id: I55f267935c17e133ad593f027f795a9ec381fcaa
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Jonathan Liu [Wed, 23 May 2012 05:46:35 +0000 (15:46 +1000)]
Enable extra warnings for win32-g++ mkspecs
Change-Id: I09d6ed18007f29bad84e757f2916c6f7323e5b44
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Holger Hans Peter Freyther [Wed, 23 May 2012 15:59:42 +0000 (17:59 +0200)]
devices: Allow to pick up the compiler from the path
Re-enable checking if the compiler is in the path. The previous
commit dealt with a user/spec author not setting CROSS_COMPILE and
then picking up the host g++. Re-add the 'which' check, but put it
after the sanity check for the CROSS_COMPILE variable. This check
assumes that QMAKE_CXX is of the form "${CROSS_COMPILE}g++".
Change-Id: I54f7e058a75d26d73eca5a860946a6854ce91d67
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Laszlo Agocs [Wed, 23 May 2012 12:38:22 +0000 (15:38 +0300)]
Fix wrong local positions in mouse events when no tlw was given
Calling handleMouseEvent() with w == 0 implies that the local position
is bogus and instead it should be calculated from the global position
once the target window is known.
Change-Id: If173d0570f6dcc8b7bc5d6f21fa1f69d06d9d702
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
aavit [Tue, 22 May 2012 08:59:17 +0000 (10:59 +0200)]
Allow QHash randomization to be disabled by environment variable
The new randomization of QHash is enabled by default. There may be cases
where you need deterministic behavior, e.g. for debugging or regression
testing. This patch disables randomization if QT_HASH_SEED is defined.
Change-Id: Idfad55ea7aba830add0a36334f0f763c62fdce13
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Shane Kearns [Tue, 22 May 2012 14:05:00 +0000 (15:05 +0100)]
QAuthenticator - test NTLM SSO and normal paths separately
Single signon code path gets the NTLM responses from the system,
so we can't predict the contents.
Task-number: QTBUG-25851
Change-Id: Ia8aa1741ae5af9e48643331bf9a3768550a30166
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Shane Kearns [Mon, 21 May 2012 14:19:50 +0000 (15:19 +0100)]
Fix deprecated API warning
Check for blacklisting in case the application has blacklisted
a cert before windows has (currently unlikely as the blacklist is
hardcoded in Qt)
Don't need to check for time validity because that's already checked
by the windows API.
Change-Id: I34da5c4a8a0f8851b9b7668fc421a93c360c8588
Reviewed-by: Richard J. Moore <rich@kde.org>
Mitch Curtis [Tue, 22 May 2012 14:27:47 +0000 (16:27 +0200)]
Clarified code documentation for QFileInfo::operator==.
QTBUG-4031 mentions that canonicalFilePath() will cause the operator
to return true for the following comparison because it returns an
empty string if the path is empty or non-existant:
QFileInfo("") == QFileInfo("non_existant_file")
I'm assuming that the reason for not checking whether one of the files
exist is based on performance, and so I've updated the comments for the
operator to explicitly state that the result of the above comparison is
undefined.
Task-number: QTBUG-4031
Change-Id: I9b34f189f1628f9362b3604445706abd2342fd6e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mitch Curtis [Tue, 22 May 2012 14:08:08 +0000 (16:08 +0200)]
Removed size comparison in QFileInfo::operator==.
QTBUG-4031 and QTBUG-4036 mention that QFileInfo::operator==
includes a size() comparison as part of its equality check. I've
removed this check as it doesn't seem to be integral to the comparison.
Task-number: QTBUG-4031
Task-number: QTBUG-4036
Change-Id: I5663ec0e1ac8f70e0a156357c284696779ecd380
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Jiang Jiang [Tue, 22 May 2012 12:36:25 +0000 (14:36 +0200)]
Fix font rendering gamma correction on Mac
It needs a 2.0 gamma (as in Qt 4) in platform plugin styleHint.
Change-Id: I2286532c607554c41baee4fa348cd7899bf010e1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
David Faure [Tue, 22 May 2012 15:43:50 +0000 (17:43 +0200)]
Fix handling of invalid urls in QDataStream << QUrl
When given an invalid url, the output shouldn't be a valid url.
KDE's kurltest detected this regression compared to Qt4, where
all invalid urls were empty in toString() -- but we don't want that,
to give as much feedback as possible to the user.
Change-Id: Ie53e6e1c0a1d4bb9e12b820220dfb7e2f7753959
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Jędrzej Nowacki [Mon, 7 May 2012 08:05:35 +0000 (10:05 +0200)]
Fix warning about unused variable in tst_qvariant.
Change-Id: I9e713aa6a2033c5c4cd4b97bbd4ebb461d46962a
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
Jocelyn Turcotte [Tue, 22 May 2012 11:23:26 +0000 (13:23 +0200)]
Add a missing pointer initializer.
This causes a crash when using QGraphicsWebView with a GL viewport.
Change-Id: I64bdcfe8cd4d8ed7794188c1df08f9028479f8d4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Bradley T. Hughes [Tue, 22 May 2012 11:41:50 +0000 (13:41 +0200)]
Cocoa: Handle keyboard dead keys correctly
Some keyboard layouts have physical dead keys (like the ¨ key on a
Norwegian keyboard). These do not send any text, so we should not use
[NSString characterAtIndex:0] if the string is empty. When encountering
an empty [NSEvent character] string, use Qt::Key_unknown and
QChar::ReplacementCharacter.
Change-Id: I7281aa9ea6005341c0dcfa5900bfe601e4eac6a9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Tue, 22 May 2012 11:38:19 +0000 (13:38 +0200)]
Cocoa: Avoid UTF-16 to UTF-8 to UTF-16 conversion in key handling
When coverting NSEvent characters to a QString, use
QCFString::toQString(), which copies the UTF-16 characters out of the
NSString into a QString (instead of converting to UTF-8 and back again
on each key press).
Change-Id: I78f7c46e75283b7b51c762fd7f22e351ac068072
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Bradley T. Hughes [Mon, 21 May 2012 09:26:12 +0000 (11:26 +0200)]
Cocoa: don't send input method events for basic text input
When receiving keyDown events on the Mac, we pass them to NSView's
interpretKeyEvents method, which ends up calling our insertText method.
This means we end up sending input method events for most text input
(instead of normal key events). While this is not wrong, it is
unexpected, and different form how Qt 4 works.
Change insertText to do nothing if no preedit string has been set when
handling a key event. For normal text input that does not need input
method handling, we can simply return and let handleKeyEvent send key
events instead.
Our insertText implementation has to take care to not ignore calls from
outside key event processing (such as the user input characters with the
Character Viewer). As a result m_keyEventsAccepted changes to
m_sendKeyEvent to let insertText know whether or not insertText was
called via handleKeyEvent.
Change-Id: Ie8c2eb67f6a8438f08442f9ff48f2027a041ca23
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Fri, 18 May 2012 14:00:55 +0000 (16:00 +0200)]
Fix surrogate pair handling in QCoreTextFontEngine
The number of glyphs returned should take surrogate pairs into account.
The glyphs array and advances array as well. This follows the approach
in QFontEngineFT in general.
Change-Id: Ic53faa5e38c2219b987d76aec434558dad92015a
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>