Commit Graph

12190 Commits

Author SHA1 Message Date
Samuel Rødal
388f4f16b0 Mention offscreen platform plugin in QTestLib documentation.
Change-Id: Icb82e0b4dedbe4978230cd3271f335ec07da60e4
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2013-02-19 08:11:08 +01:00
Samuel Rødal
46cc594c67 Fixed EGLFS reporting impossibly high physical dimensions.
If FBIOGET_VSCREENINFO doesn't give us sensible values we need to
default to something instead. Refactor the code that queries the
resolution and depth to behave the same way.

Change-Id: Id2b3fc41349a74610856273b10281f744612890b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-19 08:10:40 +01:00
Takumi ASAKI
febbdbb992 Doc: Fix some typos
Change-Id: I7f3a8cd27f1d1cb944599cff40024f3521a3ec34
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 08:09:22 +01:00
Tor Arne Vestbø
71b4325cb7 Clean up how we build against SDKs on Mac OS
Instead of setting -isysroot in both arch.test, compile.test, the various
mkspecs, and sdk.prf, we now propgate the chosen SDK as the qmake
variable QMAKE_MAC_SDK, which is then handled exclusivly in sdk.prf.

The QMAKE_MAC_SDK variable, and -sdk argument to configure, is expected
to be of the short-form name, eg macosx or iphoneos, not a full path, as
that's what Xcode also expects. We take care of translating that into
a full path for -isysroot/-syslibroot in sdk.prf, using xcodebuild as
a helper.

Change-Id: I281655b2fa5180c6e78ffdce36824e4a91447570
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-19 07:56:34 +01:00
Tor Arne Vestbø
3988ad95f7 moc: Error out when detecting unterminated macro usage
Exhausting the symbol list while looking for the
final right parenthesis means it is missing.

Task-number: QTBUG-29308
Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-19 07:55:39 +01:00
Keith Gardner
cfc09b6564 QLocale: Added QStringRef overloads to toInt(), toUInt(), etc...
Added the following function overloads to QLocale: toShort, toUShort,
toInt, toUInt, toLong, toULong, toLongLong, toULongLong, toFloat, and
toDouble.

Change-Id: I8cd90ca08b88338b08a73a72492f4c91c4f46ea4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 22:24:54 +01:00
Friedemann Kleint
4b42c91821 QColorDialog/QFontDialog: Fix setOption().
Call setOptions() such that the option takes effect.

Task-number: QTBUG-28817

Change-Id: Ibef834efc988d3ba49e88ea88ef475b1fd7fd98f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-02-18 21:53:31 +01:00
Frederik Gladhorn
3654a4a3c1 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-18 20:03:20 +01:00
Sergio Martins
8afd7b4675 QNX: Print the buffer size before crashing, for debug purposes.
Change-Id: I2d423ee3717bb09b7bb2c63f645e5315be1fa611
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-18 19:56:45 +01:00
Tor Arne Vestbø
c04f3584ab Remove deprecated use of QMAKE_MAC_SDK in corewlan.pro
We no longer support OS X < 10.6, so there's no need to check for it.

Change-Id: I2628984846de0c0c19ea86b3ba6d00fc370ddae7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-18 17:07:23 +01:00
Tor Arne Vestbø
4dd29248cd Update feature paths on assignment to QMAKE_PLATFORM
Instead of after parsing the makespecs, were we assumed QMAKE_PLATFORM
had been set by the makespec and did an explicit update.

Allows loading platform specific features from within a makespec after
updating QMAKE_PLATFORM.

Change-Id: I0eb3b7fb88ce48b00a384850c5d87223c06234d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-18 17:07:17 +01:00
Tor Arne Vestbø
a1000de2b4 Ensure that arch.test for host runs with option(host_build)
So that mkspecs and features may rely on the host_build test.

Change-Id: I18fee4820d9e2904285afcc7ddb8f1cc3d025fef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 17:07:13 +01:00
Shawn Rutledge
dfde72e436 Added QDebug support for QWindowSystemInterface::TouchPoint
Change-Id: Icfc606a49a7fd24fcd35b9c818642a03e044ed6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-18 16:26:49 +01:00
Gunnar Sletta
ffecaf85e8 QScreen::refreshRate would return 0 on Mac OS X
The function we use to get the actual vsync on cocoa is documented
to return 0 if the monitor is not a CRT monitor. A refreshrate
of 0 means we have vsync deltas of 1000/0 which cause problems
elsewhere. It is better to use the "default" value in this case
as it will be closer to correct than 0.

Change-Id: Id08007e40a9af5e42f13a07628fcad5fd3a7d0dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-18 16:21:27 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Oswald Buddenhagen
489d8a0627 add QT_CONFIG's static/shared to CONFIG on startup
... instead of as a fallback in default_post.
it was this way in qt4, and it requires less code to be written in the
end. we are already doing it for debug/release as well.

Change-Id: I6e02849d61d14a18375cf64a5990768931ebac48
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:43 +01:00
Oswald Buddenhagen
2e4ce301f9 take advantage of new safety regarding build config resolution
all tests that happen after default_post loads resolve_config can rely
on debug vs. release, static vs. shared, and staticlib vs. dll being
properly "de-conflicted".

Change-Id: Ie0b4defcd6024bd1c25f53ba7e03621052d96492
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:39 +01:00
Oswald Buddenhagen
9dcbfc1c44 refactor build config resolution
the current approach of having "free-flying" prf files for such a core
issue is rather insane. this was noticed early on, as evidenced by the
forcible loading of debug/release/debug_and_release in default_post.
however, things remained a mess, in particular static vs. shared.

consequently, the commit merges all related feature files. the actual
config resolution is put in a separate feature file, so it can be loaded
by resolve_target if that happens to be loaded early on.

Change-Id: Ie30e7c63cabe9409a3263ca1650e323a870926f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-18 15:52:36 +01:00
Tobias Koenig
18a65b6cdf Blackberry: Specify QMAKE_LFLAGS_RPATHLINK for BB10 platform
The linker from the BBNDK needs -rpath-link to resolve
transitive dependencies, like on Linux.

Change-Id: I85726841ea15070e8661b9bdbffaf950fdd247e9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-18 15:44:10 +01:00
Marcel Krems
3c657383c6 Doc: Fixed value descriptions for enum QAbstractSocket::SocketError.
Change-Id: I7ef5ff53ac838a7793852c1eadd9610e630cae43
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-18 14:44:17 +01:00
Gabriel de Dietrich
7c33ae6a7b Cocoa QPA: Make QCocoaMenu::menuItemAt() more robust
Change-Id: I2c68f87eb1a4926ca5bd0bfcc842ab9c56c99cd7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-18 13:43:21 +01:00
Yoann Lopes
c7a51f1858 Added QOffscreenSurface class.
Inherits QSurface and allows to use OpenGL from an arbitrary thread.
Platform plugins can implement QPlatformOffscreenSurface, otherwise an
invisible QWindow is used by QOffscreenSurface.
This patch includes an implementation of QOffscreenSurface for XCB
and EglFS platform plugins using pbuffers.

Change-Id: I57b4fc1db417331f34826dcfa754b7698782fde4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-18 13:42:22 +01:00
anknight
f8fdeb68b6 KMS QPA Plugin: use preferred mode when selecting mode
This should select the best mode (likely the currently running mode)
for the display instead of the first one found.

The built-in mode was left as a fallback.

Change-Id: I4e1bc798df6f310b001566ab76cb9def3224a7ed
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-02-18 13:34:25 +01:00
anknight
936aceb5f2 KMS QPA Plugin: use GBM cursor writer
GBM provides a way to write directly to a buffer object that gets set
as the drmMode cursor. This eliminates the need to create a GL texture
and opens this class up to platforms that support GBM but not OpenGL.

Change-Id: I7297827387ef9a717a5287b5484f14c9987b4158
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-02-18 13:34:18 +01:00
anknight
4d14d14021 KMS QPA Plugin: .pro file improvements
- Use qtHaveModule to check for OpenGL
- Add __GBM__ to pick up the correct native types in the Mesa EGL headers

Change-Id: Idfc0e81e95672b08ba8f259b9d7edf2b25fd1bad
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-02-18 13:34:03 +01:00
Andreas Aardal Hanssen
843de37bca Remove QGraphicsProxyWidget crash in QWidget::hasFocus().
A QGraphicsProxyWidget embeds a focusable widget (e.g., QComboBox). When
deleting QGraphicsProxyWidget, the QWidget will be deleted. The QWidget
clears focus, and QWidget::hasFocus() is nice enough to check if its
embedder QGraphicsProxyWidget has focus - because if it does, it wants
to clear focus from that item too. QGraphicsItem's destructor already
calls clearFocus() however, so this call is unnecessary; we can simply
stop clearing the QWidget's focus in its destructor if the widget is
embedded.

QWidget::hasFocus checks QGraphicsItem::hasFocus (on the proxy widget
that is being deleted), which checks its d_ptr, which is gone. It's
generally unfavorable for an object deleting a child to have the child
go back and poke at the parent object, which is in many ways what's
happening here.

Task-number: QTBUG-29684
Change-Id: I1e52bf28f47b2824752de28dff2d0de13733ee48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-18 11:07:23 +01:00
Andreas Aardal Hanssen
615d120e5a Fix crash in somewhat faulty QGraphicsProxyWidget unit test.
The crash is deep inside QGraphicsSceneIndex, which calls boundingRect()
on the item that is being destroyed. The vtable is busted, resulting in
a pure virtual function call. There's a more proper fix for this lying
around somewhere but in this particular case we can get the test to
not crash by guarding based on whether the item has a cursor set. This
also happens to speed up QGraphicsItem destruction a bit so I figured
it's a win-win situation to fix it. This case will still crash if the
item actually had a cursor set but that makes the case even more narrow.

Generally speaking, creating objects partially on the stack and
partially on the heap, mixing parent/child relationships and then
deleting one of the heap objects is quite sketchy and I doubt it happens
much outside of this unit test.

Change-Id: I25393d2cafb1256269ab6681519bd554cc380bfd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-18 11:07:13 +01:00
Tor Arne Vestbø
f2191d9900 Introduce macros for simplifying platform checks on Mac OS and iOS
Change-Id: Ibab8486e1e6d7e4d8922fce96add055e60c6095c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:32:49 +01:00
Tor Arne Vestbø
4e78ce288a Start using Availability.h over AvailabilityMacros.h on Mac OS
The former was introduced with Mac OS 10.6 and can also be used
for checking iOS versions, so it's preferable. We still include
the old availability header, and use it in various places in Qt,
and so does the Mac OS frameworks, so there's no need to phase
it out, but for new platform checks we want to use the updated
macros of the form:

  #if __MAC_OS_X_VERSION_MAX_ALLOWED > __MAC_10_7

Ideally you should not use the named version macro, and use 1070
instead, in case you build against an SDK that does not define
the named version yet, but we take care of defining these
in qsystemdetection.h for convenience.

Change-Id: I9cfa72e37816583f28ff9643793f111e155b7789
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:32:31 +01:00
Tor Arne Vestbø
193e3ba32e Don't override OS X deployment target unconditionally in qsystemdetection.h
AvailabilityMacros.h will pick up the MACOSX_DEPLOYMENT_TARGET environment
variable, as well as the -mmacosx-min-version= command line flag, and
set the MAC_OS_X_VERSION_MIN_REQUIRED based on that. By setting the
define before including AvailabilityMacros.h we essentially skipped
that whole logic and always set it to 10.6.

Only in the case where there's no deployment target specified on the
command line do we want to ensure that it's at least 10.6

Change-Id: Ic558ff4deb77937ea805b048d83949815b273bcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:32:18 +01:00
Tor Arne Vestbø
0768920dbd Remove ifdefs for supporting Mac OS <= 10.5
Qt5 requires Mac OS 10.6, so we can remove checks such as
if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6

Change-Id: Iea21727a277291148704ecf9677ed0b68c24920f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-18 00:31:54 +01:00
J-P Nurmi
468d010fdf Introduce a native file dialog for GTK+ 2.x
Change-Id: I3cb29218a54b9120c2ab6e2e32b810a111a7bf3d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-02-18 00:27:47 +01:00
Giuseppe D'Angelo
e88011357e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-17 20:31:38 +01:00
Tor Arne Vestbø
2df8884bc6 Skip tst_QSslSocket::setReadBufferSize_task_250027()
It's flakey and is blocking integration. Tracked in QTBUG-29730.

Change-Id: Ia5b8f952314bf2e1aa6dbb5c5c0a97e32e68d0f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:31 +01:00
Tor Arne Vestbø
159f42222d Remove duplicated code for handling OpenGL extensions in QtOpenGL
We now re-use QOpenGLExtensions/Functions from QtGui in the same way
as QtGui uses these classes. There is still some duplicated logic
in qglfunctions.cpp, but this code now at least uses the shared
QOpenGLExtensionMatcher class.

Change-Id: Ie04008c43d430ae805e6ec1c45e7e363deeb3b8f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:30 +01:00
Tor Arne Vestbø
3250ec0c8f configure: Verify makespec before using it further
The chosen makespec may spit out errors for various reasons, which will
influence steps such as detecting pkg-config or the architecture test.

It's preferable to catch any issues with the makespec as early as
possible and exit configure before the errors propagate to tests.

Change-Id: Iecbf3217c36dea9f5e0677c58171b72cb6ce1e0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:23 +01:00
Tor Arne Vestbø
e71d0402b0 configure: Don't build qmake with MAC_SDK_FLAGS, it's a host tool
Passing -sdk to configure should affect the target build, not host tools.

We skip passing MAC_SDK_FLAG for the host arch test as well, since as for
qmake the SDK should only apply to the target.

Change-Id: I3902355715234b9300a65d3095b9c925d9492311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-17 20:31:16 +01:00
David E. Narváez
f0221d3594 Fix call to QMetaObject::metaCall from updateProperty
Create an array of arguments in the same way
QMetaObject::write does

Task-number: QTBUG-29082
Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305
Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-16 21:17:31 +01:00
Christoph Schleifenbaum
8de8800de1 Cocoa: QSystemTrayIcon showing native messages on Mountain Lion.
This patch enables usage of the new NSUserNotificationCenter as part of
Mountain Lion. On earlier versions, or if compiled on earlier versions,
Growl will be used, if installed.

Change-Id: I676f9c63aa3c1ada19d36b6310ae90915be63011
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-16 17:57:30 +01:00
Keith Gardner
b26c9da892 QLocalePrivate: Generalized numberToCLocale.
Modified QLocalPrivate::numberToCLocale to take a const QChar * and an
integer instead of a QString. This allows for passing QStrings and
QStringRefs into the same function. Updated the
QLocalePrivate::stringToDouble, QLocalePrivate::stringToLongLong, and
QLocalePrivate::stringToUnsLongLong to use this new function signature.

Change-Id: Ifee5dfcd9b743e1d3b9123a65007c89e8ed93e83
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-16 14:51:21 +01:00
Peter Hartmann
08f8027a0e SSL benchmarks: add benchmark for uploading data
All Web service APIs like Facebook, Twitter etc. use SSL for
uploading pictures etc., so it is good to have a benchmark
for that.

Task-number: QTBUG-28764
Change-Id: I590f76ac8b6575509f1635c18c35f9fe652fa8f8
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-16 09:28:24 +01:00
Peter Hartmann
eaa18f3063 SSL docs: Be more explicit about the threats of ignoring SSL errors
... because almost everybody gets it wrong almost every time.

Change-Id: I54938ef094323ba8de02186b585b11b9579f3ca4
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-16 09:28:03 +01:00
Friedemann Kleint
c4314f7aeb Filedialog test: Do not set directory if empty.
Make it possible to test the saving/restoring of directories
which is done by default.

Task-number: QTBUG-28855
Change-Id: Id16010b6aea9cd78b9bebdbe1b148eb7f5141f8b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-02-16 09:04:27 +01:00
Jędrzej Nowacki
8ec2c0a70e Revert "Provide better error if min (or max) is defined in QDateTime"
This reverts commit d0804ff2dd.

The commit breaks JSC which is used by QtWebKit, QtScript and
indirectly by QtQuick1, which blocks integration stable->dev.
JSC should be fixed upstream, but until then we need to revert
the change.

Change-Id: I3f7b8be08b68181e08422d2cb00d7cd70a7fc07f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-16 08:07:30 +01:00
Tor Arne Vestbø
f6265182ad configure: Remove duplicated logic for dealing with framework builds
The exact same hunk is present 100 lines below.

Change-Id: Ia3d61037b29186368e30f95f4162282d38bca972
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-16 05:08:13 +01:00
Tor Arne Vestbø
cd9c98e881 Teach configure to execute $$system() when parsing qmake.conf
This allows for example the iOS mkspecs to use xcode-select to get the
path to Xcode's /Developer directory, which is then in turn used to
set up QMAKE_CXX (which is needed by configure).

Coprocess is GNU awk specific, so we're just using getline.
http://www.gnu.org/software/gawk/manual/html_node/Getline_002fPipe.html#Getline_002fPipe

Change-Id: I7e88112bea68f039361d6e96ee581eedf129ab02
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-16 05:08:07 +01:00
Tor Arne Vestbø
603e188273 Manually add Emoji font to fallback list on Mac OS
It's not part of the fallback list we read from the plist file.

Change-Id: Ieaf306d4cd51a6bb6e6f41048876d3e674a4b99b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-02-16 05:08:03 +01:00
Tor Arne Vestbø
8b06b4136f Zero-initialize paint-device in minimal EGL platform plugin
Change-Id: Ic6b39825cf349f8ad8a56b1fb5dd3855f8675519
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-16 05:07:54 +01:00
Marcel Krems
abb8beb064 Doc: Fixed typo "pragraphs" -> "paragraphs"
Change-Id: I47e88dbedd3afee4bd53550ef1ce643829aecedb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-15 22:46:59 +01:00
Fredrik Höglund
cb1b451cd1 Fix the GL_CONTEXT_FLAG_DEBUG_BIT check
Use the correct enum. GL_CONTEXT_FLAG_DEBUG_BIT does not have the same
value as GLX/WGL_CONTEXT_DEBUG_BIT_ARB.

Change-Id: I7d90da54ca1ff526c8b00669b486a68424fc8dfb
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-15 17:48:36 +01:00