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>
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>
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>
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>
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>
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>
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>
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>
Fuzzing test revealed that for certain malformed gif files,
qgifhandler would segfault.
Change-Id: I5bb6f60e1c61849e0d8c735edc3869945e5331c1
Reviewed-by: Richard J. Moore <rich@kde.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
\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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
www.example.com is a reserved domain (RFC 6761), but IANA is running a
web server there. As for www.foo.com, that also exists, is a real
website and is often content-filtered in corporations (it triggers a
firewall warning for me -- "You attempted to visit a site that is in
violation of Intel acceptable use guidelines").
So use a localhost instead, since we don't actually need to connect to
the servers to do the work. And since we don't need to connect, I chose
port 4 as it's extremely unlikely someone is running an HTTP server
there (/etc/services lists it as unassigned).
Change-Id: Ia0aac2f09e9245339951ffff13c82439c6d5f945
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This reverts commit 24c52bd44b and makes
the Qt unit tests requiring DNS zones to use the temporary test zone in
macieira.org (Thiago's domain).
Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Register font's english name as alias in the callback of
EnumFontFamiliesEx() at the time
QWindowsFontDatabase::populateFontDatabase() is being called. This will
help us to resolve english font family name to its corresponding localized
alias once windows font database has been populated. It will also fix an
assertion in Chinese Windows.
Task-number: QTBUG-44647
Change-Id: I265d93c16a1677a7f31ff56d60c24f6e90666419
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
In the case of Windows Embedded Compact we need to delete the destination
file before doing the move if DeleteAndRenameFile has failed since
MoveFile will fail if the destination file exists.
Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>