Commit Graph

690 Commits

Author SHA1 Message Date
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
Qt Continuous Integration System
1edd1c95fe Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging:
  Compile on Mac
2011-05-10 21:21:45 +10:00
Olivier Goffart
48b7c870ec Merge remote-tracking branch 'staging/master' 2011-05-10 13:15:10 +02:00
Eskil Abrahamsen Blomfeldt
f0857b7667 Compile on Mac
Missing API update in Q_WS_MAC block

Reviewed-by: Jiang Jiang
(cherry picked from commit 4b95d9939db75d7bd55db4bbbf2d67af459f7eb5)
2011-05-10 13:14:41 +02:00
Oswald Buddenhagen
1e331968e1 ifdef out mac/no_coreservices path more cleanly
the symbian path was also dead
(cherry picked from commit 76ac26383922b4c452592a9175e7f3b9b3fd2513)
2011-05-10 12:54:57 +02:00
Oswald Buddenhagen
00bfc268c4 fix build on symbian
provide dummy implementation of QProcessEnvironment::systemEnvironment()
(cherry picked from commit e4920a4b4bc454ad309324a62db0e9257bba7367)
2011-05-10 12:54:56 +02:00
Alexander Potashev
342d2a253c Allow different text for undo actions and items in QUndoView
Now the texts used for undo actions and for items in QUndoView can
be set separately. This introduces an extended format of text that
can be passed to QUndoCommand::setText or QUndoCommand constructor.

The action text can now contain two strings separated by a "\n". The
first string (that goes before "\n") is then returned by
QUndoCommand::text() and used as name of item in QUndoView.
The second string (that goes after "\n") is returned by
QUndoCommand::actionText() and used when the text properties of the
undo and redo actions are updated.

If the text passed to QUndoCommand does not contain "\n", everything
works as before, and both QUndoCommand::text() and
QUndoCommand::actionText() return the same string.

Even though action text in English usually does not need different forms
for undo actions and QUndoView item, translators can employ this new
command text format, for example to adjust the grammatical case used in
command text to match the context of "Undo %1"/"Redo %1".

Merge-request: 2610
Reviewed-by: ossi
(cherry picked from commit 9b784789c75d59b27530bbf1d12676cc44f64f46)
2011-05-10 12:54:56 +02:00
Alexander Potashev
ec4d346f95 Allow using not only prefixes for undo command text
Functions QUndo{Group,Stack}::create{Undo,Redo}Action() now use action
text templates "Undo %1" and "Redo %1" if no custom prefix was provided.

This makes more flexible translations possible. The surrounding text
(like "Undo" and "Redo") can now be suffixed to the command name as
German and Korean languages require ("%1 rueckgaengig machen" for German).

Also, now the default action text (when no command can be undone) can be
translated differently from the prefix. For example, it can be
translated as "Undo action", not just "Undo".

When a non-empty prefix is passed to QUndo*****::create****Action(),
those functions work as before, and the features described above become
unavailable.

Task-number: QTBUG-14442
Merge-request: 1212
Reviewed-by: ossi
(cherry picked from commit 213c25ad24e4f3b0a44f82f23d34746cd294f8d6)
2011-05-10 12:54:56 +02:00
Pino Toscano
e04ad81dc4 QFileSystemEngine::currentPath(): use QFileSystemEntry() also for the no-PATH_MAX case
... in the same way as done in the other code path.

This makes qmake/QtCore compile again on glibc systems without PATH_MAX (e.g. GNU/Hurd).

Merge-request: 1218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit c8812fe6e642520532d65744caefcea790d59de8)
2011-05-10 12:54:56 +02:00
Pino Toscano
cc79c63c76 Massively update the hurd-g++ mkspec.
Bring it to the same level as linux-g++:
- copy the defines from common/linux.conf
- use the common gcc/g++ .conf files
- keep the trick of linking the pthread library everywhere
- leave out the wayland variables, which are not useful for Hurd

Merge-request: 1219
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 027605f67f73c8021c1ae604adad298599785a79)
2011-05-10 12:54:56 +02:00
Bradley T. Hughes
a6c8d0ba56 Do not allow multiple threads to acquire a QMutex
After the mutex optimizations on Mac, we did not handle the case where
semaphore_wait() could return KERN_ABORTED. Under heavy contention, this
happens, and when running in release mode, the assert in qmutex.cpp is not
executed. The code silently allows multiple threads to continue as if it
had acquired the mutex exclusively.

Fix this by checking for KERN_ABORTED from semaphore_wait(), and retry the
wait. We do not handle KERN_ABORTED for timed waits, simply return false and
let the code doing the tryLock() handle it how it deems best.

Reviewed-by: joao
(cherry picked from commit b54af0a9d6406356616889826e31925d2fa05718)
2011-05-10 12:54:56 +02:00
Robin Burchell
0bb70c3164 Ensure that QDateTimeEdit::calendarWidget() will always return a valid widget.
This case may be triggered in the (admittedly slightly abnormal) case where a
user wishes to embed the calendar widget in a layout or, for whatever reason, do
something else that will change its ownership.

We work around this by detecting when it is deleted and recreating the widget.

This will also have a positive side effect if setCalendarWidget() is called with
a widget which is then subsequently deleted, returning the default widget
instead of a pointer to (now deleted) memory.

Reviewed-by: Denis Dzyubenko

Merge-request: 2568
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
(cherry picked from commit 124ec3200f8453142717fcfe7a4aa0a55164aaa6)
2011-05-10 12:54:56 +02:00
Oswald Buddenhagen
202df2ae89 don't crash in QProcessEnvironment::systemEnvironment()
as the implementations moved to platform-specific files, the
QSharedDataPointer<QProcessEnvironmentPrivate>::detach() specialization
needs to go to the private header.

Reviewed-by: thiago
(cherry picked from commit c79246683a5033f605acd59d1c37d68381383a06)
2011-05-10 12:54:56 +02:00
Peter Hartmann
f38a639a41 HTTP backend: do not load resources from cache that must be revalidated
The header field "Cache-Control: must-revalidate" is a strict
requirement for loading the resource from the server, and not reading it
from the cache without revalidating first. With this patch, PreferCache
will load such from the network instead of loading them from the cache,
and AlwaysCache will throw a ContentNotFound error.

Reviewed-by: Markus Goetz
Task-number: QTBUG-18983
(cherry picked from commit 0e449f38894b1bd2dbb2f14206a011424679f063)
2011-05-10 12:54:56 +02:00
Denis Dzyubenko
bf89190cfb Compile fix for QLocale on Symbian.
The previous change added new ELangEnglish_India that doesn't
necesserally present in all SDKs.

Reviewed-by: trustme
(cherry picked from commit 154ab1cb4c4cdf34f21fc93b078f91cc79048bd4)
2011-05-10 12:54:56 +02:00
Denis Dzyubenko
563ab2e16c Added Kazakh language to the QLocale mapping table on Symbian.
Reviewed-by: trustme
(cherry picked from commit c6808af66d45541546b30c8e6de155b9812b4ef9)
2011-05-10 12:54:55 +02:00
Denis Dzyubenko
fc7aaa5c48 Added support for QLocale::uiLanguages on Symbian.
Extended the mapping table that matches symbian device languages to a
locale name and language code.

Task-number: QTBUG-7329
Reviewed-by: trustme
(cherry picked from commit 93233fc811920002d5b5b8272d9b5b8d5d3e2b98)
2011-05-10 12:54:55 +02:00
Olivier Goffart
74dda83074 Fix drawing text in item view:
Put back code that was removed by mistake in e8019cf8feb402303e6d253f5ca58bebfda42679

Task-number: QTBUG-18998
(cherry picked from commit bbbd4b8f3949b58d4fd21854241cb46cbc024a80)
2011-05-10 12:54:55 +02:00
Simon Frost
9e3fb2b86f Add enablers for Symbian App Booster
To use the Symbian App Booster, a registration file (matching the
filename of the executable, eg helloworld.applite) must be copied to the
import folder within QtAppBooster's private directory. The appropriate
library (qdeclarativebooster) must also be linked against. With this
change, the required actions are carried out by adding
"CONFIG += symbian_appbooster" to the application's .pro file.

Task-number: QT-4892
Reviewed-by: Miikka Heikkinen
(cherry picked from commit ae128aef03d246c9f89bed015092b1c5a925bcbc)
2011-05-10 12:54:55 +02:00
João Abecasis
1787e557e8 Don't rely on uninitialized data
HB_GetCharAttributes used to require a zero-initialized array for
attributes, as it selectively sets relevant bits for each character. We
ease that requirement by always initializing the attributes buffer
explicitly with memset.

Task-number: QT-4911
Reviewed-by: Ritt Konstantin
(cherry picked from commit 4cb9db404224c55859713c282aa90409e375c372)
2011-05-10 12:54:55 +02:00
João Abecasis
e6e6e4c169 Don't realloc user-provided buffer
When QTextBoundaryFinder doesn't own the buffer, don't realloc it and
get a new one instead.

Reviewed-by: Ritt Konstantin
(cherry picked from commit 320f172c851a4720299297c8b3b757eb1202c568)
2011-05-10 12:54:55 +02:00
Christian Kandeler
bc88f528dc qmake: Introduce new template type
The template type "aux" is intended for projects that do not require building anything, but may need to install stuff (e.g. applications with QML entry point).

Reviewed-by: Joerg Bornemann
(cherry picked from commit 56443421cb5e537e60abd7ced42c9ebf587683fe)
2011-05-10 12:54:55 +02:00
aavit
5a7409a423 Make autotest more resilient against network timeout
(cherry picked from commit 50be38737507f5c23b4d050e635a200024164a13)
2011-05-10 12:54:55 +02:00
aavit
f55563e7df Do not filter adhoc clients
(cherry picked from commit 4fe5307af44a76b99cc8c70aa330180c1985eabc)
2011-05-10 12:54:55 +02:00
aavit
c890bf88a7 Lancelot: Add configurable client filtering to baseline server
(cherry picked from commit d499f7ca995e40f7a75f913ff0f07d9a73fa3559)
2011-05-10 12:54:55 +02:00