Commit Graph

17292 Commits

Author SHA1 Message Date
John Layt
27473f19bb QPrintEngine - Fix PPK_DocumentName
Add support to the Mac print engine for set/get the Document Name using
the Job Name setting. Our documentation states this is one use that the
document name will be put to so is appropriate to be used.

Change the Windows print engine to default to a blank Docuemnt Name
consistent with the other print engines. If still blank when printing
then use a default value.

Task-number: QTBUG-27724
Task-number: QTBUG-22144

Change-Id: If590811b5720e6f759eabc290b578b94e221f9f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:50 +01:00
John Layt
053bee8b80 QPrinter - Clean up Print Engine Key defaults and tests
The PrintEngine keys are not consistently treated across the platforms
and are not properly tested.  Start the process of making the print
engines behave consistently by documenting and testing the current
behavior. Ensure all unsupported features return a consistent
default value.

The auto test for valuePreservation() has been flaky depending on the
platform and installed printers so remove it and replace it with more
complete testing.  If no native printers available then don't test
the native engines.

Fixes for the individual inconsistent keys will follow.

Task-number: QTBUG-26430

Change-Id: Iab914d7e0a5ae4a2cdc24c8645751f0910cf440c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-05 19:33:42 +01:00
David Faure
f0d135a6be Doc: fix documentation for QWidget::windowHandle.
It's not "preliminary" anymore, and it doesn't return a QPlatformWindow,
but a QWindow.

Change-Id: Iaa1938728e689d97011dce8cf0d88ff8cb4a83b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-05 18:41:26 +01:00
Friedemann Kleint
aae1eb3b03 Move documentation of AA_MSWindowsUseDirect3DByDefault into obsolete section.
Change-Id: Id45ddb760d1ec56741314f1125ad03d172c8e1a9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-05 15:16:00 +01:00
Frederik Gladhorn
113cfa9aa6 Accessibility Linux: Fix all widgets reporting being editable
[ChangeLog][QtGui] Accessibility on Linux reported all objects as being
editable instead of just editable text items.

Change-Id: I8bca2799a2e5b175b3ca515fee5dd02eae23829e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-02-05 14:16:56 +01:00
Cedric Chedaleux
c6d3fe8873 Checking input mask before scanning evdev devices
Adding device mask verification for static device discovery.
DRM devices are no longer scanned if mask is set to input devices only

Change-Id: Ibd2e77280c2d93c707ba7bdb84c4ae3cb0932178
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-05 13:46:46 +01:00
Laszlo Agocs
2d67bf07fe Do not query max samples on gles
Querying GL_MAX_SAMPLES is not supported in GLES2.

Avoiding the call also makes us play nice with Mesa in debug
mode since it gets rid of the warnings about the failing
glGetIntegerv call.

Change-Id: I05e501cc11af41a54fefc34ab919c5191e4f3f0a
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-05 13:46:41 +01:00
Frederik Gladhorn
760ad40700 Make QWindowContainer accessible
Change-Id: I93451b8842648db0815c96d64d319daecb45f0de
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-05 13:33:47 +01:00
Rafael Roquetto
bb9dd25843 QNX: fix wrong coding style
Change-Id: I84b166ee528b7d586f1901e6bfda999ef698c3fd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-05 13:07:00 +01:00
Thierry Bastian
4c173e96c1 Adds the ability to not have an activity on Android
That code allows for not having an activity on Android.
In my case I've made some java code to handle an Android service.
The code is mainly about not dereferencing null pointers.

Change-Id: Ia7fda03cbbc55e6afeacd928445a4b72b51c679e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-05 09:19:38 +01:00
Eskil Abrahamsen Blomfeldt
35579f6fe7 Support empty inline elements in block tags in QTextDocument
This fixes the following case:

<blockquote>
<span />Foobar
</blockquote>

Qt would see the end of <span>, and consider the current block
tag as closed, thus resetting the block format, thus losing the
margin set for the current block (due to blockquote).

If you do

<blockquote>
<span>Foo</span>Foobar
</blockquote>

instead, then the same would not happen, since hasBlock is set
to false when we append text to the current inline node.

[ChangeLog][QTextDocument] Add support for empty inline elements
in block tags.

Task-number: QTBUG-33336
Change-Id: Ic566edfec96cb8d44d1c02932bb195bc921d1580
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-05 09:10:25 +01:00
Eskil Abrahamsen Blomfeldt
11189af016 Remove some left-over +1 in font height calculation
In change cb8445f032, I tried to
remove all the historical +1s when calculating the font height
from the ascent and descent, but I missed a couple. These are
used when drawing the background for the text, the height of which
would no longer match the height returned from QFontMetrics.

[ChangeLog][Text] Fixed off-by-one in the height of text background.

Task-number: QTBUG-36444
Change-Id: If6d87f903e246f9faed2298bb1693b2556906eed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-05 09:10:16 +01:00
Andy Shaw
060b853a2f Actually print when the tester pushes the print button
Change-Id: I5c995938a74f720be5beb33160488ec1ec73c0ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-05 08:51:55 +01:00
Friedemann Kleint
09e53c8b6e Plugin minimalegl: Remove superfluous keys() function.
This is no longer needed in Qt 5.

Change-Id: I10a2b893fdc822a526abc19c3d1f0f2538de0d83
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-02-05 08:50:19 +01:00
Friedemann Kleint
41fea09d63 Obsolete AA_ImmediateWidgetCreation.
This attribute is not guaranteed to fully work with QPA.

Task-number: QTBUG-36489
Change-Id: I638a8e00851288012be553b5316aa6088dd67cff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-05 06:29:20 +01:00
Liang Qi
839997adfa Cocoa: fix single punctuation input via CJK input method
2d05d3bd28 was not correct.

On OS X, when user uses CJK input method, only types single punctuation,
it was converted to CJK ones, and not showed in composing text.

Task-number: QTBUG-35700
Change-Id: I2d1063d2f837d075929dc5ebb5722fdefc6ee0f6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-05 02:35:11 +01:00
Morten Johan Sørvig
d01f0213b8 Cocoa: Establish pattern for accessing globals
Use a static QCocoaIntegration pointer instead of
QGuiApplication. This removes the need to call out
of the platform plugin as well as the casting from
"platform" to "cocoa" types.

Change-Id: If432b3567811223b73a67548e475e07d63635b73
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-04 22:59:04 +01:00
Cedric Chedaleux
96b7ac569c NPOT texture support in QOpenGLTextureCache
Enable non power of two texture support for non compatible NPOT GPU.
If the context does not handle NPOTTexture feature, the image to bind is scaled to POT size. It works with OpenGL ES and Desktop version.
It is actually almost the same code as the one in QGLContextPrivate::bindTexture.

Change-Id: I6f0f511165c9e171a14f4ba6ba0b7a902e590cf6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-04 21:34:58 +01:00
Gatis Paeglis
b0e6bc42eb Set QMAKE_X11_PREFIX also when Qt configure with -qt-xcb
Change-Id: Ib9ca7edb1e914275a415b6c74ef691838415a40f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-04 20:57:06 +01:00
Jake Petroules
fdef360bad QFileSelector: correct the macros for Apple platforms.
This fixes a serious regression from
7d72516b52.

[ChangeLog] QFileSelector: the identifier for OS X has been changed back
to 'osx' from 'mac', and 'mac' and 'darwin' have now been added as
selectors for Darwin OS (which is the base of both OS X and iOS).

Task-number: QTBUG-35073
Change-Id: I83183e34c5a697338cc1ddcac33a41bd379ded12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2014-02-04 19:36:58 +01:00
Frantisek Vacek
cc88e6e92c QDeclarativeTypeLoader doesn't close processed QNetworkReplies
This bug causes that Cascades QML application cannot open more than
system ulimit defined number of different asset:///*.qml files.

The realFile is ordinary closed in the ~QNetworkReplyFileImpl(),
the QDeclarativeTypeLoader::::networkReplyFinished() calls
reply->deleteLater(). There are tricky situations when event-loop is
not entered and too many read already files are waiting for close.

This patch close() file when all the data is read. It can be done
this way since the QNetworkReplyFileImplnetworkreply is a sequential
device.

For more info, please, read comments on QTBUG-36032

Task-number: QTBUG-36032
Change-Id: I4002f21b4b0c7350af48b0dc6530d9606fd2794b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-02-04 16:17:01 +01:00
Kimmo Leppälä
cd820569dc Fix KDE calculated colors being all black
KDE calculated colors weren't set correctly rendering all calculated colors
"Light", "Midlight", "Mid" and "Dark" as black.

Issues fixed:
* QFrame with frameStyle Box|Raised didn't look raised but
instead just black border.
* QMdiArea had black background
* QToolBox separators were just black

Change-Id: I5e06bafe280f73af12f23960ae68a8b35e8549ac
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
2014-02-04 16:01:26 +01:00
Maurice Kalinowski
eba56a35e3 Add suspend and resume event handling for WinRT
Task-number: QTBUG-35952

Change-Id: Icb4edb0f55c1d02dfbb5501df311b0fff87d2dc1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-02-04 13:56:18 +01:00
Konstantin Ritt
19463c5c3f Fix character mirroring issue with HarfBuzz-NG
HarfBuzz-NG does character mirroring where appropriate.
A simple solution is to unset RightToLeft shaper flag when
text gets shaped with HB-NG. Instead, move the mirroring code
right to HB-old proxy function and decrease code duplication.

Change-Id: Icdcd50b73b3e6a43da4b85addc7d8f51edf86512
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-04 13:37:14 +01:00
Kai Koehne
2edf3ba5a7 Logging: Don't use for loop in qCDebug macros
The local 'enabled' variable might cause dubious MSVC warnings
if a local variable name 'enabled' exists.

Just replace the whole loop with the if (...); else idiom, as Thiago
once suggested on the mailing list.

Task-number: QTBUG-36605
Change-Id: I0b8959a29d4432296961493fe2b7827c5b860d00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-04 11:34:42 +01:00
Frederik Gladhorn
49f30168c0 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-02-04 10:37:11 +01:00
Sze Howe Koh
8bb5dba0cb Doc: Fix broken links
Change-Id: Ic275dfbf0b332fc34ea0fac1c31c4935ad961527
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-04 01:30:24 +01:00
Nils Jeisecke
6894bc0f3f Fix sorted QSortFilterProxyModel filter update
When changing a filter so that a previously empty proxy model becomes
populated sorting was not applied correctly.

This was caused by using mapToSource for getting source_sort_column
from proxy_sort_column. For an empty proxy model this won't work because
no valid proxy index can be created in this case.

We now directly use the root index column mapping instead by doing
essentially the same as QSortFilterProxyModelPrivate::proxy_to_source
but without the sanity checks needed for external use.

The sorting feature of QSortFilterProxyModel has always assumed that
the number of columns is specified by columnCount(QModelIndex()) so
the behavior doesn't change.

[ChangeLog][QtCore][QSortFilterProxyModel] Fixed sorting when a
previously empty proxy model becomes populated because of a change in
the filter.

Task-number: QTBUG-30662
Change-Id: I21322122e127889dfadc02f838f0119ed322dcab
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-03 22:12:20 +01:00
Samuel Gaist
6d48df83ab Clean up QXCBSessionManager
Removed useless overrides and inline simple functions.

Change-Id: I69df0ec8446fe2c8bb904c7d4d9cc2e1d269533b
Reviewed-by: Teo Mrnjavac <teo@kde.org>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-03 21:55:50 +01:00
Samuel Gaist
35a29f3287 Clean up QPlatformSessionManager
Remove virtual from appCommitData and appSaveData and make them public

Change-Id: Ifd605742c6552b7a407de9bf482f8f0f0aa125ca
Reviewed-by: David Faure <david.faure@kdab.com>
2014-02-03 21:55:21 +01:00
Alex Montgomery
72259baa76 Fixed duplicate QMoveEvent generated for each QWidget::move call
Removed QMoveEvent generating code from QWidgetPrivate::setGeometry_sys
for widgets with native window handles. A move event is already
generated for them by QGuiApplicationPrivate::processGeometryChangeEvent.

Task-number: QTBUG-32590
Change-Id: I73313a012851516047ac017f1e15a21774d8ffe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-03 20:31:13 +01:00
Frederik Gladhorn
899604af55 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I625c46b86491fee66d39494d1466b2d616ea7380
2014-02-03 17:26:01 +01:00
Friedemann Kleint
0e16bf01a5 Windows: Silence QWindowsOleDataObject::GetData().
Change-Id: Iad97a35af334f951f56a7bf02ec1bf2873901aa1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-03 17:21:47 +01:00
Thiago Macieira
71eb4d4939 Fix compilation: testBit is only used if mtdev isn't
qevdevtouch.cpp:160:20: error: unused function 'testBit'

Change-Id: Idd9eee9b916c694bdfb963c00eeb0eaaf5618d40
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-03 17:12:48 +01:00
Andy Shaw
cfa8fcdda0 Ensure the text is not cut off when shown under a toolbutton icon
Change-Id: I82cfa549b9db9439ab03123ddf73e5f2d001738e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-02-03 13:52:59 +01:00
Giuseppe D'Angelo
9d29afe6b0 QOpenGLTexture: remove typos in the docs
Change-Id: Ia842c7f91eadefc6b5328d7d951c4e265c2c7432
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-03 13:21:45 +01:00
Giuseppe D'Angelo
95435a8c90 QOpenGLTextureHelper: fix the DSA emulation
The DSA emulator functions query which texture is currently bound
to a given target, then bind the new one, perform an operation,
and bind the old one back.

The problem is that in order to query what's currently bound to the
GL_TEXTURE_<X> target one needs to call glGetIntegerv passing
GL_BINDING_TEXTURE_<X>. Since both GL_TEXTURE_X and GL_BINDING_TEXTURE_X
values are completely arbitrary (not contiguous nor related in any way)
we need to pass *both* them to the functions.

The right GL_BINDING_TEXTURE_X was getting already chosen (and stored)
at texture creation time by QOpenGLTexture, so it's just a matter
of passing it around.

For the "real" DSA functions, the binding target is ignored.

Change-Id: Ida823abbfb142d4a22bf9f9a762b160b7e281c6d
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-03 13:21:39 +01:00
Allan Sandfeld Jensen
f34e080063 Fix access after delete with Harfbuzz NG code path.
Remove reference to released font-engine so we don't risk returning it
later.

Change-Id: I741a741567a079818c7f414ac1f9c0b5a9677322
Task-number: QTBUG-36522
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-03 12:13:22 +01:00
Friedemann Kleint
bc8cf62797 QGuiApplication: Check if window exists before sending double click event.
Task-number: QTBUG-36364

Change-Id: I0be40e8f920f0210ba4e99e83d138f82ce3a69f2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-02-03 09:48:11 +01:00
Shawn Rutledge
64d95e3df2 OSX: FileDialogHelper uses options to remember the selected filter
Task-number: QTBUG-35958
Change-Id: I998cf93232e79f70837cfa8f63592b69ea0dc563
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-03 07:49:51 +01:00
El Mehdi Fekari
61e1bcb4dd QLogging: Avoid infinite loop in error case
If the user code installs a message handler that uses
any API that prints logs (handled by qt_message_print)
then this will lead to an infinite loop.

This patch adds a thread local storage to check
if the message handler is done before the thread
is calling it again.

Note: This check is performed only if the compiler
supports thread_local (__declspec(thread) for MSVC).

Change-Id: I43b0460b8f39b26a18de48a5652a5e55f0b336f8
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-02 19:01:26 +01:00
Fabian Bumberger
c1c5aca6f1 [QNX] Handle the case when an egl surface can not be created
If an egl surface can not be created (e.g. when out of memory) the
application should not crash. In this case we will not be able to make
the egl surface current and have to return false in the makeCurrent call
in QQnxGlContext.

Change-Id: If9b5a82a0f64dc0a42bee687d351bea43fb05d51
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-02 14:40:44 +01:00
Fabian Bumberger
74d84f32da [QNX} Remove adjustBufferSize from the egl window
setGeometry will adjust the buffer for an egl window when a egl surface is created.
Adjusting the buffer somewhere else can be potentially harmful. Another reason is that
every egl window has a buffer on its own (unlike raster windows) so we do not have to
check if we have to create a buffer after reparanting.

Change-Id: I01406867a0dab598dac7d86e1f1e28ca9736a299
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-02 14:40:41 +01:00
Fabian Bumberger
29cd7db616 [QNX] Fix crash when creating eglSurface
Change-Id: I9cf9d56003a5f237dcf00b621fddf74e8d0ca190
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-02 14:40:35 +01:00
Richard J. Moore
30d199a76c Fix the QSslSocket::setCiphers(const QString &) overload.
The overload used an evil hack to work around a flaw in the QSslCipher
API rather than fixing the API. The hack was broken by the addition of
support for newer versions of TLS. This change solves the issue properly
by fixing the QSslCipher API then using the fixed version.

Task-Number: QTBUG-34688
Change-Id: Ibf677c374f837f705395741e730d40d8f912d7c6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-02-02 12:18:23 +01:00
Giuseppe D'Angelo
e5fd241770 Fix QByteArray documentation w.r.t. QString-related methods
There's no loss of data when converting a Unicode string to UTF-8,
so don't state that in the docs.

Change-Id: If26914ec674a994d9c59136448e8e4292d0412e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-01 21:34:00 +01:00
Marc Mutz
861574ebb6 QGraphicsSceneIndex: replace polymorphism with a function pointer
QGraphicsSceneIndexIntersector was used as a kind of polymorpic predicate in
items_helper(). But it had only one function and the instances of it, which
were kept around in QGraphicsSceneIndexPrivate, were re-initialised on every
call to items_helper(), which means that one can just as well pass that
miniscule amount of data to the function itself.

Replaced the polymorphism with a function pointer and the comparison state
(which is conceptually const if it wasn't for the requirement to assign
to it all the time) with a const void * argument.

Effects on Linux AMD64 GCC 4.9-trunk release stripped:
  text:   -1584B
  data:    -376B
  relocs:   -26

I've wrapped the functions in a namespace. The only reason for this is
to keep the functions, previously defined in class bodies, at the same
indentation level so as not to destroy the git-blame history for them.

Change-Id: I8e1f48030047a3c54e881de7c77a3325b3e1f509
Reviewed-by: Alexis Menard <alexis@webkit.org>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2014-02-01 15:51:17 +01:00
Bastiaan Veelo
5e99b07a07 Fix setWindowFlags() for QMdiSubWindow.
It was impossible to hide/show the close button after a QMdiSubWindow
was created.

Task-number: QTBUG-9933
Task-number: QTBUG-27274

[ChangeLog][QtWidgets][QMdiSubWindow] Fixed setWindowFlags() for QMdiSubWindow.

Change-Id: I7db9a1bef5ba8a8ace729acb85682c8b3de9c33c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-01 15:50:26 +01:00
Peter Kümmel
404a84e411 CMake: don't require GL when build with -no-opengl
Task-number: QTBUG-36509
Change-Id: I03451527ab91754d87ff2a43985952c7c7641826
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-01 15:44:02 +01:00
Thiago Macieira
dd987a9ef0 Add other integer overloads to QFlag's constructor
This avoids "change of sign" warnings as found by ICC when the high
bit is set. This often happens when you do
    X & ~Y

as ~Y probably has bit 31 on. If the enum is unsigned, then there's a sign conversion.

Change-Id: Ia5f221d928ac0155f4504a70c4046e60c25fbf3b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-01 06:58:36 +01:00