summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Track window state in manual test windowflags.Friedemann Kleint2012-07-182-15/+39
| | | | | Change-Id: Ief6cd4b29ddcc946e1ccac75b352da80bbf647d0 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix rendering glitches when using native widgets in MDI subwindowsMiikka Heikkinen2012-07-181-6/+0
| | | | | | | | | | | | | | | | | | | | When mixing native and regular widgets in same QMdiArea, some subwindows didn't properly get set native. This was because when a native parentless widget was given a parent, it wouldn't enforce native window on the new parent and its ancestors. This happened because window flags were adjusted too late in relation to createWinId() call in setParent_sys(). Fixed by moving the createWinId() call to its proper place. Also removed some old Q_WS_* ifdeffing in QWidget::setParent() that masked some native enforcement code. Additionally removed few QEXPECT_FAILs from QWidget autotest now that those cases work correctly. Task-number: QTBUG-26424 Change-Id: Ib6f9d0531e5c7299e2c307734d49c81f1ffa9713 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Windows: Do not return short path names for QDir::tempPath().Friedemann Kleint2012-07-171-0/+2
| | | | | | | | WinAPI GetTempPath() sometimes returns short names for C:/Users/<user>/AppData/Local/Temp. Change-Id: I33f991acc06e652ccd484d36a5a384eb776f8395 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix error when inserting to tables with datetime fields with QODBCThiago A. Correa2012-07-161-1/+27
| | | | | | | | | | | | | 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>
* Replace Q_WS_ in tests by Q_OS_ or check platform names.Friedemann Kleint2012-07-1610-30/+25
| | | | | Change-Id: Ica445cf1e83bfaab870ac344d6c02766f047a5cc Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* tst_qwidget: check widget geometry in fullscreen modeJoerg Bornemann2012-07-161-0/+10
| | | | | Change-Id: Idc45c6d18decf3c71c6736742434ad9d0cccd2d2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove #ifdef Q_WS_ / include / #endif conditionals.Friedemann Kleint2012-07-166-22/+0
| | | | | Change-Id: I734490ddcb5501e620370e50ef06180ab5e23393 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix applicationName() being empty in QApplication.David Faure2012-07-162-15/+26
| | | | | | | | | | | | | | | 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>
* statemachine: Move RestorePolicy enum to QState classKent Hansen2012-07-161-21/+21
| | | | | | | | | | 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>
* Add QStateMachine constructor that takes a ChildModeKent Hansen2012-07-161-0/+42
| | | | | | | | | | | | 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 d281aa6936ad01e28dacabb41bd9eb59891f85a1, 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>
* fix object file name clashOswald Buddenhagen2012-07-163-0/+3
| | | | | | | under extremely rare circumstances this would have actually failed Change-Id: I4132d0f82e9f924e92e9e96f6d34451c94a67201 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Test QVariant copy with a user type instead of a QtNetwork type.Stephen Kelly2012-07-152-9/+19
| | | | | Change-Id: I78acc8a843eb12a2606f491d1a29e1bcd408d60f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Run QIcon related crash test with the other QtGui types.Stephen Kelly2012-07-141-2/+2
| | | | | Change-Id: I475cfc5a91a046951feecb425f8235ad37f1ba44 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Don't declare built-in metatypes as metatypes again.Stephen Kelly2012-07-141-23/+0
| | | | | Change-Id: Iba9804299e8f6e2db10965fdc719ee26f197758e Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Add some tests to note that private signals can't be overloads.Stephen Kelly2012-07-131-0/+88
| | | | | | | | | 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>
* Relax the reqirement in which order events are delivered.Jan-Arve Saether2012-07-131-7/+11
| | | | | | | | | | | | | | | | | 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>
* statemachine: Make signal transition registration thread-safeKent Hansen2012-07-131-0/+50
| | | | | | | | Since Qt's connections are thread-safe, QStateMachine's plumbing around them should be thread-safe too. Change-Id: I8ae91c2edc2d32ca4ed4258b71e5da22de30ed91 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Fix signal transition handling in multi-threaded setupKent Hansen2012-07-131-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, QStateMachine lazily registers signal transitions (i.e., connects to the signal) when the transition's source state is entered. The connections are established in Qt::AutoConnection mode, which means that if the sender object lives in a different thread, the signal processing will be queued. But if a sender object's signal is used in an out-going transition of the target state of the queued transition, it's possible that a second signal emission on the sender object's thread will be "missed" by the state machine; before the machine gets around to processing the first queued emission (and registering the transitions of the new state), a sender object on the other thread could have emitted a new signal. The solution employed here is to eagerly register any signal transition whose sender object is on a different thread; that is, register it regardless of whether the transition's source state is active. Conversely, when a machine's transitions are unregistered (i.e., because the machine finished), signal transitions with sender objects on other threads should be left as-is, in case the machine will be run again. This doesn't solve the case where the sender object is moved to a different thread _after_ the transition has been initialized. Theoretically, we could catch that by installing an event filter on every sender object and handle the ThreadChange events, but that would be very expensive, and likely useless in most cases. So let's just say that that case isn't supported for now. Task-number: QTBUG-19789 Change-Id: Ibc87bfbf2ed83217ac61ae9401fe4f179ef26c24 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Fix dynamic transition registration edge casesKent Hansen2012-07-131-0/+86
| | | | | | | | | | | | Some of the transition constructors didn't call the maybeRegister() function, causing the transitions to be ignored if they were created when the state machine was running and the transition's source state was active. Added tests that cover all possible cases. Change-Id: If1b593b127bd719e3be4e5a2e6949a780c4e97c3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Set correct signal index when signal is non-normalizedKent Hansen2012-07-131-22/+77
| | | | | | | | | | | | The originalSignalIndex member was not set if the signature had to be normalized. This caused the SignalEvent passed to onTransition() to report a signal index of -1. Improve the signal transition tests so they check both the event passed to eventTest() and onTransition(). Change-Id: I5331fd1944d53310b6d11eb2fd8713b80faa53a1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Make it possible to connect to QAbstract{State,Transtion} private signals.Stephen Kelly2012-07-131-0/+121
| | | | | | | Use the same trick as used for private signals in the models. Change-Id: I4235788490cae0e3d554565621d145652dc5b0ca Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Make it possible to use new syntax to connect to model signals.Stephen Kelly2012-07-131-0/+107
| | | | | | | | | The private signals can not be used as function pointers, as required by the new syntax, so we introduce a parameter which can only be created privately. Change-Id: I3d7bb8a163e764d685e8007cba831fb77e3c6855 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Create a way to inform moc about private signals.Stephen Kelly2012-07-131-0/+370
| | | | | | | | | | | | | | | | | | Moc checks for the use of the QPrivateSignal struct, which is part of the Q_OBJECT macro and is private to each class that uses it. Moc then generates a name of the signal which does not include the private struct, and generates code to invoke such signals with an instance of the private struct. This way we can mark private signals as such and prevent them from being emitted from subclasses or from outside of the class entirely. The drawback to this is that it only works if the private signal has no default arguments. However, at least in Qt, there are no such signals. Change-Id: Id16eadaa8d3c36a2c3b265077877f3e1d8304c84 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Test for QMetaType binary breakage.Jędrzej Nowacki2012-07-133-0/+46
| | | | | | | Type traits can not be changed durring Qt5 life time. Change-Id: If69f65ff2113c901580afee91b11ae1b11c13a4f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* tst_QMimeDatabase: use QFutureSynchronizerMarc Mutz2012-07-131-12/+11
| | | | | | | | Replace a list of QFuture<void>s and a loop that calls waitForFinished() on each of them with a QFutureSynchronizer<void>, which does exactly that. Change-Id: I1f2e90169a5b2949bd8cb9d1009a5a7af1500139 Reviewed-by: David Faure <faure@kde.org>
* statemachine: Fix state entry bug for parallel state groupsKent Hansen2012-07-121-0/+39
| | | | | | | | | | | | | | | | | | The SCXML spec had a bug that would cause the initial state of a compound state within a parallel state group to be entered even if the transition specified another (non-initial) state of the compound state as its target. This only happened if the transition had multiple target states. The bug has been fixed in recent revisions of the SCXML spec. This commit implements the fix, which is to walk the ancestors of the transition's target states only after all the target states themselves have been added, so that the default initial states are correctly overridden/ignored. Task-number: QTBUG-25958 Change-Id: Iac532047678c483a4a3996e24dacf30e00f6bbe0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Fix small problems with tst_QProcessThiago Macieira2012-07-121-3/+4
| | | | | | | | | | | | | | Remember to register the metatype where we use it, so we don't depend on another test being run previously. And skip the setWorkingDirectory test completely on Unix. I don't know why it needs to be skipped, but if we're not going to verify anything, don't even try to do anything. This saves us one memory leak at least. Change-Id: I22e151cc3fa7b4e976972aca8978b88b263d9bee Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Enable modularization of translation files.Jan-Arve Saether2012-07-123-0/+47
| | | | | | | | | | | | | | | | | This is accomplished by introducing dependencies to catalogs. This requires one API change: QTranslator::load(const uchar *, int); changes to QTranslator::load(const uchar*, int len, const QString &directory = QString()); Since now, even the load from memory might need a directory if the memory block contains a qm file with dependencies. Change-Id: I781f333d07f53bb431d0a7b5fa1abe282dc4d338 Task-number: QTBUG-26138 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fix crash when column is inserted before rowspanned cellEskil Abrahamsen Blomfeldt2012-07-121-0/+29
| | | | | | | | | | | | | | When you're inserting a column in front of a rowspanned cell and this cell is not the first in the rowspan, we would get the wrong logical index of the new cell (putting it in front of the initial cell with the rowspan). If the cell does not span all rows, the table will get into a broken state and trigger asserts in update(). To fix this, we search for the first cell after the insertion point which has a logical index higher than the cell directly before the insertion point. Change-Id: I42e91a20d77b2ba9c5607f6cab23f51ed888cbd3 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* test behavior of $${absolute,relative}_path() with empty 1st argumentOswald Buddenhagen2012-07-121-0/+2
| | | | | Change-Id: I76c0853a9d397979f2ae5eb780374d2380c989f1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Implement qWaitForWindowShown using qWaitForWindowExposed.Friedemann Kleint2012-07-121-1/+1
| | | | | | | Deprecate qWaitForWindowShown for Qt 6 as it is just a wrapper. Change-Id: I0f8195679679120bd402e273fed4d331dc926708 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Tests: Fix printsupport profiles.Friedemann Kleint2012-07-122-2/+2
| | | | | | | | | Fix reversed conditions, breakage introduced by 32db7de2079967fe1c333c562b742318c50321a4. Change-Id: I6fca399376cd1fa9bffea0a686b56c4d5ec26605 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Write qHash functions for QDate, QTime and QDateTime.Mitch Curtis2012-07-123-1/+8
| | | | | | | | These functions didn't exist - this patch implements them. Task-number: QTBUG-23079 Change-Id: I9eb6e238531d5cda878f5f2cdd27bab30aa60669 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add unary operator+ to QPoint and QPointF.Mitch Curtis2012-07-122-0/+30
| | | | | | | | | | | | | As requested by Winfried Schenke: "QPoint should have an unary operator+ (the unary operator- exists). Classes with arithmetic operators should provide a complete set of operators, because some template code relies on it." Task-number: QTBUG-22913 Change-Id: Ib0c5105975f56c15f00bb48d83c8d911f5a204ac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Improve windowflags, windowgeometry manual tests.Friedemann Kleint2012-07-118-21/+62
| | | | | | | | | | - Make them compile with 4.8 for comparison - Add Active to WindowStates control - Add -layout option to windowgeometry Change-Id: I052330eb8689883c104a0552708ea700c7cd790a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Fix some spelling errorsSergio Ahumada2012-07-1110-11/+11
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Improve QPoint and QPointF auto tests.Mitch Curtis2012-07-114-72/+679
| | | | | | | | Improve test coverage for QPoint and QPointF. Separate QPointF tests into their own project. Change-Id: Id28dc5b85aba9fc179d87b2bca1d99854f27a5ab Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix build with namespaced qtOswald Buddenhagen2012-07-111-0/+4
| | | | | Change-Id: Ie7d8ce60448aea98141baa66a57796447a31040e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix unit tests when CMAKE_PREFIX_PATH env var is not set.Stephen Kelly2012-07-112-2/+10
| | | | | | | | | | | | Tests which are expected to not build need to get a way to find the Qt 5 config packages. Because they use try_compile, there is no way to pass the contents to it. Work around that by generating a file containing the prefix which the tests will include. Change-Id: If43080c241539e4af5fe1c183e7da72066278b73 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* statemachine: Support parallel root stateKent Hansen2012-07-111-4/+9
| | | | | | | | | | | QStateMachine inherits from QState, so it should be possible to set its childMode to ParallelStates, and it should behave as expected (the machine should emit the finished() signal when all its child states are in final states). Task-number: QTBUG-22931 Change-Id: Ic436351be0be69e3b01ae9984561132cd9839fa7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Emit finished() signal when the initial state is finalKent Hansen2012-07-111-0/+12
| | | | | | | | | | It's legal to set a QFinalState as the initial state. The state machine should correctly emit the finished() signal upon entering such a state in the initial transition, and don't do any further processing. Change-Id: Ica8d3fadbbde604512ea1136624af54eb3b13b11 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Revamp property assignments implementationKent Hansen2012-07-111-0/+443
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the old implementation, property assignments (QState::assignProperty()) were "second-class citizens". Assignments were not really integrated into the state machine algorithm, but rather done as a separate step (QStateMachinePrivate::applyProperties()). While that was convenient for SCXML spec transcription purposes, it resulted in some pretty poor semantics on the user side: * Properties were not assigned until _after_ both the QAbstractState::onEntry() function had been called and the QState::entered() signal had been emitted. * Automatic property restoration (QStateMachine::RestoreProperties) did not play nice with nested states (and parallel states, in particular). The proper fix is to refactor the implementation to make property assignments first-class in the core state machine algorithm (QStateMachinePrivate::microstep()). In practice, this meant splitting some steps. Instead of calling exitStates() straight away, we now first only compute the states to exit (without actually exiting them), and use the resulting set to compute which properties are candidates for restoration. Similarly, instead of calling enterStates(), we first only compute the states to enter (without actually entering them), and use the resulting set to compute which properties are assigned by the entered states. With that in place, the rest was a matter of moving the various chunks of the old applyProperties() logic to the place where they belong in the per-state entry/exit. All existing autotests pass. Added several tests that verify the desired semantics in more detail. Task-number: QTBUG-20362 Change-Id: I7d8c7253b66cae87bb0d09aa504303218e230c65 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Remove clipboard operations from QAccessibleEditableTextInterfaceJan-Arve Saether2012-07-112-53/+133
| | | | | | | | | | | | | | | | | | Also, remove its subclass QAccessibleSimpleEditableTextInterface Instead of having the subclass that implements this conveniently, we move this behaviour over to the bridge. The bridge should check if role() == EditableText is set, and then it should try to support the IAccessibleEditableText interface (i.e. it should accept the calls to replaceText(), deleteText() and insertText()) and change the text with the following operations: 1. Query the text using QAccessibleTextInterface::text() or by using QAccessibleInterface::text(QAccessible::Value) as a fallback 2. Do the requested delete/insert/replace manipulation 3. Update the text with setText(QAccessible::Value, newText); Change-Id: Iee5e41faf14351951e2bfca8c9eac970a113e878 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* test: subtract qurlinternal.pro when private_tests are not enabledSergio Ahumada2012-07-101-1/+2
| | | | | | | | | | This test used requires(contains(QT_CONFIG,private_tests)) in its .pro file, but did not subtract itself from its parent project SUBDIRS when private_tests weren't enabled. Change-Id: Idcd0893c4804a8217e4dd33ba9838ff67e996f58 Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* statemachine: Don't assign properties for transitions with no targetsKent Hansen2012-07-101-0/+55
| | | | | | | | | | If the transition has no target states, that means the current state won't change; hence, property assignments should not be performed. In particular, properties should not be restored to the values they had before the state was entered. Change-Id: I237bbb541f939c272777e70c5f26c886ec457a17 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Purge restorable properties when they are restoredKent Hansen2012-07-101-0/+46
| | | | | | | | | | | | Previously, a registered restorable property would only be unregistered if the property was animated (see QStateMachinePrivate::_q_animationFinished()). But if a property is set directly, it should also be unregistered; otherwise, the state machine would use the previously saved (stale) value the next time that property should be restored. Change-Id: I5d246aa5355ddd0ba5f81b0186a9f0e4f3bbaa3f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Set compound state's initial state to 0 if it is removed/deletedKent Hansen2012-07-101-0/+13
| | | | | Change-Id: I45b7c15a9b3d5a1860cb9a7da8836f9eaaa0326d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* statemachine: Don't crash if property assignment target is deletedKent Hansen2012-07-101-0/+52
| | | | | | | | Do like QPropertyAnimation and store the QObject in a QPointer. Purge the assignments list upon state entry and property restore. Change-Id: I54a56885a2905178ab6aa5cf292b3d25c86b7a97 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Color transparency support in html import/exportAlexey Chernov2012-07-102-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export of color transparency component is added for cases where color is exported to html. New static function colorValue() is added to prepare CSS string representation of QColor. When the color is opaque, it falls down to QColor::name() method which was used previously, otherwise it returns 'rgba()' CSS statement or 'transparent' keyword in case transparency is 0. 6-digit precision is used for alpha value as it's maximum which can be processed properly by Gecko and Webkit engines (http://lists.w3.org/Archives/Public/www-style/2009Dec/0295.html). Import part for rgba() statement was also added to QCssParser. It supports rgba() color values as stated in CSS Color Module Level 3 (http://www.w3.org/TR/css3-color/#rgba-color). Import of undocumented statement 'rgba(int,int,int,int);' was also added to preserve regression test success and to provide compatibility with previous code relying on this behaviour. Test cases added to QCssParser autotest for rgba(int,int,int,float) statement and to QTextDocument autotest for rgba(int,int,int,float) and 'transparent' statements for certain 'color', 'background-color' and 'bgcolor' properties. Change-Id: Id341c4e800249820d52edef8003e50f9a74d062b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* fix compilation with conforming compilers (e.g. GCC >= 4.7)Marc Mutz2012-07-102-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | In qdbus_cast(), qMetaTypeId<QDBusArgument> as well as qvariant_cast<QDBusArgument> are used. They don't depend on any template argument of qdbus_cast(), so their definitions need to be available at function template definition instead of instantiation time. But the necessary Q_DECLARE_METATYPE(QDBusArgument) was at the end of the header, after the defintion of qdbus_cast(), which is too late for conformin compilers. Fixed by moving it up just after the QDBusArgument definition. Similarly, in tst_qdatetime and tst_qvector, the Q_DECLARE_METATYPE() for Qt::DateFormat and QVector<int>, and with it the specialisation of QMetaTypeId<>, were issued after the first use of meta typing; too late for conforming compilers. Change-Id: I25ca0b06e68d5184597a22708404a8f2040b2de1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>