summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed tst_qobject::property for clangRohan McGovern2012-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | The test was failing at: QCOMPARE(property.userType(), qMetaTypeId<CustomType*>()); The CustomType* metatype was not registered before this part of the test. qMetaTypeId<T> will register the metatype for T before returning it if it is not yet registered, while QMetaProperty::userType() returns 0 if the metatype is not yet registered. However, the order of evaluation of these two expressions in the above statement is technically undefined. Apparently, gcc evaluates the arguments in order from right to left, allowing the test to pass, while clang evaluates the arguments in order from left to right, causing the test to fail. Change-Id: I5059556e860cec29b57c31e4e26f46cf9e6055da Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* QSqlTableModel::insertRecord(): clean up after failed setRecord()Mark Brand2012-02-092-1/+6
| | | | | Change-Id: Ic9f314144bd3ccf4b59b9cb3f0d79f8d6f97a824 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Remove leftover show() prototype.Andreas Holzammer2012-02-091-4/+0
| | | | | | | | | | | | In Qt4.8 this was declared in qwidget_wince.cpp. It was for auto maximizing. This would need to go into lighthouse if needed. This fixes the Windows CE compile. Change-Id: I6fe8361f745e16d9e8053ab58eb76ead0b22d261 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QSqlTableModel::setRecord(): improve handling of field mappingMark Brand2012-02-092-12/+27
| | | | | | | | | | -Only use fields where generated flag is set to true. -Require all fields to map correctly. If fields don't map, that is a sign of a programming or user error. Change-Id: Ie8474393005de6c9926b4e46985d62b194eafde2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* QSqlTableModel::insertRecord(): correct documentationMark Brand2012-02-091-3/+3
| | | | | Change-Id: I35680f842a650493cf530c0b74894e2b45aa3c6e Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Don't link shell32 for Windows CE.Andreas Holzammer2012-02-091-1/+3
| | | | | | | | | Windows CE normally don't come with a shell32, so its better to don't use it. Change-Id: I7198b5fadb0dfe37d1321800371110b7b407f577 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixed qstandardpaths unittest to handle being run as rootKurt Korbatits2012-02-091-0/+5
| | | | | | | - testCustomRuntimeDirectory test skips if run as root Change-Id: Idcc2a1db5d8a96b2ec0248b8b1c392fffc0b2e11 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qdir unittest to handle being run as rootKurt Korbatits2012-02-091-1/+12
| | | | | | | | - Added checks to see if running as root and skip as needed Change-Id: I4f94d5bfe511c6dfda315854b7cd1f64efe6e4f4 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fixed qfile unittest rename() failing as rootKurt Korbatits2012-02-091-0/+7
| | | | | | | | | When run as root was able to move file to /etc directory but was expecting a failure. Change-Id: Ic2ac5506253f2a3395ed56e88a856542bf82ad6d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update note about metatype fully defined requirement.Stephen Kelly2012-02-091-2/+3
| | | | | | | | | There is now public API to re-allow forward declared types as metatypes. Change-Id: I6c956ea2dc96f66eccfcfa81fcbb833b58b58d61 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
* Make selftest.pri more readable/maintainable.Jason McDonald2012-02-091-7/+41
| | | | | Change-Id: Ic5a74beebb718df4cce5a9b02cdfd6f6d4cec97d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve float selftestJason McDonald2012-02-092-10/+23
| | | | | | | | | | | | Correct a bug in the test and use unique names for data rows. The bug was that the test assumed that QCOMPARE for float values 100001 and 100002 would fail, but it actually succeeds. QCOMPARE for floats uses qFuzzyCompare(), which succeeds if the numbers differ by no more than 1/100,000th of the smaller value. Thus QCOMPARE(100001, 100002) passes, while QCOMPARE(99998, 99999) fails. Change-Id: Ia35d3126c2e3ebe91d64daa309048514a365d9fb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove unused test results from testlib selftests.Jason McDonald2012-02-0919-353/+0
| | | | | | | | | Some of the subtests are only run with plain-text output format. For those subtests, the other output formats were unused and gradually becoming out-of-date. Change-Id: I4c10f7f5bab2d2cc7d2d2ad641fbf5d4df02b798 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add data tag names to datetime selftest.Jason McDonald2012-02-095-8/+12
| | | | | Change-Id: I73a0faab06df99521a48f106d93dd7b9a620148d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* testlib: Add selftests for skip and fail inside cleanupTestCase().Jason McDonald2012-02-0915-1/+261
| | | | | Change-Id: I9bbe774c3259338d452cd1eb1a6f37a85db15921 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fixed tst_selftests on OSX 10.7Rohan McGovern2012-02-091-1/+7
| | | | | | | | | | | | Our OSX 10.7 test machines send a SIGILL rather than a SIGSEGV to a process which attempts to dereference a null pointer. Change the "crashes" test to dereference an invalid pointer with a value slightly greater than 0 so that we get the same crash behavior on all (unix) platforms. Change-Id: I700a2c7d654a9468af5e5996010a258695ed2ae5 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Avoid advancing animations outside the animation "tick"Gunnar Sletta2012-02-093-2/+9
| | | | | | | | | | | | | | | We have logic to prevent animations from starting in the middle of an animation as a result of a previously slow frame. This was based on current time, not the animation driver time and would cause severe jumping when custom animation drivers were being used. Also, this logic would trigger multiple animation runs per frame, which is very bad for performance, so this change introduces a threshold of 50ms to compensate for that. 50ms because that is triplebuffer limit. Change-Id: I1c7ebac30060e849d03c14d62411c2b953854d98 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix compile with QT_NO_OPENGL.Andreas Holzammer2012-02-093-0/+9
| | | | | | Change-Id: Icade54a6e3b43fdc9c151efbc25adcef6b7e41d6 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Introduce Q_DECLARE_OPAQUE_POINTERJoão Abecasis2012-02-097-46/+42
| | | | | | | | | | | | To hide the IsPointerToTypeDerivedFromQObject monstruosity :-) Documentation for Q_DECLARE_METATYPE and qRegisterMetaType was updated to mention requirements on registered types and how they can be circumvented for pointer types with the new macro. Change-Id: If83b037a8e2f28761eb903525e87008107298801 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Build with QT_NO_CAST_FROM_BYTEARRAYStephen Kelly2012-02-081-1/+1
| | | | | | Change-Id: I9069b61c6247bdff323e2e5e93b70e42c3504201 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: David Faure <faure@kde.org>
* Fix compilation of Menubar for Windows CE.Andreas Holzammer2012-02-083-4/+7
| | | | | | | | | | | Use QApplicationPrivate::getHWNDForWidget for getting the HWND for Widgets. The Menubar needs refactoring, but the API for native Menubars is not in place yet, so fix it temporarily. Change-Id: I090cca99d19aa881c2f41b54005a65f3ae67ae68 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add missing include of qdrawutil.hAndreas Holzammer2012-02-081-0/+1
| | | | | | Change-Id: Ifda1e3a0fbe1ee3431374722878d5cde86ef3916 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* realpath(X,0) IS supported on QNX.Nick Ratelle2012-02-081-1/+1
| | | | | | | | | Adds check for Q_OS_QNX to force QFileSystemEntry QFileSystemEngine::canonicalName() use realpath(X, 0) on QNX as well. Change-Id: Id0a32277e6d043753c42101c91a393ebedb48a0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed CustomDashLine drawing bug.Samuel Rødal2012-02-081-1/+3
| | | | | | | | | | | The bug was caused by attempting to stroke an empty subpath. If there have been no line-to's emitted we should not try to join the start and end of that line segment. Task-number: QTBUG-23248 Change-Id: I38b7e955ed6683f8fc25f9551e93b4f472c022bf Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com> (cherry picked from commit 593947ba70188df3d33efe031fab2fd255faa8b9)
* Use qgetenv instead of getenv.Andreas Holzammer2012-02-081-1/+1
| | | | | | | | | Use the Qt Version because platforms like Windows CE don't support getenv. Change-Id: I95ca4d7194e09889ab228af80e679a3c34479e41 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Treat pointers to QObject derived types in QVariant specially.Stephen Kelly2012-02-082-16/+158
| | | | | | | | | | | | | | | | It is possible to do this for example: QVariant v = QVariant::fromValue<MyCustomQObject*>(); QObject *object = v.value<QObject*>(); This means that if a QVariant contains a pointer to a QObject derived type, third parties can extract a QObject* and use its properties without knowing the concrete type. This is a source compatible change. Change-Id: Iee9a9437e99cc2f40d1a4bfea47275482ef7161f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Mac: Fix compilation with -qtnamespaceKai Koehne2012-02-081-0/+4
| | | | | Change-Id: I85559b6698103eef865464a355d9b00012dcbd5f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QSqlTableModel::setRecord(): emit dataChanged() consistentlyMark Brand2012-02-082-13/+8
| | | | | | | | | | | | | | | Previously, if any fields in the supplied record could not be matched with a column in the target table, dataChanged() was supressed for all columns for OnManualSubmit. This is not good because it prevents other views from noticing the fields that *do* change. It's simplest and probably more efficient just to emit dataChanged() once for the whole row. Fewer signals need to be processed and in typical cases much or all of the row is likely to be changed anyway. Change-Id: Ib56bf9a18e51b9cb85771acefcb2bf26e295a54e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSqlTableModel::setRecord(): do not try to detect value changesMark Brand2012-02-082-12/+5
| | | | | | | | | | | | | | | | | | | | | | | In an apparent attempt to be economical with emitting dataChanged() and submitting SQL to the databse, setRecord() compares each field value of the record with the old value, taking action only when a difference is detected. Several complaints against this code are: -The comparision does not work on float type. -It is really up to the application and database to decide this. The model should make few assumptions. The application has the option to omit fields from the record that should be ignored. -The current behavior seems to assume that the "old" values are the current state of the database, but the database may have changed since the model was last refreshed. -The code compares the value from record(), which probably corresponds to the EditRole, with the DisplayRole value from data(). Change-Id: I11477c185eb411d442144dc682893d0df12d03d5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSqlTableModel::setData(): submit() instead of updateRowInTable()Mark Brand2012-02-081-10/+3
| | | | | | | | | | Use submit() instead of calling updatRowInTable(). The effect is exactly the same. Submit() invokes submitAll() which invokes updateRowInTable(). The cache is purged and select() is called only on success. Change-Id: I3de9a3d6acf802ee6594d034a9e261e53637995d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSqlTableModel::setData(): call dataChanged() before select()Mark Brand2012-02-081-2/+1
| | | | | | | | | Emit dataChanged() before a possible new select instead of after. The select reinserts all the rows, emitting signals for that, so there isn't any point to dataChanged() afterwards. Change-Id: I698a0d385f97104891343d94cc27e4ecf3a7233c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSqlTableModel: do not suppress dataChanged() on inserted recordMark Brand2012-02-083-18/+30
| | | | | | | | | | | | | | | | | | | Affects setData() and setRecord(). Previously dataChanged() was suppressed when editing an inserted record, except for OnManualSubmit. The motivation was probably to allow setData() to be used while handling primeInsert(). Suppressing dataChanged() is not a good idea since views other than the one which made the change will not know of the change. It is a terrible idea to call setData() or setRecord() while handling primeInsert(), so this is now expressly forbidden. setData() and setRecord() now do nothing and return false if called while rows are being inserted. Change-Id: I96738c09a6268704c5626d95b72bfb46378e3242 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QSqlTableModel::setRecord(): use submit for OnFieldChangeMark Brand2012-02-081-1/+1
| | | | | | | submitAll() is supposed to be for OnManualSubmit. Change-Id: Id0335fe731669bd24e1da72ab4724f88d6f1d905 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* fix msvc 2008 warning about downcasting to boolOswald Buddenhagen2012-02-081-1/+1
| | | | | | | | | | | | the compiler doesn't have static_assert yet, so we ran into the path which was not fixed by 10229ae. use !!() pattern instead of bool() cast, as the latter throws off macx (see 95d7abb). the other alternative - a c-style cast - would cause autotest failures (see 92464fa), and would be ugly anyway. Change-Id: Idbe9a3b60e17ae1f566f938d9b9be04f0c977492 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* QTextEdit cursor position fix when moving left/right with selectionPasi Matilainen2012-02-083-10/+24
| | | | | | | | | | | | When text has been selected in a QTextEdit and the left or right arrow key is pressed, the cursor moves one character beyond the start or end of the selection, when it shouldn't move past the selection. Fixed by moving the cursor to the right place when a selection is active. Task-number: QTBUG-22853 Change-Id: I9ea1863436db98627a6fd041ce554cf10be26493 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> (cherry picked from commit 1b031759ddfdab9703dfecac13f1ed318da3dafe)
* Fix compilation with -Werror -WshadowDavid Faure2012-02-082-6/+6
| | | | | Change-Id: I2ef8f288415820fa08e5bab8b99a00b1ad0f2988 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use Q_PROCESSOR_* when chosing an atomic implementationBradley T. Hughes2012-02-084-84/+12
| | | | | | | | | | Use the new Q_PROCESSOR_* macros to decide which headers to include in the atomic implementation. This also removes qatomic_arm.h, which isn't needed anymore, just select the correct qatomic_armv*.h from qbasicatomic.h Change-Id: I954848feafb8c420949d066ffcee1dd2b271e13b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qprocessordetection.hBradley T. Hughes2012-02-084-1/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This detects the target processor based on preprocessor #defines, setting Q_PROCESSOR_${FAMILY} accordingly. Optional Q_PROCESSOR_${FAMILY}_${REVISION/VARIANT} #defines are also provided, usually dependent on how the compiler is invoked. Currently detected families (and variants) include: ARM (v5, v6, and v7) X86 (i386 and x86_64, as X86_32 and X86_64 respectively) IA-64 MIPS (I, II, III, IV, 32, 64) Other families that currently are not detected, but Qt has (or had) support for include: Alpha AVR32 Blackfin PA-RISC PowerPC (optional 64-bit variant) S390 (and S390X 64-bit variant) SH (and SH-4A) SPARC (SPARC V9) Detection for these is currently commented out, and can be easily enabled later. Change-Id: I571f245c189b9d80c7c3a5369ac595a271f37c8b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QProcess compile for Windows CE.Andreas Holzammer2012-02-082-4/+6
| | | | | | | | There are no Pipes under Windows CE, so take out the pipereader. Change-Id: I3e6afd403ed36e86a8694674f6c4798f1226ff74 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Disable Assertion messagebox for unittests.Andreas Holzammer2012-02-081-0/+1
| | | | | | | | | | | | | A messagebox will be shown for an assertion in debug mode. This introduces a need for user interaction to proceed the execution of the unit test. Setting the Report mode to debug, will only print the assertion to stderr. Change-Id: If8ae80ea96d6608cba77b9c6ca176f97d1680932 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix qlocalsocket autotestHarald Fernengel2012-02-081-19/+11
| | | | | | | | | Lackey is currently not built due to a qscript dependency. Mark the test as an expected failure, so we can resume testing QLocalSocket again. See QTBUG-24142 Change-Id: I2642ed30cf7a2068f30f63801c632fea7dae7691 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* Fixed source composition with opacity in the raster paint engine.Kim Motoyoshi Kalland2012-02-081-0/+2
| | | | | | | Task-number: QTBUG-24075 Change-Id: I2b9263364bf30fb8c914823e80e7ea4a8af26035 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Initialize dynamic meta object extradata.Andrew den Exter2012-02-082-0/+35
| | | | | | | | | | QMetaObject::invokeMethod attempts to deference the extradata for meta objects versions 6 and greater which is causing a crash in some of the qtquick1 tests. Change-Id: If5b2ca83b15de2cd558976c6b681dd5457c404d1 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix position of a comment.Jędrzej Nowacki2012-02-081-3/+2
| | | | | | | The comment was wrongly placed. It describes v_cast function. Change-Id: I2390e4bf1fc19136bbbecbae4be83d5320ca244f Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Code cleanup and micro optimizations in QMetaType.Jędrzej Nowacki2012-02-082-61/+67
| | | | | | Change-Id: I0fbd713fcdf094f9d13acee855b6dd6986695e0d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Don't include qguifunctions_wince.h in QtCore.Andreas Holzammer2012-02-081-1/+0
| | | | | | | | | | qguifunctions_wince.h does not live anymore in QtCore, but instead in QtGui, so do not include them in QtCore. Change-Id: I22222ae7045ee0140924197ac583a3bf2e0f3d36 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Make copy and cut methods work in QAccessibleTextEditJosé Millán Soto2012-02-082-4/+17
| | | | | | | | | | Correct the implementation of cutText and copyText in QAccessibleTextEdit so they use cut() and copy() methods of QTextEdit Cherry picked from Qt 4 - 36202cf8fca822492615d418bd563a40bee4af08 Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64Giotis Nikos2012-02-081-2/+8
| | | | | | | | | | | | | This change is needed because msvc2010 tools have a '\' character at the end of environment variable VCINSTALLDIR. This variable on msvc2008 does not have this '\' character at its end. Without this change QMAKE_TARGET.arch on msvc2010 x64 evaluates to x86 instead of x86_64. Task-number: QTBUG-22686 Change-Id: Ifba833e9361c97568b8b3de9976023e8537b208a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add configure, sync.profile, and header.* to OTHER_FILES in qtbase.proBradley T. Hughes2012-02-081-0/+8
| | | | | | | This makes these files easily locatable when using Qt Creator. Change-Id: Ie0c15ebf2cc7045954713265bf524f2ecf1eea34 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add 'AllButtons' into Qt::MouseButton enum, for use by QMLRick Stockton2012-02-081-0/+1
| | | | | | | | | | | | This allows the QML programmer to set 'acceptedButtons', for a MouseArea, to accept all buttons with a single value. In comparison with OR'ing a long list of Qt::MouseButton values, this is shorter, easier, more clear, and less error-prone. Task-number: QTBUG-24106 Change-Id: I0259969223c0b44b6ce8ae84aed37d20cb77999b Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>