Commit Graph

13042 Commits

Author SHA1 Message Date
Jocelyn Turcotte
04f6dffbf9 QOpenGLWidget: Avoid crashing if updateGL is called before the first resize
Change-Id: I9e7788334de98b35dc5d6beee97a63783a1fe267
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-09 10:47:02 +02:00
Frederik Gladhorn
ccdfe354a6 Accessibility Mac: Cache Accessible Elements and Notify about changes
The big change is that we now keep the id objects representing accessibles
around so that they are persistent for ATs.
This improves performance of Mac accessibility significantly.

This is required for notifications which are now sent so that many things work much better,
for example the VoiceOver focus follows the keyboard focus.

The parent element in QCocoaAccessibleElement was removed, we can
dynamically access it more reliably.

Change-Id: I686d212f40d28b392dcc22f16f3c3430f08bdc98
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-09 10:46:02 +02:00
Laszlo Agocs
7537a4605a Correct QOpenGLContext::versionFunctions() docs
The example is incorrect: no context parameter is needed.

There was also no mentioning of the fact the the context must be
current at the time of calling initializeOpenGLFunctions(). This
is corrected too.

Change-Id: If8695140096e4b4f84927579c099b0af80750703
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-09 10:45:36 +02:00
Tomasz Olszak
041c4d9c0b Forward "_q_platform_*" QWidgets's properties to QWindow.
This way we can customize QPlatformWindow by using
dynamic "_q_platform_" properties in corresponding
QWindow.

Change-Id: I987b7a17d252541fe766af6aa37a6cffb67f1807
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-04-09 10:45:15 +02:00
Uli Schlachter
e215aba4aa XCB: Only use the XFixes extension if available
Commit 0d4918950e added a new place
(QXcbWindow::setTransparentForMouseEvents()) where requests from the
XFixes extension are generated. However, this wasn't checking if the
extension is actually supported before using it.

Fix this by turning QXcbWindow::setTransparentForMouseEvents() into a
no-op if the XFixes extension isn't available.

This means that the window in question won't be transparent for mouse
events, but we cannot do much about that if the X server doesn't support
the required extension.

Task-number: QTBUG-38109
Change-Id: I2931481eb71bab990f2dcf0ec600b9e62d3d799c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-09 10:38:46 +02:00
Marc Mutz
6b2b0cd41b QPageSize: clean up operator==
Recognize that the d-pointer can never be nullptr and drop the
nullptr checks.

The d-pointer can never be nullptr as there's no move ctor and all other
ctors create a QPageSizePrivate.

Change-Id: I6c4e165949ed55510aefbc2d933f20fc8e624333
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-08 22:07:16 +02:00
Marc Mutz
1baf8e9ad7 QPageLayout: clean up operator==
The old code always compared the Private classes, unless one of them
was nullptr (which it never was, as there is no move ctor and all
other ctors create a QPageLayoutPrivate.

The new code compares the dpointers, and only if they differ, the
Private classes. It also drops the nullptr checks, as they cannot
trigger.

Change-Id: I523c3503e2edb520f98f9b4e2e3bdaf28a9a355d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-08 22:07:08 +02:00
Marc Mutz
c7dd6006b9 QPageLayout: provide op!=
For consistency.

Change-Id: I20fb70999785e2c1947f033d63367a2f6746990a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:07:01 +02:00
Marc Mutz
4bed03eb85 QPageLayout: make op== non-member
Better style, since it treats the left-hand and right-hand size symmetrically,
e.g. for implicit conversions.

Change-Id: Ib5d39b1ebffffcb664ee2f72c756702469e32d3b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-08 22:06:55 +02:00
Marc Mutz
0de0f494bd QPageLayout: use QExplicitlySharedDataPointer
Many setters check for an actual change before making changes to
data members, but because of QSharedDataPointer, the detach had
already happened by the time the comparison returned false.

Change-Id: I320806e74de4a64fa3a340831621c1f5120ebb0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:06:50 +02:00
Marc Mutz
7b3d9bbdf2 QPageLayout: remove QPageLayout:: overqualifications
This is not Qt style, not needed, and clutters the code, so remove
QPageLayout:: qualifications where they're not needed.

Change-Id: I62f90c29bcb9f3c137d319051ac79e081fe5fb69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:06:44 +02:00
Marc Mutz
22afdaa2da QPageSize: provide op!=
For consistency.

Change-Id: I4375a6f8c2514479a7479c735d397bf8a9876db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:06:38 +02:00
Marc Mutz
9f924338a8 QPageSize: make op== non-member
Better style, since it treats the left-hand and right-hand size symmetrically,
e.g. for implicit conversions.

Change-Id: If1ffa9dc2a018e402c884f60bfbc82e799daeb92
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-08 22:06:31 +02:00
Marc Mutz
6115ba4f4e QPageSize: mark ctors explicit
A QSize or QSizeF is not an accurate representation of a QPageSize, so
the corresponding constructor should be explicit.

Change-Id: I6b1808e5f93e3caef948c0e5300bd3c20e3c4210
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2014-04-08 22:06:25 +02:00
Gatis Paeglis
c2b2ef32ca Don't access null pointer
Change-Id: If9ac712543f7c7fd85d877bba76e67ce89c60c61
Reviewed-by: Michael Brasser <michael.brasser@live.com>
2014-04-08 16:26:17 +02:00
Michael Brasser
5fe98ebb37 Prevent QUnifiedTimer from ticking backwards.
This could happen in the following situation:
* a custom animation driver with fixed delta
* a triple-buffering scheme (rendering ahead a frame)
* a second animation timer starting while a first was active

This would cause QUnifiedTimer::startTimers() to trigger
QUnifiedTimer::updateAnimationTimers(-1), and use the current time from
the QElapsedTimer rather than the animation driver. This time could be
less than the last reported time from the animation driver.

Change-Id: Ibf1796fcb99f288d4946b30e5e7225695aa61781
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-08 10:57:56 +02:00
Richard J. Moore
f41418aeb2 Ensure we initialize things before checking the openssl version.
Task-number: QTBUG-37783
Change-Id: Ie276e597062d8bfc74ef57251ed21a94020e030f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-08 10:40:50 +02:00
Shawn Rutledge
3a100edc4f QTestCase: fix macros taking expressions to avoid clang warnings
They were of the form "warning: using the result of an assignment
as a condition without parentheses [-Wparentheses]"

Change-Id: I049bf0f67073bf41310ca5ee73f17e5e69de569f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-08 10:39:13 +02:00
Jason Haslam
53c8a687b4 Fix xcb plugin backing store byte order issue
The image format of the backing store should use the byte order of the
machine where the application is running, not the native format of the
X server. Then, if the byte order of the backing store image differs
from the X server's native format, it needs to be converted before
being sent across the network.

Task-number: QTBUG-29898
Change-Id: Ic91c8ffb814c6beeb9f1d9195174a47d8bd94a90
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-08 09:54:16 +02:00
Bernd Weimer
c6720d8721 QNX: Destroy window buffers when resized
QNX version of screen doesn't reallocate window buffers dynamically.
The buffers have to be destroyed and recreated when a window is resized.
As the overhead is minimal this will be done on BlackBerry, as well.

Change-Id: I488942879822c64a6ab1871ebf5d6da9aec144d6
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-04-08 09:50:08 +02:00
Eskil Abrahamsen Blomfeldt
118494aeda HB-NG on Mac: Fix PDF in end of string
The CoreText engine will remove the PDF token from the end of
the string (instead of producing a zero-width glyph for it),
thus the output will be different from the OpenType backend
and Qt will get confused. To fix this, we emulate the expected
behavior by molding the output in a special case.

This is a port of e45c4387ae16627d61e30a58ae901d888d375aa7 from
Qt 4.

Task-number: QTBUG-38113
Change-Id: Ia0a078e3a60317981d4d5a4ee7e575a1714a1d75
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-04-08 09:49:04 +02:00
Gabriel de Dietrich
30e6d442ff Mac style: Fix one-pixel offset for combo boxes in small size
Change-Id: I744c102bd086742b1052ed547e50037dddff4654
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-04-08 09:34:47 +02:00
David Faure
d2f5fdb20d QCUPSSupport: fix misuse of QDateTime::addDays()
QDateTime::addDays() is a const function and returns a new QDateTime with
the given days added, thus the current statement had no effect.

Found by applying Q_REQUIRED_RESULT in dev branch.

Change-Id: I1b061619d45d7806feaa2bf9fb6d9f0b43d63def
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-08 05:16:58 +02:00
David Faure
6ea574d446 QNetworkReplyHttpImpl: fix misuse of QDateTime::addSecs()
QDateTime::addSecs() is a const function and returns a new QDateTime with
the given seconds added, thus the current statement had no effect.

Found by applying Q_REQUIRED_RESULT in dev branch.

Change-Id: Id712334f91e0adb40bafc23470bf46479334c81a
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-08 05:16:58 +02:00
Thiago Macieira
fbeb43135f Mark Variable Length Arrays as a TS feature for C++14
The feature was removed from the C++14 draft standard and moved instead
to a Technical Specification. Since we don't know how to enable TS
features in GCC 4.9 yet, remove it from the definition.

The Clang definition is probably safe, since it is behind an #if
__has_extension.

Change-Id: Ibc32b35657b046680078b39a7678bd8e1e5395d2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-04-08 05:16:58 +02:00
Richard J. Moore
0ed1042092 Fix QNetworkRequest::setRawHeader() for QT_NO_CAST_FROM_BYTEARRAY
Avoid the implicit conversion in the doc snippet.

Change-Id: Iacec6dab371a22c16f537af471f6653d9c5ad43d
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-04-08 05:16:58 +02:00
Thiago Macieira
c33849d0cb Don't redefine dynamic_cast if it's already a macro
Redefining macros is always a bad idea. On top of that, MSVC doesn't
like when we #define dynamic_cast, even though the C++ standard
explicitly allows it.

Task-number: QTBUG-29093
Change-Id: I6e33d609ce213cf6a9085faa3f991a873d825dc6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-04-08 05:16:58 +02:00
Yoann Lopes
d03cc17a6c Android: use glyph cache resizing workaround with Vivante GC1000 GPU.
Task-number: QTBUG-38102
Change-Id: I9f423e15b9cbc3d2f424871f47795052b1f53e09
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-07 23:56:18 +02:00
Marc Mutz
5110831721 QPageLayout: use existing qBound()
instead of rolling our own qt_clamp().

Change-Id: I2729ae3ff98e8c29c66f0f5c792b1bc7bf586f06
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-07 23:42:09 +02:00
Peter Hartmann
9c2ecf89eb network: finish all pending replies upon error
... and not only one. This was a problem e.g. when there were several
requests to the same host and the host was not reachable; only one
reply would get an error signal in case we suppressed other errors in
"happy eyeballs" host lookup style.

Task-number: QTBUG-36890

Change-Id: I1b5757498bd644b0d773cf6c43e4950620949c5c
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-07 17:57:42 +02:00
Gabriel de Dietrich
1a4fc0a129 QStyle: Add new SH_ComboBox_UseNativePopup style hint
If the style hints it, QComboBox::showPopup() will try to
show a native popup instead. This is currently undocumented
and an opt-in feature (typically by using a proxy style).

Works only on Mac so far.

Task-number: QTBUG-32731
Change-Id: I4447e884cbd6b490f3039c7a95168698c0bed16e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-04-07 17:33:51 +02:00
Gabriel de Dietrich
abbdb4d98d QComboBox: Use native popups on Mac
This remains an opt-in solution bound to the usage
of SH_ComboBox_UseNativePopup in a proxy style. The
midterm goal is to make this option on by default,
possibly in 5.4. This solution is and will remain a hint
in the sense that some exotic use cases of QComboBox
(e.g., when setting its view) are inherently incompatible
with the native popup idea.

Task-number: QTBUG-32731
Change-Id: I2a3d780795c22f9989e44325fcaf314538b1de49
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-04-07 17:33:41 +02:00
Richard Moe Gustavsen
b8d0fac5a9 QGuiApplication: fix crash caused by posting fake mouse event
Since Qt expects a mouse press/release event to not change
mouse position in the same event, QGuiApplicationPrivate::processMouseEvent
will detect if a QWindowSystemInterfacePrivate::MouseEvent
tries to do this and convert it to two events; one move
and one press/release.

The problem is that the extra mouse event gets posted. So if
delivering the first event causes a flush in the event queue
(which can easily happen if e.g calling processEvents), the
second event will be processed before the first returns.

On iOS we see a crash with DnD as result of this, since drag
data gets deleted on mouse release, and returning back to a mouse
move after that will cause dangling pointers.

This patch will instead of posting the event, call the
event handler recursively with the faked event as argument.
That way a flush will not cause the "pending" event to be
delivered.

Change-Id: Id9d88053b4859083fedd666584815016d67ac51b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-07 11:07:31 +02:00
Joerg Bornemann
e30ae1268f fix build for MSVC 2010
The Windows version for QS_TOUCH and QS_POINTER was slightly off.

Change-Id: Idb8a8219e09c6aa1a1b24e45b9da640c8d4b7161
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-07 11:02:57 +02:00
Jocelyn Turcotte
f4f1f597d4 Fix a crash on startup with QOpenGLWidget
After c4aabeb2b8 we now try to access
q_ptr in QWidgetPrivate::setRenderToTexture. QOpenGLWidget needs to
delay this call after the QObject constructor is done to make sure
that setTextureChildSeen doesn't dereference q_ptr before it has
been initialized.

Change-Id: Icaee82c8b806f42bc7614b0ac6fe4e6026331750
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-07 10:58:24 +02:00
Shawn Rutledge
b5eb850e0d OSX: add several menuitem roles to support menu shortcuts in dialogs
Now menu items and key shortcuts for Cut, Copy, Paste and Select All
work in the standard ways in dialogs such as the file dialog, provided
that the corresponding QActions have been created and added to the menu.
This depends on new roles to identify each menu item which is so
broadly applicable that it should work even when a native widget has
focus; but the role will be auto-detected, just as we were already
doing for application menu items such as Quit, About and Preferences.
When the QFileDialog is opened, it will call
redirectKnownMenuItemsToFirstResponder() which will make only those
"special" menu items have the standard actions and nil targets.  When
the dialog is dismissed, those NSMenuItems must be reverted by calling
resetKnownMenuItemsToQt(), because to invoke a QAction, the NSMenuItem's
action should be itemFired and the target should be the
QCocoaMenuDelegate.

Task-number: QTBUG-17291
Change-Id: I501375ca6fa13fac75d4b4fdcede993ec2329cc7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-07 08:30:24 +02:00
Frederik Gladhorn
a7f98a7ac0 Mac Accessibility: Make more widgets name/description work
Change-Id: I0abe17a59f95818939d6b82500d2463c3f135989
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-05 21:48:42 +02:00
Frederik Gladhorn
cc57a2e90f Accessibility text updates for QTextEdit
For Mac this makes QTextEdit work nicely with VoiceOver.

Task-number: QTBUG-37204

Change-Id: I1326d24ca6a932ad667ee395f62881b6ec64e892
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-04-05 21:48:31 +02:00
John Layt
bc46b591b2 QPagedPaintDevice - Move QPageLayout methods
The new QPageLayout methods weren't originally added to QPagePaintDevice
as no new virtuals can be added, instead static polymorphism was used to
add the methods directly in the derived classes QPdfWriter and QPrinter.

This however means that classes like QTextDocument with print() methods
that take a QPagedPaintDevice are unable to access the QPageLayout
methods. To fix this, instead make the QPagedPaintDevicePrivate a
virtual class and have QPdfWriter and QPrinter implement derived
private classes that are called by the non-virtual QPagedPaintDevice
base methods.

Change-Id: Ieb6e513b1fa05f5ae76ea1f9156b0b1a053089eb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-05 21:47:46 +02:00
Thiago Macieira
d84da39964 Use the new 3-operand testAndSet functions in QMutex
This allows us to get the current value of the QMutex / QBasicMutex
after the testAndSet operation failed. It saves an extra load from
memory.

Change-Id: I4922a8b3df15e342b177b13f56cf4f1184314520
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-04-05 21:47:09 +02:00
Alejandro Exojo
0ebfd0866d Use category names when logging to the journal
Use the custom field QT_CATEGORY to store the name of the QLoggingCategory used
when writing to systemd's journal. To pass custom fields sd_journal_send() is
needed, and is used in combination with #define SD_JOURNAL_SUPPRESS_LOCATION to
store the metadata that is already in the QMessageLogContext.

Change-Id: I6a120701f7012aaa46451dd3d91586a419c5f803
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-04-05 13:27:05 +02:00
Morten Johan Sørvig
687fbc1152 Improve QWidget::metric for PdmDevicePixelRatio.
Use QWindow::devicePixelRatio() which is the most
accurate devicePixelRatio accessor since it can ask
the platform native window directly

Fall back to qApp->devicePixelRatio() if the window
pointer is not valid.

Task-number: QTBUG-37606
Task-number: QTBUG-38078
Change-Id: Ief1468a0c6ced07439f55329ab056883016241cc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-05 08:16:23 +02:00
Morten Johan Sørvig
2884d7c9aa OS X: Improve QLibraryInfo app bundle testing.
QLibraryInfo::location() paths are relative to
"myapp.app/Contents/" when the application has a
bundle and relative to the executable when not.

However CFBundleGetMainBundle() can and will return
a valid CFBundleRef even if the application is built
as a standalone executable.

Add a test that verifies that the path constructed
with "/Contents" exists on disk. Fall back to the
non-bundle code path if it doesn't.

This bug was hit in cases where a qt.conf file was
present side-by-side with the app binary, for example
in qtbase/bin.

Task-number: QTBUG-38039
Change-Id: Id993599208fe94fff283c725778f8ad47b610ba7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-05 08:16:19 +02:00
Morten Johan Sørvig
840a665017 Cocoa: Don't beep on maximize.
Use zoom instead of performZoom: Does not beep if
there is no Zoom button, and is what Qt 4 did.

Task-number: QTBUG-37716
Change-Id: Iaa85d55a449744c38b260cf79745a433e0e3272f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-05 08:16:16 +02:00
Morten Johan Sørvig
a7e8b400d1 Cocoa: Make backing store flush accurate.
Flush the individual rects that make up the region
instead of the bounding rect. This is required for
correctness since then areas not included in the
region might not have valid backing store content.

The bondingRect() usage here had its roots in an
optimization in Qt 4, where it was observed that
flushing the bounding rect was more efficient than
flushing (many) individual rects.

Task-number: QTBUG-37918
Change-Id: Ib805f6713523f9895be24c48466870efaaf89c02
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-05 08:15:43 +02:00
Morten Johan Sørvig
bd2ec12a7b Cocoa: Make QScreen::topLevelAt() work correctly
The QPlatformScreen::topLevelAt() default implementation
is flawed in that it does not check z-ordering but
simply returns the first window in the window list
that contains the test point.

Add QCocoaScreen::topLevelAt(). Use [NSApp orderedWindows]
to iterate through the window list in z order. Add
a NSWindow->QCococaWindow mapping hash to QCocoaIntegration
for getting the corresponding QWindow once a NSWindow
is found.

Task-number: QTBUG-37597
Change-Id: I7af70163a32528cb56f8d6caa037b98f580ee191
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-05 08:15:24 +02:00
Morten Johan Sørvig
bb73d8d070 Compile: isChildOfQMdiSubWindow may be unused.
[-Werror,-Wunused-function]

Change-Id: Icf1e60ce3c5dadb96272453583d1cd03379eb73b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-05 08:14:49 +02:00
Morten Johan Sørvig
d24ada47b4 Cocoa: Support pasting rich text to Qt apps
Native Mac OS X apps uses Rtf as the rich text format
while Qt uses html. Add QMacPasteboardMimeRtfText
which supports converting from public.rtf to text/html
(but not the other way around, since we want to keep
posting our html as html).

The QMacInternalPasteboardMime API does not support
the concept of a one-way handler. Skip the Rtf handler
in QMacPasteboard::setMimeData().

Task-number: QTBUG-37188
Change-Id: Ibe29997a038bbb64da24b961e84a5f60133074e0
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-05 08:14:06 +02:00
Thiago Macieira
f1540a2966 Fix capacity reservation for shared QByteArray
We can squeeze, but not by discarding elements. Make sure the size of
the object stays intact after changing the reserved capacity.

I've also added unit tests for other containers, just to be sure.

Task-number: QTBUG-37750
Change-Id: I5135b095943b7589423c51cebcb52af792468e61
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-04-05 05:23:07 +02:00
Thiago Macieira
3e930baa98 Use Q_STATIC_ASSERT to check that the array has the right size
No need to sprinkle the code with Q_ASSERT. We don't want this to fail
to the user anyway. By using a Q_STATIC_ASSERT, a failure will be
immediately reported to the developer.

This also solves a warning found by Clang 3.4:
error: unused variable 'pageSizesCount' [-Werror,-Wunused-const-variable]

Change-Id: I79cf72c64242ad395276ce4360c59ad81112d9eb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-05 05:23:03 +02:00
Thiago Macieira
6c8ecf1000 Consistently hide the parts that require xcb-xkb
It was inconsistent. This also solves a warning from Clang 3.4:
error: private field 'vmod_masks' is not used [-Werror,-Wunused-private-field]

Change-Id: I6be9f7ef56dffe6df2be3beb984c2d82d3808403
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-04-05 05:22:58 +02:00
Fabian Bumberger
8d83562c1f QNX: Surpress manual window activation during showFullScreen
When a window is shown, libscreen will give it keyboard focus.
Requesting the activation right after the window is created (and
before libscreen activated the window) causes problems on some devices
e.g. Q10.

Change-Id: I29f7a38990ea4259a8b0c6624f70e31d7291af00
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-04-05 02:27:31 +02:00
Samuli Piippo
1a6d7b6e93 Fix neon image scaling function declarations
Change on the image scaling functions did not update the neon function
declarations.

Task-number: QTBUG-35927
Change-Id: Ia1e7428953aa140cad36e1cf26a18bfefc2267e7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 22:05:57 +02:00
Sergio Ahumada
2343b74193 Doc: Fix documentation warning in qstylehints.cpp
warning: Command '\snippet (//! [6])' failed at end of file 'code/src_gui_kernel_qguiapplication.cpp'

This change amends 56cd9cc2b0

Change-Id: I63a2f086fc582d3a9c8b60f1ef94ccb537b0d3a5
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-04-04 22:05:57 +02:00
Oswald Buddenhagen
a4ec90175c purge vestiges of opengl es 1 support
amends 0d5170256c.

Change-Id: Ifa178d38f602bb7c66ef13334673ff47e332af5b
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 19:32:21 +02:00
Thiago Macieira
964ac38fb0 Don't read before the beginning of the string
The code did discard the the data, so it wasn't affecting the comparison
result (tests added anyway), but it could cause crashes if the pointer
to the beginning of the data in the first 8 bytes of a page.

Change-Id: I618e68de329b65de34ef8c934934c3e631cc6c9f
Reported-By: Erik Verbruggen
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
330f6e3598 QTextLayout: Fix cursor movement from invalid position
Actually guarantee cursor doesn't move in this case for both logical
and visual modes (just what the documentation says we already do ;)

Change-Id: Iabdca7aa1d205672386a0095e3487e585611cdb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
47056e78d3 Optimize QTextEngine::insertionPointsForLine() a bit
Reserve the insertionPoints vector capacity prior to multiple append()-s.

Change-Id: I97ab5b2a1add9f2e87c04ad0707bf516c13ff4d7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
0b5911f376 QTextLayout: Fix visual cursor movement in some cases
To guarantee proper positioning at the end of the last line in a
bidirectional text we have to insert the eol position into the
insertion points vector, accordingly to the visual ordering.
Detection of the last *logical* item in a *visual* line is unrelaed
to the text direction, it is simply `iterator.item == iterator.lastItem`.

[ChangeLog][QtGui][QTextLayout] Fixed visual cursor movement
in bidirectional text.

Task-number: QTBUG-18060 (partially related)
Change-Id: I53b6ab889ef580ab0560b620b808b1e09efc0fbd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
d828672945 QTextEngine: Fix visual position movement for tab and object cases
QTextLineItemIterator::next() was never updating itemStart and itemEnd
for QScriptAnalysis::TabOrObject, thus producing incorrect
insertion points for the line that contains tabs and/or objects.

Change-Id: Ia964c663cc0636ba6be4500702656f989b252fba
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Konstantin Ritt
6d39e87f34 [HB] Ensure we always working with non-multi font engine
Change-Id: If88385d4cecdc527b7952d34e48f7ba889173c6c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-04 19:32:21 +02:00
Jocelyn Turcotte
495c4d501e Make it possible to render QtWebEngine in QOpenGLWidget
Setup the GL context as shared with the Qt global share context.

Change-Id: I199cfc7d290466d0ad99294bcffcd738b615862b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 16:55:08 +02:00
Friedemann Kleint
19ff7d038f Increase tolerance for warning about QTest::qSleep() for Windows.
50% is too strict, it clutters the logs.

Change-Id: Ib391064f32e39a1192e77d872cd99b7f95a5065a
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
2014-04-04 16:31:27 +02:00
Martin Koller
f0dbc6b37e Fix: Initialize all needed member vars
Change-Id: I74b71d93e25e4b3b0c1a5766f2fbc4f71aebecbb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-04 15:47:55 +02:00
Jorgen Lind
7d005c502b Add isCreated to QOpenGLTextureBlitter
Change-Id: Icb1a0354ac1caee38e3cb0cba6d7daec99d66c54
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 10:50:48 +02:00
Shawn Rutledge
ba2ea6da29 Don't assume qt_tablet_target widget exists from one event to the next
In this scenario there is a widget with a button inside, and you click
the button with the tablet.  The target of the event is the button,
but when you click it, the parent (or ancestor) is destroyed.  Commit
2bac49265e took care of the case when
the parent is a window, but it is not always a window which is being
destroyed.  So the approach of using a QPointer is better because it
should take care of all the cases when the qt_tablet_target is
destroyed during the course of a tablet event sequence.

Task-number: QTBUG-36848
Task-number: QTBUG-38040
Change-Id: Ia0e861f2cb2fbc30234aa596f3a36ddd0835a9af
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 10:46:21 +02:00
Jorgen Lind
82d2d9b3cc Fixup QGuiApplication::sync to flush the QWSI queue
Change-Id: If4cedeb886e912f622a66b2b3374d6260cffc32a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-04 10:35:23 +02:00
Mark Brand
00d5e3c917 update bundled sqlite to 3.8.4.3
The "Fixed CE build of sqlite3" patch is preserved in this change.
(ea70ec8711)

Change-Id: I163a4bcc92f47838c8203d8f5d78bbdcb0c1fd84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-04 09:28:51 +02:00
Morten Johan Sørvig
078f83a761 Compile: remove "register" keyword in MD5Transform
"register" is usually ignored by the compiler and
is deprecated in C++11

[-Werror,-Wdeprecated-register]

Change-Id: I3a10f2128e4a4574b2cd3861bddbbd4ba6a3683f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-04-04 01:29:35 +02:00
Joerg Bornemann
10a0ac759e Windows XP target support for MSVC >= 2012
To enable windows xp support, we must do two things:
1. linker flag must be /SUBSYSTEM:CONSOLE,5.01 or
   /SUBSYSTEM:WINDOWS,5.01. For x64, the version is 5.02.
2. Do not use Windows Kit 8. Win SDK v7.1A is recommended. Prepend the
   right include paths and lib paths to INCLUDE and LIB before
   building.

The Windows XP target support is enabled by passing "-target xp" to
configure.

Task-number: QTBUG-29939

Change-Id: I84c8439606cc2a9d27d64947702846faa4f1e4a2
Reviewed-by: Lucas Wang <wbsecg1@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-04-03 18:31:45 +02:00
Gatis Paeglis
6ad458bc93 Fix regression in key handling.
libxkbcommon 0.4.1 added two new functions, xkb_state_key_get_utf{8,32}(). They
combine the operations of xkb_state_key_get_syms() and xkb_keysym_to_utf{8,32}().

The xkb_state_key_get_utf{8,32}() functions now apply Control transformation: when
the Control modifier is active, the string is converted to an appropriate control
character. This matches the behavior of libX11's XLookupString(3), and is required by
the XKB specification:

http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier

Task-number: QTBUG-36281
Change-Id: Ib45f45d801291c171640600384107a35d7d56b9b
Reviewed-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-03 14:20:25 +02:00
Gatis Paeglis
bd40a7cc44 Update bundled libxkbcommon version to 0.4.1
This is the latest version, released on Mar 27 2014. It includes:

https://bugs.freedesktop.org/show_bug.cgi?id=75798
https://bugs.freedesktop.org/show_bug.cgi?id=75892

Required for fixing input when running Qt application on Mac OS X
with XQuartz and for fixing QTBUG-36281.

Change-Id: Idc4d3c99a4008a10b91ab51c8910b36909974703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-03 14:20:19 +02:00
Laszlo Agocs
581d10bdf2 Avoid recreating the underlying context in QGLContext wrappers
QGLContexts created from a QOpenGLContext get their valid flag reset,
resulting in creating a totally new underlying context. This is wrong
and becomes visible when sharing is expected between contexts (since the
QGLContext's underlying QOpenGLContext will not have sharing).

Task-number: QTBUG-37893
Change-Id: I8cb37c11dfb400a77e510bf4c8219bedc742309e
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-03 14:18:41 +02:00
Topi Reinio
dfb70fbfc4 Doc: Fix Qt Gui filter name in Assistant
Use bookcase for the filter name like the rest of the modules.

Change-Id: I9690d0b6a6f3abb11837120da75832475b975b5d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-04-03 11:07:07 +02:00
Jocelyn Turcotte
4bbf313e9d Fix UI squishing when using QWidget::setRenderToTexture
When resizing a window, a window might not be resized synchronously with
its backing store. We need to use the actual texture size as the transform
to avoid stretching the rendered texture.

Change-Id: I945f6d190577ccdcb54483a267a1e42df1ca3156
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-03 11:07:07 +02:00
Samuel Gaist
afacf694d5 Use Finder bundle identifier over path for OS X bundle detection
Currently, checking if Finder is the application returned for
opening a bundle is done using its absolute path. Finder might
be relocated in future OS X versions which makes this approach
less clean.

Using Finder's bundle identifier allows us to ignore where it is
stored in the filesystem as the identifier will not change.

Task-number: QTBUG-31884
Change-Id: Ib4c3412fb206fadda04eb547bc6a4eef02ee949a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-03 11:07:07 +02:00
Dyami Caliri
2d8b40439d Cocoa: Fix crash when disconnecting an AirDisplay monitor.
There are some cases where unplugging a monitor temporarily leaves
a QCocoaScreen object with an invalid m_screenIndex. Debugging shows
that the OS does not report the screen update before Qt attempts a
repaint. This calls devicePixelRatio(), which calls osScreen(), and
the index for the screen is out of bounds.

By temporarily exiting updateGeometry() when the screen is unavailable,
we avoid the crash. The OS quickly reports the monitor state change
and everything returns to normal, unnoticed to application.

Task-number: QTBUG-37606
Change-Id: Iacb2ff22bd3df72a5d87b2289242fb393625af57
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-03 11:07:07 +02:00
Kari Pihkala
bdf55f62a2 Change the hidpi cursor hotspot coordinate mapping
All hidpi coordinates in Qt are device independent points and
the hidpi cursor hotspot should follow that convention.

Change-Id: Id5295cae7a463e9a3ea85d2b0a18a5020dc97656
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-04-03 11:07:07 +02:00
Morten Johan Sørvig
acebf67712 Cocoa: Close ToolTips on parent window move.
Treat Qt::ToolTip windows the same way as Qt::Popup
windows: The parent window keeps track visible
transient child windows of this type and closes
them when appropriate.

This improves the locator popup window behavior in
Qt Creator: It now closes when moving the main Qt
Creator window.

Change-Id: Ibc5d0713469b7c9aba2fd13fb1eb559706c8c4ed
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-04-03 11:07:07 +02:00
Morten Johan Sørvig
66178447e9 Mac: Use QString::toNSString in QtBase.
The string is now autoreleased.

This fixes a memory leak in qt_mac_QStringListToNSMutableArrayVoid

Task-number: QTBUG-20347
Change-Id: I11ebeb264af4c8ce98968f2221eea772f24c12d4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-04-03 11:07:07 +02:00
Morten Johan Sørvig
d6202762c1 OS X: Fix QRubberBand drawing on retina displays
Extend the existing rect adjustment to cover the
upper/left edges as well. Check for a valid rect
before drawing.

Task-number: QTBUG-34534
Change-Id: I156abf4fb52924c350ec24fb44eadca86b2d5339
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Steve Mokris <smokris@softpixel.com>
2014-04-03 11:07:07 +02:00
Kai Koehne
b11adb825c Logging: Be also more strict with value of logging rule
Only accept lower-case "true" and "false", as documented.

The old check didn't match either the documentation, nor the QSettings/
QVariant behavior (where, for a boolean value, any lower-cased content
that not empty, "0" or "false" is considered true).

Change-Id: I317d29c16a27f862001b9dff02e8298df8acf5a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-03 11:07:07 +02:00
Laszlo Agocs
828cfb4019 Avoid double clicks confusing popups
Setting qt_button_down on DblClick is dubious and breaks popups like menus
since they won't appear correctly on every click anymore when clicking on
them rapidly several times.

Task-number: QTBUG-37891
Change-Id: Ic6cbbbe8b42891d2f9fa2ff66aa42bb89230d896
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-04-03 11:07:07 +02:00
Andrew Knight
4dd9a02001 d3dcompiler_qt: Fix default precompiled path
The trailing slash was missing, which caused the resulting path to be
wrong.

Change-Id: Iaa9dee15e744307c2d438181964b71c412fd9709
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-04-03 08:54:48 +02:00
Gatis Paeglis
0dbd8c0be7 Be less verbose about invalid keysyms
Report invalid keysyms only when DEBUG_GENERATOR is defined.

It is not unusal that Qt applications are used on old linux
distributions where Compose files might be far behind the current
development, therefore we should be less verbose when encountering
invalid keysyms. On Red Hat 5 compose key plugin reports ~3200 lines of
warning messages:

"Qt Warning - invalid keysym: U1001D1BC"
"Qt Warning - invalid keysym: U1001D16F"
"Qt Warning - invalid keysym: U1001D1BA"
"Qt Warning - invalid keysym: U1001D165"
"Qt Warning - invalid keysym: U1001D16F"
...

Task-number: QTBUG-34483

Change-Id: If0c51d300508ef164ad7fc59b0a76a838cd5a3b9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-04-03 08:44:34 +02:00
Friedemann Kleint
d5ff16bc8e Fix access of tmpStorage in QODBCResult::exec().
Instead of using a list and appending / popping of elements, use
a vector of constant size and access via index to avoid
bookkeeping errors.

Task-number: QTBUG-37831

Change-Id: Icb5a182626c63e693b04daaf7a2f70997d9aeae1
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2014-04-03 08:20:48 +02:00
Lisandro Damián Nicanor Pérez Meyer
00cfcfefb3 Enable s390[x] detection.
It has been working in Debian for some time.

Change-Id: Ib5741a4ba68bf95c7020336c84bc66257ff27809
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-04-03 07:42:32 +02:00
Christian Strømme
c9241a1a7b Android: Don't accept the volume-key events.
On Android the volume keys are by default connected to the global volume
control and by accepting them we remove this feature. Meaning each
application would need to re-implement this functionality.
Ideally we should only accept the volume keys if they where accepted by
the user to avoid overriding default behavior, but we currently don't
have the infrastructure to do that.

To revert back to the old behavior the env. variable
QT_ANDROID_VOLUME_KEYS can be set.

Task-number: QTBUG-36570

Change-Id: Ib053a40383f2de452f385b19f7795c2fc23fc4fe
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-04-03 00:28:22 +02:00
Christian Strømme
5f6cbfb070 Android: Stop ART from complaining about missing thread names.
The new Android jvm (ART) complains loudly if we attach without
supplying a thread name.

Task-number: QTBUG-35441

Change-Id: I962d613be0db50f3ca9a4c786b36003f31c9db14
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-03 00:28:10 +02:00
Jocelyn Turcotte
b94493e6c8 Avoid an "OpenGL Error: 1282" output when resizing a QOpenGLWidget
When we delete the previous FBO in QOpenGLWidget::resizeEvent while
it is the currently bound FBO, the QOpenGLContextPrivate::current_fbo
will not be updated and will try to be bound during the initialization
of the new FBO.

Fix the issue by explicitly releasing the FBO on destruction if it
is current.

Change-Id: Id049889c4857526750bbecf3dd27343e44449c12
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-02 10:06:07 +02:00
Jocelyn Turcotte
f7971d37cb Add a way to share context between QtQuick and QtWidgets
This will replace QSGContext::setSharedOpenGLContext.

To be able to allow sharing the Chromium GL context with both
QWebEngineView and QQuickWebEngineView, we need some way of setting
the sharing within QtWidgets and QtQuick. Since they don't depend
on one another this patch allows the sharing context to be set
through QtGui.

Change-Id: I91b365dd06ec925b4c5a99ac82c222778781fe8e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-04-02 10:06:00 +02:00
Jocelyn Turcotte
7672f25f44 Enable the depth and stencil buffers by default in QOpenGLWidget
QGLWidget rendered to the default framebuffer, which had a depth and
stencil buffer attached by default.

Keep this behavior by adding the attachments to the FBO by default
in QOpenGLWidget.

Change-Id: I6f72a444eac3d8eabb7a539ad12216f1e5d2183d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-04-02 10:05:52 +02:00
Gatis Paeglis
ee3dea8d3f [xcb] Fix build failure
Build failure was introduced by 9bb634a617.

When linking with systems provided libxkbcommon, then DFLT_XKB_CONFIG_ROOT
can't be accessed directly.

The reason that this slip through CI is that on CI machines Qt
is build with bundled version of libxkbcommon.

In addition this patch improves keymap error message, by making it more explicit for
users what could be the reasons for "keymap compilation" failures and what should
be done to make input work. As it turns out this is a common issue on old systems,
servers and some VNC clients.

Task-number: QTBUG-37971

Change-Id: I77667a404150ee7ab8465a065e23ca5eea63c33b
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-04-02 08:47:36 +02:00
Fabian Bumberger
2c36469a16 QNX: Fix OpenGL autotest
On QNX grabbing the frame buffer returns the content of the back buffer.
In order to execute the OpenGL tests properly a swapBuffers is executed before
in order to be able to retrieve the content of the front buffer.

The patch also documents this platform behavior.

Change-Id: I7a501818ec6eea061f2f54f95854f68cb72e0534
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-01 23:35:21 +02:00
Friedemann Kleint
9a14731b7c Windows CE: Fix message about freetype font rendering.
Task-number: QTBUG-37976

Change-Id: Ib4bf6ba8f62e2dc4f3860313442fa57c67f06d9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-04-01 19:18:43 +02:00
Laszlo Agocs
d8281a92b8 Do not set fwdcompat bit for a compatibility profile QGLFormat
AMD drivers do weird things. Provide a workaround.

Task-number: QTBUG-37909
Change-Id: Idabd6ebb6e1447cb9bd92c7711a50aaa8575b9d6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-04-01 19:18:43 +02:00
Alberto Mardegan
0a86c31272 When looking up the window hierarchy, stop at foreign windows
If the window being activated is an embedded window, the parent window
will be a foreign window (usually not even belonging to the current
process); we shouldn't attempt to focus it.

Task-number: QTBUG-37984
Change-Id: I2ea03a86b30bbc43cde643e18e0e1d020e5f2c84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-04-01 15:54:49 +02:00
Laszlo Agocs
b4128d0f7d Use an offscreen surface in VAO cleanup
Avoid failing the makeCurrent() on iOS that does not currently support
using a window with different contexts.

Change-Id: I2e10ad7e382161625a78518d02ad94edaff591ca
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-04-01 15:51:33 +02:00
Maurice Kalinowski
30db2159aa Fix offset calculation on WinRT
According to MSDN "the offset must be a multiple of the allocation
granularity". We use this already for the win32 version by splitting
into offsetLo and offsetHi. However, we did not convert it back to the
correct argument passed for MapViewOfFileFromApp.

Now all auto-tests for mapping succeed.

Task-number: QTBUG-37773
Change-Id: I7e43f906cb93164b58f4e5e3f88388cdace865d7
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-04-01 12:29:14 +02:00
Andrew Knight
caf34b9f0a WinRT winmain: Pass ImagePath as part of ImageParams in Xap packages
ImageParams is used to pass arguments to main(), but when used the
original argv[0] is dropped. To remedy this, expect argv[1] to contain
the same value found in the Xap's ImagePath.

Change-Id: I2fb3b9956304fdcdeec4424ea56289d56ad4fe0b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-04-01 12:28:10 +02:00