Commit Graph

11711 Commits

Author SHA1 Message Date
Friedemann Kleint
5bf3fb34be Fix lupdate-warning in qnetworkreplyhttpimpl.cpp.
qnetworkreplyhttpimpl.cpp:666: Cannot invoke tr() like this.

Change-Id: I3baf448f2118b108c32dcddc7e408b2b75542eab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-06 12:00:07 +01:00
Jan Arve Saether
7502a78388 Check if the interface pointer is valid to avoid a potential crash.
Change-Id: I7e6634b799e551786d6cbc85e2d526b7874ada3d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-06 12:00:07 +01:00
Jan Arve Saether
20204fe58b Do not crash if the child index is out of range.
Task-number: QTBUG-29077

Change-Id: I934101cdc121e9ef99de2e9eeaef154dd4cae0d8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-06 12:00:07 +01:00
Samuel Rødal
af84313c62 Fixed crash in image reader when reading certain BMP files.
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>
2013-02-06 09:59:56 +01:00
Mark Brand
c3ae1c76f3 QSqlTableModel: support refreshing inserted rows with auto columns
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>
2013-02-06 07:57:47 +01:00
Mark Brand
33c212b7d2 QSqlTableModel::setData(): fix non-change detection
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>
2013-02-06 07:57:28 +01:00
Mark Brand
a694b9f8d2 fix QSqlTableModel::headerData() for empty query with inserted row
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>
2013-02-06 07:57:13 +01:00
Oswald Buddenhagen
04478614c1 fix transitive linking for x-builds
-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>
2013-02-05 22:50:28 +01:00
Frederik Gladhorn
a1f4a821fc Nokia -> Qt Project
Change-Id: Iadd29ee918dc181d2a468f5198e66351c7cb3548
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-02-05 20:53:57 +01:00
Frederik Gladhorn
d7cad756ef Replace nokia in example by Qt Project
Change-Id: I23adfd6a1cf02c8c99996b698fb780988434b9a7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-02-05 20:53:57 +01:00
Topi Reinio
1d9863658d Doc: Fix filenames for nested classes generated by qdoc
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>
2013-02-05 18:54:41 +01:00
Laszlo Papp
334101df92 Do not use the non-existent state() method reference
Task-number: QTBUG-29094
Change-Id: I715018a82b7f8405dee023cbe5f2481883cad3e2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-05 16:55:22 +01:00
Laszlo Papp
1de63171ee QScroller was introduced in Qt 5.0, not 4.8
Task-number: QTBUG-29365
Change-Id: I11804bf51f1537dcd7f40d7ec02022d8fb76c1e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-05 14:24:50 +01:00
Gabriel de Dietrich
655ba57556 Cocoa QPA: Fix compilation error
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>
2013-02-05 14:24:50 +01:00
Friedemann Kleint
d81edc440b Fix lupdate-warnings in simplewidgets.cpp.
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>
2013-02-05 14:24:50 +01:00
Friedemann Kleint
0972067264 Fix lupdate-warnings in QSpiAccessibleBridge.
linuxaccessibility/bridge.cpp:169: tr() cannot be called without
context

Change-Id: Ib6bd4db7c4759818ccba8adff73617af7331f318
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-02-05 14:24:50 +01:00
Sergio Martins
7829c477a9 QNX: Fix one more code path that led to having no QScreens.
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>
2013-02-05 12:26:32 +01:00
Julien Brianceau
85b2ba2a92 doc: Fix QPixmapCache size default value in doc
QPixmapCache size default value is always 10 Mb
since change I2ac33765

Change-Id: I28c99433948b07e9c84d0afda7aa5a8f49d2cd18
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-02-05 12:18:27 +01:00
Sergio Martins
9d7e63e370 QNX: Fix one more code path that led to having no QScreens.
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>
2013-02-05 11:55:47 +01:00
Jens Bache-Wiig
7cc3a3adf2 Added missing null pointer check in QMacStyle
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>
2013-02-05 11:40:14 +01:00
Mark Brand
0b8065b581 remove misleading statement from ~QSqlDatabase()
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>
2013-02-05 10:38:12 +01:00
Samuel Rødal
ef7c9b5b52 Fixed missing support for single buffered OpenGL on OS X.
Task-number: QTBUG-28804
Change-Id: I426a9bbc08953d777f67a23b050570e9f7d442d7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-05 09:00:56 +01:00
Jian Liang
328c7ee6b8 Show default shortcut menu when user right click window's caption
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>
2013-02-05 08:59:51 +01:00
Joerg Bornemann
be8c47b140 qmake/MSVC: fix parsing of the /openmp option
Task-number: QTBUG-29143

Change-Id: I6b1ce0babf51701fa404b821b22060a87c4f46b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-04 16:33:17 +01:00
Joerg Bornemann
9c1628aae3 do not parse MSVC option /Gs as /GS
/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>
2013-02-04 16:23:53 +01:00
Joerg Bornemann
4fe029963d qmake/MSVC: do not disable buffer security check per default
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>
2013-02-04 16:23:32 +01:00
Oswald Buddenhagen
4c34b418b8 fix lack of rpath-link when using modules from final location
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>
2013-02-04 15:10:22 +01:00
Oswald Buddenhagen
8705480587 support alternative and multiple suffixes in $$resolve_depends()
this is undeniably a new feature, but it's needed for a bugfix.

Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:19 +01:00
Marcel Krems
513971eecd QSqlError test: Fix isValid()-check for constructed QSqlError.
Change-Id: I4dc1f537226139ceca017cc36abadd2fba4ce35b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-04 14:44:19 +01:00
Oswald Buddenhagen
e01343352e fix doc page urls
they are versioned nowadays

Change-Id: I839db633e9d7d63c9d445f8e914b529bd7ce60a2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-04 14:28:24 +01:00
Olivier Goffart
91e12dca75 QThread documentation: do not discourage the reimplementation of QThread
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>
2013-02-04 14:22:45 +01:00
Laszlo Papp
86ca28774b Add the missing "\since 5.0" reference for the QTimer method
Change-Id: I9f2bb97eed7a1e2eb92865920f815055c847c84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-04 14:22:45 +01:00
Olivier Goffart
c5c584c116 Optimize code sample of QObject::isSignalConnected
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>
2013-02-02 10:03:04 +01:00
Mark Brand
3ba61d9baa fix build failures on mingw caused by name clash
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>
2013-02-02 01:41:21 +01:00
Sergio Ahumada
2aa9f5d153 Bump Qt version to 5.0.2
Change-Id: I573601fb609cdb632fbb422920801a24be4c0448
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-01 23:42:03 +01:00
Oswald Buddenhagen
864e1ceaf6 don't flush qmake command line twice
otherwise variable assignments (including -config options) from
$QMAKEFLAGS are lost.

Change-Id: I818e9372d2b0ff44333dc3eb8fc3420f84ab01c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-01 17:38:29 +01:00
Sergio Ahumada
d011f64524 tests: Fix some more old references and links to Nokia
Task-number: QTBUG-28156
Change-Id: Ifb768b167203c901c5e42ce58c9aaf3db2739320
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-02-01 15:27:37 +01:00
Sergio Ahumada
256dc059ee Merge "Merge branch 'release' into stable" into refs/staging/stable 2013-02-01 12:31:16 +01:00
Oswald Buddenhagen
f9725ce9c2 avoid that we accidentally initialize XQMAKESPEC to an empty string
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>
2013-02-01 10:23:26 +01:00
Oswald Buddenhagen
0debd5dd48 remove somewhat pointless conditional
if the user just set an empty spec, everything will go wrong anyway.

Change-Id: I5ddaa2f0be1be96132260af8c869ba38e02eb3d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-01 10:23:26 +01:00
Oswald Buddenhagen
feb33916fd remove versioned config backwards compatibility hack
the vendor string was changed, so compat is broken anyway.

Change-Id: I07241843237ce28bd7a869bb4170c7e4c8d084df
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-01 10:23:26 +01:00
Oswald Buddenhagen
06a6d1da58 substitute fixed version numbers in qdocconf files with variables
Change-Id: Ie57765c10a8e90d6fc74ee5a8fd84bfc7cd8bcf2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-01 10:23:26 +01:00
Mitch Curtis
c81d15a746 Correct QTextEdit detailed description.
Change-Id: Ie5c4769c864d9dfdc1cb4ed5d2cbfb9951df582b
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-01 07:45:33 +01:00
Thiago Macieira
4b6bd14063 Let ICC 13 build Qt again if the system compiler is GCC 4.7.
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>
2013-02-01 00:48:16 +01:00
Sergio Ahumada
6239af6f0f Merge branch 'release' into stable
Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
2013-01-31 18:55:53 +01:00
Sergio Martins
29a78d48d0 QNX: Don't crash if we unplug the primary display.
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>
2013-01-31 18:24:16 +01:00
Oswald Buddenhagen
6654a05fca don't create forwarding module pris for non-prefix builds
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>
2013-01-31 15:51:44 +01:00
Oswald Buddenhagen
9e388bf692 qt_module_fwdpri.prf => qt_module_pris.prf
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>
2013-01-31 15:51:40 +01:00
Oswald Buddenhagen
f75e897519 centralize detection of prefix builds
this makes the use sites more expressive

Change-Id: Ib879de65d1cc26462fa61f5339e951f294515faf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:35 +01:00
Oswald Buddenhagen
8f61befb53 fix install locations of examples/widgets/tools
amends cb961007c5

Change-Id: I725042c55816832eeb5b0d8a3522911877279aae
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:30 +01:00