Commit Graph

12206 Commits

Author SHA1 Message Date
Oliver Wolff
1a6bea1ceb Check for printsupport module when building according auto tests
Change-Id: I9bade7b31c75331190960cb14dee6840e3582c50
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:58 +01:00
Oliver Wolff
53dc49ffc8 Check for network module when building according auto tests
Change-Id: I68013bf8e07be8d202b3253f997d4f4db05335a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:53 +01:00
Oliver Wolff
a19037cc9e Don't build the bearer plugin if network is not available
Change-Id: Ia706ac95570e903ae4fa0e47d2c850daf703bb04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-02-19 19:20:47 +01:00
Sergio Martins
c02a2f8e76 QNX: Don't crash with 0 by 0 sized windows
In the rare event of an invalid sized window, the application crashes
because libscreen doesn't like creating empty buffers.

Not creating the buffers at all would also be a solution, if we didn't
have QPainter crashes due do null paint devices.

Change-Id: I561d0082576b6226dd52129f9640952ba46273c8
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-19 17:10:27 +01:00
Shawn Rutledge
39b1bd8f45 undef B0 to build on PPC (conflict with definition in termios.h)
This is the same fix that was already done in qprinter.h
/usr/include/bits/termios.h:122:#define B0 0000000  /* hang up */
so the compiler sees B0 as a numeric constant

Task-number: QTBUG-29704
Change-Id: I2df5e1783f3142558cbc1606e0c61fcf636f2de8
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-02-19 17:05:43 +01:00
Michael Brasser
a54b271c39 Fix EGL_BAD_MATCH when requesting a 16-bit surface with eglfs.
QEglFSWindow does not request highestPixelFormat, and can obtain a 16-bit
config when requested. QEGLPlatformContext does request highestPixelFormat,
and can obtain a 32-bit config when a 16-bit config is requested, leading
to this error.

Change-Id: I418c09a35ec19b2e9ca372b32599034e02384e44
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 15:10:44 +01:00
Jerome Pasion
5d6916b4c1 Doc: Removed reference to deprecated \badcode command.
-QDoc doesn't differentiate between \badcode and \code. They both
look the same in the output.

Change-Id: Ifabd51b7e433a1c30cf30c267d3ce63dded1bd43
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-02-19 11:55:51 +01:00
Peter Hartmann
165926c3ae SSL session sharing auto test: Retrieve smaller file for testing
The "mediumfile" is actually 9.6 MB large, and makes the test slow and
even fail on mobile platforms.

Change-Id: I694d9d38e4d09c8e90a03c1141320fe2a757fdd9
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-02-19 10:35:06 +01:00
J-P Nurmi
2dd8e7cf2e Introduce a native font dialog for GTK+ 2.x
Change-Id: Ia5660c3e2c8c122187427ccb490d46e52ee3ad21
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-02-19 10:35:06 +01:00
Erik Verbruggen
436c65ba21 Fix compilation with Clang on MacOS.
Apparently Clang does not like methods to be declared static inline,
and then have their definition somewhere else. Error messages:

../../../include/QtCore/../../src/corelib/tools/qpoint.h:156:37: error: conflicting types for 'dotProduct'
Q_DECL_CONSTEXPR inline int QPoint::dotProduct(const QPoint &p1, const QPoint &p2)
                                    ^
../../../include/QtCore/../../src/corelib/tools/qpoint.h:77:40: note: previous declaration is here
    Q_DECL_CONSTEXPR static inline int dotProduct(const QPoint &p1, const QPoint &p2);
                                       ^
../../../include/QtCore/../../src/corelib/tools/qpoint.h:338:40: error: conflicting types for 'dotProduct'
Q_DECL_CONSTEXPR inline qreal QPointF::dotProduct(const QPointF &p1, const QPointF &p2)
                                       ^
../../../include/QtCore/../../src/corelib/tools/qpoint.h:239:42: note: previous declaration is here
    Q_DECL_CONSTEXPR static inline qreal dotProduct(const QPointF &p1, const QPointF &p2);
                                         ^

Change-Id: I041b96d79506d2898daf40d70b37f02459de35bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-19 10:35:06 +01:00
Ray Donnelly
1a0924dfc0 Unify win32-g++ and Unix qmake Makefiles.
Replace the old sed / template @FOO@ method with echo.
Enable MSYS bash to build qmake.exe
Use qmake/Makefile.unix for all win32-g++ builds.

Change-Id: I6e27d69b28d27131838bbbb3a4ee5a08b470f31b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
5ec342fefd Fix QFileInfo autotest for VxWorks.
No users/groups/symlinks on VxWorks.

Change-Id: I524a568202db2478b070b16a63ae425224c3aaa0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
7e8cc3b3ba Fix QFile autotest for VxWorks
No users/file permissions. Open function in VxWorks DKM
requires always three parameters.

Change-Id: I93fb075d82aa57e210e224bfe4ede40def82c275
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Pasi Petäjäjärvi
10d077fa19 Fix QSettings autotest for VxWorks
No users/groups on VxWorks.

Change-Id: I88912c93fa59dc7c00bdbb973fc34ecd631b3316
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-19 10:35:06 +01:00
Kevin Ottens
fc6b214363 Let QPlatformTheme decide which engine QIcon::fromTheme uses
By default we still use QIconLoaderEngine but now platform theme plugins
have the opportunity to override that. It is in particular planned to be
used in a WIP platform theme plugin for KDE sessions.

Change-Id: I07a82dc91daea44709b3a790f3f6e2a7a090d108
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-19 10:35:06 +01:00
Morten Johan Sørvig
73d32873cf Cocoa: Add QMdiSubWindow size grip back.
Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-19 08:53:55 +01:00
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