Commit Graph

7348 Commits

Author SHA1 Message Date
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
Johannes Zellner
ce5c1db2d3 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>
2012-05-24 07:15:02 +02:00
Pekka Vuorela
7dd64fd2bb Initialize member variable in QXcbWindow
Change-Id: Iddf3f70ae2cb7be0703c0084da87e41412ad1d06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-24 07:14:58 +02:00
Holger Hans Peter Freyther
92a61d896e 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>
2012-05-24 07:14:58 +02:00
Martin Petersson
26583f3777 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>
2012-05-24 07:14:54 +02:00
Rohan McGovern
0a298ab485 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
1c7421ad14.

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>
2012-05-24 07:14:40 +02:00
Friedemann Kleint
0a290318fb Fix compiler warnings in QtGui, QtWidgets.
- Unused variables.
- Deprecated headers.

Change-Id: I8fb5d5f2cc02aca145a8c857358527592b7491ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-23 23:55:43 +02:00
Friedemann Kleint
47e8352a00 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>
2012-05-23 23:55:43 +02:00
John Layt
f3ad57e90e 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>
2012-05-23 23:55:43 +02:00
Kevin Ottens
e9d20b1951 QNX: Post orientation change events
Change-Id: I4dc13e5388e065c2425641c7efabcdee8f94800e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2012-05-23 23:55:43 +02:00
Girish Ramakrishnan
375b464db4 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>
2012-05-23 20:18:46 +02:00
Jonathan Liu
10cfb08eae 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>
2012-05-23 20:09:09 +02:00
Holger Hans Peter Freyther
a6bd4c60e4 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>
2012-05-23 19:27:41 +02:00
Laszlo Agocs
cd8ff4fa8f 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>
2012-05-23 19:22:34 +02:00
aavit
b5a11a7be5 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>
2012-05-23 14:21:47 +02:00
Shane Kearns
f604fd8ff4 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>
2012-05-23 14:18:34 +02:00