Commit Graph

7513 Commits

Author SHA1 Message Date
Gatis Paeglis
02b80ebb52 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>
2012-05-26 10:15:36 +02:00
Gatis Paeglis
2defa750b7 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>
2012-05-26 10:14:23 +02:00
Gatis Paeglis
9b7b90cf55 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>
2012-05-26 10:14:12 +02:00
Mitch Curtis
ccd56e9844 Clarify QByteArray::size() documentation.
QTBUG-25438

Change-Id: I8cf9bfb295195548b6f7d4410682e4d675181a65
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-05-26 02:47:01 +02:00
Johannes Zellner
9a17206b5c 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>
2012-05-26 02:47:01 +02:00
Sean Harmer
48768ab433 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>
2012-05-26 00:34:40 +02:00
Thiago Macieira
c4fbe872be Itemviews: compile with QT_STRICT_ITERATORS
Just a few mixed up iterators.

Change-Id: I19f62457ee24bc844fadd182ba61866e259e9636
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-26 00:34:40 +02:00
Tasuku Suzuki
576d4a1cce 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>
2012-05-26 00:34:40 +02:00
Konstantin Ritt
ad7d953963 Declare typeinfo-s for QLatin1String, QStringRef, and QCharRef
Change-Id: I05e0f866c632f2a7e966e6bae9c73eeb77d99217
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-25 21:49:35 +02:00
Konstantin Ritt
10da6417ee Replace const QCharRef & with QCharRef where appropriate
in order of consistency with QChar

Change-Id: I8a7cf8960eb64ef177113d4569f1c49ae31c828e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-25 21:49:27 +02:00
Konstantin Ritt
09f20e75a4 Replace const QLatin1String & with QLatin1String where appropriate
Task-Id: QTBUG-24502

Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-25 21:49:21 +02:00
Konstantin Ritt
c31681ab62 Move QLatin1String up to QString
This is needed for the change that follows

Change-Id: I05611defe422fa4bbb5be27b102e39b1f61a1cbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-25 21:49:15 +02:00
Konstantin Ritt
f728afcd85 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>
2012-05-25 21:49:05 +02:00
Konstantin Ritt
e96e80687e 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>
2012-05-25 21:48:55 +02:00
Konstantin Ritt
2b15c1b30f Move ScriptSentinel enum from header to .cpp
Change-Id: Ic74e8e2471e92aa2014735f6ab0bb4f3b88de206
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-05-25 21:48:44 +02:00
Thiago Macieira
7c1e0fef8e 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>
2012-05-25 21:46:55 +02:00
Friedemann Kleint
57f243594e OpenGL/HelloWindow example: Fix resource leaks.
Change-Id: Icf776b5581b3a632e8cef19af1059503146c158c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 21:42:14 +02:00
Jiewen Wang
7381328bcc 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>
2012-05-25 21:41:42 +02:00
Friedemann Kleint
2848395b50 XCB/EGL: Free display.
Fix valgrind reporting resource leaks.

Change-Id: I4c2038f61b63dc5b6bc0c7eca43f0f339ddf723a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 17:23:20 +02:00
Friedemann Kleint
9015e479db Fix warnings about unused variables.
Change-Id: Ie95f032981d2ce68b1193725ab55ac207d187525
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 17:23:20 +02:00
Tarja Sundqvist
7266e11297 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>
2012-05-25 17:23:20 +02:00
Konstantin Ritt
79ab7c170d 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>
2012-05-25 17:23:20 +02:00
Martin Smith
a755049931 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>
2012-05-25 17:23:20 +02:00
Tasuku Suzuki
4830bcc962 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>
2012-05-25 17:23:20 +02:00
Girish Ramakrishnan
b8420c9fc2 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>
2012-05-25 17:23:20 +02:00
Oswald Buddenhagen
113620d6f7 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>
2012-05-25 14:52:36 +02:00
Sean Harmer
49b12d8236 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>
2012-05-25 14:46:04 +02:00
Morten Sorvig
df1fc82e23 Add Mac OS 10.8 QSysInfo enums
Change-Id: I79ce06ead836478ff6816e6631742db91ba256fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-25 13:52:08 +02:00
Stephen Kelly
5c632708da 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>
2012-05-25 13:45:07 +02:00
John Layt
3dffbe8c81 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>
2012-05-25 13:23:14 +02:00
Stephen Kelly
c8028844ee Fix some spelling errors.
Change-Id: I1f730c843e77d68ab17715175af53da577cb3695
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-05-25 08:01:55 +02:00
Donald Carr
15fcb229cb Introduce a Snowball mkspec to the device specs
Change-Id: I7aa2f1a719c424079d7f0d7b3410f293cee05fa9
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-25 00:19:37 +02:00
Thiago Macieira
220f791f9a 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>
2012-05-24 20:20:52 +02:00
Mitch Curtis
794febd713 Write QList unit tests for movable, complex, etc. types.
Change-Id: I641ada39f7c84cd221ec1e235cdb0c86270d49fc
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-05-24 20:20:52 +02:00
Corentin Jabot
ce3d1a153a 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>
2012-05-24 20:20:52 +02:00
Rafael Roquetto
df7a1a28aa 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>
2012-05-24 17:59:07 +02:00
Miikka Heikkinen
3c3e938c82 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>
2012-05-24 17:52:52 +02:00
Friedemann Kleint
d74c45a95b QtWidgets: Fix QT_FLUSH_UPDATE for Windows.
Change-Id: I09fd1ca6e7691b326760b83aad612e9a26717379
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-05-24 17:51:47 +02:00
Sean Harmer
66e68b79c2 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>
2012-05-24 17:46:15 +02:00
Girish Ramakrishnan
2d990ccba6 -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>
2012-05-24 14:49:56 +02:00
Kevin Ottens
425c902ed0 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>
2012-05-24 14:47:20 +02:00
Kevin Ottens
b283213712 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>
2012-05-24 14:47:14 +02:00
Kevin Ottens
20a52687ec 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>
2012-05-24 14:47:08 +02:00
Kevin Ottens
2ee67d3826 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>
2012-05-24 14:47:02 +02:00
Kevin Ottens
600eee0481 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>
2012-05-24 14:46:48 +02:00
Morten Johan Sorvig
48e104aa1d 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>
2012-05-24 14:20:11 +02:00
Samuel Rødal
4b4975ceae Compile fix for kms platform plugin.
Change-Id: Ieed141c390920d118f8bb34fa884574ba308d23e
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
2012-05-24 14:06:12 +02:00
Thiago Macieira
2e4e283d41 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>
2012-05-24 13:30:44 +02:00
Kent Hansen
662c0a722a 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>
2012-05-24 09:48:27 +02:00
John Layt
36f469bdb1 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>
2012-05-24 09:48:27 +02:00