Commit Graph

7228 Commits

Author SHA1 Message Date
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
Shane Kearns
6a7dc02160 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>
2012-05-23 14:18:34 +02:00
Mitch Curtis
bbafdf5812 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>
2012-05-23 14:18:34 +02:00
Mitch Curtis
318d39ccaf 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>
2012-05-23 14:18:34 +02:00
Jiang Jiang
d74a246cc9 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>
2012-05-23 14:18:34 +02:00
David Faure
f06b629bfb 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>
2012-05-23 14:18:34 +02:00
Jędrzej Nowacki
06906ce40d Fix warning about unused variable in tst_qvariant.
Change-Id: I9e713aa6a2033c5c4cd4b97bbd4ebb461d46962a
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
2012-05-23 14:18:34 +02:00
Jocelyn Turcotte
c283d78a1d 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>
2012-05-23 14:18:34 +02:00
Bradley T. Hughes
19a6c50061 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>
2012-05-23 14:18:34 +02:00
Bradley T. Hughes
321a549510 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>
2012-05-23 14:18:34 +02:00
Bradley T. Hughes
2d05d3bd28 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>
2012-05-23 14:18:34 +02:00
Jiang Jiang
b4aa5d970d 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>
2012-05-23 14:18:34 +02:00
Shane Kearns
9149aebac9 Fix compile warnings with MSVC
Calling a static function non statically causes an unused variable
warning for the optimised away d pointer.
sscanf causes an insecure functions warning. (Even though it was used
safely in this case)

Change-Id: I07700e2155284ef3ebbe7d604ed59b2e61ee7f95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-23 14:18:34 +02:00
Sean Harmer
856ca268f8 QNX: Implementing QPlatformScreen::refreshRate() for QNX QPA
Change-Id: I777ebd2c1ca51d244de714eb5b235d931df044d6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-05-23 10:52:11 +02:00
David Faure
e0cf8cf5f1 Fix crash when using QCoreApplication::applicationName in a global static
e.g. when a global-static configuration object uses QTemporaryFile
for saving to disk (via QSaveFile).

Change-Id: I532aec6de7411e10e4461d5a4ac60686e2f482df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-05-23 10:13:43 +02:00
Morten Johan Sorvig
98dbaecf7f Minor QPlatformMenu API cleanup.
Make the QPlatformMenu* classes abstract with
pure virtual functions. Delete qplatformmenu_qpa.cpp.
QtGui no longer has to carry the empty implementations.

Change the inheritance tree - Make QPlatformMenu
and QPlatformMenuBar inherit QObject instead of
QMenuItem. Add (now) missing virtual functions to
QPlatformMenu. The effect of this change is to 
reduce the number of pure virtuals the platform 
has to implement.

Change QPlatformMenuBar::syncMenu to take a
QPlatformMenu pointer instead of a QPlatformMenuItem*
pointer.

Fix a couple of header/unused variable
compiler warnings.

Change-Id: I77450e40c6aae26f3e1aca204603acebd242c036
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-05-23 10:02:11 +02:00
Debao Zhang
62fafaf16a Don't use deprecated QPixmap::grabWindow(),grabWidget().
Change-Id: I5d0ffb17d60ad53822d537b9c736307486823d45
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-05-23 09:44:21 +02:00
Rohan McGovern
03536d3e3d Removed CONFIG+=parallel_test from suspected parallel-unsafe tests [2]
These tests have failed a parallel stress test and may contribute to
instability in test runs.

Change-Id: Ibbbe01f7d9550b953fc9fbd6ed52fc99fdb5f5d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-05-23 03:17:59 +02:00
Sean Harmer
03392e1edf QNX: Register for navigator events before any window creation
This prevents a possible race condition in which the nvaigator service
notices that we have created a window and starts sending us messages
possibly before we have registered with bps for navigator messages.

This resulted in applications sometimes missing navigator messages at
startup.

Change-Id: I362fd782d7798990bc196f23e07b58293b13275d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2012-05-23 03:15:18 +02:00
Tasuku Suzuki
3a14f0301c Fix QtGui compilation for -qconfig large
Change-Id: I118a9b40c9eef821b326ee9dabbb9765d65277b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-23 01:11:34 +02:00
Tasuku Suzuki
4d238a5684 move inputMethodQuery() to public in subclasses of QWidget
QWidget::inputMethodQuery() is public.

Change-Id: I6d290e911854937f32fa6984329b56571feb6872
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-05-23 01:11:30 +02:00