Commit Graph

2581 Commits

Author SHA1 Message Date
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