Commit Graph

21572 Commits

Author SHA1 Message Date
Friedemann Kleint
619a0f14dc Re-add documentation for QStandardPaths::GenericDataLocation.
The text was accidentally removed in
1afe110b8f.

Fixes qdoc warning:
qtbase/src/corelib/io/qstandardpaths.cpp:60: warning: Undocumented enum item GenericDataLocation in QStandardPaths::StandardLocation

Change-Id: I7f236c01d85ebf76b67ab7af7e61b8cbedee4c36
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-25 09:26:31 +00:00
Lorn Potter
8c242fd65d Fix a crash in connman bearer backend on d'tor when using QStringLiteral
Task-number: QTBUG-41507
Change-Id: I7711eb34bf9ca738fb25031acff3371a6126ae23
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2015-03-22 16:38:15 +00:00
Paul Olav Tvete
d41368b4e9 Doc: warn about resize event bug
The resize event for QMdiSubWindow may occasionally have an invalid
oldSize(). This has been the case since 2007. Fixing this looks like a
high risk, low reward endeavour.

Task-number: QTBUG-32446
Change-Id: I80ce43987c7b6e346cd44f7ac4cef01b01e5472b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-03-21 15:37:44 +00:00
Eskil Abrahamsen Blomfeldt
c179fc710e Android: Fix compilation on armv5 with 4.9 toolchain
Thumb instructions trigger a compiler bug in e.g. Qt Script
when used with armv5 in the recent versions of the toolchain.
We already disabled this for the 4.8 toolchain, but the bug
is also present in 4.9, so we need to disable it there as
well.

Change-Id: I6cadc7efd2b59b9a2ffec038559edd0e7782a4b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-20 15:36:52 +00:00
Maurice Kalinowski
e6602a38e1 WinRT: Fix documentation for manifest capability description
0c7241cc contains the wrong identifier for device capabilities. This has
been updated in a previous commit, but documentation was not properly
updated.

Task-number: QTBUG-45098
Change-Id: I300a2ea19ebdf8a1aaed492a1bdf24b9af2bd60a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-03-20 10:35:43 +00:00
Eirik Aavitsland
d5c6335ff3 Fix rasterization errors in aliased cosmetic drawPolyLine
If a cosmetic polyline contained a 1-pixel segment, the next segment
would be drawn with wrong starting point.

The original fix for QTBUG-26156 had some unwanted side effects
(QTBUG-31579 and now QTBUG-42398). It tried to skip start-point update
if stroke() did not actually draw anything (because the segment was
too small). However, to determine that, it tested for a change in
lastPixel. But that was not failsafe; in some cases (1-pixel segment),
lastPixel could be unchanged even though the segment had been
drawn. With this change, we instead test directly whether stroke()
skipped the segment or not.

Task-number: QTBUG-42398
Change-Id: Id751db69a18cd1af4f45070db9d5698aa532d22a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-19 09:01:08 +00:00
Allan Sandfeld Jensen
90461979bc Avoid using the current frame as the previous in layout
When continuing a previous layout, we would in some cases add a wrong
margin because we would treat the current frame as preceding itself.

Task-number: QTBUG-42269
Change-Id: Idf00fadbed890ce34b073cf670cc9b8e1d4b0d5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-18 22:55:47 +00:00
Jocelyn Turcotte
ee7fea3338 OSX Fix disapearing tray icon
It would happen together with an error:
    QPainter::begin: Paint device returned engine == 0
and would be caused by the size provided to QIcon::pixmap being empty,
itself caused by the availableSizes list being empty for the Selected
mode.

This bug was most often hidden by the fact that the Selected icon mode
was not triggered properly since we usually only set menuVisible after
calling updateIcon, and most of the time when it did, we would overwrite
it right after with a Normal mode icon.

Fix the issue by disabling the broken feature completely since the
default Selected icon is grayed out while tray icons are now usually
black (or white when selected). To support the dark menu bar mode on
10.10 we'll need to use NSImage's setTemplate anyway and that
knowing in advance if we can invert the colors ourselves would also
better solve the menuVisible usecase.

Task-number: QTBUG-42910
Change-Id: If9ec9659af28ecceb841bfc2f11721e6029fe891
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-18 20:12:18 +00:00
Andre Hartmann
e610ef8c8d QComboBox: Update completer on setCurrentIndex()
When the ComboBox currentText() was changed by key
LineUp or LineDown or mouse click, the completer still
contained the last inserted characters.

If now all text was selected (by Ctrl+A or selectAll()),
the old item and index was restored on next Enter press.

Task-number: QTBUG-41288
Change-Id: I6916fd31c8b8fbacfb12e1a62c3e46823cf918b4
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-18 16:57:19 +00:00
Paul Olav Tvete
f64b87a5df Fallback to malloc for insanely large windows
If shmget() does not work (probably because the backingstore size is
bigger than SHMMAX), don't create a QImage with the previous buffer and
the new size. That does not end well when we try to draw to the image
later. Instead, fall back to the malloc path, like we do when the system
doesn't support shared memory.

[ChangeLog][X11] Don't crash when resizing windows to bigger than 3840x2160

Task-number: QTBUG-45071
Change-Id: I009de7c2179ffde28e252593067756877cad1b1c
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-03-18 09:25:57 +00:00
Aaron McCarthy
45a0629a95 Add note clarifying return value of QDesktopServices::openUrl()
On some platforms (notably wayland and xcb) the openUrl() call returns
as soon as the request is passed to the underlying system. The call may
still fail, but this status is not reported to the application.

Change-Id: Iea554e9d5e7e371a5ce11454aef6f5c66ba36ca0
Reviewed-by: Valerio Valerio <valerio.valerio@jollamobile.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-17 04:57:40 +00:00
Allan Sandfeld Jensen
5bee3ac1da Do not colorizing images to invalid premultiplied colors
In some combinations the fusion style colorizeImage method would
generate invalid colors causing odd colors in the end result.

Task-number: QTBUG-41515
Change-Id: Ib16049be1f3e93ae4976524df2827076eac7d94f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
2015-03-16 22:43:02 +00:00
Paul Olav Tvete
5d34bf9033 Avoid deadlock on suspend/resume
On some devices, there is a possibility of getting a state change
while we are locking the event loop for suspend. This is
probably related to change 8c0ef140b3, but we should in
any case use the existing deadlock protection mutex mechanism,
just to make sure that there are not other cases which could
trigger the same deadlock.

Task-number: QTBUG-44339
Change-Id: I3e0b5fa2ddf4ef86e6b29cb1d67c4cccedd8242e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-16 14:03:18 +00:00
Tasuku Suzuki
f901b75926 Fix crash in QDesktopServices::openUrl() without QGuiApplication
Change-Id: Ib1a66c71725dac8fd7ba7ef3d432667b210df778
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-13 14:42:13 +00:00
Eskil Abrahamsen Blomfeldt
d0d107ffc8 Android: Also populate database with otf fonts
On Android 5, the Chinese fallback fonts are .otf format,
and these were ignored when we populated the font database.

Note that this also requires an upgrade of FreeType, otherwise
the Simplified Chinese font will not load.

[ChangeLog][Android] Fixed rendering Chinese text on Android 5.

Change-Id: I972d0fbc0b16458650a7b82ea82a0ddd5bdfa641
Task-number: QTBUG-44648
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-03-13 12:12:10 +00:00
Andy Shaw
aa645caec1 Windows: Get the normal virtual key when not composing
When there is no composing currently being done then we need to get the
real virtual key rather than the one it was sent as with ImmGetVirtualKey.
This ensures that any shortcut associated with the key will be fired right
away.

Change-Id: Id526b7030ca21eaacbd6c74774392b0707cf762a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-13 12:03:37 +00:00
Eirik Aavitsland
51ec7ebfe5 Fixes crash in bmp and ico image decoding
Fuzzing test revealed that for certain malformed bmp and ico files,
the handler would segfault.

Change-Id: I19d45145f31e7f808f7f6a1a1610270ea4159cbe
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-13 09:07:41 +00:00
Eirik Aavitsland
d3048a2979 Fixes crash in gif image decoder
Fuzzing test revealed that for certain malformed gif files,
qgifhandler would segfault.

Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-13 09:07:33 +00:00
Albert Astals Cid
afaf8a1650 Remove #ifndef QT_NO_HTTP that does nothing
Change-Id: I9d6771e9da64e59f8a038dd3b506e6293fcb62c0
Reviewed-by: Jan Kundrát <jkt@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-03-13 08:40:53 +00:00
Andy Shaw
adc3ef97d7 Cocoa: Send mouse release as a right button when clicking right button
Task-number: QTBUG-43612
Change-Id: Id6c764be13527e6b15255b509b4d43b8fe1b54d8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-13 08:30:57 +00:00
Timur Pocheptsov
ba440f35e1 Cocoa integration - invalid backing store on geometry update
In case we skip flushing window events (while we're in setGeometry), backing store
has to be invalidated, otherwise drawRect will use scaled CGImage.

Change-Id: I26ff7083d7c702b4ff107eff235b2067eda540c2
Task-number: QTBUG-44313
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-13 08:30:47 +00:00
Albert Astals Cid
baa3a71e32 Revert adding dispatchLocker to QDBusConnection::connect
This reverts 268cc1dc99

On further examination it has shown that even if it fixes one deadlock
it is either creating some others or making existing ones happen more often

Change-Id: I70068cf0b0435a5dc06d4ac77ea50d3ba2361d01
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-13 08:15:10 +00:00
John Brooks
3f8e3373e1 Fix QMAKE_INFO_PLIST regression with relative paths
In de5553aa, qmake was fixed to resolve QMAKE_INFO_PLIST based on the
current pwd to fix QTBUG-21267. This fix was lost as part of 8c138054
in 5.4.

This fixes the error:

"WARNING: Could not resolve Info.plist ..."

when using qmake for shadow builds on OS X.

[ChangeLog][qmake][OS X/iOS] Fixed QMAKE_INFO_PLIST path resolution
for shadow builds

Change-Id: Icb42b2b3a44856f9b9a86a008081a3353951640d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-13 03:48:29 +00:00
Sergio Ahumada
642daa76e5 Doc: Update links to forum.qt.io
Change-Id: I10c1fd388b44c45412fad544604e51fbd2807f96
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-12 12:37:00 +00:00
Sergio Ahumada
3cadc688f8 Doc: Fix qmath documentation
qmath.qdoc:206: warning: No such parameter 'radians' in qNextPowerOfTwo()
 qmath.qdoc:206: warning: No such parameter 'value' in qRadiansToDegrees()

Change-Id: Ia1556a98801ab694716235cc50edcc9e7d2f33f0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-12 12:36:56 +00:00
Sergio Ahumada
f44db5e139 Doc: Remove link to old Nokia Wiki
The link does not work anymore and it is not referenced anywhere in Qt

Change-Id: I54dd7a40668c5a3963c8c1e95a9684385e5ac083
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-03-12 12:36:49 +00:00
Liang Qi
8f06183699 Core: fix crash in QCollator if ucol_open() failed
If ucol_open() failed, call back to QString::compare() implementation.

Task-number: QTBUG-44796
Change-Id: I03446e5227e1dedac6c5f824ac6d74a494fc0ace
Reviewed-by: Gergely Nagy <ngg@tresorit.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-11 15:30:16 +00:00
Paul Olav Tvete
a31fd4fb96 Clarify InputMethodHint documentation
The description of ImhHiddenText made it sound like it would change
the echoMode of the input field.

Task-number: QTBUG-38080
Change-Id: I379015b95e43b6eff181d51444c7e069728504ad
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-03-11 15:07:07 +00:00
Andy Shaw
afd2246de2 Windows Embedded: GetTickCount64 won't be available so just remove it
Since GetTickCount64 still relies on the usage of kernel32, then it will
not find the function anyway as the library does not exist for Windows
Embedded. Therefore it is best to remove it altogether to save time trying
to locate something we know is not there.

Change-Id: Id879382fdd0692fb9443231a405c0e28d9bcc328
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-11 14:53:09 +00:00
Paul Olav Tvete
6589fb7e0d Workaround for programs depending on previous layout bug
Change 2bfee10f made QDockAreaLayout respect the maximum
size of the central widget. This broke some existing
programs which would set sizePolicy to Fixed on a
central widget without a sizeHint.

This patch restores the old behaviour for the special case
where there are no dock areas. It is highly unlikely that
the intention in this case is to have a very small central
widget with huge blank areas on either side.

Task-number: QTBUG-43797
Change-Id: I1e1fb17204f72166da3b0b054a7777e8183604a7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-03-11 13:09:37 +00:00
Morten Johan Sørvig
22f3d35935 Cocoa: Fix systray SVG icons.
Regression caused by f3699510.

Task-number: QTBUG-44686
Change-Id: I546422a67d4da29fac196025b09bddcb45c1b641
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-03-11 12:43:19 +00:00
Andy Shaw
8a60f57462 [Android]: Ensure clicking on the arrow shows the popup
This was a problem with editable comboboxes specifically as there is
an edit field area which is separate to the arrow. Giving a valid
rectangle for the arrow allows QComboBox to know that it was
clicked on.

Task-number: QTBUG-44931
Change-Id: Ie1d06a6631d6c7f5e813419a5e76f67ec9dcd7e8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-03-11 11:21:00 +00:00
Paul Olav Tvete
156be54578 Avoid deadlock when suspending app at startup
QWindowSystemInterface::flushWindowSystemEvents() is a synchronous call.
This will cause a deadlock if the GUI thread is waiting for an OpenGL
surface at the same time. Add deadlock protection to this case as well.

Task-number: QTBUG-44721
Change-Id: Id26370f6e07011dbcd861617bf96f59e85837db6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-03-11 10:46:43 +00:00
Topi Reinio
2002103baa Doc: Update the online documentation template
This change fixes a number of issues in the online template:
    - Missing vertical line after the login icon in the header
    - Update header, footer links and appearance
    - Adjust alternate background color of table cells to improve
      readability
    - Fix style of cookie notification in the html header
    - Add The Qt Company logo in the footer
    - Adjust list item marker image
    - Improve responsiveness of footer

Change-Id: I77147b4b4161d6001c095a4b67e15552132100e6
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-03-11 09:17:39 +00:00
Albert Astals Cid
268cc1dc99 Lock dispatchLock before the regular lock
Fixes deadlock

Task-number: QTBUG-44836
Change-Id: Ie6def2d1e9684f4272d8920cd19c5765eef5f7c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-11 09:12:02 +00:00
Eike Ziller
416438c2f3 QMimeDatabase: Fix magic rules with \t
\t was not interpreted as a tab character.

Task-number: QTBUG-44884
Change-Id: I3c733e227fba7e5fd5153df0ae4d0431903bb104
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-03-10 12:17:32 +00:00
Daniel Teske
ed0c0070f9 Introduce qt_subtract_from_timeout to reduce code duplication.
The same qt_timeout_value function was copied 5 times in qtbase's code,
so provide a common implementation in QIoDevice that can be used by
everyone.

This commit also corrects the remaining time calculation in
QProcess::waitForBytesWritten and QProcess::waitForFinished by using
this new function.

For QProcess::waitForFinished, if the process started within almost exactly
the timeout time passed to waitForFinished, msecs - stopWatch.elapsed() would
be -1, which is a special value.

Change-Id: I7b76ee6bae695eafdd02e3db03e2ff1e23a7f40c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-09 17:11:54 +00:00
Timur Pocheptsov
5bf9528b91 Revert "OS X: main window doesn't become key."
This reverts commit da0c74550f.
The patch da0c74 unfortunately does not work well with QCocoaMenuBar's logic:
it can happen that our selectNextKeyWindow chooses a Popup or another window with
some 'unusual' flag as a key, but QCocoaMenuBar::updateMenuBarImmediately will return
immediately, assuming that popup does not have a menu and there are no menu items to enable.

Task-number: QTBUG-44369
Change-Id: I83cd2f6a62acd3a6ceb4d9dbf53ca42af67476d8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-03-09 08:34:27 +00:00
Giuseppe D'Angelo
14fdd946f6 Upgrade PCRE to r1530
Include a couple of hard-to-backport fixes for stack/heap overflows
and regressions from previous PCRE versions (cf. the changelog [1])

[1] http://vcs.pcre.org/viewvc/code/trunk/ChangeLog?view=markup

Change-Id: I618c3633e9265ef1b9fd56b58e2c6c714335aae8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-06 13:43:12 +00:00
Andy Shaw
a9a41961c6 Win QPA: Pass in the top level setting instead of relying on isTopLevel()
When updateDropSite() is called then most of the time calling
window()->isTopLevel() is enough. But in a case like while the window is
being reparented it cannot be trusted. So we pass it as a variable so that
it is possible to give it the correct information when it is being called.

Task-number: QTBUG-39739
Change-Id: I77a7ceeaf78e89b1f65a10d60df86088b35e0fe5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-06 10:38:51 +00:00
Alexander Volkov
143350c876 Always clear QWindowPrivate::positionAutomatic in setFramePosition()
Change-Id: I3dd494eee6a133c05256cc1518853e6c5511f8b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-06 09:49:07 +00:00
Mike Kuta
4ca43c71eb Improved Windows printer support and fixed crashes due to NULL devMode
With certain printer drivers, the PRINTER_INFO_2 can return NULL for
the pDevMode member in the call to GetPrinter() as mentioned on MSDN:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd144911
In many places, Qt first checks that devMode isn't NULL before
dereferencing it.  In other places it does not (such as when it
actually attempts to print in QWin32PrintEngine::begin()).  Checking
every dereference aside, most printer functionality is removed without
access to the DEVMODE structure.  This fix uses DocumentProperties()
to get the DEVMODE information when the first method fails.

[ChangeLog][QtPrintSupport][QPrinter][Windows] Improved Windows printer
support and fixed crashes due to NULL devMode

Task-number: QTBUG-44349
Task-number: QTBUG-43877
Task-number: QTBUG-2251
Change-Id: Iafa337055d967c70f2096dcde4cc9c8ca8a0d252
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2015-03-06 08:23:13 +00:00
Thiago Macieira
208cd9ebf1 tst_QDnsLookup: Update to match the new zone for test.qt-project.org
This commit updates the NS records and disables the lookup for
ptr-single.test.qt-project.org, as the new provider does not support
adding PTR records outside of the in-addr.arpa zone.

This commit reverts f9c70128bb, which was
a reversal of 24c52bd44b.

Change-Id: Ia0aac2f09e9245339951ffff13c7cab530a41515
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-03-05 21:34:52 +00:00
Alex Blasche
3c282ad177 Remove C++11 usage from NetworkManager bearer plugin
Change-Id: Icac28ac11222a62636fdbe2cbdf289b7e24f9f20
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-05 13:36:21 +00:00
Oswald Buddenhagen
67289d0dfa restore qt4's qtLibraryTarget() behavior
the function is used in our examples and code generated by qt-creator,
so the qt5-specific magic behavior is inappropriate. create a separate
function instead.

Task-number: QTBUG-44595
Change-Id: I4d72cc1e5cbfc274b3210520baa213f4c5479ca9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-05 12:52:33 +00:00
Liang Jian
8c0ef140b3 Avoid deadlock with two consecutive suspended notification
According to our Android app test, sometimes we will receive two
consecutive app suspended notifications. In the second app suspended
notification QWindowSystemInterface::flushWindowSystemEvents() will
deadlock due to the fact that the event dispatcher has been stopped in the
first app suspended notification. This patch will simply return if we
found the event dispatcher has been stopped in the beginning of app
suspended notification.

Change-Id: I15fa4a6a118510b866ff16061862f4bb8360cc9b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-03-05 10:09:50 +00:00
Sergio Ahumada
a9bb1c63dc Adjust wiki links to the new redirect
it looks nicer this way

Change-Id: I872976bdef5f581187a758aa92b02e2f5f32b130
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-04 15:36:12 +00:00
Eirik Aavitsland
509bc7e59c Fix another crash when converting format of buffer-created QImage
This continues 68762151db

When doing format conversion, the optimized inplace codepath did not
check if the image data was external, i.e. if the QImage had been
created by the constructor taking an existing external buffer.

The previous commit fixed the readonly case. But in the case of the
QImage constructor taking non-const uchar*, data will be read-write,
but still external. This would of course crash if the converter tries
to realloc it.

Task-number: QTBUG-44610
Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-03-04 10:53:00 +00:00
Andy Shaw
227bb20ded Call MoveFile() anyway if the delete failed because it did not exist
Since the new filename might not yet exist and DeleteFile() will fail if the
new file does not exist then MoveFile() should still be called.

Change-Id: Id4576ade079ad8593f824b7100bb0d94aec1fa0a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-03-04 10:00:34 +00:00
Eirik Aavitsland
88550543f8 Painting: Avoid endless loop for certain bezier curves
If the coordinates were too close (at the limit of the number
accuracy), the splitting algorithm in QBezier::shifted() would never
finish. Ref. testcase in bugreport.

Task-number: QTBUG-44674
Change-Id: I2a575cdc6284504ef5e3eb2b749857576fe433c3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-04 09:18:24 +00:00