If the high bit in a mask is set, for instance if the mask is
0xff000000, and we shift it to the right by 24 positions, since the mask
was not declared as unsigned we ended up with a mask value of
0xffffffff. We then add 1 to this value and divide by the result,
causing a division by zero crash.
The masks need to be declared unsigned to prevent sign bit extension
when shifting right.
Task-number: QTBUG-29194
Change-Id: I79260344cebfbdd3ea86416a9c734dca76517999
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Previously, selectRow() did not work after INSERTing a new row into a
table with an automatically populated column. It did not work because
the model did not know the primary values for the new row. Newly
inserted rows were therefore not refreshed in OnFieldChange and
OnRowChange edit strategies.
This change provides support for the typical simple case where a single
column is populated by the database and can be retrieved with
QSqlQuery::lastInsertId().
Task-Number: QTBUG-29102
Change-Id: Ibf0f0ac8661185bde57034ddf40c2178bece4778
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Commit 10ff9de91b introduced the
optimization of ignoring non-changes, but it overshot the mark.
It neglected to consider that QVariant's equality operator does not
compare the null flag. It also failed to consider that setData() has
a useful side effect of setting the generated flag in a column of a
pending INSERT. This is important when the application actually wants
a NULL to be inserted into the column.
Task-number: QTBUG-29217
Change-Id: I1368f7acc21eebfeb5a8d23746fc38f6f30fd395
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
QSqlQueryModel::headerData() relied on virtual indexInQuery() to
detect whether the requested column at row 0 mapped to an index in
the query. This failed when row 0 was a pending insert managed by
QSqlTableModel, and therefore not in the query.
The only thing that matters here is the column.
Task-number: QTBUG-29108
Change-Id: I3e0ae85ba223e444781ec8033386d394bb44f0e8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
-rpath does *not* imply -rpath-link when x-building:
ld(1): "Searching -rpath in this way is only supported by native linkers
and cross linkers which have been configured with the --with-sysroot
option."
it doesn't hurt to have the "excess" -rpath-link for native builds, so
just remove the cleanup.
Change-Id: Ic39c1f4d6c2e3770d43a5ed3e56cf89a146edf85
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Generator::fullDocumentLocation() adds a parent class name twice into
the generated filename for nested classes, which not correct.
This change fixes the issue and makes documentation for nested classes
work in Qt Creator (qch files).
Task-number: QTBUG-29440
Change-Id: I489800ba09f49dda2befef73634cb2b344be0060
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
The error appeared with latest clang as of Feb. 5, 2013.
Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.2.0
Change-Id: I8df8cccc941ac03a7a997bdd5afe095b7b6f65d3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
simplewidgets.cpp:429: Discarding unconsumed meta data
simplewidgets.cpp:535: Discarding unconsumed meta data
Change-Id: Icd9686392781eb1faa7868dc4c92d26fa44c4f94
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
linuxaccessibility/bridge.cpp:169: tr() cannot be called without
context
Change-Id: Ib6bd4db7c4759818ccba8adff73617af7331f318
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Qt dereferences QGuiApplication::primaryScreen() inside,
for example, QColormapPrivate::initialize().
libscreen always returns at least one display, even it it's
not connected, so lets not ignore it if it's primary.
Change-Id: I2f14a187c979ca0c7ad39149ceb0b2b7e61e9ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QPixmapCache size default value is always 10 Mb
since change I2ac33765
Change-Id: I28c99433948b07e9c84d0afda7aa5a8f49d2cd18
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Qt dereferences QGuiApplication::primaryScreen() inside,
for example, QColormapPrivate::initialize().
libscreen always returns at least one display, even it it's
not connected, so lets not ignore it if it's primary.
Change-Id: I2f14a187c979ca0c7ad39149ceb0b2b7e61e9ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QMacStyle::subElementRect could crash if SE_LineEditContents was used
without providing a widget pointer.
Task-number: QTBUG-27033
Change-Id: I15ef07ae1310be4257a8480d392f98dbf02168d3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
The presence of the sentence "If this is the last QSqlDatabase object
that uses a certain database connection, the database connection is
automatically closed" is misleading, whether or not the statement is
true. It is about an internal detail of QSqlDatabase's implementation.
As such it is not appropriate for user documentation. The user should be
focused on how to use addDatabase(), cloneDatabase() and removeDatabase()
correctly.
Task-number: QTBUG-29481
Change-Id: I0c39584be260e13340834c34098368fcce4a7419
Reviewed-by: Florian Paul Schmidt <mista.tapas@gmx.net>
Reviewed-by: Sune Vuorela <sune@vuorela.dk>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
In windows platform, Qt5 will not show the system default shortcut menu
when the user right click in the window's caption. This is a regression
from Qt4.
This patch will let DefWindowProc() to handle the message WM_CONTEXTMENU
if the mouse pointer is in the non-client area of the window. Thus the
default Windows shortcut menu will show up.
Change-Id: I88638ad1d4f0e73b088204b83c3f7ec0fe2033f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
/Gs[size] will be added as additional option as there is no XML element
for this option.
Task-number: QTBUG-29329
Change-Id: I1f09bfdac90f9c5f2333dc03e6e4e6a206b4f6d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The default must be "unset" to let the user's MSVC settings decide
what the default value is.
Task-number: QTBUG-29329
Change-Id: I6015202c123dbb7304941b0d24557a26a1e3236c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
if the libraries are in a non-standard location, but no rpath is used,
rpath-link is needed. this is often the case for non-prefix builds
(which have no forwarding pris any more).
as we cannot store absolute paths in the final pris, we need to store the
module names, and resolve them only at use time.
Change-Id: I1538b5d531611c76a2d7058a3b2ff683bdcbe427
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
this is undeniably a new feature, but it's needed for a bugfix.
Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The new QThread documentation now really discourage to reimplement
QThread. But in fact, there are many cases where it is perfectly fine.
And the example given is even a case where using worker object is wrong.
The examle even contains a leak since the thread will never stop and
will even leak.
This changes put back some sentences from before commit
d4ad9dbbf9.
The sample code has been re-writen. Notice how reimpementing run takes
less lines of code, less runtime overhead, no leaks, and also is more
complete than the previous example.
Change-Id: I6cb80826e917dd5ce442ccad2572ec692ccb25ab
Reviewed-by: Andre Somers <andre@familiesomers.nl>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Debao Zhang <hello@debao.me>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since isSignalConnected is meant to be used in performance critical
code, and that QMetaMethod::fromSignal is relatively slow, it is better
to have it a a static variable in the code sample, as a good
recommendation on how to use it.
Since QMetaMethod::fromSignal should not change during the life of the
program, it should be safe. Also, if different threads run at the same
time, both should lead to the same result.
Change-Id: Ib6113d11ca93f216bc3a92aea4eaa4da6a4151ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In mingw.org, basetyps.h contains
#define interface _COM_interface
which clashes with function parameter names in qdbusmessage.h.
Although there is no clash when building qtbase itself, the clash
makes building qttools 5.0.1 fail. Presumably this could also affect
other applications.
Taken from 2cc9a9a51d6742708b1ea41c7338755e2a0ee9e9 which solves the
same problem in another header.
Change-Id: I802d5c673b544fb3a17e9273030876928faa5c46
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
there is plenty of tests which rely on the non-presence of the variable,
rather than it being empty.
Task-number: QTBUG-29400
Change-Id: Ifa8aa68192750521869767e2d4d3796794f4d8f2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
if the user just set an empty spec, everything will go wrong anyway.
Change-Id: I5ddaa2f0be1be96132260af8c869ba38e02eb3d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
the vendor string was changed, so compat is broken anyway.
Change-Id: I07241843237ce28bd7a869bb4170c7e4c8d084df
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
GCC 4.7 has new builtins in x86intrin.h that ICC 13 does not (yet)
understand, causing compilation errors.
/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include/adxintrin.h(36): error: identifier "__builtin_ia32_addcarryx_u32" is undefined
Change-Id: I1845ccc3bf3ac15aef063bc3f998c5839fa51866
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The QPA plugin assumes in several places that we have at least
one QScreen.
Even if patching the plugin to support 0 screens, Qt itself crashes
when dereferencing a null paint device while synching the backing
store.
Change-Id: I2ac504a447aff811d6c07ab857340a3433557cdc
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
as everything is built inside the common build/install dir, there is
no point in the fwd pri stuff.
as a "side effect", this makes it more straight-forward to relocate
non-prefix builds, which is the default on windows.
Task-number: QTBUG-28827
Change-Id: I010246a9ad87cf74974dc168768b1a8625f73260
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
move the regular pri file creation into the "sub-prf" and rename it
accordingly. the original reason for the split was the deep magic in
activeqt (and phonon), which is gone now.
Change-Id: If40e941afc9293725630ed6bcf3e4ef18a692f66
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-developer-build enables an actual build of examples, based on the
assumption that developers want to test it (it can be still disabled
with -nomake examples). regular users otoh want only the examples
sources installed.
Change-Id: Ifc6a108099929175a3960480802b271a758fdd38
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>