Commit Graph

2681 Commits

Author SHA1 Message Date
Jo Asplin
24971fbef0 Re-enabled passing tests in tst_qlistview
To increase the effective test coverage, this patch
re-enables the tst_qlistview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I029be60c16cdff5ee3e38889d2780f1ee7d01b51
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-04 01:53:55 +01:00
Sergio Ahumada
e71ac20d0f Add QT_MODULE(Gui) macro
Fixing `macros' function test of `tst_headers'

Task-number: QTQAINFRA-324
Change-Id: Ib6fcf276108bbb5515a72f3f17b373de82a599fc
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-03 20:07:04 +01:00
Friedemann Kleint
7d7b2d4218 QtGui: Fix compilation with gcc 4.4
- Do not mix QStringLiteral and Q_TR_NOOP.
- Replace static QString member variables by
- static member functions to return the strings.
- Use tr() since QAccessibleActionInterface declares it.

Acked-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>

Change-Id: Iabbee8ef61a5d7bfd35978a3f1cce1866329d065
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-03 20:07:04 +01:00
Sergio Ahumada
d2f1c6cd75 test: Skipping tst_qmdisubwindow::setFont() as it's unstable
This unstable test is preventing some good changes from being
merged. Further investigation needs to follow, so people can
refer to QTBUG-22544 for a real fix.

Change-Id: I038e5f340ccd2562d0e67428af595a2bcfc8c11d
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-03 20:07:04 +01:00
Oliver Wolff
e84b8a3475 Fixed returned geometry of toplevel child widgets
If a widget has got a parent widget but also is a toplevel widget it
should not return its geometry relative to its parent.
In addition to that, child widgets which are not toplevel should not
change their left and top values according to their parent but also
keep their width and height intact.

Change-Id: I5e641abf5ddc0b8d056ba023f8de52af1d2ccc9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-03 18:43:52 +01:00
Bradley T. Hughes
faa6113c41 Fix unstable test due to a race in QThread
QThread::finished() is emitted before setting the thread's state to
finished and !running, which means it's possible to receive the
finished() signal and act on it while QThread::isRunning() still
returns true.

This test randomly fails due to this race. Fix it by using checking
the return value of QThread::wait() instead.

Change-Id: Ibf347fc9a2e8d32b328227ee6978e1129dd781f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-03 18:43:52 +01:00
Olivier Goffart
ec5e59b73c QThread::isFinished should return true from finished()
and isRunning() should return false.

This restore the Qt 4.7 behaviour

In Qt 4.7, the finished() was called with the thread's intenal mutex
locked. Which mean that:
 - Call to isRunning or isFinished called from a slot connected to
   finish within the thread would deadlock. (Hence no compatibility
   to keep here)
 - Call to isRunning or isFinished from a slot connected with
   QueuedConnection in another thread would lock the mutex until
   the destructors are finished. and then return as if the thread have
   finished.

Change-Id: I963eccae8f7634aff90cc4bbab6ca886a78e35eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-03 18:43:52 +01:00
Olivier Goffart
1fe8fb81b1 Enable deprecated feature for now
Rationale is that it makes it possible to deprecate functions without
breaking other modules.

After the feature freeze, this should be reset to 5

Notice that QT_DEPRECATED is not defined while bootstrapping Qt
(QT_NO_DEPRECATED defined)

This also means that compilation is tested

Change-Id: I85f0e65ac3a160e9aba3833787ded3f94304cb90
Reviewed-by: David Faure <faure@kde.org>
2011-11-03 18:43:52 +01:00
Pekka Vuorela
255f569a43 Renamed QTextLayout member variable for readability
Class complex enough already without int i as member variable.
Furthermore, some methods use loop variable with same name, shadowing
the member one.

Change-Id: Idf2f5e34f130a60eb6121480e596e443f23641dd
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-03 16:14:08 +01:00
Pekka Vuorela
391f5670a3 Documented side-effect of QTextLayout::setPreeditArea()
Invalidates layout and requires layouting again.

Change-Id: I1cb954f155e4fc1df4b217478998ac903cc18323
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-03 16:13:03 +01:00
Harald Fernengel
d524bf0ee6 Fix regular expression when replacing headers
Use non-greedy capturing where it makes sense, also
keep the user's whitespace indentation in his include statements

Change-Id: Iff2b5dabf443529292e943ae69427bd15e702bf9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-03 10:04:56 +01:00
Jason McDonald
f79dc01304 Remove empty functions from QDirModel test.
Change-Id: Ieb8af41425739f9175df26224b171cd9f8b3c4f3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:54 +01:00
Jason McDonald
edc77f5aa8 Improve QDirModel autotest
The unreadable() test function has been disabled since before the tests
were imported into the Qt repository.  The idea of the test seems valid
(though the original implementation failed to correctly create an
unreadable file), so it should be re-enabled.

Change-Id: I94634bc5785dfbfbb42ca975badaead7fe812b29
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 08:17:43 +01:00
Jason McDonald
65ece490a9 Fix getting of enviroment strings in testlib
The standard C getenv() returns NULL if the requested environment
variable is not found.

In Qt4 and later, qgetenv() does not return a null pointer if the
requested environment string is not defined.  Instead it returns a
QByteArray containing an empty string.  If using qgetenv(), there is no
way to tell the difference between an undefined environment variable
and one which is defined to be the empty string.

In testlib, all calls to qgetenv() were checking whether the returned
QByteArray's constData() returned a null pointer, but that would never
happen.  These calls must instead check whether the QByteArray contains
a non-empty string.

Change-Id: I342f0e8b196896c26cccce3ff169fa1b9669b5ff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 02:42:56 +01:00
Jason McDonald
8cb52795f1 Allow extra selftests without modifying source.
Change-Id: I21708b725611eb64bdb0414cee08ca00dd62b213
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-03 02:42:56 +01:00
Samuel Rødal
9022f42a4f Get rid of "#if 0" and skipped tests in QPainter autotest.
qt_format_text_clip() and qt_format_text_boundingrect() have been
skipped ever since they were originally added to git, so I see no point
in keeping them.

The #if 0 in setEqualClipRegionAndPath() was ifdefed out from when that
specific test case was added (maybe it was failing to begin with?), but
it passes now, so we should enable it.

Change-Id: I6551e3b5612a4d4b00a969511af6abc85db43892
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-03 01:06:05 +01:00
David Faure
e488efa577 QStandardPaths: fix encoding of XDG_CONFIG_HOME env var
Change-Id: Ibb89f204fc93aed5a669f8f9efc7859845e6d493
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-02 19:57:21 +01:00
Jo Asplin
938ce35cec Re-enabled passing tests in tst_qgraphicsitem
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsitem test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: If311bc61801d2a279c274928ae7f0faeb595eeb3
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:42 +01:00
Jo Asplin
718f58487d Re-enabled passing tests in tst_qgraphicsview
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsview test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: I6b8eb09000ece789b990a2dd697cdb8b47cc8e1c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:38 +01:00
Jo Asplin
b92fed185e Re-enabled passing tests in tst_qgraphicsscene
To increase the effective test coverage, this patch
re-enables the tst_qgraphicsscene test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Idd229532787ce8138d8e1c86daf1f91b90e87e38
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:34 +01:00
Jo Asplin
006c5a7d73 Moved tests into network/ssl/
This commit moves qsslsocket_onDemandCertificates_member and
qsslsocket_onDemandCertificates_static from tests/auto/ to
tests/auto/network/ssl/.

Change-Id: I1593e113016ce7bb7dffbee82f1196275784d0ac
Reviewed-by: Holger Ihrig <holger.ihrig@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 18:51:29 +01:00
Thomas Hartmann
b9f0bde16e Adding custom bezier easing curves to QEasingCurve
I added the possibilty to define Bezier/TCB splines and use them
as custom easing curves.

Note:
Splines have a parametric definition. This means we have a
function/polynom of t that evalutes to x and y. x/y = f(t).

For our purpose we actually need the function y = f(x).
So as a first step we have to solve the solution x = f(t) for a given
t and then in a second step we evaluate y = f(t).

f(t) is a cubic polynom so we use cardanos formula to solve this equation
directly.

For the casus irreducibilis we need 3 functions that are a combination of
arcos and cos. Instead of evaluating arcos and cos we approximate these
functions directly.

TCB splines are converted into the corresponding cubic bezier spline.

Change-Id: Id2afc15efac92e494d6358dc2e11f94e8c524da1
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-02 17:10:00 +01:00
Friedemann Kleint
7d560240fa Windows platform plugin: Fix compiler warnings.
Change-Id: Id7111ca74455b93aabb803babff51c4393508dbc
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
2011-11-02 15:44:04 +01:00
Olivier Goffart
f3242864c3 Use C++11 static_assert
Change-Id: I75aa2bc209cdc8869e7daa9fd0dd865ccf65a68e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-11-02 13:24:36 +01:00
Bradley T. Hughes
ca25b63bea Silence warning from clang: semicolon before method body is ignored
qnsview.mm:171:45: warning: semicolon before method body is ignored
      [-Wsemicolon-before-method-body]
- (void)handleMouseEvent:(NSEvent *)theEvent;
                                            ^

Change-Id: I0b2fdd9c28586ce03f14f784d35e88dbbb5bd8f4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-11-02 13:23:10 +01:00
Bradley T. Hughes
5341cf7831 Disable warnings while building QtV8
This is a 3rd-party submodule that we do not directly modify. Warnings
from this code is of no value to people diagnosing and fixing warnings
in Qt code itself.

Change-Id: If17d9ce6509abb7d7aa1f00daf7e771fc6231993
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-02 13:17:10 +01:00
Friedemann Kleint
ebc28a2ee8 Testlib: Remove remains of qpa.
Link ApplicationServices in the non-qpa case (CoreServices
present).

Change-Id: I7555243aa480a7a4db84731a797924a97bf200cd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-02 08:18:12 +01:00
Jason McDonald
e9b5cd0266 Reinstate disabled part of qsortfilterproxymodel test
This test function has been disabled since before the tests were
imported into the Qt repository in 2006, but seems to pass today, at
least on Linux.

Change-Id: I8ff90a11a0fbb260d66b20ae735b5f21c450a5af
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:34 +01:00
Jason McDonald
5eb0a7be74 Remove stale test data from qsortfilterproxymodel test
The removed test data has been disabled since before the tests were
added to the Qt repository in June 2006, and was incomplete (the
"pattern" field was missing).

Change-Id: I974d03a4dcca76ba1a20f740372702612c8ce02b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:27 +01:00
Jason McDonald
82a4516c5d Remove disabled code from QWidget autotest.
The removed code was already disabled when first committed in January
2009.

Change-Id: I00a82f2e673fee76869cc76d756c36d081da2d2a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:44:20 +01:00
Jason McDonald
647e59fdb1 Remove disabled code from qgridlayout autotest
The removed code was already disabled when it was first added in June
2006, and is based on assumptions that no longer hold true.

Change-Id: Id7941d46e2a993aac422554dcc5540eb64eac492
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:55 +01:00
Jason McDonald
a7b1f30d57 Remove disabled test data from QUrl autotest
The removed test data was for obex URLs, which are not supported by
QUrl.

Change-Id: I166130ae936342d415165e46b7943d198de8986b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:49 +01:00
Jason McDonald
1f0f5c1691 Remove redundant #if 1 from qdbusmarshall test
Change-Id: I5342210cda1f02950667621e5e64d65d6357c6ce
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 05:43:40 +01:00
Jason McDonald
98992786f3 Remove redundant code from qsortfilterproxymodel test
Remove a couple of "#if 1" directives (but not their contents), which
have been present since before the tests were imported into the Qt
repository in 2006.

Change-Id: Id43aff37843e7a44ed96973f809de3838ba0e5b9
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:50 +01:00
Jason McDonald
238bdc2e91 Improve QWidget autotest.
Remove some "#if 1" directives and a line of debug code.

Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:22:16 +01:00
Jason McDonald
6fce33dd4c Remove debugging code from qgraphicsitem autotest.
Change-Id: Ia2ff65b5e980b42c5c64b957143860e94395d54f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 02:21:00 +01:00
Jason McDonald
60f6f63c54 Remove unused code from qdbusmarshall test.
The removed functions have been unsued since at least as far back as
2006.

Change-Id: Id1ea77dbfffa319c18891968f3aa378cfb563fd4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
983ba6510b Remove obsolete code from qdbusmarshall test.
The removed code had been disabled since 2007 and tested functionality
that was no longer supported.

Change-Id: I49dfe58601c1cc6d41590ab2980daba27eca6bfb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
5b744aefa3 Remove obsolete code from qdbuspendingcall test
The tested functionality hasn't been in the public API since 2008.

Change-Id: I2898da3730fa6248eea2e19779b33ccc793b7a31
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Jason McDonald
2c665596ae Remove disabled code in QItemView test.
The removed code was disabled in January 2007.  The commit history does
not make clear what the code was supposed to achieve and the code
doesn't do what the comment at the top says (that looks like a TODO).
Best to delete it and start again.

Change-Id: I42b6b1d865c96518d74dc189a4a41d0d2776e5bc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-02 00:53:26 +01:00
Bradley T. Hughes
2bce4627e6 Silence warning from clang
The original intent was most likely to memset() the entire MD5Context to
zero at the end of MD5Final(), which we do now.

In file included from tools/qcryptographichash.cpp:49:
...qtbase/src/corelib/../../include/QtCore/../../src/corelib/tools/../../3rdparty/md5/md5.cpp:139:24:
warning:
      argument to 'sizeof' in 'memset' call is the same expression as
the
      destination; did you mean to dereference it? [-Wsizeof-pointer-
        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
               ~~~            ^~~

Change-Id: I793c6f0944b89c0e4c5f9253cdb1071175c17152
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-01 17:39:32 +01:00
Casper van Donderen
51bee2babf Remove test that hasn't been enabled since 2007.
Task-number: QTBUG-22444

Change-Id: Id7569cf60cb314511a7d4f38833913c442f3fbba
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-11-01 17:39:32 +01:00
Friedemann Kleint
735457a40b Remove remains of qpa in tests.
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>

Change-Id: I41aed5290df5aebeb30ebf5d2796aca6c65980d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-01 16:15:08 +01:00
Jędrzej Nowacki
991d9cf928 Fix broken build.
Variadic macros are not supported by C++98 standard.

Change-Id: Ib520297e43b654b46925f3ee2735a975ebbe8e35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-01 16:15:08 +01:00
Samuel Rødal
d3710a13a6 Add Q_PROPERTY declarations to QScreen.
This means we can expose the API to QML in a simple way.

Change-Id: Ibc36711071d288ed78ce833a64d6be2f22fc4b62
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-01 16:15:08 +01:00
Bradley T. Hughes
573d8b838b Tentatively keep operator=(const QAtomic* &other)
QAtomic* has a copy constructor, so it may make sense to allow
assignment of one atomic variable to another.

Change-Id: Ic754d13765080e2fcd13dc583940e354ad4404cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-01 14:39:55 +01:00
Friedemann Kleint
24f845dd20 qeventdispatcher_win: Fix warnings about QAtomicInt.
Change-Id: I2639fcee046ad3cc5de9c2635fdb6de4b757fc27
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-01 14:39:55 +01:00
Jo Asplin
6264bf242a Re-enabled passing tests in tst_qgraphicswidget
To increase the effective test coverage, this patch
re-enables the tst_qgraphicswidget test case as such, and
instead disables only the test functions that are currently
failing in CI.

Task-number: QTBUG-22453
Change-Id: Ic484fde3492f077453f47a959dd6dc862288dcaf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-01 13:15:44 +01:00
Olivier Goffart
d2ed588419 tst_qvariant: add a test QVariant works with not movable types
Soon, QVariant will use more internal storage. It is important
that it still work with not movable types

Also, check with type that are movable but cannot be copyed
without their copy constructor to be called such as QSharedDataPointer

Change-Id: I6d67755476e4822468599bebfa8774ad96a15306
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-01 12:56:09 +01:00
Sergio Ahumada
cf6ef44ffd Revert "Fix use of qMax() with floating point constants"
This reverts commit 4e1b8720c1498edbb7a5bd37f622fdd3feb07850

Change-Id: I5e52a86119b522888b69fa261ebfa9168f885864
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-01 09:56:40 +01:00