Commit Graph

19024 Commits

Author SHA1 Message Date
Yoann Lopes
dddd5ebb08 Android: enable FBO readback workaround for more devices.
Now enabled for all devices equipped with a GPU from the Mali-4xx
series or Adreno 2xx series.

Task-number: QTBUG-40131
Change-Id: I2923c07033ef768aceec6f5590dbb6f26aa67087
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-10 16:00:28 +02:00
Alessandro Portale
66790d63e9 XCB: Enable loading of the Qt::DragLinkCursor
It did not load due to an off-by-1 boundary error in a check.
Qt::DragLinkCursor happens to be Qt::LastCursor.

Task-number: QTBUG-39735
Change-Id: Ia7b11fc4eecc4329bd487bd5689c83c986fd2de6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-07-10 12:48:55 +02:00
Eskil Abrahamsen Blomfeldt
5834360741 Fix fallbacks for adapted common script
When the platform plugin gives us specific fallbacks for a
specific script, we need to respect this, and load the correct
font family regardless of which writing systems it supports.

This is especially important since the common script is adapted
to match surrounding, proper scripts, so characters such as
digits next to e.g. Hebrew text will be marked as Hebrew. On
stock Android, there is a single Hebrew font, and this would
previously be put in all fallback slots for Hebrew regardless of
what fallback fonts were dictated by the platform plugin. Since
this font does not support the digits, they would show up as boxes.

[ChangeLog][Android] Fixed common characters like digits and
punctuation showing as boxes when positioned next to non-latin
scripts.

Task-number: QTBUG-39377
Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-07-10 12:38:36 +02:00
Eskil Abrahamsen Blomfeldt
1dd9a0af4f Fix fallbacks for adapted common script
When the platform plugin gives us specific fallbacks for a
specific script, we need to respect this, and load the correct
font family regardless of which writing systems it supports.

This is especially important since the common script is adapted
to match surrounding, proper scripts, so characters such as
digits next to e.g. Hebrew text will be marked as Hebrew. On
stock Android, there is a single Hebrew font, and this would
previously be put in all fallback slots for Hebrew regardless of
what fallback fonts were dictated by the platform plugin. Since
this font does not support the digits, they would show up as boxes.

[ChangeLog][Android] Fixed common characters like digits and
punctuation showing as boxes when positioned next to non-latin
scripts.

Task-number: QTBUG-39377
Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-07-10 10:01:49 +02:00
Peter Hartmann
916c9d469b QSslCertificate: blacklist NIC certificates from India
Those intermediate certificates were used to issue "unauthorized"
certificates according to
http://googleonlinesecurity.blogspot.de/2014/07/maintaining-digital-certificate-security.html
, and are by default trusted on Windows, so to be safe we blacklist
them here.

Change-Id: I9891c5bee2dd82c22eb0f45e9b04abd25efeb596
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-07-09 21:30:11 +02:00
Nico Vertriest
1b6bc6d34d Doc: moved saxbookmarks example files
Moved to qtbase/examples/xml/saxbookmarks
Png and qdoc file.
Updated qtxml.qdocconf accordingly.

Change-Id: Iafe50a09aee22f518adf9ec2ebf289e766e24ff4
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-09 12:17:34 +02:00
Friedemann Kleint
cdf9aed630 tst_qdir: Move QFINDTESTDATA() from init() to constructor.
Check result in initTestData().

Previously, QFINDTESTDATA() was repeatedly invoked in init(). The
data-driven cd() test then failed when invoked stand-alone since
cd_data(), which relies on the data path, is executed before init().

Task-number: QTBUG-40067
Change-Id: I91039247e8dcaedd92fa990f1b5f82bc54b17c60
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-09 10:59:42 +02:00
Nico Vertriest
71e1976bcc Doc: moved streambookmarks example files
Moved to qtbase/examples/xml/streambookmarks.
Files: qxmlstreambookmarks.qdoc and png files

Change-Id: I6edf975f1e0666a4283e65c933d31923695f8b4c
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-08 14:38:30 +02:00
Konstantin Ritt
e26660c004 Don't assert when HB-old is unable to deal with surrogates
Since we have no interest in fixing HB-old to properly support surrogates,
here is a simple workaround for the case when surrogate parts gets
treated like two separate glyphs in log_clusters but a single character.
And since it's a known issue that HB-old doesn't really support surrogates,
it's better to draw some garbage/boxes rather than to assert, IMO.

Task-number: QTBUG-39875
Change-Id: I95ff43e821ae989d7a6f792f71f157dcea92dd16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-07-08 09:40:24 +02:00
Eskil Abrahamsen Blomfeldt
df7ecb6802 Android: Fix compiling targets with space in name
We have to escape the target name to avoid compilation errors.
This fixes the compilation failure in the qprocess autotest.

[ChangeLog][Android] Added support for building libraries with
spaces in name.

Change-Id: Ib98ba261fb3a4cc1e835d0cd2f93aac6855a7c21
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-07-08 08:35:49 +02:00
Eskil Abrahamsen Blomfeldt
b56a42be14 REG: Fix nbsp in QTextLayout
At some point since Qt 4.8, the nbsp character has acquired
the whitespace attribute, causing it to be treated exactly
like an ordinary space. To account for this, we add an extra
check in the layout code to avoid breaking on non-breaking
spaces even if they have the whiteSpace flag set.

This is a temporary fix for the regression. The line breaking
algorithm needs to be refactored and support Unicode tr14
properly, which it currently doesn't.

[ChangeLog][Text] Fixed lines breaking on non-breaking spaces.

Task-number: QTBUG-39832
Change-Id: Ibd7e1a11ce4b82c611ecda1542c8638a67bf3cae
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-07-08 08:35:02 +02:00
Eskil Abrahamsen Blomfeldt
1c08a41cb9 Support getting test data from qrc
If none of the other locations work, we can fall back to bundling
the test data in qrc to make it possible to include test data on
platforms that do not have any good way of deploying files to the
traditional file system, like Android.

Change-Id: I7779ce6be2380d551697cecfb9f76652d1fd0a38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-07-08 08:34:30 +02:00
Eskil Abrahamsen Blomfeldt
ac2b15bdd0 Android: [REG] Fix QScreen::physicalSize()
The physical size should be set based on the screen size, not
the available geometry. This used to work in Qt 5.3.0 because
the screenSize and size of the available geometry was identical
on startup, but in Qt 5.3.1 the available geometry is 0x0 until
there the metrics are actually available to avoid flickering on
startup, so this caused a regression.

[ChangeLog][Android] Fixed regression where QScreen::physicalSize()
would return 0x0.

Change-Id: I6c2ee11205427a88764e129b05ece6d3fbbf4c99
Task-number: QTBUG-39978
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2014-07-08 08:32:32 +02:00
İsmail Dönmez
9569836668 Document QApplication::cursorFlashTime() can return -1
On Windows QApplication::cursorFlashTime() can return -1 if keyboard
blinking is disabled. Add documentation for that case.

Change-Id: I1e5d683573e55b045e2d9bd9804daf4be579fd02
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-07-07 19:31:24 +02:00
Niels Weber
81bd9633cc Fix for code snippet in commandlineparser documentation
One line in the code snippet wasn't translated whlie the others were.

Change-Id: Ie77a317833f800087b485609cd001dd26060a40f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-07-07 13:58:24 +02:00
Nico Vertriest
637ac8a81e Doc: removed trolltech.com from namespace in manual qdocconf file
Task-number: QTBUG-23270
Change-Id: Id65ded1adbbb4f15ef5634f9a984c6cfad5c18d5
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-07 12:38:27 +02:00
Christian Strømme
f17494e9b8 Android: Refactor exception checking in qjni.
In places where we call java/jni functions that can throw exceptions,
we check and clear the exception, if necessary. This change moves
the "checking" code into a single (private) function.

Change-Id: Ic3de2be51305972b096e1ed0a477e341eb5d9404
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-07 12:00:57 +02:00
Mitch Curtis
a2948e1387 Fix typo in QGraphicsView documentation.
Change-Id: Ib750a78e86b8af87d091705a1107ca1eccf32389
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-07-07 11:44:16 +02:00
İsmail Dönmez
a6ec09d7ed Fix QTimer with negative interval in QWidgetLineControl::setCursorBlinkPeriod
When keyboard blink is disabled, msec will be negative (-2 in my case).
In that case if (msec) will evaluate to true and create a QTimer
with a negative interval. Fix is to check for msec > 0.

Change-Id: I5c8d82c3cdaf26a961c986f4164805aacfe3ae37
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-07-06 20:16:18 +02:00
Thiago Macieira
16dccb24e4 Attempt to work with Visual Studio in -Za (strict ANSI) mode
Visual Studio always treats enum values as signed int, even when the
value doesn't fit in a signed int (like 0x80000000 or larger than 32-
the tags themselves are still signed. That causes ambiguity in creating
a QFlag from an enum value.

Visual C++ defines __STDC__ in C mode, but we have no macro in C++ mode.

Also note that the Windows SDK headers don't compile in -Za mode.

Task-number: QTBUG-39700
Change-Id: Ia943cef37ac1f539bd461c3c18200b0c365c72b3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-05 23:03:59 +02:00
Mitch Curtis
76371c4d56 Improve QListWidget documentation.
Mention that removeItemWidget() isn't sufficient to remove a row.
List related functions so that it's easy to see the relation
between them.

Change-Id: Ia1d467390f00976e2276d50df35dd555f7992a9a
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-07-04 10:59:24 +02:00
Friedemann Kleint
d7bb914ac8 Fix debug output of QTouchEvent.
Return dbg.space().

Task-number: QTBUG-29946
Change-Id: Ia79b297ee3801ccba9f7b1c22ac7a8761cbe8b2e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-04 06:29:32 +02:00
Liang Qi
88a47439d1 Doc: fix a link in QAbstractOpenGLFunctions documentation
Change-Id: Icc0109de22de756f7e4b3e888b0ee28a9b9c04d5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-07-03 20:01:26 +02:00
Frederik Gladhorn
5b4c996f36 Accessibility Linux: Fix crashes when accessing invalid functions
There is no way to prevent ATs from calling random functions on DBus.
While these functions shouldn't exist when we don't advertise the
interface, they should just fail gracefully.

Task-number: QTBUG-40044
Change-Id: Ia29b49b16feabc0beb80007456e53497f230c7d4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-07-03 18:20:04 +02:00
Michael Zanetti
35f6b00334 move loading of testability driver from QApplication to QGuiApplication
This is useful without QWidget too.

Change-Id: Ic7857e52e4a8f57c1205615a1f30323b486814af
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-03 12:00:10 +02:00
Martin Pley
1a32cc0ae4 QPdf::addImage(): avoid a QImage detach when it's in an acceptable Format
Don't detach QImage, when it's in Format_Mono or Format_ARG32.
Use QImage::constScanLine() instead of QImage::scanLine().

Change-Id: I30fcafb576aea3189637a40fd75f77c70017ba46
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-03 11:15:15 +02:00
David Faure
aabe80ae28 Make QDom/QXmlSimpleReader reentrant.
I moved the evil static bool to QXmlSimpleReaderPrivate, and used
it from QDom, when the reader instance is a QXmlSimpleReader
(if it's not, nothing happens, like before).

Task-number: QTBUG-40015
Change-Id: I54ba89db334d7b086379c4a6840cf0de23f77027
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-03 10:59:07 +02:00
David Faure
e26fa6d206 Move QXmlReaderPrivate to private header.
First step for making QXmlSimpleReader reentrant.

Task-number: QTBUG-40015
Change-Id: I1666672b1759adb745b86ce58488142f3c66d3f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-03 10:58:56 +02:00
Morten Johan Sørvig
47a66d5eac Mac: Don't register for Pan Gestures.
This will enable touch events for the viewport
widget, which has undesired side effects (see task).

Fixes a regression from Qt 4.

Task-number: QTBUG-38815
Change-Id: I7b9c0d1de985d1c82f946140fecf460fcfc5e686
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-03 09:17:43 +02:00
Morten Johan Sørvig
5f3ec26d90 Add opt-out environment variable for @2x images
There are cases where @2x images are in use but
where you don't want the associated behavior:
- You are implementing an image editor
- You are inheriting a resource set which has @2x
  images, but don't want that behavior with Qt.

Add support for disabling @2x behavior with QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING.

Change-Id: I206e050b6241f8935b4404c7a28b024a9e00d46c
Task-id: QTBUG-38485
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-03 09:15:42 +02:00
Maarten Lankhorst
19d289ab1b Listen to touch events on the master device instead of slave.
Listening to touch events on the master prevents pointer emulation
events from being generated, alleviating the need to grab.

Grabbing on the slave device is buggy, and breaks pointer emulation
on all current servers that support XInput 2.2 due to a bug in the
server, and will also grab unwanted touch events.

For reference, see https://bugs.freedesktop.org/show_bug.cgi?id=78345

Reverts 2c65b78b40.  The idea of
enabling each touchscreen separately was introduced in
4dbf574b7acb7ae8f852219700afa95f8d568f0e; that aspect is also
reverted.

Change-Id: I30d36397aa4ff2fb7a8ad2bbb94c2a13abd472b4
Task-number: QTBUG-38625
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-02 13:55:42 +02:00
Xu Feng
99d78b40e9 add support for device linux-arm-hisilicon-hix5hd2-g++
1. add qmake configuration for linux-arm-hisilicon-x5hd2-g++ using the
   arm-linux-gnueabihf-g++ crosscompiler
2. add eglfs platform hooks file: qeglfshooks_hix5hd2.cpp
3. support hisilicon platform hix5hd2

Change-Id: I22bdbe5785d1a6bc77715b8e8aa7caa22b62ddce
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-07-02 13:34:07 +02:00
Morten Johan Sørvig
cd07830e3b Cocoa: Handle Qt::WA_ShowWithoutActivating
Forward the flag to QWindow by setting the _q_showWithoutActivating
property on the window in QWidgetPrivate::create_sys().

Implement by refusing to become the key window
or first responder during QCocoaWindow::setVisible().

Task-number: QTBUG-19194
Change-Id: I8446927ec510d7226a5a7b51b7be49d2f9bfd098
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-02 12:56:32 +02:00
Morten Johan Sørvig
3c982a6384 Cocoa: Handle Qt::WindowDoesNotAcceptFocus
Make windows with the Qt::WindowDoesNotAcceptFocus
flag refuse to become the key window.

This is in addition to the existing refusal to become
the first responder in QNSView. Refactor the common
test into a new function:
bool shouldRefuseKeyWindowAndFirstResponder()

Task-number: QTBUG-32385
Change-Id: I31021b5d8895a17c48f94f3691e6590c90b68627
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-02 12:56:24 +02:00
Tim Blechmann
4f155b0535 Cocoa: Fix Qt-in-namespace build.
Wrap cocoa classes in namespace macros.

Task-number: QTBUG-39382
Change-Id: Id840e666105afca21760fcb529b5765e0a534120
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-02 12:56:06 +02:00
Morten Johan Sørvig
62f1aa7ca7 Cocoa: Separate framestrut and normal button state
Frame strut button state can get out of sync due to
missing calls to handleFrameStrutMouseEvent, typically
when a mouse down is sent but the mouse up isn't.

There is no reason this should interfere with normal
button state: Add m_frameStrutButtons for tracking
the frame strut button state.

Change-Id: Ia21700af94fe000c73088b7657237372f3a04bf8
Task-number: QTBUG-39810
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-07-02 12:55:55 +02:00
Morten Johan Sørvig
b942cf0f3b Make tst_QLocale::macDefaultLocale() more robust
The assumption that we can test "en_US" and expect
it to behave a certain way is flawed in that most
of the formatting settings are independently
configurable by the end user.

Make the test more robust while attempting to preserve
as much testing as possible:

Make the decimalPoint/groupSeparator tests check for
a range of possible values. Check that they are not
the same.

Remove the date formatting tests and the firstDayOfWeek()
== Sunday test.

Make the time zone test accept a non zero extended
time zone. ("GMT+2" in addition to "GMT+02".)

Change-Id: Ie1f89793eb785f526c5f6fafbb6726ef8c6cb016
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-02 12:55:47 +02:00
Gabriel de Dietrich
769af66893 QMacStyle: Fix focus frame rendering in Yosemite
Using the HITheme API would result in the frame's right edge
to be missing.

Instead, we use the recommended technique to draw the focus 
ring around a custom NSCell. (See 
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ControlCell/Articles/ManipulateCellControl.html)

Change-Id: I12d4834d353b5cbd5893bf070b14ad0d8bb75634
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-07-02 12:44:49 +02:00
Shawn Rutledge
90053954b8 OS X: when opening a URL via QFileOpenEvent, pass as QUrl
Opening a file from Finder and opening a URL from the browser are two
different operations, and the URL might not be a local file.

Task-number: QTBUG-39972
Change-Id: I467dfef7efe8eb88c922410db16137e135bc8133
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-02 10:52:26 +02:00
Bernd Weimer
8377384e3a Fix some tst_qwidget test cases
Fixed qwidget test cases for platforms that show windows full screen by
default and that don't support WindowMasks. Incorporated QNX/BlackBerry
peculiarities.

Change-Id: I349ecab5cef35c7d9751aa547465f685d620164a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-02 10:29:44 +02:00
Bernd Weimer
375b52f20f QNX: Override QPlatformScreen::topLevelAt
Implemented QQnxScreen::topLevelAt method, as base implementation
returned wrong results. This fixes "tst_qwidget widgetAt" for instance.
Removed related method, that is not used at all.

Change-Id: I25c4f474cb0d661e5e5cdcdd0ab13d670fd4dc37
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-07-02 10:29:33 +02:00
Tasuku Suzuki
5250e4f157 xcb: make sure to update window title when it is changed
Task-number: QTBUG-33775
Change-Id: Ibe346c4304532d031bfa1c9b4d73cd02d1e5a64f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-02 09:50:30 +02:00
Morten Johan Sørvig
ddeb907442 Skip unstable autotests in QtBase.
The combination of these unstable tests makes it very
hard to get changes through the CI system due to the
unrelated test failures.

Skip the following test functions:
tst_QIODevice::unget QTBUG-39983 (Mac)
tst_QThreadPool:expiryTimeoutRace QTBUG-3786 (Windows)
tst_QLocalSocket::processConnection QTBUG-39986 (Mac)
tst_QTcpServer::adressReusable QTBUG-39985 (Linux)

Change-Id: I96559bea0d437fd25966b6ccac1ece1490e06241
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-07-02 09:28:34 +02:00
Andreas Holzammer
23961aa54c WINCE: Fix grabWindow
BitBlt does not support CAPTUREBLT under
Windows Embedded compact. It was before defined to
the value it would have for a desktop Windows,
but as it looks if the bit gets set for Windows
Embedded Compact he does not do the right thing
anymore. So lets define it to 0 so that we dont
do any harm.

Change-Id: I447ebcd90eb9ae7c64f931aa8859b83794f201a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
2014-07-02 09:12:12 +02:00
Timur Pocheptsov
1529a3df95 Empty icons and Cocoa menu items.
Clear menu item's image if QImage is empty (isNull).

Task-number: QTBUG-39557
Change-Id: I8145b67342b0361da2bb945070603cc182202b71
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-07-02 09:09:03 +02:00
Topi Reinio
4827623acb Address Book example: Fix QTableView column sorting
Rearrange the code so that QTableView::setSortingEnabled() is
called after setting up the sort filter. This ensures that
new entries added to the model always follow the column
header's sort order.

Task-number: QTBUG-39585
Change-Id: Iaec8aa9342981817a019473ba12bad52cdbdfbb8
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-02 08:41:11 +02:00
Giuseppe D'Angelo
9e5765fba0 QOpenGLTexture: fix the feature test for Buffer Textures
1a4ff6f122 modified the features test
by checking extensions as well as the GL version. The problem was that
the GL version was wrong in the first place -- buffer textures are
natively supported since OpenGL 3.0, not 4.3.

4.3 introduced support for buffer texture ranges, i.e.
ARB_texture_buffer_range; however it's pointless to take the highest
requirement, especially considering that so far QOpenGLTexture doesn't
wrap glTexBuffer(Range) in any way. In the future, if QOpenGLTexture
will also wrap glTexBuffer, then we will also be able to introduce
a different feature flag for testing buffer texture ranges.

Change-Id: I6becbd49ac26d44ce01d088cbb7831b5cc127bdb
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
2014-07-01 23:26:37 +02:00
David Faure
9ee27005ee qDebug: fix data race in qt_message_print
The setting of (static) messageHandler to qDefaultMessageHandler if null
was happening in multiple threads simultaneously, so it needs synchronization.

Used an atomic pointer in case qInstallMessageHandler is called from a thread,
but more importantly, initialized the static vars right away.

Improve auto test to ensure that qInstallMessageHandler(0) still sets the
default message handler.

Change-Id: I70335af38c1d28a1cdba1df8a79c6006f227422e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-01 20:23:31 +02:00
Frederik Gladhorn
0272ce6417 Accessibility Windows: Do not assert on invalid indexInParent
We try to but don't always guarantee a valid hierarchy, having
applications crash because of this is not a good idea.
The assert currently triggers when showing message boxes.
Fix for the message box case is in progress but this may happen in other
situations.

Change-Id: I6f82b23c8abfcb7f91ecde0584f0e01bd8216ca1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2014-07-01 17:21:20 +02:00
Thiago Macieira
256f810be3 Fix annoying warning from ICC 14 on Windows
It says that defining a macro that does defined() is not portable. The
solution implemented for MSVC 2008 and earlier does work, however, and
is portable to all compilers (the parentheses around the macro are
unnecessary).

Incidentally, this makes d98004cd2f
actually work: Q_CC_MSVC wasn't defined at that point in the file, so
that change had never taken effect.

warning #3199: "defined" is always false in a macro expansion in Microsoft mode

Task-number: QTBUG-39597
Change-Id: Iaa2895e7f63d97c439090043435a2b8d2f185c3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-01 17:17:27 +02:00