Commit Graph

464 Commits

Author SHA1 Message Date
Lars Knoll
1f806aa1b4 New algorithm for drawing thin lines
Added a new QCosmeticStroker class for drawing thin
lines. The class can handle both aliased and antialiased
lines.

The code replaces all the midpoint line drawing algorithms in
the raster paintengine and gives correct subpixel positioning
for lines.

It gives around 30% to 50% speedup against the midpoint algorithm. If
we missed that fast path, the speedup is around between a factor of
6 to 8 for lines and aliased paths and 100 and 400 for antialiased
paths.

Reviewed-by: Kim
(cherry picked from commit 37c329a3e35fabc88fbcad824a69f37c671d2132)
2011-05-12 10:36:29 +02:00
Qt Continuous Integration System
c6b4da2f8a Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Prevent crash in OpenGL engine when scaling images / pixmaps.
2011-05-12 02:11:15 +10:00
Qt Continuous Integration System
ca724e095b Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Add the QIdentityProxyModel.
2011-05-12 01:42:31 +10:00
Stephen Kelly
d49c561b73 Add the QIdentityProxyModel.
Older commit history is in KDE svn:
http://websvn.kde.org/trunk/KDE/kdelibs/kdeui/itemviews/kidentityproxymodel.cpp?view=log

Ammended to update the license headers.

Merge-request: 900
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>

Conflicts:

	doc/src/frameworks-technologies/model-view-programming.qdoc
	tests/auto/headers/tst_headers.cpp

(cherry picked from b00089261eafbdf5f92ed94d7fb20b402bfcaeb2)
2011-05-11 17:37:48 +02:00
Samuel Rødal
e40443f7df Prevent crash in OpenGL engine when scaling images / pixmaps.
Make sure the resulting image / pixmap is valid if the source was valid.

Task-number: QTBUG-19157
Reviewed-by: Kim
Reviewed-by: Benjamin Poulain
(cherry picked from commit 1c5da7207a21cc44a4a08d291c290ffcd9b958fd)
2011-05-11 17:34:42 +02:00
Qt Continuous Integration System
1355da4b0f Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  update def files
  emit QNetWorkAccessManager::finished on QNetworkReply::abort()
  Don't run XLib check if -no-gui is used
  don't ignore create_prl for static plugins
  make QLibraryInfo return clean paths
  make relative paths in qt.conf work inside qmake
  Sockets: Fix potential null pointer usages
  QNAM: Re-order checks in migrateBackend()
  Fix initial main window dimensions for "fullscreen with softkeys" case
  Fix spelling mistake
  Fixes crash in QWidget::effectiveWinId.
  Fix crash when QSocketNotifier used with an invalid descriptor
  Optimisation - buffer packet read in pendingDatagramSize
  Remove warnings when disabling notifications on a closed socket
  Fix some warnings in symbian network tests
2011-05-12 00:49:55 +10:00
Shane Kearns
9d1a7b21c0 update def files
Reviewed-by: Trust Me
(cherry picked from commit 84cf56543c3e9add4f06ed65cf419561117ee739)
2011-05-11 16:40:09 +02:00
Martin Petersson
483807d4f2 emit QNetWorkAccessManager::finished on QNetworkReply::abort()
If we can not get online when the request is made then we are in the
WaitingForSession state. This will happen for example if the device
is in flight mode. This fix follows the same logic as in
_q_networkSessionFailed, but we should look into why we have the
WaitingForSession check in finished().

Task-number: QT-4747
Reviewed-by: Markus Goetz
(cherry picked from commit 0c9cb9a34d6b472cb53bf1af4616af55b593b616)
2011-05-11 16:39:59 +02:00
Bernhard Rosenkraenzer
01cbab598a Don't run XLib check if -no-gui is used
Currently, an attempt to compile Qt even with -no-gui on a Linux box
that doesn't have libX11 installed fails becaue of the XLib
functionality check in configure.
This check can be turned off in -no-gui mode, since QtCore, QtXml,
QtNetwork and friends don't use libX11.

Merge-request: 1214
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 912b6804bcacbf1b4f356d947986df8156a545a4)
2011-05-11 16:39:54 +02:00
Oswald Buddenhagen
c1077e9fb6 don't ignore create_prl for static plugins
Task-number: QTBUG-18436
Reviewed-by: joerg
(cherry picked from commit 2ca4ce848c63c9fa0a48c0f9f4e7fdbc90463bf1)
2011-05-11 16:39:47 +02:00
Oswald Buddenhagen
23db871a44 make QLibraryInfo return clean paths
as a side effect, don't use QDir for path resolution - it doesn't buy us
anything.

Task-number: QTBUG-1371
Reviewed-by: joerg
(cherry picked from commit 9cd62e4f7b23894a672297f6eebda64cdbd53cb0)
2011-05-11 16:39:45 +02:00
Oswald Buddenhagen
86a6ffbc3e make relative paths in qt.conf work inside qmake
Task-number: QTBUG-11602
Reviewed-by: joerg
(cherry picked from commit e6bb6ba76942d98e4b50a7fd32bf44e211f2fa5e)
2011-05-11 16:39:43 +02:00
Shane Kearns
119da2c8d4 Sockets: Fix potential null pointer usages
QAbstractSocketEngine::createSocketEngine can return 0 as well as throw.
In two cases the pointer was being used before the null check, in a 3rd
case the null check was missing.

Reviewed-by: Markus Goetz
(cherry picked from commit 19edac88af53eea7f733cabbaee77f9b725b7ea9)
2011-05-11 16:39:40 +02:00
Markus Goetz
10646142ae QNAM: Re-order checks in migrateBackend()
Do the easy checks first, will avoid a crash in the HTTP code
if request is serviced from the cache.

Task-number: QTBUG-18770
Reviewed-by: Peter Hartmann
(cherry picked from commit d03a28a289cf0665290e6ea0375b31cbb2d6649e)
2011-05-11 16:39:29 +02:00
Miikka Heikkinen
a2e836f3c1 Fix initial main window dimensions for "fullscreen with softkeys" case
The application main window defaults to fullscreen size when initially
constructed, even if softkeys are specified for it, as the screen
furniture is constructed later in show_sys. This resulted in the main
window being partially under softkeys.
Fixed by invoking handleClientAreaChange() explicitly in show_sys in
fullscreen with softkeys case.

Task-number: QTBUG-19043
Reviewed-by: Sami Merila
(cherry picked from commit e8fc93973a41f193665baa5fdc26cba951bd692f)
2011-05-11 16:39:20 +02:00
Shane Kearns
4b2d966566 Fix spelling mistake
Reviewed-by: Trust Me
(cherry picked from commit b166c30d8d0834518337ded44d2ebfe097ee312f)
2011-05-11 16:39:13 +02:00
Bjørn Erik Nilsen
1e41e3076a Fixes crash in QWidget::effectiveWinId.
Widgets are left in a transitional (and incosistent) state while being
re-parented, which caused QWidget::effectiveWinId() to crash in certain
circumstances. See patch for more details.

Auto test included.

Reviewed-by: ogoffart
(cherry picked from commit 6db0153cd7e35e4a919a76ae2aadbf2d2510bfb7)
2011-05-11 16:38:49 +02:00
Shane Kearns
7ee981a834 Fix crash when QSocketNotifier used with an invalid descriptor
select code for open C file/socket descriptors was crashing in FD_SET
if a QSocketNotifier was created with an invalid descriptor.

Added two autotests to QSocketNotifier, one to check notifiers with
bogus socket descriptors don't crash, the other to check that notifiers
with posix socket descriptors do work. (symbian socket engine doesn't
use them so they are not implicitly tested)

Reviewed-by: mread
Task-Number: QTBUG-18138
(cherry picked from commit 8a9a6afcf02f089f932bc81431ab46a60af32134)
2011-05-11 16:37:58 +02:00
Shane Kearns
fe56131236 Optimisation - buffer packet read in pendingDatagramSize
In Symbian, the OS function to get the size of a pending datagram also
includes the size of the packet header (which is different for IPv4 and
IPv6). We were reading the datagram with the "peek" flag set to
implement pendingDatagramSize, then reading again normally when the
client called read/readDatagram.

This change removes the "peek" flag, and buffers the datagram in the
socket engine, returning it and clearing the buffer when read or
readDatagram is called.
If there is no buffered data, the existing code path is followed - it
isn't mandatory to call pendingDatagramSize before reading from the
socket.

Reviewed-by: Markus Goetz
(cherry picked from commit dd8de4c2437397748daba49569cbc7f89a8bfbee)
2011-05-11 16:37:23 +02:00
Shane Kearns
7d505004f5 Remove warnings when disabling notifications on a closed socket
The generic layer calls setReadNotificationEnabled(false) on sockets
after they are closed. This no longer causes a warning from the symbian
socket engine. A warning will only be emitted if trying to enable
notifications on a closed socket.

Task-number: QTBUG-18713
Reviewed-by: Markus Goetz
(cherry picked from commit 0aa780235c24ed724fcf6a9095a6467e34b9346e)
2011-05-11 16:37:18 +02:00
Shane Kearns
605102d5c6 Fix some warnings in symbian network tests
Ignore warning when the test intentionally sets an invalid socket descriptor.
Make sure to set content type on all http post tests in tst_qnetworkreply.
Run test with enough capabilities to avoid platsec errors when accessing
certificate store.

Reviewed-By: Markus Goetz
(cherry picked from commit 9632fdefa9012ca11cd1345d66bafd6f417de88e)
2011-05-11 16:37:16 +02:00
Qt Continuous Integration System
1a1af689fc Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix tst_QVariant::invalidColor
  Move QTextCursor::MoveStyle to Qt namespace
  Add some QRawFont related low level functions to avoid extra copying
2011-05-11 23:47:33 +10:00
Jiang Jiang
a1d91af499 Fix tst_QVariant::invalidColor
Since a423ff5474b89028eeca95b254f5184311c8223b, the warning message is
no longer produced.

Reviewed-by: Samuel Rødal
(cherry picked from commit 8a5e82732be3aac37d14ef85c6974add46c6b65f)
2011-05-11 15:28:19 +02:00
Jiang Jiang
16628b76c0 Move QTextCursor::MoveStyle to Qt namespace
We cannot use QTextCursor::MoveStyle enums in QTextLine because
QTextCursor is not a QObject, while referring to that enum in
Q_PROPERTY requires it to be. That's why we need to move the
enums in Qt namespace.

Reviewed-by: David Boddie
(cherry picked from commit 5eba82b752e85a5d6cb3a893214ed2646d75f362)
2011-05-11 15:28:09 +02:00
Jiang Jiang
3032ba0f8e Add some QRawFont related low level functions to avoid extra copying
Added functions:

- QRawFont::glyphIndexesForChars(const QChar *chars, int numChars,
  quint32 *glyphIndexes, int *numGlyphs) const
- QRawFont::advancesForGlyphIndexes(const quint32 *glyphIndexes,
  QPointF *advances, int numGlyphs) const

Reviewed-by: Eskil
(cherry picked from commit 965af9eb2932efae5d736df54c3859460017b6a5)
2011-05-11 15:26:34 +02:00
Qt Continuous Integration System
83aa91f550 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix GLES2 include path for applications when not using the dash shell
2011-05-11 23:20:45 +10:00
Paul Olav Tvete
df4d7f1811 Fix GLES2 include path for applications when not using the dash shell
Backslash escapes normally requires "-e" option to echo

Reviewed-by: Jørgen
(cherry picked from commit 68f37a29f911fce5bcdd285b1fc1bc6d4868d78e)
2011-05-11 15:15:47 +02:00
Qt Continuous Integration System
3f8923d3a5 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Fix to commit 7fce0a73cc.
2011-05-11 22:30:28 +10:00
Kim Motoyoshi Kalland
587f7f753a Fix to commit 7fce0a73cc. 2011-05-11 14:24:45 +02:00
Qt Continuous Integration System
8cd8e5e4cb Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  tests: fixed or disabled qtbase tests with circular dependencies
2011-05-11 21:47:11 +10:00
Rohan McGovern
698b3da842 tests: fixed or disabled qtbase tests with circular dependencies
tst_lancelot did QT+=svg, but didn't actually use QtSvg.

qlocalsocket/lackey uses QtScript, which is not available when compiling
qtbase.

Change-Id: Ic3cc5a6f74a58ee8f2fdc48b9c852d9551b85f68
2011-05-11 13:34:00 +02:00
Qt Continuous Integration System
eb5ad10b2c Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Check if OES_texture_npot is present on OpenGL ES 2.
2011-05-11 20:41:00 +10:00
Kim Motoyoshi Kalland
7fce0a73cc Check if OES_texture_npot is present on OpenGL ES 2.
Unless the OES_texture_npot extension is present, non-power-
of-two textures have some restrictions on OpenGL ES 2.

Reviewed-by: Samuel
2011-05-11 11:59:50 +02:00
Qt Continuous Integration System
d4a5077446 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Fix a bug in syncqt.
2011-05-11 18:18:18 +10:00
Liang Qi
236e794fc3 Fix a bug in syncqt.
Move the generation of version header file before the sync of header
files.

Reviewed-by: TrustMe
2011-05-11 10:05:43 +02:00
Qt Continuous Integration System
6954a35bb5 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  tests: fix private header inclusion in qtbase autotests
  tests: disable tests in qtbase which depend on qtsvg
  tests: make benchmarks compile or disable those which don't compile
  tests: remove references to benchmark directories which don't exist
  tests: enable compilation of autotests for qtbase by default
  tests: make tst_qrawfont compile for QGlyphs -> QGlyphRun API change
  tests: mark some tests as using private API
2011-05-11 17:11:28 +10:00
Rohan McGovern
fda40e37df tests: fix private header inclusion in qtbase autotests
Any test which needs private headers from some Qt module must do:

  QT += modulename-private

Reviewed-by: Jason McDonald
Change-Id: I6924a577a960e4990f4379b02bca4822d8248fb4
2011-05-11 17:04:19 +10:00
Rohan McGovern
838cf9abd9 tests: disable tests in qtbase which depend on qtsvg
Reviewed-by: Jason McDonald
Change-Id: I2416d34b5c262e20ee18f7121e8745327d5614f8
2011-05-11 17:04:16 +10:00
Rohan McGovern
ce26a6fd2b tests: make benchmarks compile or disable those which don't compile
Reviewed-by: Jason McDonald
Change-Id: Idc9fa4722b59f9b75d5e4a91bbfd0ae068d29b3d
2011-05-11 17:04:12 +10:00
Rohan McGovern
427d32a3b8 tests: remove references to benchmark directories which don't exist
Reviewed-by: Jason McDonald
Change-Id: I14d0981c9f962c4eb048ca426a8ba19aa7ea66de
2011-05-11 17:04:02 +10:00
Rohan McGovern
a1e66dbeaa tests: enable compilation of autotests for qtbase by default
Tests are now treated like examples and demos: compiled by default,
unless you configured with `-nomake tests'.  (They are still not
installed by default, however.)

Reviewed-by: Jason McDonald
Change-Id: Ifc56f6763bb2aafe6fe57b684751f99ec82ea26f
2011-05-11 11:52:24 +10:00
Rohan McGovern
0012bd57a9 tests: make tst_qrawfont compile for QGlyphs -> QGlyphRun API change
Broken by 051ef6f294

Reviewed-by: Jason McDonald
Change-Id: Ia8589aba1bfb71d000d8fad455d90e704ba28972
2011-05-11 11:52:09 +10:00
Rohan McGovern
ed8c43b5ee tests: mark some tests as using private API
These autotests are all using private symbols, available only when Qt is
configured with -developer-build.  So, gracefully disable them when
the private symbols are not available.

Reviewed-by: Jason McDonald
Change-Id: Iafd1c7af486feeee810110bc021e75984827f78a
2011-05-11 11:51:46 +10:00
Qt Continuous Integration System
2de195b450 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Prevent crash in wayland mimedata in case there is no offer.
2011-05-11 02:07:56 +10:00
Laszlo Agocs
8e8e0b26b6 Prevent crash in wayland mimedata in case there is no offer. 2011-05-10 18:03:43 +02:00
Qt Continuous Integration System
ff112f47c8 Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-earth-staging:
  Add QT_xxx_VERSION macros for each library in qtbase
2011-05-11 00:10:15 +10:00
Qt Continuous Integration System
e35297e65d Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Prevent having Status undefined in xlib platform plug-in.
2011-05-10 23:49:29 +10:00
Laszlo Agocs
20594a6d5b Prevent having Status undefined in xlib platform plug-in.
Commit 4b75ceea08 changed
qcoreapplication_p.h to include qsettings.h, which undefines Status.
This breaks the xlib platform plug-in (and its includes).
2011-05-10 15:42:01 +02:00
Liang Qi
45cdd701fa Add QT_xxx_VERSION macros for each library in qtbase
Provide version info for each library like QTCORE_VERSION and etc.

Task-number: QTMODULARIZATION-44
Reviewed-by: axis
2011-05-10 15:15:15 +02:00
Qt Continuous Integration System
09d6bb0ebd Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: (142 commits)
  ifdef out mac/no_coreservices path more cleanly
  fix build on symbian
  Allow different text for undo actions and items in QUndoView
  Allow using not only prefixes for undo command text
  QFileSystemEngine::currentPath(): use QFileSystemEntry() also for the no-PATH_MAX case
  Massively update the hurd-g++ mkspec.
  Do not allow multiple threads to acquire a QMutex
  Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget.
  don't crash in QProcessEnvironment::systemEnvironment()
  HTTP backend: do not load resources from cache that must be revalidated
  Compile fix for QLocale on Symbian.
  Added Kazakh language to the QLocale mapping table on Symbian.
  Added support for QLocale::uiLanguages on Symbian.
  Fix drawing text in item view:
  Add enablers for Symbian App Booster
  Don't rely on uninitialized data
  Don't realloc user-provided buffer
  qmake: Introduce new template type
  Make autotest more resilient against network timeout (cherry picked from commit 50be38737507f5c23b4d050e635a200024164a13)
  Do not filter adhoc clients (cherry picked from commit 4fe5307af44a76b99cc8c70aa330180c1985eabc)
  ...
2011-05-10 21:43:23 +10:00