Change a4e1c15b1 will cause setGeometry to take immediate effect
by doing a synchronuous layout and a flush. As a side-effect, the
flush will also send posted touch events. So if the current
setGeometry call comes from a touchMove, a touchEnd might
be delivered before the touchMove returns.
A crash in QToolBar drag-n-drop is seen from this. There
drag data is deleted on mouse release (during the flush), while
a mouse move is already handled on the stack. When the code returns
to the move handler, drag-data has been deleted, and we have a crash.
Since the root problem is that we flush events on a callback from
the app, we can be more careful and precise by only flushing non-user
input events from layoutSubviews.
Change-Id: I3f5e025d774d21509ef837de9d7e85a1ac6e48cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This is a no-op change. It doesn't improve or worsen the code at all.
Change-Id: Ifd5273842370ca9bce0ed74f2f2d54d453797948
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Linux's socket(2) system call can take SOCK_NONBLOCK and let us avoid
the extra two fcntl(2) to change the setting after it's created.
Change-Id: Ie0d7a2d51acc21acd850cbee6d0f76e27b1ae859
Reviewed-by: Richard J. Moore <rich@kde.org>
QJsonObject requires that, since it does binary searches for the keys.
Change-Id: I8a7a116f51864cecb52fffff13bc24660c1cc1ac
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
backtrace_symbols is very slow because it tries to find the function
name from the address. In order to do that it needs to do a linear search
over all symbols. (Because the hash table goes the other way to find the
address from the symbol name)
The code is going to skip a few frames from QtCore. Since we cannot know
how many, we take a few more than necessary.
This patch changes the additional number of frames from 15 to 7
(Usually, there are about 5 suppressed frames).
We call backtrace_symbols several times for only one frame at the time.
So we are not looking up addresses we don't need after we printed the
right number of frames.
Calling many times backtrace_symbols means we do more malloc, but that's
negligible compared to the time we save. We anyway do a lot of other
allocations because of the regexp operations and such
So this patch is then saving about 10 frames lookups which allow to print
about 6 qDebug per miliseconds instead of only 2 when using %{backtrace depth=2}
Change-Id: Ic6ece2145d53dc570c80fcb0e4455dcef6bc40cb
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
also update some broken links while we are at it ...
Change-Id: I9707a01b01be82e229c8f135c9ae093d73fd1204
Reviewed-by: Martin Smith <martin.smith@digia.com>
Remove the ia32 data since there are no linux x86 machines in
the CI system (which makes the data useless from an automated
testing point of view) and most people use x64 these days anyway.
Change-Id: Ifdf8850767869eb2706e2a9d6396314d1fb25500
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Commit 8ee2e497 introduced a regression for CONFIG-=flat vcxproj files.
Files with custom build steps (e.g. foo.h with Q_OBJECT) were written
into top-level filters ("Header Files" instead of
"Header Files\my\sub\dir").
The assumption that the parameter filtername always equals
VCFilter::name was wrong.
Change-Id: Id5178550310d06b73e42f18597a27012ddd89bb7
Task-number: QTBUG-44413
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
We already have saved this information in the loop above.
Change-Id: Ic0e0a66b01e9ee001932d7d798d848abc746ef95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Commit 4f21eb03 broke the generation of non-flat vcxprojs.
XTreeNode passes filter names to outputFileConfigs that have
the source subdirectory suffixed (e.g. "Generated Files\subdir").
Function filterByName must be called with the substring before the
backslash.
Change-Id: Ic259e6316ab0727828773b13e0d8ad0cc7f0808f
Task-number: QTBUG-41746
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This reverts commit e5a8134765.
A much simpler fix for QTBUG-41746 is about to follow.
Change-Id: I1eea1785e00b4d7d470108d8dc3272a2af438ef4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The VS integration does not exist anymore and has been replaced by
the Qt VS Add-in years ago.
Change-Id: I0202b0b2909318ed8869a738ec87b507c4c746af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Re-enable tests that were skipped because of open, now closed, bugs.
Change-Id: Ic7dbe0a9cf74df1e69550536d5923a62e2186b6f
Task-number: QTBUG-26424
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Consider the following code:
QFileDialog dlg;
dlg.setFilter(QDir::Hidden | ...);
dlg.setOption(QFileDialog::DontUseNativeDialog)
setFilter stores the filter value in QDialogPrivate::options.
setOption will overwrite this value with the default value from
a newly created QFileSystemModel.
The intention was to set the filter in the model to the value in
options.
Change-Id: I561c5cf1ad4d9d729a56620d86ec549eb3105a07
Task-number: QTBUG-37085
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Option -separate-debug-info is not enabled by default, even help
claims it to be enabled.
Change-Id: I4a986acbb2b7f2c7bf7feaaff29bcc6bfadcc559
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Specifically when rendering svg to a pdf, when painter
opacity is set, path strokes were transformed incorrectly
due to missed setting of dirtyTransform flag.
Task-number: QTBUG-38675
Change-Id: I861353822ccddd394910b8612687a244d195a41e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Recent code in font support started to use the platformNativeInterface()
return value without checking for null. Most platform plugins, with the
notable exception of linuxfb and the minimal ones, provide an object.
Start providing a dummy object from linuxfb too. This is more sensible
then adding null checks everywhere.
This will prevent crashing with linuxfb on startup.
Task-number: QTBUG-44414
Change-Id: I48912132e1f8ad52e2a94c3d765dacc7b16f309a
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
For most cases, the GCC/Intel atomics (__sync functions) are fine, but
there are some systems for which libgcc is incorrectly built (QNX
6.5.0). Additionally, this will allow Harfbuzz-NG to be supported in
exactly the same systems as Qt itself.
Task-number: QTBUG-43850
Change-Id: Ib53f57f70d4ad46863c45e74d60b0eb45ba9bd02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This code is C++ only. There isn't a single C++ compiler that fails to
understand the "inline" keyword, since it's required by C++98. Any
compiler older than C++98 is likely to choke on the template usage
further down, so this isn't necessary.
Moreover, the C++ standard says you cannot define macros.
[lib.macro.names] says "Nor shall such a translation unit define macros
for names lexically identical to keywords." -- technically, it's a
promise that the Standard Library headers won't do it, the wording means
that the entire translation unit won't do it, which implies no source
can do it.
MSVC complains about it:
fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
Change-Id: Ic2a0a03a0af47386e34bb698454a2040ef3f6a9d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
execinfo.h is optional in uClibc. We need to check
__UCLIBC_HAS_BACKTRACE__ if uClibc is used.
Change-Id: Ie28be85b0b70472df1fc4a208581bb66ad34229e
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This only occurred if the item added was the only item in the last
row/column, since then the the internal grid failed to expand
(in this case it would always call expand(0, 0), which would not
create the extra row/column).
[ChangeLog][QtWidgets][QGridLayout] Fixed crash that sometimes happened
when adding items with spans that spanned to the bottom/right edge.
Task-number: QTBUG-38052
Change-Id: Iba95f6d9d9356b4d1c84c7b93f4af9b4ea0cf714
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Some drivers appears to reset their scroll positions when make the
primary point. This patch listens for the device changed event and uses
the information in it to update the position.
Task-number: QTBUG-40829
Change-Id: If354dfde6300ceb2b81be14ea24594ab0658a6aa
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This version was based on Clang mainline between releases 3.1 and 3.2,
which means it has part of 3.2 features but not all. One of the missing
features is __builtin_bswap16.
Cherry-picked from ec9bc843d8 on 5.4
Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This patch apply the recommended cleanup in qpainterengineex_p.h
Task-number: QTBUG-25069
Change-Id: Ice2c3298c88ba6a7141642470aeeefa782af7f3a
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
If the window contains a widget that accepts text input, a Meta+...
shortcut will be interpreted as if no modifier was pressed. This fix
enables the usage of Meta+... shortcuts for the XCB platform plugin.
Change-Id: I80034b7e6bbbf18471c86fc77320d5038f5740be
Task-number: QTBUG-43572
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Historically, the screen number of a QWidget was stored in
QTLWExtra::screenIndex which came in via the Q_WS_QWS platform.
The variable contained the screen number of the QDesktopScreenWidget
and the desired screen number for widget creation (from parent widget
or desktop parent widgets) and was not updated according to widget
geometry or when the associated QWindow moved to another screen.
Storing the screen number is problematic in Qt 5 since it may change
when the list of QScreens in QGuiApplication is rearranged.
This change renames it to initialScreen and changes its usage to only
contain a screen number when a screen is requested by parenting
on a desktop widget or reparenting. A value of -1 indicates no screen
is requested and the number should be deduced from the geometry.
For the usage in QDesktopScreenWidget, add a method to determine the
number via index in the list of QDesktopWidget.
Task-number: QTBUG-44070
Task-number: QTBUG-44213
Change-Id: I153d19073ad4b0fd14ef3d24caa6d3e76f350e82
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
When using images in QRC and giving the 1x and 2x image files
respective aliases but without any file extension
(for example 'myimage' and 'myimage@2x'),
then QIcon would fail to find the 2x variant.
Task-number: QTBUG-44049
Change-Id: I400bf6d22aeefe0aa351c68e473bf24ac2a36471
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This patch aims to improve the documentation of setPlainText/setHtml to
let the user know that the undo stack is cleared when both these
function are called.
Change-Id: I079f9f1dd407387941777ebbc7b5a7bc6dc005ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Currently angle() is used in place of angleTo() to describe the
difference with intersect. This patch fixes that.
Task-number: QTBUG-44309
Change-Id: Idfc521932247f76fe15fd980ff8e87e52feec1f1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Otherwise there is a race condition: when the tray implementation
gets around to embedding the window, if it was already shown,
it will be unmapped, embedded, and then remapped. Some tray
implementations will resize the tray icon to 1 pixel wide in
that case. We also never want to show a window that was intended
for the tray in any other location, so it's better that it remain
invisible until we are sure it is embedded.
Task-number: QTBUG-31762
Task-number: QTBUG-35658
Task-number: QTBUG-32811
Change-Id: Id324b0bfded0f8258ff1686a223cb2c069827d42
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
... but choose HTTP/1.1 and continue connecting anyhow. According to
the NPN spec, actually we should choose SPDY:
"In the event that the client doesn't support any of server's protocols,
or the server doesn't advertise any, it SHOULD select the first protocol
that it supports."
However, some tested servers did not advertise anything and did not
support SPDY, so blindly trying the newest protocol would fail. We are
conservative in that case and choose HTTP.
Task-number: QTBUG-40714
Change-Id: Ia8aaf01fea74e13d9e4416306f85f1890b25559e
Reviewed-by: Richard J. Moore <rich@kde.org>
Disable top-level widget code path for embedded widget in the show
helper.
Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
QProcessPrivate::_q_processDied() was potentially called twice if there
was a slot connected to readyRead() that called processEvents(), because
the processFinishedNotifier was still enabled when readyRead() was
emitted.
This led to a null pointer access in findExitCode.
Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28
Task-number: QTBUG-33731
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change c238d34137 was a refactoring
which slightly changed behavior. In the case of fetching the
alpha map's bounding box, before we would call loadGlyph()
even for the case of outline drawing, as the correct bounding
rect is still needed for this case. In loadGlyphFor() however,
0 was always returned for this case, as it was only used for
populating the cache.
The simple fix for this is to add a bool to loadGlyphFor() which
adapts the original behavior when set, similar to the
fetchMetricsOnly bool in the loadGlyph() functions.
Change-Id: I76296c8aaeddbdae9e4c27ed2b30b7d59ff0843b
Task-number: QTBUG-44273
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
We do not support Windows older versions in the first place ...
Change-Id: I2cd3135f1b7f2dac6929c07624ea9373f4ac0ff1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The call to LookupAccountNameW from advapi32 was rewritten following
the example:
http://msdn.microsoft.com/en-us/library/aa392742%28v=vs.85%29.aspx
This prevents the generation of a garbage pointer when accessing
QWindowsSystemProxy::init() for Qt compiled as 64bit library
with MinGW-w64.
Task-number: QTBUG-39874
Task-number: QTBUG-38145
Change-Id: I620b2fa64941f84838f9a386851480285336e8d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Use a static_cast instead. This is not 100% equivalent,
since it's missing remove_reference<>, which we don't want
to depend on and whose emulation in qtypetraits.h is missing
rvalue support.
That will be fixed in dev.
Change-Id: Ib03754c81c904932943d3a5415b54ff107f4719d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>