Commit Graph

2772 Commits

Author SHA1 Message Date
Simon Hausmann
ef2efafcc6 Allow generic plugins to set defaults for window system properties
In order for generic plugins to set defaults on "startup" time - such
as the meego integration plugin to set the correct screen orientation -
it is necessary to construct the plugins when the application startup is
done. Then the plugin can "inject" the values the usual way, using
QWindowSystemInterface::handle*Change. Afterwards we need to process those
events - take them from the window system event queue and let QGuiApplication
process them.

Change-Id: I84de022ad565a33ae3ef5dfc34f540d6bf488b03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-20 12:43:55 +01:00
Simon Hausmann
1ca05bb0c1 Add support for platform plugin specific event filters.
The setEventFilter on the platform native interface allows subscribing to
events on the backend by event name.

Change-Id: Ib10077fbc69f0207edbae1177e7bbd18c8d0f9ae
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
2012-01-20 12:43:52 +01:00
Robin Burchell
03700a293e Change visibility of eventFilter().
Change-Id: I2d47e3d1f5a8fac5a1fe4638dce87a9e036f8544
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-20 12:42:10 +01:00
Bradley T. Hughes
77fcba22c4 Add Contact: information in the license header
Contact point is the Qt Project, and needs to be included for
all new files added to the repository.

Change-Id: Id0e7219e1d11a169f1a91439728cbda55ab29eeb
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:27:11 +01:00
Bradley T. Hughes
085d3af48c Silence warning from clang
QBasicAtomicPointer is forward declared as a class, keep the actual
declaration of QBasicAtomicInteger and QBasicAtomicPointer as class with
all public members (qoldbasicatomic.h does the same).

src/corelib/thread/qbasicatomic.h:158:1: warning:
      'QBasicAtomicPointer' defined as a struct template here but
      previously declared as a class template [-Wmismatched-tags]
struct QBasicAtomicPointer
^
src/corelib/global/qglobal.h:1861:23: note: did you mean struct here?
template <typename T> class QBasicAtomicPointer;
                      ^~~~~
                      struct

Change-Id: I38c59c29d7f796dde772e7f403bbf98b04571a08
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:27:04 +01:00
Bradley T. Hughes
db10b7b40f Use Q_FOREVER instead of forever
Public headers should compile with QT_NO_KEYWORDS defined.

Change-Id: I5620b4b2600f5e39bb402b97d14fdb257dfe9942
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-20 12:26:37 +01:00
Thiago Macieira
1f843ca39e Add the new QBasicAtomicXXX implementation - no backends yet
The new implementation is API- and ABI-compatible with the old
implementation, provided that QBasicAtomicInt isn't used as an
argument in a function call or the return value: now, QBasicAtomicInt
is a typedef to QBasicAtomicInteger<int>.

The new design is based on CRTP: the QGenericAtomicOps template class
takes as a template parameter the derived class itself. This way, we
implement a "poor man's virtual" without a virtual table and
everything is inline.

QGenericAtomicOps implements most of the atomics code that is repeated
in many classes all over:

 * Acquire semantics are obtained by placing an acquire barrier after
   the Relaxed operation
 * Release semantics are obtained by placing a release barrier before
   the Relaxed operation
 * Ordered semantics are obtained by placing an ordered barrier before
   the Relaxed operation (either way would be fine)
 * fetchAndStoreRelaxed and fetchAndAddRelaxed are implemented on top
   of testAndSetRelaxed
 * ref and deref are implemented on top of fetchAndAddRelaxed

It also adds load, loadAcquire, store and storeRelease: the default
implementations of loadAcquire and storeRelease operate on a volatile
variable and add barriers. There are no direct operators for accessing
the value.

Each architecture-specific implementation can override any of the
functions or the memory barrier functions. It must implement at least
the testAndSetRelaxed function.

In addition, by specialising one template class, the implementations
can allow QBasicAtomicInteger for additional types (of different
sizes). At the very least, int, unsigned and pointers must be supported.

Change-Id: I6da647e225bb330d3cfc16f84d0e7849dff85ec7
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-20 12:26:26 +01:00
Mark Brand
ce2428c608 fix case of included windows headers
Allows cross-building on unix.

Change-Id: If389138c2d3bf5e72c62c85d054785ac9232f158
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-19 23:58:34 +01:00
Xizhi Zhu
3c0777936e Remove the useless connManager() function.
Change-Id: Ifac0796ec22d0656ccfcf31b8d45b2342c2ee646
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-19 22:26:43 +01:00
Robin Burchell
ce14c36475 Remove Q_CC_MWERKS.
This is no longer supported.

Change-Id: I3914f5007595fd699fa1e9a565a0a3f59a0e135e
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-01-19 21:13:48 +01:00
Robin Burchell
9e940ec8fc Remove Q_CC_NOKIAX86.
This is no longer supported.

Change-Id: Ic393bc48c4c842514da69b6696cfb62b54360070
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-19 18:40:45 +01:00
Lars Knoll
253c801c56 Remove QDir::convertSeparators()
This method has been deprecated since Qt 4.2.
QDir::toNativeSeparators() replaces it since then.

Change-Id: I49e6e1bfd50f26aa30134e599ee82067709549a7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 16:41:44 +01:00
Jonas M. Gastal
8bbf1a46a5 Removing QHttpHeader and QHttpResponseHeader.
QAuthenticator used it for the convinience of QHttpSocketEngine only.
QHttpSocketEngine has now been ported to use QHttpNetworkReply to parse
HTTP responses.

Change-Id: Idf6e70aa76613aad6e3d789d81ca1b4fd73575c2
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 14:31:10 +01:00
Lars Knoll
658a239eb9 Rename all our interfaces from com.trolltech to org.qt-project
Change-Id: I6db7211fcf6b24bd75e360645bbb2fdf1ef8a8bc
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 14:28:49 +01:00
Jan-Arve Saether
408a347d80 Cleanup: No need to have two code paths that both return Unrelated.
QAccessibleInterface::relatedTo() does the job for us already.

Change-Id: I816022041e38c5f9dd742df1c4b9ca61b8d6a186
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 12:58:26 +01:00
Bradley T. Hughes
a84d893bae Add "nswindow" resource to the Cocoa native interface implementation
This will return the NSWindow* for the given QWindow*. Port the QWidget
autotest helper to use the native interface and the "nswindow" resource.

Change-Id: I754b7e9288690ac3c99c3ec65c5526d5fe121234
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Bradley T. Hughes
1e29040c17 Prevent menubar related crashes
The native menubar interface does not communicate menubar destruction
down to the implementation, so we cannot keep naked pointers (otherwise
they become dangling). This happens often while running autotests as
windows, menus, widgets, etc. are quickly created, tested, and then
destroyed.

Work-around the crashes for now by using QWeakPointer. A proper fix will
need to be investigated to prevent the menubars hash from holding
dangling key pointers.

Change-Id: Ie8e50cbc52f9510e844fc3c0c5ae6a0865320282
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-19 11:31:22 +01:00
Joerg Bornemann
49d1b06898 Revert "fix NTFS mount points"
We agreed on treating neither junctions nor mount points as symlinks.
This will be handled in another commit.

This reverts commit 1656c4780c.

Change-Id: I41a87b6df9f7fba333df4c967ee9f0c1f3940952
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
911fd94913 Fix compiler warnings in Qt Network.
- Missing return value
- Wrong format for qint64

Change-Id: Id0de58c85b7c8ed2a62f7237fd23e6c5a5ac92ec
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 11:31:22 +01:00
Friedemann Kleint
114079e224 Windows: Implement QPlatformScreen::name()
Change-Id: I04ec91b12936bdcc179b79558ac2285b70281dcd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-19 10:09:09 +01:00
Jan-Arve Saether
ec550e28d2 Remove all references to QAccessible::Self
navigate() to Self does not make any sense (its basically a clone).
It seems that its not that useful to return Self from relationTo(),
since it was only one place where relationTo() was called where it
checked for the Self flag. This was in the windows bridge, and we
could easily work around that.
If it really turns out that Self is useful, we can always add that
enum value back later.

Change-Id: I9ebb60da059a843de5e6fcab9e815b919afc6f2a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 08:05:05 +01:00
Xizhi Zhu
f4d2acdb8e Remove QNetworkConfigurationPrivate::bearerTypeName().
Also, use QStringLiteral instead of QLatin1String.

Change-Id: I232fc02a56261929864c2ea66993ef1c74bc1237
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
2012-01-19 06:22:16 +01:00
Xizhi Zhu
b12d27ecb0 Remove the useless undef for "interface".
"interface" is not used by QNetworkConfiguration.

Change-Id: I742fe179d415ab1424bfddb1f6c034fc98c55e61
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 06:22:14 +01:00
Xizhi Zhu
a4402fdc89 Add the missing Q_DISABLE_COPY for public bearer classes.
QNetworkConfigurationManager and QNetworkSession are QObject, which
should not be thought of as values that can be copied or assigned, but
as unique identities.

Change-Id: I6ff0124a613862c2b411da2df31f03d5033315a9
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-19 06:22:10 +01:00
Jan-Arve Saether
67a3698b3c Remove all references to QAccessible::(Covers|Covered)
These were not used in any bridges, and none of the bridges
(MSAA, Cocoa, AT-SPI/IA2) can hardly make use of this information.

Change-Id: If3cad6b6c1928535dd932f46c9ec6883a4a19c76
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 00:17:38 +01:00
Jan-Arve Saether
f4ea85f8fe Remove all references to Self in relation to navigate.
After this change, Self should only be used in the context of
relationTo().

Change-Id: I04bb2bf7c480f9350aceb6e53d78e5cf1808d53e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-19 00:17:35 +01:00
Pekka Vuorela
a3a0b03735 QWidget editors to return correct value for Qt::ImEnabled
Qt::ImEnabled input method query was added for Qt5.
Enhancing source compatibility with Qt4 by setting query value
in QWidget if widget does not return any valid value.

Change-Id: I274c1f6c47a5cb08ecf550b25e5b358622e21d90
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-19 00:16:42 +01:00
Xizhi Zhu
8ecc2da31d Remove QNetworkConfiguration::bearerName().
It was added only to maintain source compatibility with Qt Mobility.

Change-Id: Iea8d40e401bd1f8d5115268e09b256eacca69ea0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-18 12:53:13 +01:00
Lars Knoll
4f25e66f7a Add a constructor that explicitly takes a size to QLatin1String
This is useful in a couple of situations where the size is known
at runtime and one wants to avoid a call to strlen.

Change-Id: Ic20587b0d365a4573d4636c5853c206b571b8d6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-18 10:21:30 +01:00
Jędrzej Nowacki
f8696140b0 Fix visibility of QVariant functions.
Change "Refactor QVariant handlers."
08863b6fda changed visibility of two
methods; QVariant::create and QVariant::cmp. These methods are internal
for Qt usage, but there is no need for breaking a dependent code.

Change-Id: Ic3a7f95dea5fa3e697f0686ae5d32dade24f14df
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2012-01-18 08:53:03 +01:00
Jason McDonald
8fbad679e9 Change QSKIP to fail for outdated tests.
Be more insistent that tests using the old two-argument version of QSKIP
should be updated.  After a grace period the warning will be removed and
incorrect usage of QSKIP will revert to a compilation failure.

Change-Id: Ifa19b856d9f45738bd9d790bb65a8741f965d0f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-18 02:10:09 +01:00
Morten Johan Sorvig
81e55fede7 Improve accessibility actions descriptions on Mac
Use built-in descriptions for built-in actions

Change-Id: Ic5581e89e4568abcc6c3add126d492345d26d87d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-17 19:24:29 +01:00
Joerg Bornemann
1656c4780c fix NTFS mount points
NTFS mount points are not treated as symlinks, because they might
not have a link target.
This is the case when a volume is mounted as a single mount point
without a drive letter.
This patch fixes building Qt in an NTFS mount point.

Task-number: QTBUG-20431
Change-Id: Ie2e15212e1a7ca7fa0067b7ca8857e243e42c21a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
2012-01-17 19:24:29 +01:00
Samuel Rødal
b41fd5cf12 Added libxrender-dev to xcb's README.
Task-number: QTBUG-23633
Change-Id: I9428d04dab9e769f531a5aaffb943c6c2fa79f9a
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-17 17:41:14 +01:00
Raphael Kubo da Costa
3de1e6f26b Remove the default address parameter from QDBusServer's constructor.
Commit 5be6cf0a6e306ed3a51ed5ba89317b1317544eea introduced an implicit
cast from const char* to QString in QDBusServer's constructor, which
breaks the compilation of applications which use QtDBus when
QT_NO_CAST_FROM_ASCII is defined and clang is used.

Fix it by splitting the current constructor with the broken default
argument into one which takes a non-default QString and one which only
takes a QObject* parent and calls the other with the current default
argument.

It would have been better not to have mostly duplicate code in both
constructors, but QDBusConnectionPrivate is also used in other places.

Task-number: QTBUG-23398
Change-Id: Ia001d63878e7ff720c6630a3372adc571124448d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-17 17:41:14 +01:00
Jiang Jiang
314da0ae01 Fix isolated Thai SARA AM handling
Since 5e07a3ac58f93bd5e09715d43b58c20950c2befa Thai text layout is
handled by libthai to special case of the SARA AM. It didn't handle
isolated SARA AM. This patch fixed it and added detailed explaination
on the special case.

The dotted circle should be shown rather than hidden.

Add an test case to verify that with Waree.

Change-Id: I4967715627cbe15f5a3e9ab3e3844420ab541aed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-17 16:12:53 +01:00
Simon Hausmann
6e24833dc9 Support current screen orientation changes on Harmattan
Subscribe to the corresponding property via DBus and report it
through QWindowSystemInterface::handleScreenOrientationChanged.

Change-Id: Ibd2901de798866e177aba898374ee2b9877310ed
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-17 16:12:53 +01:00
Mark Brand
0f7a413683 remove trailing whitespace
Change-Id: If53a0bd1794e69b4856f993c6e2959369bd007d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-17 14:44:30 +01:00
C. Boemann
efc355e8ed Fix that right aligned tabs can cause text overlapping
Eventhough there is a unittest that shows it shouldn't overlap it does
at drawing.

I've not been able to figure out why the unittet doesn't fail, but it
has before been the case that layout and drawing don't correspond.

Change-Id: I13250d0510cd0d963721b05f67ac82b1d499fbac
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-17 14:44:30 +01:00
Lars Knoll
bf805455d4 Fix ### Qt5 for QKeySequence
Change-Id: I32e582d264991e4a42e4ca6678d477835d15dbce
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-17 14:44:30 +01:00
Lars Knoll
445c4cb011 Mark obsolete methods in qregion as deprecated
Make them inline as well, so they don't
create symbols.

Change-Id: I779103d6752e75809d16632c8c0eb374cdbd9705
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-17 14:44:30 +01:00
Pekka Vuorela
cf0d5d4554 Move keyboardInput data back to QApplication
Deprecated interface, rest of Qt now adapted to
QInputPanel.

Change-Id: Iacbbcac90dd7c037a24b45df1ee868f04090b21b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-17 13:15:04 +01:00
Erik Verbruggen
90a3e6c7c4 Conditionally define Qt C++ "extension" macros.
This patch makes it possible to disable the definition of meta-object
related macros like SIGNAL, Q_SIGNALS, etc. This changes makes it
possible for tools to define the macros in a way that can be used with
them.

Change-Id: Ie8efb1983536f57755cbc59a8f71f1d04bf080be
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-17 12:45:36 +01:00
Simon Hausmann
14e237816d Add support for QWindow::setOrientation on Harmattan
Set the _MEEGOTOUCH_ORIENTATION_ANGLE property on the window, just like
Qt Components for MeeGo and MeegoTouch itself.

Change-Id: I0b9adf4550593678bbcba89a2d4f1f65c1f4bd20
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-17 12:21:56 +01:00
Morten Johan Sorvig
bc02ef882b Delete src/widgets/platforms/mac
This looks like the mac port but isn't any more,
remove it to prevent confusion.

Change-Id: I498f536d77d1a3c53e687f696ca6992539a1a90b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-17 12:19:29 +01:00
Samuel Rødal
82340ea5cd Fixed crash in GL 2 paint engine on Intel Atom.
The GPU in question supports GL 2 but not framebuffer objects. Since we
anyway have a font rendering path that doesn't use FBOs we might as well
not require framebuffer objects in order to use the GL 2 engine.

Task-number: QTBUG-22483
Change-Id: I2a80343fedda276e73e603ffe54edff58801af5b
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
(cherry picked from commit f13d0078d9f829cde2cd5b8b9eac40635a883ec6)
2012-01-17 10:30:17 +01:00
Leandro Melo
85a14abd2e Join user state of removed text blocks
Note: Indentation of surrounding code was fixed.

Done-with: mae
(cherry picked from commit 8d3d3381c127f0f4dd9fc507c3069acddbf40535)
Change-Id: I8d3d3381c127f0f4dd9fc507c3069acddbf40535
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-17 09:09:03 +01:00
Jason McDonald
2ba0d1e550 Move pass/fail/skip counters from QTestResult to QTestLog.
This change will enable further simplification of QTestResult and
QTestLog in the future, including removing a circular dependency between
the two classes.

The "getter" functions in QTestResult are retained for now, but will be
removed in a future commit, once QtQuickTest has been changed to call
the getters that this commit adds to QTestLog.

This commit is adapted from an unfinished change by Henrik Hartz.

Change-Id: Ife7f80ac6a4310449a4712e96e0bea6c02139a5a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-17 01:17:35 +01:00
Stephen Kelly
6acdb32561 Clarify docs that everything must be re-queried on model reset.
Change-Id: I05970302d4f52d092a7c65a45b9e5a3570b1d144
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-16 17:07:12 +01:00
Frederik Gladhorn
7a0099183a Accessibility plugin is for widgets.
Change-Id: Ifbfe1a7ec62979097ad82343b20be823579d99b9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 15:27:50 +01:00
Jan-Arve Saether
56c80382c6 Remove all reimplementations of relationTo() returning Unrelated.
QAccessibleInterface::relationTo() already return
QAccessible::Unrelated by default. No need to duplicate that code.

Change-Id: I40e6758b946c43ca8773cdb2d28407edf99aad49
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-16 15:27:50 +01:00
Morten Johan Sorvig
1f7aa83661 Remove Qt4 Mac accessibility backend files.
Change-Id: I2c41050b5965756ae4c2ecfe73ba5926880ed98d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
d6fb349751 Remove a ###
Change-Id: Ibc92317b07f3746c7978e571cae105535c01e1d6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-16 13:48:30 +01:00
Lars Knoll
1d7db25bd6 Merge the makeEncoder/Decoder overloads.
Change-Id: I9fdeeafe08dd70c0ab9ce26a2fce3b8d803ca280
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
6bf72a98ac Remove unused variable
Change-Id: Ib8725e89e40d6e12172b1da687da2e4d559444f3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
3b973971fb Fix ###'es in qrect.h
Change-Id: Id9635b6faeaf12ba2f7a0f70055b0df01cd16587
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 13:48:30 +01:00
Lars Knoll
bb5ae21c41 Fix ### comments in QSet
Change-Id: I302be7dc4cd7a9c2b9e35e8142ca100d6f86da7c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
e469323407 Use QFunctionPointer in QOpenGLContext as well.
Change-Id: I7192e6aea721c75257bfbd1d205d5ce7764d915f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 13:48:30 +01:00
Bradley T. Hughes
802c3580e0 Cleanup properly when destroying QCocoaWindow
[NSNotificationCenter addObserver]'s documentation clearly states that
removeObserver needs to be called before releasing the object being
observed. The m_contentView we create was never released either, so be
sure to release that as well.

Change-Id: Ia54eb1c5c751f4cb0edb21ad559b261cb8f24208
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
9702400e2d Fixed QGLContext::getProcAddress() to return a function pointer.
Task-number: QTBUG-5729
Change-Id: I57e71f89a2c5ca7f74f73c66adcbf4a6cc073813
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 11:47:32 +01:00
Xizhi Zhu
5b1aa4c75d Fixed build break when bearer is disabled.
Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-16 11:29:04 +01:00
Uli Schlachter
23a372ab8d xcb: Obey maximum request length when uploading images
When connecting to an X11 server, the server tells the client what its
maximum allowed request size is. Larger requests are not permitted.
Thus, libxcb verifies that all requests which are sent are smaller than
this size limit and possibly kills the connection (without any good
error message).

Thus, when uploading an image, we could be trying to send more pixel
data than fit into a single request. If this would be the case, the
code will now use multiple requests where each request only sends a
part of the allowed rows.

In case all the data fits into a single request, this commit shouldn't
change any behavior.

Change-Id: I84a4ebfcdb6de7e206015c37e3e33cba3bd309b1
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 11:01:09 +01:00
Frederik Gladhorn
ba888bb8c8 Clean up and extend QAccessible::State.
The state should contain useful and clear information.
Some of the old enum/bitfield members were not really clear.
Make them follow Qt terminology and shift the burden of interpreting
them to the bridge.

Apart from the previous commit changing from enum to bitfield, these
flags have changed names:

unavailable -> disabled
mixed -> checkStateMixed
protected -> passwordEdit (in the last commit)

floating is completely removed, even MSAA documentation states it is unsupported.

Some new states have been added.
Documentation added.

Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:55:37 +01:00
Frederik Gladhorn
15598b46c1 Accessible docs - editable text interface.
Change-Id: Id8b64ff9674b7cd4ac8551528239e8ab97563764
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:49:15 +01:00
Rohan McGovern
e08453f31a xcb: abort (rather than segfault) when X is not available
Be more user-friendly (e.g. when logging into a machine by ssh and
forgetting to export DISPLAY).

Change-Id: I9d07b0af9c5b4841827826053bb27b507801ae61
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 08:26:16 +01:00
Olivier Goffart
24a72c4efa qglobal: Remove symbian specific features
Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-16 03:52:32 +01:00
Olivier Goffart
a03b4e4417 Improve the documentation of QStringLiteral
Change-Id: I4bbe18ecc342f034fbc8e9fd14b700ee5272076f
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 03:51:14 +01:00
Jason McDonald
51cb2dd00a Remove unused QTestResult::allDataPassed().
The removed function was private API and was not used anywhere in Qt.

Change-Id: Ia262d119ebba30f6968cb7145043475bf88ffa39
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:57:23 +01:00
Jason McDonald
1066d185a6 Rename QTestLog::addIgnoreMessage to QTestLog::ignoreMessage.
Change-Id: I4cfcd00d444d0812c58afab6ffd43dee37db1340
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:56:51 +01:00
Olivier Goffart
d057065cbb Document Q_DECL_CONSTEXPR
Change-Id: I61f4017186e8c7b943855723d7c677a01f7a7bf7
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-14 10:27:35 +01:00
Morten Johan Sorvig
e97d77d5bc Clean up QCocoaIntegration destruction.
Fix memory leak - delete the font database. Remove
the NAApplication delegate.

Change-Id: I7c69eb4df01c8450c0abde360f77fbb318b20c83
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-14 05:36:12 +01:00
Martin Smith
e58e1abbd9 qdoc3: Don't put \relates in class member functions.
This removes two uses of \relates that were unnecessary.

Task-number:  QTBUG-23599
Change-Id: I3e10375159f6535f56622f9d24e16151938c63c3
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-14 03:55:26 +01:00
Janne Anttila
106bab644a Fix qsystemerror for WinCE
Windows CE does not have strerror(_r), so lets use string formatting
provided by windowsErrorString function.

In order to use windowsErrorString it was moved before
standardLibraryErrorString function.

Task-number: QTBUG-22498
Change-Id: Ifa20c4ac314ac8a26de6b0c5b67ced96b262c2b4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-14 03:55:03 +01:00
Mark Brand
f0841fe4cf remove symbian support vestiges from text codecs
Change-Id: I7b577d360cb9c7225da108ee56fd927a91a04dee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-14 03:54:41 +01:00
Janne Anttila
1135aeb1d8 Fixed sqlite for Windows CE.
Windows CE does not declare the localtime function, for this reason
sqlite3.c defines it for Windows CE. However the localtime define
was too late in sqlite.c code since the osLocaltime function
introduced inside ifndef SQLITE_OMIT_LOCALTIME needs it also.

Task-number: QTBUG-22508
Change-Id: I97b9bc6316809178cbcf7e304c5dcd7deb9005cb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
2012-01-14 03:54:18 +01:00
Jonas M. Gastal
14b929e9c4 Cleaning up header includes.
QNetworkCookie doesn't need to know about QNetworkCookieJar and for
QNetworkCookieJar header a forward declared QNetworkCookie is enough.

Change-Id: I21145ce0f67a0a6bd68a46a5e757f82105cdf520
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-13 20:54:23 +01:00
Janne Anttila
7ce13d00db libpng config for WEC7
WEC7 is missing some time conversion related functions ->
configured libpng for WinCE accordingly.

Task-number: QTBUG-22506
Change-Id: Ia4038aaf44944883be8f3e25817a638118c1a73d
Reviewed-by: aavit <qt_aavit@ovi.com>
2012-01-13 13:23:20 +01:00
Laszlo Agocs
77cfaf1f2c Update touchscreen plug-in's readme
To match the new mouse-for-unhandled-touch-event feature in
QGuiApplication.

Change-Id: Ifa3872ab51a8e95bee235a3681b0a9d1ec13081c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-13 13:23:20 +01:00
Janne Anttila
952df2ffd6 Fixed QFile::link behaviour for WinCE devices.
In WEC7 both arguments given for ScCreateShortcut needs to be given in
Windows format. Apparently older WinCE devices has accepted also Unix
format but this is not anymore true for WEC7. The Windows format works
for older WinCE versions as well.

Change-Id: Ic1f394e20bae8ad42acb46929d3ff4af92daf310
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 13:23:20 +01:00
Janne Anttila
dd5e72e2da Build fix for WINCE to qlocale_tools.cpp
Task-number: QTBUG-22500

Change-Id: If530799cf8ef971f5caf78d0c6dbeeda719d148f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 13:23:20 +01:00
Miikka Heikkinen
49c5c3e5c5 Windows: Fix qt_ntfs_permission_lookup
Specifying qt_ntfs_permission_lookup++ in application code didn't
make qfilesystemengine_win.cpp respect Windows ACL as it was supposed
to. This was because GetTokenInformation for TokenUser failed always in
resolveLibs() function, because the TOKEN_USER struct that was given to
it wasn't large enough to contain both TOKEN_USER and SID structs that
GetTokenInformation wants to return in this case.

Fixed by calling GetTokenInformation twice, first to determine the
required size, and then another time to get the actual token info.
Additionally, the SID returned as part of the token info needs to be
stored for the lifetime of the application, as the TRUSTEE_W struct
has a pointer to it (currentUserTrusteeW).

The worldTrusteeW initialization also required a change to properly
store the SID.

Note: The dynamic resolution of FreeSid and other SID manipulating
functions doesn't appear to be necessary, as they are found on the
same ifdef level (in winbase.h) as the GetTokenInformation, which
already isn't dynamically resolved.

Task-number: QTBUG-247
Change-Id: I0294c85ea903c86d03c2fcd3d801502b378dc0e5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-13 11:30:43 +01:00
Janne Anttila
2fab348c81 Build fix for WINCE to qfsfileengine_win.cpp
QFileSystemEngine::currentPath() returns QFileSystemEntry, but
this method expects QString return value.
-> Code does not compile for WinCE

Switched code to use "QFileSystemEngine::currentPath().filePath()"
correspondigly as Windows desktop does if filename does not contain
drive letter. This is ok, since WinCE does not support drive letters.

Task-number: QTBUG-22499
Change-Id: Ic4935357c40cda30efcd2e1c7d69bf2ef7b31dd0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-01-13 11:30:43 +01:00
Mark Brand
621b121c07 add missing multiple inclusion guard
Change-Id: I82e9d1ddfc1a46bf47b8948dce800dcbcc1a0305
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Constantin Makshin <cmakshin@gmail.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-13 11:30:43 +01:00
Friedemann Kleint
7549dc9e54 Windows: Use a message-only window as clipboard viewer or for GL.
Change-Id: Ib8d287404b157aae2f4493ef8eba220afaba6c47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-13 11:30:43 +01:00
Samuel Rødal
e50416066c Added application flags to translate between touch and mouse events.
The current way we do it of having the platform or touch plugin send
both mouse and touch events is not ideal. There's no good way to write
an application that works sanely both on a touch-only device and on a
desktop except by restricting yourself to only handling mouse events. If
you try to handle touch events you don't get any events at all on
desktop, and if you try to handle both, you end up getting duplicate
events on touch devices.

Instead, we should get rid of the code in the plugins that automatically
sends mouse events translated from touch events. This change enables
that by making the behaviour fully configurable in QtGui.

Two new application attributes are added to explicitly say whether
unhandled touch events should be sent as synthesized mouse events and
vice versa, and no duplicates are automatically sent as the current
situation. Synthesized mouse events are enabled by default.

We also get rid of the QTouchEvent::TouchPoint::Primary flag, which
was only used to signal that the windowing system automatically
generated mouse events for that touch point. Now we only generate mouse
events from the first touch point in the list.

Change-Id: I8e20f3480407ca8c31b42de0a4d2b319e1346b65
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-13 09:38:05 +01:00
Debao Zhang
b54cfb3124 QEventDispatcherWin32's internal Window should be a Message-Only Window
A message-only window enables you to send and receive messages. It is
not visible, has no z-order, cannot be enumerated, and does not receive
broadcast messages. The window simply dispatches messages.

Task-number: QTBUG-17144

Change-Id: Ibaf18f9ef5165166bf0b88e2f4952faba96d5eef
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-13 09:38:05 +01:00
Morten Johan Sorvig
7407045388 Cocoa: Send window activation events.
Change-Id: I599b4316f1535bf4855b205bfb2117bbcee63bf0
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2012-01-13 07:47:47 +01:00
Olivier Goffart
56b2a229a3 Remove the Q_NO_DATA_RELOCATION hack
This hack was there because symbian used to have a problem with
relocations in the data section, between libraries. Hence, this was needed
so the metaobject could have a pointer to the base metaobject, despite
being in another library.

Anyway, I was told that symbian was fixed eventually. but the hack had to
stay there because of compatibility. But now that we don't even support
symbian, we can get rid of this hack totally.

Change-Id: I7249971ece35d952efa92bf8b04bf3aa3667624c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-13 05:57:39 +01:00
Martin Smith
c373c538e8 qdoc3: Don't put a \table in a \value
In qdoc, the \value command is meant to document a single value of an
enum. e.g.

\value TypeOfService Text describing the type of service. It runs until
the next \value or a blank line.

Although it doesn't say you can't build a \table in the \value text,
it doesn't work. For now, the fix is to remove the \table from the
\value text and make the table separate from the enum \value list and
let the description of the \table refer to the value that it belongs
to.

Task-number:  QTBUG-23599
Change-Id: I88b456dca419a565eece30ba20fe09c0bcd4d98d
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-13 04:04:09 +01:00
Martin Smith
9b1dcfe901 qdoc3: Don't put \relates in class member functions.
This removes two uses of \relates that were unnecessary.

Task-number:  QTBUG-23600
Change-Id: Id9bbcfa6f95d42ad552054e4839dbacb69fd1b2a
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-13 04:04:04 +01:00
Alexander Færøy
ced306d403 Remove shadowing members in QNetworkReplyHttpImplPrivate
Task-number: QTBUG-23512

Change-Id: I072dfde1741a1d32a6125f63e52cc22bc499987f
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
2012-01-12 20:47:34 +01:00
David Faure
22225b1b06 Fix compilation of public headers with -Werror=shadow
Change-Id: Id47623002abca1e03fdfb9e9bd9cbc1b5542a2db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 18:44:56 +01:00
David Faure
eb8fce6e56 Fix compilation of Qt itself with QT_NO_DEBUG_STREAM
Change-Id: I07087dff0f109347ea80434f17eeb7cc1c13114c
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 16:15:00 +01:00
Jan-Arve Saether
0fda46932d Remove invokeMethod in favor of the recommended virtual_hook()
We don't remove the Method enum (yet), since there are functions in
dependent modules that still refer to it.
Unfortunately there is no way we can commit to several repos
"atomically".

Change-Id: Ia1923dc4bf0751a9ba67727d14da5a2e60bd4e74
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-12 15:15:30 +01:00
Jan-Arve Saether
1133c0dd22 Remove all references to QAccessible::(Up|Down|Left|Right)
It is now the resonsibility of the bridge to support this
(by querying for QAccessibleInterface::rect())

The windows bridge (currently the only bridge in need of this) has
already been updated to reflect this in commit
7dca461620

Change-Id: Ief1339ab6edc118e2d47e3875e09fa885db65c2f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-12 15:05:57 +01:00
Frederik Gladhorn
ad16382135 Remove QAccessibleEvent
It was unused and I don't quite understand its purpose any more.

Change-Id: I5c946a1644fd64508cb4aad78320ae96fd935d31
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-12 15:02:54 +01:00
Lars Knoll
265ce60718 Compile if the header files from QtWidgets are unavailable
Change-Id: I0a774fc1492e882bc6c02d913e6dace189fdb992
Reviewed-by: Kevin Simons <kevin.simons@nokia.com>
2012-01-12 14:50:28 +01:00
Jonas M. Gastal
1453f74cc5 Make QFtp private.
All references to QFtp in documentation have been removed, QFtp's
documentaiton was marked internal. The QFtp example was removed.

Task-number: QTBUG-23199
Change-Id: Ifff83cac069fb350e8ebeae63e605850e65c0c30
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-01-12 14:38:55 +01:00
Bradley T. Hughes
ad28d83f6d Add Q_COMPILER_* defines for C++11 features supported by clang
Change-Id: I9487720c33e6ac628f7e13f80057524a950c4c5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 14:38:38 +01:00
Bradley T. Hughes
a43986e2a5 Don't crash during QApplication construction
The QCoreApplication::init() function calls the virtual
QCoreApplicationPrivate::createEventDispatcher(), which for
QApplication, also creates the plaform integration. Unfortunately, the
Cocoa menubar integration uses qApp before QApplication is constructed,
causing a crash. Circumvent this by using QGuiApplicationPrivate
directly.

Change-Id: Ib36f628641761e70f9e9e39dd23e70e7537a165b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 14:38:29 +01:00
Bradley T. Hughes
9834b3681f Make QFileSystemWatcherEngines children of QFileSystemWatcher
To support moving QFileSystemWatcher to another thread, the engines need
to follow when the watcher is moved. The easiest way to do this is by
parenting the engines to the watcher.

Change-Id: Ie2bb701c0c148da9cc2302d4de23286b8ef42c4d
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-12 14:38:18 +01:00
Bradley T. Hughes
716905cd56 Do not call moveToThread(this) in QWindowsFileSystemWatcherEngineThread
This is considered bad practice, and gives no benefit as the threads do
not use an eventloop.

Change-Id: I0de9eca97948571cf5091e2f1b19bb1faab3e2ac
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-12 14:38:11 +01:00
Lars Knoll
d613f30bd4 Add setPalette to QGuiApplication
If we have a getter, we also need the setter to be
symmetric.

Change-Id: Ibcb20d66c711e4c1bebd448781fa9eddb9cd773f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 14:35:42 +01:00
Lars Knoll
84cad0bfc6 Don't include qdialog.h
Change-Id: I67d48653b90f31d018c77ec069eb559ac46f9275
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 14:35:17 +01:00
Samuel Rødal
16c2622fe7 Made it possible to report screen changes through QWindowSystemInterface.
This makes it possible for platform plugin independent code (such as
generic plugins) to report changes to screen properties. An example
would be an accelerometer plugin that reports orientation changes
without knowing anything about the windowing system.

Change-Id: I984984b6d064327772c264bc942269422451da37
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-12 12:08:19 +01:00
Friedemann Kleint
738896d6b9 QFileSystemWatcher/Windows: Output paths if FindNext fails.
Change-Id: I72bd28868c84d37e3dd4ea8ab892fa092d853d4a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-12 12:08:19 +01:00
Morten Johan Sorvig
ff5ae4a578 Ignore uninteresting accessibile interfaces.
Certain interface roles should be ignored and not
be a part of the user-visible accessibility interface
tree.

Change-Id: I264fef909052c528ee505875e3a211a33114d881
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 10:19:49 +01:00
Laszlo Agocs
893eb97b2a Do not mark any touch points as primary when no mouse event is sent
The touchscreen plug-in generates touch events only and therefore no
touch point must be marked as primary because that would mean there
is also a mouse event created from that point which is not the case.

Change-Id: I80c5fdbc52b048cd74c834900b6c8100963210e6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-12 10:19:49 +01:00
Samuel Rødal
8ff37ff535 Make show() default to sane sizing behaviour based on the platform.
Traditionally it's been hard to write a Qt app that behaves sanely
across embedded and desktop platforms, i.e. defaults to fullscreen on
embedded and non-fullscreen on desktop. For Qt 5 we can fix this by
making the behaviour of the default QWindow::show() be customizable by
the platform plugin.

If the application developer wants to override this behaviour he can
still use the explicit showFullScreen(), showNormal() etc functions.

Change-Id: I26a907b404058e345d841c818daefbb57a26d3fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-12 10:19:49 +01:00
David Faure
1319bd48c8 QTreeView: fix crash when starting a drag with hidden columns.
Crash was introduced by d639105759491 (pre-Qt-4.8 only)

Task-number: QTBUG-15834
Merge-request: MR-2725

(cherry picked from qt4 commit fd25323de7b5d5f3e0ffb1bd81ea4d251e071566)

Change-Id: I59959d3ba4c9bcb0d39bdbe58432817bbbfdd9f1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
David Faure
22b7d21186 Set missing flags in the option when rendering QTreeView drag pixmap
QAbstractItemViewPrivate::renderToPixmap was not setting all the flags
that the normal QTreeView painting sets:
option.showDecorationSelected, option.viewItemPosition (so the drag pixmap
looked wrong on Windows 7, with rects around each cell), and then the
unittest also discovered that State_Children/State_Sibling wasn't set either.

Task-number: QTBUG-15834
Merge-request: 2517

(cherry picked from Qt4 commit d63910575949106f84dacf04abaa14fc866aa66b)

Change-Id: I0a5014d960543c3ed8fea73d6df578e7e521b0e0
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-12 08:31:17 +01:00
Michael Brasser
fa699c8f96 Abstract QUnifiedTimer.
QUnifiedTimer now controls QAbstractAnimationTimers, which
in turn can be used to drive specific animation systems.

The purpose of this change is to allow the QML animation
system to be rewritten so that it does not depend on
QAbstractAnimation.

Change-Id: If06475002e41ba85b1b86b5dd4788de6d27d035d
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2012-01-12 06:29:37 +01:00
Bradley T. Hughes
b409a81da5 Ensure proper locking in QFileInfoGatherer
The mutex is used to protect the QFileSystemWatcher instance created by
QFileInfoGatherer, except when calling getFileInfos(). Add a locker
before using QFileSystemWatcher in this function.

Note: it appears that QFileInfoGatherer is misusing QFileSystemWatcher
by calling it from multiple threads. QFileSystemWatcher is an event
driven class, and as such, not thread-safe. So far, no problems have
been reported related to this, so I've left the code as-is.

Change-Id: Ib1429d9399e37120acf8e8d3b989b83c4ce24203
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:19 +01:00
Bradley T. Hughes
93a466c6fc Remove unnecessary QMutexes in QFileSystemWatcher implementations
The polling, inotify, and kqueue implementations are no longer threaded,
and as such, do not need mutexes to protect their internal data (since
QFileSystemWatcher itself is not documented as a thread-safe API).

The Windows implementation is unchanged as it uses multiple threads
explicitly.

Change-Id: Ia82510397e576bf704ce3aed3d776b58b39f7ff3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:13 +01:00
Bradley T. Hughes
d6e0306a90 Avoid races when destroying QFileSystemWatcher
On Mac OS X, socket notifiers need to be disabled/destroyed before
closing their associated file descriptor, otherwise we cause races
inside the CFSocket system. The documentation for CFSocketInvalidate()
says that we close the file descriptor after calling this function when
the kCFSocketCloseOnInvalidate flag is explicitly cleared
(QCocoaEventDispatcher clears this flag).

Do the same on the Linux inotify watcher as well, for symmetry.

Change-Id: I5592cc4bb5be4b752e48d895a685d3c92826acc7
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-12 00:45:10 +01:00
Kim Motoyoshi Kalland
e77ef98683 Fixed QOpenGLShader::log().
log() returned an empty string because the compile log was stored
in a local variable rather than the member variable.

Change-Id: I60142fd0bccfcbb495cea430b583f81fb0241329
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 23:55:58 +01:00
Janne Anttila
fc4cc4598e Docs: Forward-ported typo and link fixes from Qt 4.8
This commit brings already accepted doc fixes to Qt5.

Task-number: QTBUG-9224
Task-number: QTBUG-13442
Task-number: QTBUG-19858
Task-number: QTBUG-21447

Change-Id: I2ebc7c3e74427545367bdcec51e9e710a4925747
Merge-request: 1402
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-11 23:55:21 +01:00
Friedemann Kleint
1fbe8242ec QStyleHelper: Base DPI-calculation on QScreen.
- Use qt_defaultDpiX() to obtain the resolution, which
  obtains it from QScreen. This implies that for X11,
  which previously used a hardcoded default of 96 DPI,
  the real resolution will be used (typically 75).

- Since many tests (layouts, graphicsview) contain
  test data for 96 DPI, add an attribute to
  QCoreApplication making it possible to set the
  resolution to 96 DPI for testing.

Change-Id: I77c8233a96b0d75de07406f58d48886a89c3de06
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 22:22:34 +01:00
David Faure
f65a10b733 Remove unused QT_NO_TEXTSTREAM.
It was checked in a few places, but it didn't actually remove QTextStream,
so it was pretty useless.

Change-Id: I8eaf28893cd6c7acbe1c0b69d58de90742aee755
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-11 22:17:46 +01:00
Friedemann Kleint
aa4c2bbce9 qlocalsocket_win.cpp: Fix compiler warning.
Change-Id: Ibdb57f99b98b0c603be3c9be043737687034a958
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-11 21:59:19 +01:00
Stephen Kelly
0fd8816340 Add QModelIndex as a built-in metatype.
Change-Id: Ib87cfff8b4baee78189f3df5e20d2e1a00d690e1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-11 19:32:34 +01:00
Harald Fernengel
f29e92e96c Fix Q_ASSERT_X to handle QT_FORCE_ASSERTS
This change aligns the behavior of Q_ASSERT and Q_ASSERT_X

Change-Id: Iac9f399da6462fcf70826d3ce1177522bed9f897
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-11 15:48:07 +01:00
Pekka Vuorela
8ae55a3484 Input direction/locale to come from platform input context
Change-Id: Ib049693211a08dcffc9dbe49add54e7feab38978
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-11 11:18:51 +01:00
Frederik Gladhorn
30ad53a0a6 Make QAccessibleInterface::indexOfChild() 0-based.
Makes the code nicer and more consistent with the rest of the world.

Change-Id: I5ba0ee39f5b0afd1a079a3cea9990d123955ed3f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-11 11:18:51 +01:00
Morten Johan Sorvig
630131d585 Add support for accessibility actions.
Match Cocoa and Qt actions manually. Some have no
corresponding action on the other side.

Change-Id: I775cb8987ab843bd88d57d856ef7c0403290db00
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-11 11:18:51 +01:00
C. Boemann
d060b6f04f Add methods for font stretch and absolute letter spacing
We basicaly just rely on the methods in QFont

Change-Id: Iaf8cbf4d90d0c5b10b3a85983de7ca58763e0371
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-11 09:24:07 +01:00
Jędrzej Nowacki
4d868ece50 Remove redundant parameter from qVariantToHelper.
Change-Id: I3664a74eb8602651547c0c80dc4f628f909d97b4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-01-11 05:01:01 +01:00
Albert Astals Cid
657038ca30 Match the name in the cpp file
Which is actually the name Lars wanted i just forgot to fix it everywhere

Change-Id: Iaa190da6c17d0a423c34202c986d69feec01af96
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-11 01:11:47 +01:00
Friedemann Kleint
da71c1c755 Introduce a QVariant themeHint() to QPlatformTheme.
Start on removing platform-specific code from QtWidgets.

Change-Id: Ic2163a0ce6f2db2151cdf7ca93766b2d861eeb55
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-11 01:11:47 +01:00
Frederik Gladhorn
15db15d448 Document enum value QAccessible::Expandable.
Change-Id: I5280bf3eadf7ef876f89de318a4d6168078d929e
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-01-10 23:18:32 +01:00
Frederik Gladhorn
e8482bb457 Accessibility docs: interfaces: value/action/text.
Change-Id: Ic57305cf9c008c8e861c1bdc66886b43d78c2d76
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-01-10 23:18:19 +01:00
Frederik Gladhorn
8b757325b2 Improve Accessibility documentation 2.
More cleanup, make sure links work.

Change-Id: If72f9cfc0d44aa1fb261be2aace8ddd457295993
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 23:18:10 +01:00
Friedemann Kleint
dc5ea80963 Tests: Remove duplicate QTRY_VERIFY/QTRY_COMPARE macros in bearer.
Introduce QTRY_VERIFY_WITH_TIMEOUT and QTRY_COMPARE_WITH_TIMEOUT
to be able to specify a timeout value.

Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>

Change-Id: Iaeaa4938eb14f2c431537055f626510cba183ce3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 19:54:03 +01:00
Friedemann Kleint
75af95cbeb Fix QWidget::saveGeometry().
Bring back code that was accidentally removed.

Change-Id: Ie1a4d22caa206bc8bb8e678879935e79009e9622
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 19:53:25 +01:00
Robin Burchell
d7ec8bf29a Remove thread from QFileSystemWatcherEngine implementations.
These threads are actually counterproductive, as generally speaking, processing
watches is not that expensive an operation, so instead, they process at full
speed and can (in the case of slow processing in the thread processing the
events) stack up and consume resources for no good reason.

Threads also have an additional resource consumption per engine (some ~8mb of
thread stack on Linux), so doing away with them is nice.

A side effect of this change is that events are now effectively rate-limited by
the eventloop speed of the thread they run in, so if your thread runs too slow,
and you recieve a lot of events, on some platforms, events may be dropped now
where in the past, they would be read by the monitor thread and turned into Qt
signals (thus not visibly showing as a problem, apart from invisibly bloating
memory usage).

Task-number: QTBUG-20028
Change-Id: I345a56a8c709f6f778ca9a0b55b57c05229ba477
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-10 16:19:32 +01:00
Stephen Kelly
c42a969b2f Rename internal method check to doCheck
Mac OSX has a check macro in /usr/include/AssertMacros.h which can
conflict with this API if used together.

http://boost.2283326.n4.nabble.com/Boost-with-Darwin-Mac-gcc-4-0-1-td2580330.html

Change-Id: I93ddd08fa2b51b198bbc02ce501d79ed97a32c34
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-10 16:11:59 +01:00
Stephen Kelly
c11cb16f3f Add defines for explicit virtual overrides.
Change-Id: Ia9a610e81eeaaa0a08ca6ef4945b002bdb13fe8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-10 16:11:50 +01:00
Stephen Kelly
20abd88e71 Make the supportedDragActions a virtual accessor.
Change-Id: I4001fcabc67e5b46465b3c9111c33247c52e5788
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2012-01-10 16:11:43 +01:00
Friedemann Kleint
c95aea407b Fix a crash in QDialog.
Call d->helperDone before deleting 'this'.

Change-Id: I06224f4d3a868dccd505b1f1d3ed56af6f339ba3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-10 16:11:19 +01:00
Bradley T. Hughes
7776beacf7 Document timer accuracy behavior on UNIX.
Change-Id: I5e8b383cc4d8ce0d249be164c5ef596328bdc50c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-10 16:11:15 +01:00
Bradley T. Hughes
46b2e5f37d Remove win*Message() exported functions
They are nothing more than wrappers around the Win32 API, and marked
for removable in Qt 5.

Change-Id: Iaf34d463488feb7840185c7b46f65a031232e34a
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-10 16:11:09 +01:00
Bradley T. Hughes
f2edb41c38 Use Qt::TimerType on Windows when starting timers
Make all Qt::PreciseTimers and timers with intervals < 20ms use
Multimedia timers for maximum accuracy. Qt::CoarseTimers and
Qt::VeryCoarseTimers use normal Windows timers, with
Qt::VeryCoarseTimers having their interval rounded to the nearest
full second.

Note that the Windows timer implementation does not attempt to align
timers and reduce CPU wakeups like the UNIX implementation does. This
might be done in the future, though. However, this change does the
best we can do now, keeping most timers working as-is, while allowing
explicit use of Multimedia timers via Qt::PreciseTimer.

Change-Id: I1898272b101c572a2a9b9454fef27a651eb178f5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-10 16:11:00 +01:00
Stephen Kelly
c3ad8c1c06 Make the roleNames a virtual accessor.
This is consistent with the rest of the API of QAbstractItemModel
(which is virtual) and removes the need for code like this
in the constructor (where it doesn't belong):

QHash<int, QByteArray> myRoleNames = roleNames();
myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
setRoleNames(myRoleNames);

in favor of

MyModel::roleNames() const {
  QHash<int, QByteArray> myRoleNames = QAbstractItemModel::roleNames();
  myRoleNames.insert(Qt::UserRole + 1, "myCustomRole");
  return myRoleNames;
}

which is consistent with all other QAIM API (eg, flags()).

This is a source compatible change.

Change-Id: I7e1ce17f8dab2292c4c7b6dbd3c09ec71b5c793b
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
2012-01-10 11:37:28 +01:00
Frederik Gladhorn
1e10e4deb9 Generate docs for accessible interfaces.
Change-Id: Ic385dd416a6d6bce1b999e14a4b36cdd06127ff1
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 09:13:11 +01:00
Jørgen Lind
58bdf5c49c We should return texture id 0 for invalid images and pixmaps
in the texture cache

Change-Id: Ib9bb136fa451c571fce2adbee29998b3f3593b31
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-10 09:13:11 +01:00
Jędrzej Nowacki
f85b9f8242 Reimplement QVariant to QDebug streaming.
New implementation fixes some commented code marked as FIXME.

Change-Id: If8f5bebedd65bcf8f839d804c2022ca79ef82ddf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-10 09:13:11 +01:00
Friedemann Kleint
7024ddba4b Platform style hints: Introduce keyboard repeat rate.
Change-Id: I556c2ecec7d5368122875a659af3ae7db88aa481
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-10 09:13:11 +01:00
Zeno Albisser
1f6f1de163 Fix key codes on mac.
Qt key codes match the unicode character in upper case format.

Change-Id: I92b43463921e71f2607e569ba7ee23d6f844c50a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-10 09:13:11 +01:00
Frederik Gladhorn
39a052c664 Accessiblity State as bit field.
We would like to add more flags that will be over the 32 bit boundary.
On Windows enums don't seem to digest values >32 bit.
This patch changes the state flags to be a bit field instead.

The windows part of the patch was written by Jan-Arve Sæther.

Change-Id: I2d1d87807f920ce4d4a5c7bfea8b1122ed44eb08
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-10 07:14:34 +01:00
Jason McDonald
5313c28b30 Update year in Nokia copyright headers.
The previous change missed some headers from years prior to 2011, and a
few new files were merged after the previous change.

Change-Id: Ib7d1a2b7062228c2a5373da64242b2ee1f0981e1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-10 07:12:41 +01:00
Xizhi Zhu
0e0eb207c4 Remove ICD plugin for bearer.
It's only used by Maemo and Harmattan, thus not needed in Qt5.

Change-Id: I8638f4fc63637be88d1aa584cde7e3a4116f2de6
Reviewed-by: Alex <alex.blasche@nokia.com>
2012-01-10 07:12:41 +01:00
Stephen Kelly
67f4893b71 Rename check to checkEvent.
Avoids conflict with macro on Mac OS.

Change-Id: I1b597205c32531e054832fcb396622b47b18040a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-10 07:12:41 +01:00
Liang Qi
8c72dc5907 Add V3(md5) and V5(sha1) version for DCE in QUuid
Add the above versions based on RFC4122 standard.

Done-with: Hagen Rother
Task-number: QTBUG-23071
Change-Id: Ieb90925374d1e3c85011b899b8dd3bb1a608c561
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-10 05:12:20 +01:00
Stephen Kelly
626223ca27 Remove symbian debug macro definition.
Change-Id: I3c4cc5cfd8e157587dbda1589501bb829a5a18db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-10 04:13:07 +01:00
David Faure
3e2f32547d If decodestring can't translate the string return Qt::Key_unknown.
Change-Id: Ie082b326e944a28b4e29984a527e3841a05b32f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-10 02:02:29 +01:00
Samuel Rødal
13c5c81cfa Lock X display while calling XESetWireToEvent and its callback.
Prevent potential race conditions as suggested by Uli Schlachter.

Change-Id: Ia93eb8be1cbbc3d8ae7913a934c195af6b5ec538
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2012-01-10 02:02:11 +01:00
Sami Rosendahl
b6a43cfe9c Fix memory leak in QDomDocument entity text expansion
The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Re-enabled commented-out test data
tst_QDom::setContent to exercise the code path with the leak.

Change-Id: Ieb015d68ba9bbb3f20dd47e76835ad15abb1738e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-10 02:01:41 +01:00
Stephen Kelly
7226630d29 C++11 delete some contructors which are not wanted.
Change-Id: I844a0872e81f1824928814edb8d21c0b6384283d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-10 01:44:13 +01:00
Jędrzej Nowacki
ae9afa6b9e Remove wrong assert from QMetaType.
We can't assert that QMetaType helper arrays are initialized. In rare
situations it may happen that QMetaType compiled without support for an
external type (without compiled Gui or Widgets libraries) will be asked
for additional information for the type.

For example (assuming Qt is compiled with --no-gui):
// typeId it may be received over network (QMetaType::QImage)
void *ptr = QMetaType::create(typeId);

Change-Id: I018a59b23def35c7574e7c921019b5db4f06e800
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-10 01:27:04 +01:00
Jędrzej Nowacki
64a735eed6 Small QMetaType optimization.
Prefer compile time check over a runtime.

Change-Id: Ib78563083c765d1fd72217c5aa529d0cbb951130
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-10 01:25:59 +01:00
Jędrzej Nowacki
18617f2824 Implement QDebug stream operators for builtin classes
QDebug stream operator was added for:
QPixmap, QImage, QUuid, QBitArray, QLocale, QRegExp, QCursor,
QPalette, QTextFormat, QTextLength, QIcon and QSizePolicy

Change-Id: Ibcf5c9b599ba322d53cb106d8e5e157427ebe757
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-10 01:25:18 +01:00
Joerg Bornemann
b03fa845a7 QLocalSocket: make socket descriptor qintptr
This is consistent with the other socket classes.

Also see commit bf7f170607.

Change-Id: Ic4bf01bd4abf778e21fe575c5304f86c9bee82fc
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-10 01:25:02 +01:00
C. Boemann
1222da803a Make sure cursor navigation in qtexttable works like user expects
Before the selection of cells NW of anchor showed some defects where
cells would not be selected as the user expects

Change-Id: Ia2b63f11b8d534e918ffb97b76339d60f1ca0389
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-09 23:09:40 +01:00
Shane Kearns
1ee9c0925b SSL - dump failed certificate chains when debug logging is enabled
This is to help us debug problems with CA certificates.
Code is not compiled by default, only when QtNetwork is built with
QSSLSOCKET_DEBUG defined

Change-Id: I404c36bf4c6bf1190f480196038197be30b4b5f9
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-09 22:08:35 +01:00
Allan Sandfeld Jensen
aa23a18ad2 Update the lastPosition with the full current position
By only updating parts of the lastPosition the axislock got confused, since the
direction would be calculated from a mix of delta-movement and movements since
touch begin.

Task-Number: QTBUG-23530
Change-Id: I6b886d4819b963aba18bb86154df172070399206
Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
2012-01-09 22:03:22 +01:00
Simon Hausmann
51d634ce2e Remove QtV8 library from QtBase
The QtV8 library is going to live in the qtjsbackend module.

Change-Id: I72251316163829411dda998b9503ce6f75b3606a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-09 19:54:07 +01:00
Jonas M. Gastal
159098719b Using proper virtual functions instead of Q_INVOKABLE tricks.
This mantains BC between version compiled with and without OPENSSL,
which was the reason for the use of "runtime virtuals". Using proper
virtuals should make code clearer.

Change-Id: I24f141ebaab68c000c2d602b54addbae1679a424
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-09 19:18:08 +01:00
Jonas M. Gastal
4669d657d2 Make (dis)connectTo(From)Host virtual in QAbstractSocket.
Change-Id: Ib1dfae4031f00fb331108152a259f6a2756381c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-09 19:17:47 +01:00
Stephen Kelly
696a6b57d1 Add define for C++11 explict delete methods
Change-Id: Ief4b8949acb528dcfc0be725b562ae71bd1640cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-09 18:54:49 +01:00
Stephen Kelly
75ab5a15c4 Rename handler/handlerManager.
Change-Id: Idbac004120ea686d403421ea4f2fb4db87f55149
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-09 18:53:37 +01:00
Stephen Kelly
90a7e6953d Fix constness of QInputPanel::keyboardRectangle()
Change-Id: I13552ed0c357b19486f389a8fbf2c338652437c9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-09 18:53:22 +01:00
Stephen Kelly
ab7c7b66ec Fix constness of QGraphicsSceneBspTreeIndex::bspTreeDepth()
Change-Id: I8298afc9c493a1e9c6e49cc36a97184a50709558
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2012-01-09 18:53:13 +01:00
Stephen Kelly
fa1a142126 Fix constness of QShortcut::context()
Change-Id: Ic819c9b70fb2d6732f3fdc1d151a9adda571211b
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-01-09 18:53:04 +01:00
Frederik Gladhorn
9b2a776ce2 Remove unused function.
Instead this code has been ported to qAccessibleRoleString.

Change-Id: I41dd83d09cbcf2b0de3eb2fa027f24cf070f22a2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-09 16:44:56 +01:00
Stephen Kelly
f2327c083c Rename private API to avoid conflict with mac OX macros.
Mac OS defines the check macro in /usr/include/AssertMacros.h

http://boost.2283326.n4.nabble.com/Boost-with-Darwin-Mac-gcc-4-0-1-td2580330.html

Change-Id: I99789e4dba25e80afd184c44d0781c4ebde46d74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-09 16:40:36 +01:00
Frederik Gladhorn
30d3c3b49f Improve Accessibility documentation.
Change-Id: Ifb70d9c6d7b3096e0188e8454191786375296647
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-01-09 16:22:21 +01:00
Laszlo Agocs
e8713e0873 Remove unused touch-related code in QApplicationPrivate header
For X11 and Windows the touch handling code lives in the platform
plug-ins.  The RX71 code is replaced by the generic evdev touch
support provided by the touchscreen plug-in.

Change-Id: I12c9fd3be8b466565cac7abebbb70805f1e28b5f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-09 11:58:03 +01:00
Frederik Gladhorn
f6dd3ab553 Remove docs for removed functions.
Change-Id: I33346d0a2b324afe4b85b1792854b586aa7685ba
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-09 11:47:17 +01:00
Bradley T. Hughes
d23322bf1c Change QCocoaEventDispatcher timer handling to use QTimerInfoList
This gives us support for the various Qt::TimerTypes.

We only use one CFRunLoopTimer to drive all of the Qt timers. We update
the time-to-fire for this timer as we add/remove/fire Qt timers. The
documentation for the CFRunLoopTimerSetNextFireDate() function says that
this is a valid use case, and is more performant than constantly adding
and removing CFRunLoopTimers. The documentation recommends using a large
interval for this use case (the docs say "several decades", but we use 1
year).

Change-Id: Ie7fd7a845f4254699a5b6a5720e7626f2c5e787f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2012-01-09 09:45:07 +01:00
Bradley T. Hughes
c7755d33db Export QTimerInfoList
... so that QCocoaEventDispatcher can use it to implement timer handling
and benefit from the Qt::TimerType support in QTimerInfoList.

Change-Id: I34b81502465963e2c9d528df463fa2eccd275ad6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-09 09:45:07 +01:00
Xizhi Zhu
84bd87353a Clean-up the interface for QDate.
Four overload functions removed while keeping source compatibility:
 - shortMonthName()
 - shortDayName()
 - longMonthName()
 - longDayName()

Two functions removed since they have confusing names:
 - gregorianToJulian()
 - julianToGregorian()

Change-Id: Iaaea066a3fb77b1ee3499d3049fcec5563054cdf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2012-01-09 07:46:08 +01:00
Stephen Kelly
7aeccb183a Remove the Q_TYPENAME define.
It is mostly not used (most places in Qt use typename directly), so
is already not very useful.

For example typename is used in:

QDataStream& operator<<(QDataStream& s, const QVector<T>& v)

Change-Id: I85337ad7d8d4ebbb424bfa2ab9a356456ff3e90f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-08 23:54:56 +01:00
Uli Schlachter
7e40ea4499 xcb: Fix a memleak when atomName() fails
The only reason for GetAtomName to fail is when an invalid atom is specified, so
the xcb_generic_error_t struct doesn't contain any useful information for us.
Still, we have to free it.

Change-Id: I3da98018b7bfe08a9d7dcd566ed010f5d7b0df73
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-08 21:55:10 +01:00
Joerg Bornemann
2588a5b249 QProcess/Win: direct forwarding of stdout and stderr
We are now directly passing the standard out/err handles to
CreateProcess instead of reading the output and writing it.

The downside is, that we cannot automatically forward the process
output of GUI applications anymore.
This behaviour is intended by the CreateProcess API.

Change-Id: Ic6e35c8c338dbea1a9f345567a37d938da1f34a2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-08 18:22:46 +01:00
Samuel Rødal
0ba89ed91f Detect autoreapeat in xcb plugin.
Until now QKeyEvent::isAutoRepeat() would always return false.

Change-Id: I7771bc7a7ec848ef280f99bada0a26eda188604e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-07 20:09:43 +01:00
Pekka Vuorela
a98741516c Move keyboard locale and input direction to QInputPanel
Deprecated QGuiApplication::keyboardInputLocale() and
keyboardInputDirection(), introduced QInputPanel::locale()
and inputDirection().

Change-Id: Ic48c77f10821a949751c73c73f22bd78e2192b9c
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:59 +01:00
Pekka Vuorela
a2fd2f90ec Introduced input method hints for latin
On many cases especially latin input is wanted. Hint for these may,
e.g., help virtual keyboards on changing the layout to a western one.
Added a hint for requiring and another for preferring latin based
input.

Change-Id: I0ea79643665e25d9f916c3b8d0b7d7352843c2dc
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:45 +01:00
Yuchen Deng
0277f14f48 Avoiding crash when insert preEditString
We will insert an preEditString by QInputMethodEvent
See:
Task-number: QTCREATORBUG-5633
Task-number: QTCREATORBUG-6082

Change-Id: I8cfc7ab2543455dfdff8ec3df983d384513453e0
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:00 +01:00
Jonas M. Gastal
b3ce4470ae Removing QHttp class, its tests and its usage in examples.
Task-number: QTBUG-22750
Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-06 23:07:26 +01:00
Jan-Arve Saether
7dca461620 Remove all references to QAccessible:: {Child|Ancestor|Sibling}
These are deprecated in favor of
QAccessibleInterface::child() and QAccessibleInterface::parent()

QAccessible::Sibling can be done with a combination of those two.
This is handled by the bridges, if required.

Change-Id: I2e2a6eb2a982e7c9001a393d69f0c5f1ae9c0970
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-06 19:24:23 +01:00
Shane Kearns
ca5072fb18 Fix renewed SSL certificates being incorrectly reported as expired
OpenSSL tries certificates in the order they are added to the store.
There was logic to add the expired certificates after the valid ones
to ensure the valid certificate is checked first if the OS cert store
contains both the expired and renewed version of the same cert (e.g.
the verisign class 3 cert on windows)

However due to a coding error, the ordering was reversed, ensuring the
problem is always encountered instead of always avoided.

Task-number: QTBUG-20012
Change-Id: I7c8dba8a09842540a22b44d33c7dcb22bbbc6a58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-06 19:24:23 +01:00
Thiago Macieira
c87bf2e8e6 Copy qbasicatomic.h to qoldbasicatomic.h
Change-Id: I15df58f9dc29189419f8cbc0ce47bf11e9f17cf4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-06 19:24:23 +01:00
Friedemann Kleint
50e18de516 Windows: Run on Windows XP.
Replace Q_ASSERT() on missing functions from User32.dll by
qFatal() with error message. Do not check "UpdateLayeredWindowIndirect"
as it was introduced with Windows Vista.

Task-number: QTBUG-23351

Change-Id: I0064611351c687f0c3c6e13156dd534b9f7a5d75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-06 19:24:23 +01:00
Friedemann Kleint
1ff1288c04 Make QUuid a class.
Silence MSVC warnings about forward-declarations as class
in the metatype system.

Change-Id: I676662e5919585e98c87413fd8360d6f41f73631
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-06 19:24:23 +01:00
Stephen Kelly
054a4aa7dd Add roles to the dataChanged slots in views.
This is a source incompatible change.

This is for consistency with the signal for the lifetime of Qt5. I could
imagine people trying to override a virtual function (in a new class while
using the Qt5 library) with the arguments of
the signal and have that fail due to the arguments not being correct.

It also allows ignoring dataChange events when they are known not to be for roles
which are relevant to particular views or delegates.

Change-Id: Ica191835125c1c8fdaf665debb62d635e81700dc
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-06 17:21:39 +01:00
Stephen Kelly
9ddd2c0f35 Remove documentation reference to non-existant class.
Change-Id: Idaaf16a9482edaa43e5b2389adc82cad701b1407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-06 17:21:16 +01:00
Joerg Bornemann
d0bb97c327 split qprocess_win.cpp into Windows and WinCE parts
Change-Id: I7f2cf2c42dd24ca162238e6dc6408ac39dfcd790
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-06 14:44:41 +01:00
Bradley T. Hughes
156d160c56 QTimerInfo::expected is only needed for debugging
The code for calculating the expected time is only useful for debugging
purposes. Don't compile this into the library unless QTIMERINFO_DEBUG is
defined.

Change-Id: I6530e6a70410a12544410ef286225df98ceddcee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-06 14:40:57 +01:00
Kim Motoyoshi Kalland
fc6c050b40 Limit Bezier curve subdivision to maximum 512 line segments.
Avoid running out of time and memory for extreme cases.

Task-number: QTBUG-23443
Change-Id: Iac7799097d61295bb7395a2efe48b3e7d9257919
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-06 14:33:56 +01:00
Frederik Gladhorn
ce5c8743e9 Constify more accessibility interface functions.
Change-Id: Iff8da09eef5288de92ccea753a8a5fda03e214b0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 14:26:12 +01:00
Frederik Gladhorn
4f94c73d6b Image interface functions should be const.
Change-Id: I9c6ecd140abc4f4d5c28ad2228e1241d3891b5ad
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 14:24:07 +01:00
Robin Burchell
b08daaedd4 Remove all non-inline of qMalloc/qFree/qRealloc.
We're trying to deprecate these, so don't use them anymore.

The inline uses of these have been left intact, for the moment. Inline code will
need to create their own non-inline allocation methods (for future-proofing to
allow alterations in how e.g. individual containers allocate)

Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-06 14:11:14 +01:00
Frederik Gladhorn
514ef34d1f Fix documentation.
Change-Id: Id54263f408e29ed3b9d06712e39759485a42b869
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:40 +01:00
Frederik Gladhorn
7e46af4a41 Remove qdoc for code that no longer exists.
Change-Id: I82d4ba930335a03181aa20c9e4cb060ca8b35b9a
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:37 +01:00
Frederik Gladhorn
f03099cee3 Remove docs for functions that no longer exist.
Change-Id: Id79d3eeab85b156348054c727ea1897ac3e5842b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:34 +01:00
Frederik Gladhorn
05efb2e1c8 Fix documentation: missing const
Change-Id: Ie90afada6ffe3198314481dd6fc68bce67605efd
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:29 +01:00
Simon Hausmann
09ab5e60d1 Fix crashing data urls
Commit 231369eb04 introduced the use of
QBuffer::setBuffer with a QByteArray that is allocated on the stack,
causing plenty of memory corruption.

This patch replaces the use of setBuffer with setData, which correctly
assigns the QBuffer's buffer instead of just relying on the pointer
passed to setBuffer.

Spotted by Rohan in http://codereview.qt-project.org/#change,11859

Change-Id: I7cdf43d438a2a7864de7c35841b42421c1c60e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-06 13:41:46 +01:00
Robin Burchell
b44c6bef50 Remove duplicate fnctl() call.
QInotifyFileSystemWatcherEngine's constructor calls this, there's no need to do
it twice.

Change-Id: Ic19e758a3f87f2e3a885e5b834f59a5a0fe13f4b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-06 11:19:23 +01:00
Martin Petersson
5bdd20a085 QNetworkAccessManager: check if networksession is set
Need to check that the networkSession has been set so we don't
crash when bearermanagement is enabled.

Task-number: QTBUG-23484
Change-Id: Ifdb71350ba5b4ddbdbd17a8d87189c78c524783e
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-06 11:19:23 +01:00
Richard Moore
b328e36e41 Add a new QT_NO_SSL feature macro.
At the moment users of Qt must detect if it was compiled with SSL
support by testing for QT_NO_OPENSSL. This means that any code that is
conditionally compiled this way is tied to the presence of the openssl
backend. This commit makes it possible to implement new SSL backends
during the Qt5 lifetime without breaking this code. People can still
test for QT_NO_OPENSSL if they really need openssl, but if they simply
want to know if there's SSL support at all they should use this define
instead.

In addition, this commit changes the public API headers to use the new
define.

Change-Id: Ib57a71aa65836ac9351f120a487bfeb8009d9515
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-06 11:19:23 +01:00
Friedemann Kleint
c25d147c43 Windows: Fix compiler warnings in accessibility.
Change-Id: Id9ffe1069116f25b89df85337a75dae54b5beec5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
2012-01-06 11:19:23 +01:00
Frederik Gladhorn
41af951eef Remove Cursor functions from invokeMethod.
Cursor position is handled by the text interface.
This was a binary compatibility hack in Qt 4.

Change-Id: I45520e6942a490834f6e9346a4c173300a9bf7a9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 09:38:31 +01:00
Frederik Gladhorn
dfa6ac160f Update docs.
Change-Id: Icd8cbcde6893cc0ee5e7df18b219513cdbc0b2da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 09:38:31 +01:00
Samuel Rødal
d0f74e5dd9 Added xrender as a dependency to build glxconvenience.
Prevents build errors when xrender is not present.

Change-Id: Ib80d52109dd0bcd63ba865c5f6e143961f3c20e6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-06 09:38:31 +01:00
Sami Rosendahl
d55cdcd59f Fix memory leak in QDomDocument DTD entity declaration handler
The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDEntityDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous direct test case for unparsed entity declarations in
DTD, only indirect coverage via regression test cloneDTD_QTBUG8398.

Task-number: QTBUG-22587
Change-Id: I394ae9fc32d5b84e4ca287c5db4dd7effde6128b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-06 02:59:59 +01:00
Sami Rosendahl
1bc31fa43d Fix memory leak in QDomDocument DTD notation declaration handler
The created notation node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDNotationDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous test coverage for the notation declarations in DTD.

Task-number: QTBUG-22588
Change-Id: I876186d1277ceb4414f803b58b62f51cc1474367
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-06 02:59:55 +01:00
Stephen Kelly
17cc46a9a7 Add the roles to the dataChanged slot.
This will allow the possibility of ignoring dataChange signals for roles
which are not interesting to particular widgets.

Change-Id: Ia7dcebd875f7b9fa90aa5e9bff7ef5ca9f381d55
Reviewed-by: David Faure <faure@kde.org>
2012-01-06 00:46:18 +01:00
Bradley T. Hughes
7023bb1d35 Do not always compile in QTimerInfoList::repairTimers()
This function is never called on systems that are guaranteed to have
a monotonic click (like Mac OS X). Remove the dead code from the
library.

Change-Id: I95852c8dffaa3a9747367f0abe4a4c62e4f86421
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 22:15:25 +01:00
Bradley T. Hughes
c46654b3a5 Use Qt::TimerType on UNIX when scheduling timers
As stated in the documentation for Qt::TimerType, we allow for up to
5% error for CoarseTimers (the default timer type). PreciseTimers are
not adjusted at all, and VeryCoarseTimers fire with one-second accuracy.
The objective is to make most timers wake up at the same time, thereby
reducing CPU wakeups.

Note that this changes makes it possible for timers to fire early, which
may be unexpected for some applications. Such applications should use
PreciseTimers explicitly.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Iaa70314c39a446adbc6dbb6fdfa7bafcd98a7283
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-05 22:15:25 +01:00
Albert Astals Cid
c355c300d9 Use clipboard_timeout instead of hardcoded 5000 (since its the same value)
Change-Id: Ia0edf04e36c8d30394a2bc9a691ab9aa78831f78
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-05 20:40:13 +01:00
Jonas M. Gastal
bf7f170607 Make socket descriptors qintptr.
Windows x64 uses 64 bits integer for sockets, to ensure compatibility we
should use ptr sized integers for our socket descriptors.

Task-number: QTBUG-19004
Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-05 15:07:51 +01:00
Bradley T. Hughes
eb0ce0d5c1 Use explicit Qt::TimerTypes when starting animation timers.
Similar to commit 4e1ad49998, we know that
CoarseTimers are worst in their first firing, so we prefer a
PreciseTimer for short pause animations to avoid inaccuracies. If the
timeout is too big, we use a CoarseTimer anyway (current threshold is
2000ms).

The timer that drives the QDefaultAnimationDriver is always a
PreciseTimer.

Change-Id: I0939357d768b804f9f9bab3adf5ed1d0f7e012e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-05 15:03:30 +01:00
David Faure
9498f1aa54 Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUT
All QDebug operator << in custom classes were disabled by
QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT.

Now QT_NO_DEBUG_STREAM is never set automatically, but remains available
for reducing the feature set altogether (qconfig.h).

Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it
doesn't even undefine QTextStream, and this is unrelated to QDebug
streaming anyway.

Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-05 15:02:56 +01:00
Albert Astals Cid
ec104d7a54 Free the replies
Change-Id: I719bd95d94f3bfd41eeb09a49ac3e2701a516619
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 14:59:19 +01:00
Albert Astals Cid
689c4009fb Check for the clipboard manager when looping due to app quiting
One can be extremely unlucky and on session logout get this:
 * All apps are going down
 * A Qt app checks if the clipboard manager is there to yield its clipboard contents
   * The clipboard manager is still there
 * Then just after that check, the clipboard manager finishes because of the session end
 * This means the Qt app will loop for 5 seconds trying to yield its clipboard contents
   to a clipboard manager that is not there anymore

Change-Id: Ia89670d4deb72f12e660a0d7aa5b2d212955d6fe
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 14:59:12 +01:00
Robin Burchell
848f53a268 Remove OS X FSEvents watcher.
Per QTBUG-9249, this backend is buggy, and not recommended for use by Apple.

Change-Id: I72ce88006a4badbbfdd825717020078778d16a36
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-01-05 14:35:59 +01:00
Pekka Vuorela
8ad583b7f9 Removed QApplication::setInputContext()
Obsoleted by platform input context. Setting a custom QInputContext
wouldn't work properly anymore.

Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-05 11:40:08 +01:00
Pekka Vuorela
ad22c0c7cf Removed Qt::ImhMultiLine
Multi line information does not really work that well as
input method hint. Application developer is the one setting
value for the hint, and thus would be responsible for
always having right value for multi line.

Change-Id: I6102be95549f6f6d4da40845f52d5c873cd46a47
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 11:40:08 +01:00
Robin Burchell
55a0b33994 Avoid redefining the lastWindowClosed() signal.
This prevents things like the following (from qmlviewer):
QMetaObject::indexOfSignal: signal lastWindowClosed() from QGuiApplication redefined in QApplication

Change-Id: I4b30235e379aedaa913ea30f05daac7079f285e9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-05 11:40:08 +01:00
Bradley T. Hughes
da47d70c32 QCocoaEventDispatcherPrivate members should not be static
Keep the Cocoa event dispatcher's private data as normal members of
QCocoaEventDispatcherPrivate. This removes the global initializers for
the macTimerHash and cocoaModalSessionStask as well.

To keep timers working, we pass a pointer to the timer's MacTimerInfo
struct to the callback, instead of just the timer id. The MacTimerInfo
needs to keep a pointer back to the QCocoaEventDispatcherPrivate to get
access to the private's members.

Change-Id: Ic3a61e5e1d1d82030735de73cf0b0c70a13c21a4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2012-01-05 11:40:08 +01:00
Caroline Chao
a8495549d0 CodeCoverage: Remove releaseCoverageTool() function.
QLibraryPrivate::release() can be called multiple times and it is not
appropriate to unregister and save the executed data for a library there.
The library may still be used when it is released and it seems safer to save
its data only once and probably when the application ends.

Not calling __coveragescanner_unregister_library does not affect the
coverage data. Calling __coveragescanner_register_library at load time
without calling __coveragescanner_unregister_library means the plugin will
stay loaded until the application ends. Removing the call to
releaseCoverageTool() is so acceptable since the data will be saved
when the application exits.

Task-number: QTQAINFRA-416.

Change-Id: I3135d2e203ecacfeff4a5b8ffdcd4d62fbc1db33
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 08:45:56 +01:00
Bradley T. Hughes
1d63b9beb9 Document that QBasicTimer::start(int, QObject*) uses Qt::CoarseTimer
Change-Id: I553b33ac7adffb0a4fcdfc14d6e34b4e7a494c4d
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-05 08:42:35 +01:00
Bradley T. Hughes
d8d4cc3962 Warn when using QBasicTimer::start() incorrectly
Previously, QObject::startTimer() would warn when called from
QBasicTimer::start() if there was no event dispatcher for the object's
thread. QBasicTimer::start() should output a similar warning when there
is no event dispatcher for the current thread.

Change-Id: I1152f73216c3551c252a7a6995defebc9e1506c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-05 08:42:23 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Pekka Vuorela
3c40714799 Added flag operators for Qt::InputMethodQueries
Change-Id: I9e65e81c0a5a9854e28e24315a021371c9170f3f
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2012-01-05 02:17:04 +01:00
Denis Dzyubenko
92f9678055 Registered QUuid in the metatype system as a builtin type.
Change-Id: I6be6129d9f6bf468ba8a5805cfa0f6f79199afb3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-01-05 02:17:04 +01:00
Pekka Vuorela
99eb505103 QTextLayout::lineAt() to return invalid line if index is out of bounds
Change-Id: I1f93789c96f3b2335b02897ff5fc8385964d1641
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-05 02:17:04 +01:00
Jiang Jiang
24e84dd21f Support RTL text with merge font engines
Text like Urdu use mixed RTL scripts from Persian, Arabic and so on.
In RTL, sub glyph runs for individual font engines must be added from
end to start, so that the positions can still be calculated in a left
to right manner.

Task-number: QTBUG-23404
Change-Id: I7e55e4b7b858b3abbe94e352c93d36de6226ff58
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-05 02:17:04 +01:00
Samuel Rødal
07edbd23ed Introduced QOpenGLContext::aboutToBeDestroyed() signal.
This signal can be used to clean up OpenGL resources in a safe way
before the context is destroyed.

Task-number: QTBUG-20083
Change-Id: I45a4be01b06af4ee7196fa502116f099d50afeab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-01-05 02:17:04 +01:00
Friedemann Kleint
8ed53babb9 Fix compiler warnings in QtNetwork.
- Initialization order in QHttpNetworkConnectionChannel
- Potential use of uninitialized value in QNetworkReplyDataImpl

Change-Id: Ia405147ef81a3f1509149349d6b5b01bb078f853
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-05 02:17:04 +01:00
Friedemann Kleint
a793a56d70 QApplication: Remove unused variable causing a compiler warning.
Change-Id: I418ac16a2b3e119569512e38d3f00fb493b769d1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-05 02:17:04 +01:00
Denis Dzyubenko
b0cf81684d Removed obsolete function QUuid::operator QString()
It is a source incompatible change, but I believe it is safe to say that it is
a small change, which doesn't affect many people.

Change-Id: Iad11befe4cca60484cf4e04cd3049c93a4ea5faf
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 02:17:04 +01:00
Frederik Gladhorn
b237c6683b Remove old accessible itemviews code.
We are moving to use IAccessible2.
This code is dead.

Change-Id: Ib1687faeafbec84cfa3b123d6f6398998033d342
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-04 23:52:18 +01:00
Robin Burchell
4b31b4e9e7 Split polling watcher out to its own seperate files.
Just helps maintain sanity and clarity a bit.

Change-Id: Iaf00f9ecf2d959afcd8fe18bbca71a403cf9818d
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-04 22:21:19 +01:00
Simon Hausmann
73187281c3 Fix QPainter::drawText with complex brushes
Commit d52fd497f6 introduced a call path to
QPaintEngineEx::drawStaticTextItem, which has a bug in using the pen's color
instead of the entire brush.

This patch replaces the use of the color with the pen's brush().

Task-number: QTBUG-23450
Change-Id: Ieb3bf352c840ff0d3fb4ac678caf7b13f4f9a8f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-01-04 21:16:55 +01:00
Robin Burchell
ecb57cfc32 Pass notification of failure of watches onto the caller.
This is particularly useful for situations where the user might really want to
be notified about a failure, for instance, in a backup application.

Empty paths are not treated as an error in calling, as the user code cannot
really do anything sensible to handle this error, but empty paths should not be
used.

Change-Id: Iddb44fd39f4e3fac5c3f9f60fb7999e1833280a8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-04 21:09:10 +01:00
Jonas M. Gastal
b494672208 Emit error if trying to connect while socket is connected or connecting.
This applies to both local and abstract sockets.

Task-number: QTBUG-22450
Change-Id: I5c58d68da95ffb6bcde5be510853359b288e5984
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-04 18:46:52 +01:00
Bradley T. Hughes
f821d6352e Don't release timer ids in event dispatcher code
3rdparty event dispatchers are impossible to write without using the
internal API QAbstractEventDispatcherPrivate::releaseTimerId(). Fix
this by having each QObject keep track of its own timer ids, and
release them when they are no longer used. As a side effect, this
makes the QObjectData::pendTimer bit unnecessary.

This also removes the QObjectData::inThreadChangeEvent hack that the
event dispatchers used to avoid releasing timer ids when moving timers
to a new thread.

QBasicTimer becomes even more low-level. It cannot use
QObject::startTimer() anymore, since we do not have a way to call
QObject::killTimer() from QBasicTimer::stop(). QBasicTimer uses the
QAbstractEventDispatcher interface directly, and releases the timer id
explicitly as well when stopping the timer.

This change also fixes some rare timer id "leaks" when destroying or
stopping timers after a thread has exited and destroyed its event
dispatcher (the timer ids would never be released when no dispatcher
exists).

Globally destructed QObjects that have running timers may try to release
their timer ids after the timer id freelist has been destroyed. This
commit accomodates such objects by avoiding the null dereference in
QAbstractEventDispatcherPrivate::releaseTimerId().

Change-Id: I2d7cd8221fae441f3cf02b6c0b4bc16063834d00
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-04 14:31:57 +01:00
Simon Hausmann
bd525a64d5 Fix rare crashes in fontconfig fontdb due to uninitialized variable
Initialize the out variable passed to FcPatternGetString to protect
against the "failure" case. Otherwise the subsequent QString::fromUtf8
is called with an uninitialized pointer.

Change-Id: I31b8b4c366f673609b26eca162334fd8bc9f25d2
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-01-04 14:27:19 +01:00
Jędrzej Nowacki
08863b6fda Refactor QVariant handlers.
QVariant implementation is based on delegation to a handler. The handler
has rather simple construction, it is a set of function that implements
a switch statement over known types and redirects calls to a right
method of an encapsulated types instance. Unfortunately after qt
modularization project, it is not easy to use types directly from
different modules, as they can be undefined or completely unaccessible.
Which means that each module has to implement own handler to cooperate
correctly with QVariant. We can suspect that list of modules known to
QVariant will grow and it is not limited to GUI, Widgets and Core,
therefore it would be nice to have an unified, from performance and
source code point of view, way of working with handlers.

This patch is an attempt to cleanup handlers. Keynotes:
- Each handler is working only on types defined in the same module
- Core handler implements handling of primitive types too
- Custom types have an own handler
- Each handler is independent which means that dispatch between handlers
  is done on QVariant level
- Handlers might be registered / unregistered using same interface

Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-04 14:25:25 +01:00