Commit Graph

11696 Commits

Author SHA1 Message Date
Laszlo Papp
e335fb7254 Add static dotProduct methods to the QPoint(F) classes
Change-Id: I66ac9433b74341a83569a60038ea2f7a025e81b1
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-26 00:09:14 +01:00
Laszlo Papp
5f481c98de Establish an opacity property for the QWindow
Change-Id: I1e399a41bc3aa890498d579f48d03cc6dee484bf
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-26 00:08:50 +01:00
Laszlo Papp
855b0d5049 Fix a typo and make the QQuaternion constructor documentation even more explicit
Change-Id: I913ef98b706f29f1bab7564d6d6fff0a91ebfdc0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-01-25 17:56:55 +01:00
Gunnar Sletta
64134181db Introducing QWidget::createWindowContainer()
A QWidget that can embed a QWindow. This can be used
to embed a QWindow/QOpenGLContext based window or a
full QQuickView.

Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-25 14:11:07 +01:00
Frederik Gladhorn
9a5ab30d52 Improve QAccessibleApplication
Add more testing.
This uncovers that currently the QDesktopScreenWidget
shows up as child of the app. Fixed by not creating
QAccessibleInterfaces for QDesktopScreenWidget.

Also don't crash in indexOfChild when called with 0.

Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-01-25 11:58:23 +01:00
Richard Moe Gustavsen
48c73540ad showIsFullscreen: only respect this hint for windows and dialogs
If the window or widget is a popup, ignore the hint. The
intention of the flag should be to show main windows etc in
fullscreen, and not all kinds of popups and tooltips. The user can always
call showFullscreen explicit when necessary.

Change-Id: Ie150b6c6d7ca6c9344a9097544a7edbc4bd10df2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 09:52:11 +01:00
Elvis Lee
a6faecba1a QOpenGLTextureCache : make it possible to skip qgl_byteSwapImage
Improving performance when making texture from QImage, this commit
makes it possible to skip qgl_byteSwapImage. If gl_FragColor of fragment
shader is properly configured, qgl_byteSwapImage is not required.
Ex) gl_FragColor = texture2D(texture, textureCoord).bgra;

Change-Id: If1f2d7dc1fc1c4e583cc3f38dec95a9d29417cd2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-25 02:17:22 +01:00
Thiago Macieira
c0860d26a1 Doc: write up the docs for Q_GLOBAL_STATIC
Change-Id: I5bf4d0d027dc8f960c94b4be3ebf7381e9ef4be1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-01-24 23:18:10 +01:00
Stephen Kelly
314e5ce5ee Add an umbrella cmake config file for Qt 5.
Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-01-24 20:37:34 +01:00
Tor Arne Vestbø
cd1e21cf09 Use path-based text when painter has negative scale on raster/coretext
The CoreText font-engine is not able to produce glyphs with a negative
scale (flipped). We need to report this fact back to the raster paint
engine, so that it can fall back to painter-path based text drawing.

For the GL engine this is not an issue, as the engine is able to handle
the flipping itself, while still using a non-flipped glyph-cache.

Task-number: QTBUG-29284
Change-Id: I3c24cee091786faae8a5c5dd756d208163330bfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-01-24 18:34:11 +01:00
Tor Arne Vestbø
a71c7fce8a Don't assume m11/m22 represents the scale of a QTransform
We can still assume it when pulling out the scale of the glyph cache,
since we limit it to scaling, but when computing the scale from the
current matrix we have to decompose it.

We always use a positive scale in the glyph-cache, and let the drawing
code take care of any flipping of the coordinates.

Change-Id: Ie3c4f2d91008a9be8f89bef29c15d80b23fb8a82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-01-24 18:34:11 +01:00
Frederik Gladhorn
d0c360fd88 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-24 18:34:11 +01:00
Friedemann Kleint
9c6a91d07b Manual file dialog test: Add showModal().
Modal dialogs can now tested by just showing or running exec().
Remove connection of accept() from applySettings().

Change-Id: I5e3c0e6405ce5682f39d10a9c06b9d61be10ed3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-24 16:28:16 +01:00
Friedemann Kleint
4807f70f89 Dnd: Do not always Retrieve URLS in canConvertFromMime().
Task-number: QTBUG-28186

Change-Id: I71d1a241d69f5fd80f6c047b9350cbd01bd48854
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-24 16:28:07 +01:00
Frederik Gladhorn
627d9cbd3c Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I4ca87d44129fa5c1d8541cd58b8d62bc69080688
2013-01-24 16:02:55 +01:00
Tor Arne Vestbø
fed2d237b7 Extend lance-tests for text/statictext to check flipped/negative scale
Change-Id: I0504a6676f1acaa13ea1826e945d1faa51dd4e48
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-01-24 13:45:01 +01:00
Gatis Paeglis
3a2b3fc0d7 Don't try to render a pixmap when there isn't any.
This happened in cases when QDrag choose not to use a
pixmap to represent data in a drag and drop operation.

The chain that leads to QPainter errors begins in
QBasicDrag::startDrag() where we call setPixmap() with
Null pixmap, which later calls updateGeometry() which
leads to calling render() before the backing store
has been resized.

Task-number: QTBUG-29283
Change-Id: I2145159d3f23dbde2cba2ca9aa1788e222aba02a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-24 13:45:01 +01:00
Roman Pasechnik
45be71bf7d Added initializer list constructors for Qt associative containers.
Affected: QSet, QMap, QMultiMap, QHash, QMultiHash.

Task-number: QTBUG-25679
Change-Id: I01f3ecfbca805f4c053a75232188bd2a77fdb1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-24 11:38:54 +01:00
Frederik Gladhorn
1b5f9bec03 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Idcaa9b0c63aca5ba11ee3fa2da456178655a1ae3
2013-01-24 11:33:58 +01:00
Gunnar Sletta
fc663b5f9a Fix focus handling of native child widgets in xcb.
Change-Id: If4d596195624011142bff6853849a23064e478df
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-24 09:08:59 +01:00
Andy Shaw
bfd73eaba3 Respect the filename specified when showing the native filedialog
When a filename was specified as part of the start up directory then it
should ensure this is put in the filename lineedit in the native
filedialog.

Change-Id: I2b190933d46553908b5bcf17506cb2a95fb1f982
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-24 06:57:32 +01:00
Thiago Macieira
a5fa0cf98c Make the QtTest GUI headers compile on their own
Though no one is supposed to include them directly, it's a good idea
to ensure that they are tested too. They're only included from the
master header when QT_GUI_LIB and QT_WIDGETS_LIB are #defined.

Change-Id: Ie84bb6fd4c18b5b51ab35463f9082feaa0693c97
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2013-01-24 05:43:09 +01:00
Andreas Aardal Hanssen
6476d6728e Make sure QGraphicsItem notifies changes to focusScopeItem.
A glitch in QGraphicsItem's logic made it update the focusScopeItem
pointer, but fail to notify the change to QDeclarativeItem through the
d_ptr->focusScopeItemChange() virtual function, hindering
QDeclarativeItem from emitting focusChanged() correctly for focus
scopes that do not have focus.

Two lines were moved, and a comment updated to reflect the reason
why the "return" is needed at this point. It's clear that the
calls to focusScopeItemChange() are unrelated to the return.

Task-number: QTBUG-29260
Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>
2013-01-24 02:20:34 +01:00
Frederik Gladhorn
7df08a8b63 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-01-23 22:12:54 +01:00
Peter Hartmann
ce35c0db0d QSslConfiguration: toggle on demand loading of root certs properly
make sure we keep track of when we can load root certs and when we
cannot (we cannot when the developer set the certs explicitly). This is
implemented the same way for QSslSocket already, and needs to be
duplicated because we have 2 methods for setting CA certificates: one in
QSslSocket and one in QSslConfiguration.
In addition, adapt the auto test which checks whether setting a default
QSslConfiguration works: There is no way to set on demand loading
through the API, so it should be enabled by default.

Task-number: QTBUG-29103
Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-23 19:36:07 +01:00
Allan Sandfeld Jensen
06e4b1cff4 QImage plugins should report supported mime types
Introduces the methods QImageReader::supportedMimeTypes and
QImageWriter::supportedMimeTypes which corresponds to the similar
supportedImageFormats methods, except they return lists of MIME types.

Task-number: QTBUG-28177
Change-Id: Ibb0e264a12eaf972a8bfd6bd891dcd9f89efd085
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-23 17:19:22 +01:00
Thiago Macieira
2da24ac2b9 Change QT_FATAL_WARNINGS behavior to require a non-empty value
This allows easy unsetting of the variable in a shell like:
  QT_FATAL_WARNINGS= progname

Change-Id: Ie9cfb6ebfd4931de1c90af68bfeeae1e9f3d4b9d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-23 17:06:27 +01:00
Thiago Macieira
b862f43e36 Detect Clang and Apple Clang's version properly
The current code matches *g++*, which matches "clang++" and detects
Clang as GCC. That's highly incorrect.

Change-Id: Ifd85bbd35aa130be3094fc75d471614d06ca23bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-23 17:02:25 +01:00
Shawn Rutledge
896bf9ff5c Several bug fixes in QCocoaFileDialogHelper to support declarative
Required to prevent crashes and incorrect behavior in
https://codereview.qt-project.org/#change,44201

Change-Id: If6025429caabafd150cdd44fec152ff584232220
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-23 16:58:34 +01:00
Thiago Macieira
119c581dd1 Simplify checking of the SHM/SEM Unix key file's existence
We don't need to stat(2) the file to check if it exists before
creating it. We're about to open(2) with O_CREAT|O_EXCL, which will
not recreate it if it existed.

Change-Id: I2d2176054e7776a32a4520832ee104b9c4ccf748
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-01-23 16:57:58 +01:00
Michael Brasser
3c9cc32086 Support shared GL contexts in eglfs.
This allows shared texture uploads in a background thread.

Change-Id: Ib390243bc9dfabd6c579dff9b74e7f44211739d3
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 14:51:24 +01:00
Mehdi Fekari
786a6466e8 Add autotests for Indonisian and Catalan locales
Change-Id: Idbf14ee6f0cd83acfdc407408794aac7ad91c054
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-23 13:01:34 +01:00
Friedemann Kleint
14675681b5 Implement click-to-focus for native child windows.
Change-Id: If7633781a7167de2161cd74c62cfc883eb4d1b0e
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-01-23 12:41:35 +01:00
Friedemann Kleint
3df0a41a7f Fix qstring-literals test for MinGW.
The test is compiled since QT_UNICODE_LITERAL is always defined
on Windows and ref.isStatic()) then fails since C++ 11 is not
enabled.

Task-number: QTBUG-29014
Change-Id: I357574a493c5191f1463e7ee5851d7db0e569315
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-01-23 12:41:35 +01:00
Gunnar Sletta
2692db542e Implement focus handling of child windows for cocoa.
Change-Id: I1e05ef39aa67f8febdd27215d8ad05d26ece7caa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-01-23 12:41:35 +01:00
Samuel Rødal
d4f4ee4e03 Fixed copy text bug as well as potential other latent xcb plugin bugs.
As Gatis found out the copy text bug is caused by the xcb plugin's
handleEnterNotifyEvent() receiving an event with a seemingly random
"time" member. That is however not due to a bug in the X server but
rather due to a missing break statement in the event dispatching in
qxcbconnection.cpp, causing an xcb_client_message_event_t to be treated
as an xcb_enter_notify_event_t, and thus an xcb_window_t to be treated
as an xcb_timestamp_t.

The other xcb_enter_notify_event_t values would of course also be
complete garbage.

Task-number: QTCREATORBUG-8476
Task-number: QTBUG-28398
Change-Id: Id8c09a6682f78b646a0d1d27b0650248bbfa1046
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2013-01-23 10:57:34 +01:00
Frederik Gladhorn
586fabb3b5 Disable only accessibility bridge without dbus on linux
Keeping accessibility and only disabling the bridge will
enable more builds to work.

Warning about disabling accessibility disabled is needed
because in QStyle it is used to discover semantics about widgets
(if a toolbutton is in a toolbar).

Change-Id: Iae4e6ab63479743bdd70cba4b1954ec7cf3f88e9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-01-23 10:56:34 +01:00
Pasi Petäjäjärvi
f7bd8652ca Undefine overlapping variable names defined in VxWorks headers
VxWorks has defined variables with same name as in Qt's headers.
Undefine those variables to avoid naming conflict.

Change-Id: Ia8ca04a66acece683cd6c7f71df7e5a2800ec98d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:59 +01:00
Pasi Petäjäjärvi
416e73a0fc Check existence of QProcess feature before using it on Qt autotests.
VxWorks does not have QProcess support.

Change-Id: I20ed479125097d468a1aa50afb18c3749f0fbb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:59 +01:00
Pasi Petäjäjärvi
2d2da44f63 Use time.h related includes from qfunctions_vxworks.h file.
In VxWorks qfunctions_vxworks.h file includes correct time
related headers and it is included already at file
qplatformdefs.h for all mkspecs targets.

Change-Id: I8677eef8c79cebb445d89203284f3af27abbdd7f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:58 +01:00
Pasi Petäjäjärvi
2aaffe1800 Fix comments to use pre C99 standard style instead
VxWorks compiler fails to compile *.c file with C99 style comments on it

Change-Id: Ib5c5ff14006c17f9392b77363232b8b7cc112d34
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:57 +01:00
Pasi Petäjäjärvi
eae8faabed Use sched_get_priority_* functions only for SCHED_RR and SCHED_FIFO
In VxWorks set default values for scheduling priority to use
SCHED_FIFO_HIGH_PRI and SCHED_FIFO_LOW_PRI defines for other scheduling
policies than SCHED_RR or SCHED_FIFO.

Change-Id: If78b84cd9ef94d7712206e9442e96cdba727610f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:56 +01:00
Pasi Petäjäjärvi
00faa09aad Add support getting memory page size to RTP mode on VxWorks.
Change-Id: Id71bf7fd8e7371284076247558cba7edb0307e13
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:55 +01:00
Pasi Petäjäjärvi
49b8e21429 VxWorks process (RTP) mode does not have taskLock/taskUnlock functions
VxWorks does not support to globally lock and unlock the scheduler from
process. In kernel mode (DKM) above functions disable preemption from
requested task and such functionality does not exist for process.

Change-Id: Id41eab4c1973e4181e82539d08707659e0780f99
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:55 +01:00
Pasi Petäjäjärvi
2d8a4c2d3f Use QDir::homePath() for tilde expansion
VxWorks does not have concept of users and therefore has no function
getpwnam. Use QDir::homePath() which returns actually QDir::rootPath()
if there is no HOME env variable set.

Change-Id: I15fe15862c4491b56cfa13bbdb218ef00dfd1f15
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:54 +01:00
Pasi Petäjäjärvi
ae229b9192 Use stub functions getpwuid and getgrgid for VxWorks
VxWorks has no concepts of users and groups, therefore no such functions
exists on VxWorks. Use stub functions from qfunctions_vxworks.h for
those, so we don't need to make major source code changes.

Change-Id: Iaad80ec18441e3d3e9c0f96e92ccc3766b27d976
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:53 +01:00
Pasi Petäjäjärvi
1309d9a9d6 Use stub function gettimeofday for VxWorks
Vxworks does not have gettimeofday function, use function
implementation from qfunctions_vxworks.h/cpp instead.

Change-Id: Iad2a71c8484ba00dd9406706b1c136297260de4b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:52 +01:00
Pasi Petäjäjärvi
2d44f879a2 Do not define QT_NO_DYNAMIC_LIBRARY for VxWorks process (RTP)
Shared libraries cannot be used in kernel mode (DKM), only at process
mode (RTP).

Change-Id: I8cecc12461aa4417b16577db3bc9cd85a1aa7efa
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:51 +01:00
Pasi Petäjäjärvi
cd5a4279f3 Strip prepending <hostname>: string from currentPath() for VxSim
VxWorks simulator (VxSim) maps SDK rootdir usable as normal directory.
Mapped directory name is either host: or <hostname>: and can be used
without prepending prefix containing colon. Strip prepending string and
colon to get valid native path to host SDK rootdir running VxSim.

Change-Id: I9d2829e32431c2d50fefe55c93780cd37165e565
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:50 +01:00
Pasi Petäjäjärvi
608cd1ad84 Use taskIdSelf() function instead of taskIdCurrent global variable
The uniprocessor taskIdCurrent global variable (declared in taskLib.h)
does not exist in VxWorks SMP, because of concurrent execution on
multiple CPUs. Any uniprocessor code that reads taskIdCurrent should
make calls to taskIdSelf() instead.

Change-Id: I4e0efef32297f339d6121c7d4bca3820e0fc9294
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-01-23 10:38:49 +01:00