Commit Graph

8342 Commits

Author SHA1 Message Date
Stéphane Cerveau
50e15401c9 Fix infinite loop due to FPU limitation
Bug detected with animatedtiles in example/animation.
In qpa mode, using some specific resolution of directfb such as
800x600 causes a bug in FillRectF where there is an infinite loop due
to scalabilty of qreal value: One is rounded and the other not.

Change-Id: I1707e53f34aeeadc0f0fc07b1dca148fbe05b5f1
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-07-17 08:19:31 +02:00
Mark Brand
fbf010a266 QSqlTM: add reimplemented record() method
QSqlQueryModel::record(row) populates the record it returns with values
from virtual data(), so the values themselves can be supplied by
QSqlTableModel. However, it is also desirable to be able to interrogate
QSqlTableModel for the actual current record in its cache, including
properties such as the generated flag.

Change-Id: I733901913b7d237d5762448e953a99b5bd83fc7f
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-07-17 08:13:42 +02:00
Mark Brand
76880aa2c4 QSqlTM: use generated flag more correctly in setRecord()/insertRecord()
The generated flag should affect the generation of SQL commands rather
than how the fields of the source record are applied to the model before
submitting. This correction allows setRecord() to be used to change TRUE
generated flags to FALSE.

Clarified documentation on this point and updated change log.

Change-Id: I7ee124930822561ed8beee6c6259970b3e929c9b
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-07-17 08:13:30 +02:00
Charles Yin
87ff2c830d Don't join between 2 same points
Joining 2 points with same x,y values causes assert in QTriangulatingStroker::normalVector().

Task-number: QTBUG-26528
Change-Id: I2494d7f362e13e41a82753f4bacf97ffbc249cf9
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-07-17 01:54:32 +02:00
Thiago A. Correa
b8b79a0f37 Fix error when inserting to tables with datetime fields with QODBC
SQL Server 10 introduced stricter rules for TIMESTAMP validation,
making it necessary to specify the decimal digits.
Other databases might do the same as well, so this patch introduces
a check for the TIMESTAMP column size and adjusts the decimal digits
parameter as needed.

Task-number: QTBUG-2192

Change-Id: If6d798c6c928ebda75bc474e49a07fbbfbe5816c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-07-16 23:48:10 +02:00
Kim Motoyoshi Kalland
5762da38b9 List .pbm and .pgm as supported writable image file formats.
QImageWriter can write .pbm and .pgm files, but didn't list them
among its supported image file formats.

Task-number: QTBUG-22958
Change-Id: I777c7cd9a4b56fcf313248a29a917e594a5e4477
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-07-16 21:36:28 +02:00
Marc Mutz
2718f2e31f QStateMachine: mark a ctor as explicit
Commit 0b66f723f0 recently introduced a new
QStateMachine constructor, but failed to mark it as explicit. Fix.

Change-Id: I16037691ad77d528bb50b611c03063b17a71dd34
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-16 18:34:06 +02:00
Jeremy Katz
aa0319ee17 undocument enums as part of Qt3Support removal
Lots of enums in the Qt namespace used to be hidden or documented
as obsolete. These have been removed entirely, as they result in
qdoc errors.

Change-Id: I67726d7358f4e71a0c8fc5181388b1cf8fd4e4bd
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-16 18:34:06 +02:00
Jeremy Katz
e22c093a48 Add gui/ to qtcore.qdocconf to pick up enums in Qt namespace
Qt::HitTestAccuracy and Qt::WhiteSpaceMode are defined in gui/ but
documented as part of the Qt namespace, so qdoc needs to look there
to find the relevant enums.

Change-Id: I36ae71c44024b12664688129044994926160e5c9
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-16 18:34:06 +02:00
Oswald Buddenhagen
311fe0e811 remove support for forwarding module pri creation via syncqt
now that all modules have migrated, this dead code can be removed.

Change-Id: I5e9c7dd3fb271346d1b5f0e2930874da3e4d2d57
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-16 18:34:06 +02:00
Stephen Kelly
1329a57783 Generate a fatal error as appropriate.
Otherwise, subdirectories under directories which are added to
a resource file generate garbage in the binary.

The easiest way to see this is

 cd tests/auto/corelib/kernel/qvariant
 mkdir stream/qt4.9/somedir
 make && ./tst_qvariant loadQt4Stream

Change-Id: I32630ecb6d515db1d135f0ffc5cf14fd8caa0a4f
Reviewed-by: hjk <qthjk@ovi.com>
2012-07-16 16:30:55 +02:00
Stephen Kelly
e6abbe68a2 Create imported targets if the library files exist
Handle the cases where the user does

  ./configure -debug
  make
  make install
  make release
  make release_install

Thereby making the installed configuration different to the
'configured' configuration.

Change-Id: Ib351d8a84c4333ebcbd305d68a37c16f86869559
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-16 16:30:55 +02:00
Jeremy Katz
10848dd582 Undocument Qt::AnchorAttribute
AnchorAttribute was removed as part of the Qt3Support cleanup.

Change-Id: I58d8e471d4bc1af420ec8eaab6d34c1718b30382
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-16 16:30:55 +02:00
Joerg Bornemann
855bac6368 QWidget::showFullScreen fixed for widgets with valid size hint
Ensure the initial size is valid, since we store it as normalGeometry
below.

Task-number: QTBUG-26226
Change-Id: I3a55c389a48504699942930063089c80657687a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-07-16 16:30:55 +02:00
Friedemann Kleint
a89c7e4020 Replace Q_WS_ in tests by Q_OS_ or check platform names.
Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
Joerg Bornemann
887607e956 tst_qwidget: check widget geometry in fullscreen mode
Change-Id: Idc45c6d18decf3c71c6736742434ad9d0cccd2d2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-16 16:30:55 +02:00
Andreas Holzammer
cfe95aa746 Fix window size issue under Windows CE
Under Windows CE the top title window bar needs
to be taken into account when creating a window,
so the Style WS_OVERLAPPED needs to be passed to
AdjustWindowRectEx, to get the right size of the
window. For the desktop the documentation says,
that you should not pass the WS_OVERLAPPED flag,
but wince does not talk about this.

Change-Id: Id8c9d28b7aa04a9920e4cb81ac11463d9717a0e7
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-16 16:30:55 +02:00
Friedemann Kleint
7a2aafcbbf Remove #ifdef Q_WS_ / include / #endif conditionals.
Change-Id: I734490ddcb5501e620370e50ef06180ab5e23393
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 16:30:55 +02:00
David Faure
199741d026 Fix applicationName() being empty in QApplication.
A virtual method was reimplemented to return an always-empty string,
probably a leftover from a refactoring.

This fix showed that tst_qwidget_window was buggy: between Qt4 and Qt5,
a "Before" became "After", which made "Before" unused, and was masking
the fact that the app name was empty by default. In addition, the
earlier Qt5 change that made the app name default to argv[0] now requires
updating this test, now that it's actually working.

Change-Id: I5360026821a9b95bedd0ff09dba3d51a22e542b7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-07-16 16:30:55 +02:00
Jan-Arve Saether
cbddca5f02 Improve qDebug() << QAccessibleEvent() to display state changes
Change-Id: I4624bcf94c1290d14ea5f5eaaa5449af10ac2186
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-07-16 16:30:55 +02:00
Sergio Ahumada
259266d546 Doc: Fix typo
Task-number: QTBUG-23657
Change-Id: I3115f45f743da5699aa13f31a0f2de013d428aba
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-16 14:22:55 +02:00
Alexandros Dermenakis
367ab7e9a9 Added a reserved data pointer in QPaintDevice.
Change-Id: If547e5525635e7c76db7a02c7c0c300c87373a18
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-07-16 14:22:55 +02:00
Sergio Ahumada
4185fc4d85 Doc: Fix typo foreigh -> foreign
Task-number: QTBUG-23260
Change-Id: I922a8b5cba5d8784305fb1779ccd352ab2ece365
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-07-16 14:22:55 +02:00
Shawn Rutledge
6083193549 handle XInput 2.2 multipoint touch events
Change-Id: I5c925ae3e191244c7ab9415e4ba2fe49b93dd2af
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-07-16 14:22:55 +02:00
Ivan Komissarov
2178548111 Remove QToolButton's protected constructor
As long as QToolButtonPrivate is declared in .cpp file,
this constructor is useless.

Change-Id: Ibbeaf291b88b3b203e5107e0227d68e65cbb9eee
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-16 14:22:55 +02:00
Friedemann Kleint
117b27dc8d Fix QSplashScreen on X11.
Use code from QTestLib to wait for the Window to show up.

Change-Id: Ib674f3eb7a6c32cad1d502caefe7d4b073754e73
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 14:22:55 +02:00
Friedemann Kleint
59096732f6 Use DropShadow from QPlatformTheme everywhere in qwhatsthis.cpp.
Change-Id: Ib8281d44e2d4b51aba13417c26247d3e19b1b2f8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 14:22:55 +02:00
Friedemann Kleint
a51f37a430 Replace some Q_WS_X11 by check for platform's name.
Change-Id: I33d7ce31e01c355e0d9e05c98d6a84ea4f6d5bbd
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 14:22:55 +02:00
Stephen Kelly
0518a569c7 Fix the use of if() inside of macro().
if() seems to behave differently with macro parameters compared to
variables set with set().

Change-Id: Ieb9544b8c3187579fd4cfe25e2c2afa3f349eba6
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-16 14:22:55 +02:00
Jeremy Katz
ab2a6bbca9 Make qwindowsysteminterface.cpp compile with QT_NO_SHORTCUT
Task-number: QTBUG-24816

Change-Id: Ia3d20775d28922ee94f965b4a7bc993915f34d6b
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@nokia.com>
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
2012-07-16 12:14:13 +02:00
Kim Motoyoshi Kalland
c44d7eedfd Fix crash in QPixmap::fromImage() when memory is low.
Task-number: QTBUG-26451

Change-Id: I7149edb1b03d7bcd4e90f369a1ac99b25ab262b9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-07-16 10:09:15 +02:00
Kent Hansen
cd1351401f statemachine: Move RestorePolicy enum to QState class
This makes it possible to add API for setting the restore policy
per state, or even per property assignment (QTBUG-17861).

This change is fully source compatible with Qt4.

Change-Id: I53628546b070f6fc84891f86e7ad7bd8ef5ba285
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-16 10:08:28 +02:00
Kent Hansen
0b66f723f0 Add QStateMachine constructor that takes a ChildMode
Back when QStateMachine was changed to inherit QState, this
constructor was conveniently left out because setting the state
machine (root state) to be a parallel state group didn't actually
work. But as of commit d281aa6936,
it does work, so add the missing constructor.

Task-number: QTBUG-15430
Change-Id: I68c599baa0ef1bfc869195140cf5daf645e75b8b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-07-16 10:06:54 +02:00
Oswald Buddenhagen
034b5fd02e make QMAKE_RESOLVED_TARGET use normalized path separators
Change-Id: I23433a67364a9d09fa239b2c7f2cae495d3cc6df
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 01:06:55 +02:00
Oswald Buddenhagen
61d67ace5f make use of new functions
makes for cleaner code

Change-Id: I1a86bc4cac3778a1df37aa3307e5a8edac246961
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 01:06:53 +02:00
Oswald Buddenhagen
9651738f2d automatically fix separators in QMAKE_{DIST,}CLEAN
it's a tad insane to expect the user to do that

Change-Id: I75c68f2a28656c9ba2e3fabcc79718b899b29ce7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 01:06:51 +02:00
Oswald Buddenhagen
4499a911c4 fix object file name clash
under extremely rare circumstances this would have actually failed

Change-Id: I4132d0f82e9f924e92e9e96f6d34451c94a67201
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-16 01:06:32 +02:00
Stephen Kelly
adfb66d02a Test QVariant copy with a user type instead of a QtNetwork type.
Change-Id: I78acc8a843eb12a2606f491d1a29e1bcd408d60f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-15 01:23:25 +02:00
Stephen Kelly
79dddcf089 Run QIcon related crash test with the other QtGui types.
Change-Id: I475cfc5a91a046951feecb425f8235ad37f1ba44
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-14 13:25:11 +02:00
Stephen Kelly
55d90b3240 Don't declare built-in metatypes as metatypes again.
Change-Id: Iba9804299e8f6e2db10965fdc719ee26f197758e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-14 13:25:03 +02:00
Stephen Kelly
c027372b80 Fix typo qith -> with.
Change-Id: Ie9eaa016c61f929be17fd1687517540c2ae1f3d2
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-07-14 13:24:54 +02:00
Eskil Abrahamsen Blomfeldt
28826fe463 Avoid crash when getting bearings from fallback font engine
When accessing a fallback engine, we always need to call
ensureEngineAt() to make sure it's loaded.

Change-Id: Ib27e34137cfe8a3dd2b358aef3b3296a4ca52478
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-07-14 02:41:05 +02:00
Stephen Kelly
6f540691c4 Add some tests to note that private signals can't be overloads.
This is just for completeness of the understanding of the limitations
of private signals. There are no private signals in Qt which have
overloads.

Change-Id: Ic34c555aea360ee34beec796e597657888573da9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-13 19:21:55 +02:00
Stephen Kelly
90657f9236 Simplify the moc code related to private signals a bit.
Change-Id: I0e9bae82c7c6d313e4161c35d0b988f633d5ae60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-07-13 19:21:55 +02:00
Rafael Roquetto
c589ce1917 [QNX] Force UNIX-style separators on Windows hosts
The QNX toolchain, even on Windows, uses UNIX-style directory separators
('/').

Change-Id: I78575c9856b1700438c05ec0da81149688d85522
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-13 17:06:39 +02:00
Thorbjørn Lund Martsum
a187fd9fb1 Fix a few compiler warnings.
In this change:
dba22bc036
we actually do not need the sync.profile change.

The header is already in QtGui - and it caused compiler warnings
when Qt/tests are compiled. The troubled includes are of type
<qstandarditemmodel.h> where Wigets are first in the include path.

Change-Id: Iff17f6ddb6c6282d41a08b53438b7aec786f12a9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-07-13 17:01:52 +02:00
Jan-Arve Saether
d45bc23cd5 Relax the reqirement in which order events are delivered.
When the pushbutton is shown, it will generate both a ShowEvent and
a StateChange with active=1 (because it is a top level window).

This patch relaxes the reqirement in which order events are delivered.

Ideally the order should also relied on, but I'm not sure if that
is feasible due to differences among window managers across all
platforms.

This got provoked by codereview.qt-project.org/#change,26014

Change-Id: I96159fbb1b64f0ca8d13833d8a4c6799c655afc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-07-13 14:18:51 +02:00
Marc Mutz
02faddca53 QNX: normalize signals/slots
This is the result of running util/normalize --modify
from Qt 4.7  with manual review.

Change-Id: I9229c3c52ba785194469ad51aba0c3af0c058894
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-13 12:09:42 +02:00
Marc Mutz
d7d9364c9c plugins/bearer: normalize signals/slots
This is the result of running util/normalize --modify
from Qt 4.7  with manual review.

Change-Id: I7c9539056a4434ed10a0255152eac1781f7833be
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-13 12:09:42 +02:00
Marc Mutz
8c148a2eec input/evdevmouse: normalize signals/slots
This is the result of running util/normalize --modify
from Qt 4.7  with manual review.

Change-Id: I4afac23e897404ac7efb5b4a89493a2c15e3c670
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-13 12:09:42 +02:00