Commit Graph

2623 Commits

Author SHA1 Message Date
Lars Knoll
9f0796c765 Remove stuff related to obsolete platforms
Qt/Embedded and Symbian are no longer supported.

Change-Id: Ifb86a384c666f389a166efe798d4792115731adb
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-10-28 20:55:13 +02:00
Robin Burchell
a2337f79ff Remove Windows and X11 from src/widgets/platforms.
This is dead code, unused with QPA in place, so remove it to avoid confusion
caused through grepping for class names existing in both old and new places.

Mac code is left in place for now, as some of it is still in use.

Change-Id: Ia82cd5bbabe71285ca997f79d8fd9c0504e32c28
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-28 16:29:13 +02:00
Friedemann Kleint
1cae2fdb86 Examples, plugins: Remove remains of qpa in profiles.
Change-Id: I0fc45c6c4df6d1f07472aec30b9e64b55db8e543
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-28 15:04:54 +02:00
Bradley T. Hughes
d23c1a9323 Mark QAtomic* implicit cast and other operators as deprecated
Add Q_DECL_DEPRECATED to all methods that are pending removal once
http://codereview.qt-project.org/#change,6243 is merged.

This is necessary to give people time to react to the source
incompatible change.

Change-Id: Ia72f184d630d593f96dd1d95ad6cd0d3bd5d811c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-10-28 13:43:26 +02:00
Samuel Rødal
77d30df7e5 Get rid of legacy glTexParameterf calls.
ES 1.0 didn't have glTexParameteri, which is why we sometimes used
glTexParameterf. However, we shouldn't use glTexParameterf because
that's treating integer values as floating point, which is not type
safe. ES 1.1+ and ES 2.x have glTexParameteri, and we don't really care
about supporting ES 1.0 in any case in Qt 5.

Change-Id: I6b586b31ddc418ba319c4cc88f6bb3978fdbd040
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-10-28 12:14:10 +02:00
Jason McDonald
0b77a19394 Improve QTextBrowser unit test.
The relativeLinks() test function was not performing sufficient
verification steps and thus hid a regression.

Task-number: QTBUG-22416
Change-Id: I2db4d4035e7a32f3c84630c7a15408d31d85ac9e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:54 +02:00
Jason McDonald
0a75be21b3 Move test data to the right place.
This file seems to have been forgotten when the test it belongs to got
moved -- probably because the test was poorly written and still passed
when the file couldn't be opened.  The file is supposed to live one
directory up from the qtextbrowser test so that it can be used to test
opening url's with relative paths.

Change-Id: Id80965b1c73b37de75691ae3a18f909f9c6d799a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:47 +02:00
Jason McDonald
f2f4115235 Remove redundant preprocessor directive.
In Qt5, it's quite safe to assume that QT_VERSION is greater than 4.x.

Change-Id: I2b7f491d79e084f3a52ee54c9e97419570b57584
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 09:33:29 +02:00
Jason McDonald
4d643a0614 Update changes file for tests and testlib.
Change-Id: Ib8bc7b365166e75e54e693c550832849de6a0363
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-28 07:17:33 +02:00
Charles Yin
2c7ef2cee0 Update qmltest usage help
Add "-translation" command line option

Task-number:QTBUG-22390
Change-Id: I0600b92767b73ccb54e8d70f6c7bb8bf8075c81c
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
2011-10-28 05:53:21 +02:00
Oliver Wolff
b4c8ac299f Freetype: Do not unlock face when returning superclass value in lockedAlphaMapForGlyph
If the face is unlocked in this case, calling unlockAlphaMapForGlyph after doing
the operation will cause an assert.

Change-Id: Icb2310a3b139e5bedf24f9c3794bd7d3fd38cfea
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-10-28 00:49:53 +02:00
Bradley T. Hughes
6476ac738c Replace implicit QAtomic* casts with explicit load()/store()
Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-10-27 18:57:38 +02:00
Friedemann Kleint
434824aede Fix compiler warnings.
- Fix gcc 4.6.X warnings about assigned but unused variables
- Remove trailing ';' from inline functions (Clang)

Change-Id: I8670afd6b149748a740f22c65de137762e9f18e1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-27 16:35:12 +02:00
Bradley T. Hughes
d2aaa13820 Use load() instead of implicit cast when using QueuedConnection
queued_activate() sets the argumentTypes atomic pointer on first use, which
mixes a load, memory initialization, test-and-set-ordered, and
another load. The explicit memory ordering is necessary to ensure
that the memory stores happen in program order.

Change-Id: Id1f8641f9cd081ce81aa8e830692f7af8261e84b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-10-27 16:33:24 +02:00
Bradley T. Hughes
ba90d5cc8b Update QMutex benchmark to match the one in 4.8
Pull in recent changes in the 4.8 branch for the QMutex benchmark.

Change-Id: Ie1e9bff33cecafb36d3d12207100f09f99597f8e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-10-27 16:32:09 +02:00
Bradley T. Hughes
916460929d Move the implementation of normalizeTypeInternal()
This function is only used in src/tools/moc/moc.cpp and
src/corelib/kernel/qmetaobject.cpp. We don't need to include the
static, non-inline declaration and definition every time
qmetaobject_p.h is included.

This also silences the related warning from clang:

../../../include/QtCore/5.0.0/QtCore/private/../../../../../src/corelib/kernel/qmetaobject_p.h:171:19: error:
      function 'normalizeTypeInternal' is not needed and will not be emitted
      [-Werror,-Wunneeded-internal-declaration]
static QByteArray normalizeTypeInternal(const char *t, const char *e, ...
                  ^

Change-Id: I6dfb2cb4d9d82a2ae7795f91169aa62f9a5f2c2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2011-10-27 14:56:14 +02:00
Sergio Ahumada
73e1a1c27c Add QT_BEGIN_HEADER/QT_END_HEADER macros
Fixing `macros' function test of `tst_headers'

Task-number: QTQAINFRA-324

Change-Id: I9e78d5f33dcd89718d90e0d2a40a02eba80f6ca9
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-10-27 14:56:14 +02:00
Bradley T. Hughes
ac96f78398 Compilation fix (cannot assign const pointer to non-const pointer)
After reinterpret_casting to const NSString *, we need to const_cast to
drop the cast to match the return type.

Change-Id: I3d202aec10e719a48f29d96b81621492936ac6ad
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-27 14:56:14 +02:00
Oliver Wolff
a73c357500 Fixed crash in printsupport on Windows
Change-Id: I3fec51b9f5c55296041b79bbf6da9d7687ae9afd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 14:56:14 +02:00
Bradley T. Hughes
f43eaaa5fa Make configure understand -W* arguments
These will be passed on as extra C*FLAGS to the Qt build. Useful for
adding -Werror or -Wno-something-or-other.

Change-Id: Ifbbf63261573edd024de951082d99658eb443a3f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-10-27 14:56:14 +02:00
Olivier Goffart
104f8671ff Compile with QT_ENABLE_DEPRECATED_BEFORE set to old version of Qt
Change-Id: Ice67071cc97ad645a7dda264a3dce184fceae75a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-10-27 13:32:16 +02:00
Steven Ceuppens
fca432c1c0 Add QDataStream operators to QMargins, so it can be streamed
* QDataStream format documented
 * Added Unit test for QDataStream operators

 * Updated Unit test

Change-Id: Idbcfcb0b927e6369e8d31b57693c7aa0d1a154e7
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-27 13:32:01 +02:00
Friedemann Kleint
ddce31c12f Do not call setCursor on Desktop or if there is no platform window.
Fix a crash on Windows.

Change-Id: I2b88e113d7149444ebc8946c0ee0eba7a9b5bbc2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-10-27 13:28:56 +02:00
Jason McDonald
919c5982b8 Remove pointless QVERIFY(1) calls in QPainter test
Change-Id: Iae5fcb9fa7dc64ed2d2bd369dbe689c5136ad283
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:53 +02:00
Jason McDonald
e822eb1a65 Use standard method of excluding a test.
If we find out at run-time that an entire test program is not
applicable, the correct way to skip the test is by calling QSKIP from
the test's initTestCase() method.

Change-Id: Iaf1dbcce38c569ee9513bf37232e9e4ea287d872
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:44 +02:00
Jason McDonald
1bc8f124b8 Prefer compile-time checks to QSKIP.
Qt has compile-time defines for determining the presence of each style
in the build.  Use these to exclude inapplicable test data instead of
including all test data and then being unable to distinguish the absence
of a style from regressions in QStyleFactory.

Change-Id: Iab1756aec80892a8b587bb635779537c64b1d4dd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:21 +02:00
Jason McDonald
c9bc2a6fda Remove unnecessary QSKIP.
Change-Id: Icaa0687d5d0370ede6076cbee9d97d89e338ca17
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 11:14:12 +02:00
Bradley T. Hughes
4a81c29c47 Use load() when constructing QSimpleCodec's reverse map
The implicit casting results in unnecessary volatile loads. The
test-and-set-ordered doesn't need full ordering, test-and-set-release
is enough to ensure that the memory initialization done by
buildReverseMap() and test-and-set happen in program order.

Change-Id: I168b504271aeba050d6b8396becbdeb3ef938213
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-27 11:12:38 +02:00
Friedemann Kleint
19b029cd9d Windows: More fine-grained paint event handling.
Pass expose events to GL widgets, handle invalid
update rectangles, ignore WM_ERASEBKND (using code from 4.8).

Change-Id: Ide062efb392292fff556d37b0ef0e880676748a2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 11:12:38 +02:00
Tero Ahola
abf25d3f64 Fixed resource leak when setting QProgressBar style sheet
Task-number: QTBUG-19110

Merge-request: 2687
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
(cherry picked from commit ecd78168271cfe71715e074a50752712f4aa3229)

Change-Id: I49fdf0f74b903313089eb8cd778c80a19d34b461
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-27 11:12:38 +02:00
Simon Hausmann
92740638df Initial support for MeeGo's input method server
This platform input context plugin is based on the dbus protocol used in MeeGo
1.2 Harmattan's input method server.

It supports composition, mouse-click-on-preedit as well as basic input method
hints. Missing are: Copy & paste, preedit injection, key redirection as well
as a bunch of other smaller MeeGoTouch specific features.

Change-Id: Ic3a8741f7a5ed18b379985e316cb137f7b8f6a8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kenneth Rohde Christiansen <kenneth.r.christiansen@nokia.com>
2011-10-27 11:12:38 +02:00
Frederik Gladhorn
5aa14793c4 Add default actions to QAccessibleWidget.
Change-Id: I9f251aad663fd0b8db2ef068c6581241d91c090d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-27 11:12:38 +02:00
Morten Sorvig
8f912c5c0f Native file dialog support for Mac
* New API: QPlatformDialogHelper to support native dialog on QPA.
    (Currently, It supports only file dialog.)
* Modify QDialog* and QFileDialog* to support native dialog.
* Add native file dialog support to cocoa platform plugin.

Change-Id: I957f046748a27a33fd9f8af3c525feabd1b0f582
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-27 11:12:38 +02:00
Thiago Macieira
a94c960b75 Unix (non-Glib) event dispatcher: round sleep to millisecond boundary.
If we have two timers running in an application with the same timeout
and started almost at the same time by the code, they would trigger two
sleeps, the second of which very short (under a millisecond).

This causes us to match the Glib and Windows event loops, which round
all timers to millisecond anyway.

Change-Id: I7eb531e02dadf75925c01192b0f33ef3641ae1ea
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-27 11:12:38 +02:00
Friedemann Kleint
0c3d898a03 Tests: Remove Q_WS_QPA, qpa-sections from .profiles.
Compile without -qpa.

- Make Q_WS_QPA-#ifdefed sections the default in the code
- Replace some Q_WS_ by Q_OS_
- Add ### fixme for places that need checking
- Remove qpa conditionals from .pro files.

Change-Id: I6ea930afc0c236cc12a7b7e95f1b8a1c24b3a513
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-27 09:50:30 +02:00
Morten Sorvig
3849455ee7 Cocoa: Set correct child window geometry.
Remote globalGeometry which was completely wrong,
replace with flipRect which converts from Qt
screen coordinates to OS X screen coordinates.

Change-Id: Ie560cb7c2266fe779da8a44a35596d2d12af77f5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-27 09:38:26 +02:00
Morten Sorvig
db44fdf4d6 Cocoa: Implement propagateSizeHints.
Change-Id: Idc1244ffbf975972f01d9ee48092500a72739d37
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-10-27 09:37:29 +02:00
Jason McDonald
af8795c2b5 Remove unreachable QSKIP in UIC autotest.
If an autotest's initTestCase() method fails or skips, the remaining
test functions are not executed.  Thus the QSKIP in the run() test
function was unreachable.

Change-Id: If1f1b484958367236357f9445491bed50bee2239
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 06:12:17 +02:00
Jason McDonald
238c304613 Remove obsolete MSVC workarounds from autotests.
Qt5 doesn't support MSVC versions before 2008, so workarounds for
earlier versions are no longer required.

Change-Id: I429feff99fe61d286637b960d92fd58962f8aefa
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 06:12:09 +02:00
Jason McDonald
eeaf051558 Replace QSKIP with QFAIL in qputenv test
If qputenv fails, the test should fail rather than skip, particularly as
the test is supposed to be testing qputenv.

Change-Id: Iabe13d360cabaeffda46fab19f1dd0d4ed8e1eee
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 03:15:09 +02:00
Jason McDonald
66c3f8753c Remove inappropriate QSKIP in QTextCodec autotest.
There were only two ways the QSKIP could be called: (1) the C++ runtime
is broken, or (2) the earlier call to resize the string failed.

In both cases there should be a hard test failure. In the former case, a
broken C++ runtime calls all of the test results into question.  In the
latter case, the QByteArray::resize() method has suffered a regression.

Change-Id: I5adf942d2eb4d746d2ab31e98571c5d9bdd40890
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 03:14:59 +02:00
Jason McDonald
a97c0c3c99 Remove obsolete QSKIP call.
The bug referenced in the QSKIP has been marked as resolved, so this
QSKIP should no longer be needed.

Change-Id: I41dd964827a3df8fb5ebb9674cef9db59c03d432
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-27 01:38:39 +02:00
Morten Sorvig
014581f255 Fix spelling
Change-Id: If9630ffa3a1c411b2e56b41ed35c272177343274
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-26 23:59:51 +02:00
Ritt Konstantin
42402a1672 replace 'const QChar &' with 'QChar ' for QChar and QString
Merge-request: 69
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>

Change-Id: I61f5a54b783252029fcad95677958fa6a2130d01
Reviewed-by: Olivier Goffart <ogoffart@kde.org>
2011-10-26 19:59:36 +02:00
Friedemann Kleint
82d6518696 Windows: Fix Open GL formats.
- Add swapInterval as additional format
- Query context format correctly and store in separate struct
  (default vs requested/obtained)
- Cosmetics, rename enumerations, structs.

Change-Id: I381cf8e1bde33e6624feb549437c7b95dd85e93c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-10-26 18:06:39 +02:00
Oswald Buddenhagen
a144e0bfdc Revert "Use memmove in QListData::append(int) as regions overlap."
We have proven that the regions cannot overlap. The root problem must be
somewhere else.

This reverts commit d96b7b809e.

Change-Id: I3446487f2a1a5bd322379b8adb788c26ff3e08e2
Reviewed-by: Thiago Macieira (Intel) <thiago.macieira@intel.com>
2011-10-26 18:06:39 +02:00
Frederik Gladhorn
b8d702dc8e Implement child instead of navigate in QAccessibleMainWindow.
Change-Id: I321ce4f8bb6e724db87a0419f890174b32cc1fe2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-10-26 13:50:12 +02:00
Sergio Ahumada
c3313fdd1c Doc: Fixing typo
Fix typos I was able to find in `tests/auto' directory.

Change-Id: Id0bfcc18301381ac8b1ca8d5af17bd926e5913d4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-10-26 13:50:12 +02:00
Friedemann Kleint
264272fb88 QtPrintSupport: Remove Q_WS_QPA, qpa sections from .pro files.
Compile without -qpa.

Change-Id: Icfbf733964a7d6db80f8ec706a4b6fe84cd71b4d
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
2011-10-26 12:29:03 +02:00
Jo Asplin
1b345e8655 Re-enabled tests
This commit re-enables tests that are assumed to be ok by now, since they:
- Have been passing in CI for a long time recently (more precisely, not failed once in pulse run range 730-829).
- Did not have any known issues associated with them.

Note that not all of these tests were disabled as a result of QTBUG-21402.

Task-number: QTBUG-21402
Change-Id: I80bbf8b351bd9165aa968e98f4dc17e8be6bc7c3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-10-26 02:58:36 +02:00