Commit Graph

7413 Commits

Author SHA1 Message Date
Thiago Macieira
044e2b3262 Remove references to QtSharedPointer::InternalRefCount
This class does not exist, is not needed and has never been published
in a released version of Qt.

It existed during the development of QSharedPointer, when internal
reference counting (also known as intrusive counting) was a goal. That
goal was abandoned when use with forward-declared classes was
preferred.

Change-Id: If3a5a29c07fc71e2001d6ba64b90ddd241ab8ae3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-06 02:02:43 +02:00
Donald Carr
058c8da0f1 Generalize common device properties out of Raspberry Pi spec
Change-Id: I58cc9c9219bf3e9ed8e7401cb66f968306d7bfc9
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-06 02:02:40 +02:00
Girish Ramakrishnan
b5e041d48d eglfs refactor: Query screen and format info from hooks
This allows boards to customize what they really work best for
without having to set environment variables.

Change-Id: Ib40c3a870ade568f66e37e621a8abc6b17e39411
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-05 18:48:40 +02:00
Girish Ramakrishnan
f35470a442 eglfs refactor: Move egl initialization to the integration
Change-Id: If2c870538c742fd034fb9e5c115e4ac0bd8e2e03
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-05 18:48:16 +02:00
Holger Hans Peter Freyther
e1774d2029 Verify the surfaceType before activating the GL context
Verify that the surfaceType() of the QPlatformContext is of type
OpenGLSurface before making the context active. Make it possible
to get the QSurface from a QPlatformSurface, make QPlatformWindow
use that to access the QWindow. Remove the setSurfaceType call from
the eglfs plugin as this hiding a problem.

Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-05 18:48:00 +02:00
Stephen Kelly
7d28f7772c Use QPointer instead of QWeakPointer.
The use of QWeakPointer for tracking QObject pointers is to be
deprecated.

Change-Id: If460ca7f515db77af24030152f4bd56e1a5fae7c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 18:42:26 +02:00
Kent Hansen
fa7c9bbe1c Remove useless "QT += widgets"
These .pro files have TEMPLATE=subdirs, so there's no reason to be
adding libraries here.

Change-Id: I0fb0a44107710ee746d354106d0c46006958ee62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-05 16:01:29 +02:00
Kent Hansen
8a5a986828 Avoid string-based lookup of signals
Resolving signals by member function is preferable.

Change-Id: I2a47a27bc780c4c3c29cf472f9f063c910e20c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-05 16:01:29 +02:00
Kevin Ottens
0915d073f1 QNX: Implement QQnxScreen::nativeOrientation()
Provide a proper version of nativeOrientation(). We use the screen
physical size as reported by the device to determine its native
orientation.

Change-Id: I45b593b0d62436529f89050e98e10b8c9463b6b9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-06-05 16:01:29 +02:00
Kevin Ottens
99b3a15dcf Introduce nativeOrientation() to QPlatformScreen
Now QPlatformScreen has a nativeOrientation() method which default
implementation return Qt::PrimaryOrientation. Its purpose is to return
the native orientation of the device (e.g. when the device logo is right
up).

Only the QPA backend can know for sure what this native orientation is,
so allow QPA backends to override it with a finer result.

Change-Id: I3bef14acb6b8568e64398ff919d9cb4461a2c9cc
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-05 16:01:29 +02:00
Mitch Curtis
24aad8d663 Write test to confirm QStateMachine calls connectNotify().
Task-number: QTBUG-16628
Change-Id: I77535fcb9a6ae306df8ccd670ee1bfc32721d66a
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-05 16:01:29 +02:00
Casper van Donderen
21ebd2e4eb QDoc: Look for template and include() under installdir.
The installdir will now also be used to search for include() qdocconf
variables and the stylesheet.

Change-Id: I388392114fd5a8d57bab0b71699b30e4a6ddd46e
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-05 16:01:29 +02:00
Lars Knoll
143daa6ac2 Correctly locate files with relative paths
QUrl("relativefilename").toLocalFile() changed behavior
and now returns an empty string if the scheme is not set.
Setting the scheme to "file:" in setSource would however
break some other assumptions in the code about relative
url's.

Task-number: QTBUG-22416
Change-Id: I1b3fcbef81f6e356935ec426903989e783ce9a78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 13:40:00 +02:00
Jiang Jiang
fb631d10d0 Fix Mac support for glyph scaling
Change-Id: I9ac9da86c38e9313c6219b8049e46b6b58fa6731
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-05 13:37:43 +02:00
Mitch Curtis
05d980664f Make QIODevice::seek() return false for sequential files.
Task-number: QTBUG-18173
Change-Id: Ie3a96d3a6f60995b8ba7823153778869d0c2dc58
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-05 13:12:58 +02:00
Bradley T. Hughes
bf84d1a1fe configure: Auto-detect and enable C++11 support if available
Enabling support for C++11 adds CONFIG+=c++11 to the Qt build. Projects
using Qt can check for C++11 support using contains(QT_CONFIG, c++11) in
their .pr[iof] files.

The QMAKE_CXXFLAGS_CXX11 and QMAKE_LFLAGS_CXX11 qmake varibles contain
any arguments the compiler needs to enable C++11. CONFIG+=c++11 adds
these arguments to the build.

Support for clang, g++, and the Intel C++ Compiler for Linux are
included in this commit.

Change-Id: Id77f86d7ad4d5c740b890446a40b105879a0d327
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-05 12:30:13 +02:00
Bradley T. Hughes
a6d6719c26 directfb: Compile with C++11 support enabled
qdirectfbblitter.cpp:146: error: narrowing conversion of 'srcRect.x()'
from 'qreal' to 'int' inside { }
qdirectfbblitter.cpp:152: error: narrowing conversion of 'rect.x()' from
'qreal' to 'int' inside { }

The same error exists for calls to y(), width(), and height() at both
locations.

Change-Id: I14f165a6a1cab9502e157e798157b835faf2300f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 12:30:02 +02:00
Casper van Donderen
67fc1b893d QDoc: search for example projectPath for manifest.
Previously qdoc would automatically use the first .pro/.qmlproject file
found, now it explicitly searches for a .pro/.qmlproject file with the
name of the example.

Change-Id: I2552e529bd3d1b724d3b4286d98d664edbbabcf2
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-05 09:25:07 +02:00
Rohan McGovern
4eecbf3b84 tst_qtoolbutton: stabilize and improve failure message
Allow for a little more leeway in timers.

Task-number: QTBUG-26004
Change-Id: I59936d0f675b7f734e04b3f5e63631c74ca4f163
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-06-05 09:21:36 +02:00
Laszlo Agocs
a3768cb3bd Add StartDragVelocity to style hints
This will be used by Flickable in combination with the drag distance
to improve the drag start detection logic.

Change-Id: Ica30042ef3d15041d857b07fa4173dde3d3f900f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-05 09:02:55 +02:00
Lars Knoll
b7be632d5e Expose the plugins meta data in the plugin loader
add a metaData() method to QPluginLoader so that
applications can query the plugins meta data without
having to load the plugin.

Change-Id: Ic3ebb35fd3c403926326e8dd1de4176b0c48dbef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 08:58:00 +02:00
Laszlo Agocs
87e50e079e Make touch operating better on some touchpads
Some MT protocol capable touchpads do not provide
ABS_MT_TOUCH_MAJOR. The calculation for touch area was meaningless in
this case and resulted in a very small area not playing nice with apps
like fingerpaint.

Change-Id: Ibe472e22e5e792059fd594f54be9be8b75287730
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-05 06:15:15 +02:00
Mitch Curtis
f3f648f920 Fix QTemporaryFile::open() failing after remove().
If a QTemporaryFile is constructed using a template file path,
the path is generated in QTemporaryFileEngine::open() and then
filePathIsTemplate is set to false. If remove() and then open()
are called on the same QTemporaryFile, the path is not regenerated.
This change ensures that if the file path was generated, it will be
generated again in the scenario above.

Task-number: QTBUG-2557
Change-Id: I718ceb89daa9a9d46fdbe811fecc3d57d6dc08c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:15:06 +02:00
Mitch Curtis
872f0b94ac Make QString("inf").toFloat() return inf instead of zero.
Currently, QString::toFloat() returns 0 (and sets ok to false) if you
try to convert "inf". This is because inf is greater than QT_MAX_FLOAT
and there is currently no check to handle inf.

Task-number: QTBUG-8629
Change-Id: I498daf4a7a6f880f928461fca628fcaf7d1d6d08
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-06-05 06:14:57 +02:00
Konstantin Ritt
93ead35939 Improve the QTextBoundaryFinder autotests a lot
The existing tests has been retained, the new ones has been added.

Change-Id: I12ae1b4e63dde46f3b14a7c1423c13d5881d4507
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-05 06:14:41 +02:00
Jędrzej Nowacki
879539fb99 Rename QVector::realloc and QVector::free.
These names were confusing and conflicting with standard C memory
management functions.

Change-Id: I6efe20665d2ec7ad3e00f3a806cc1843a57374d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:14:32 +02:00
Christian Kandeler
046c31988e QProcess: Add accessors for program and arguments.
Task-number: QTBUG-24550

Change-Id: I1ce26e584e39b0b58b1c9f78d8027b2479f2d92c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:14:28 +02:00
Casper van Donderen
0dfbb2f553 QDoc: Use the correct DITAiXML for table col/rowspan.
Change-Id: Id5443b4428a5f0b6b9fee92efcf2fd1ae19c0d19
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-05 06:14:22 +02:00
Thiago Macieira
006edbd0d9 The QFontEngineFT files are not built into QtGui anymore.
These files are only built into QtPlatformSupport, so the Q_GUI_EXPORT
macro is now wrong. Remove it.

Additionally, since these files are built into QtPlatformSupport, the
windows platform plugin does not need to build them again.

To-Do: move the files to src/platformsupport/fontdatabases

Change-Id: I9d69b97ca25ee52ab627cfa633f43b277acc5e05
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2012-06-05 06:14:19 +02:00
Bradley T. Hughes
9b07fd0d5c Add QDeferredDeleteEvent
Use this to store the loop-level counter needed by QCoreApplication
when determining when it is safe to delete an object.

This removes the hack to hijack the QEvent::d pointer (even though
the pointer is unused).

Change-Id: I91c0b1aa00235ec6e13feb30bf928e56d2f80026
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:14:16 +02:00
Donald Carr
00f88bd090 Migrate fontconfig config test to unix scope
Fontconfig has no X11 dependency and is of broader use to us than the X11
context. The test should also disambiguate whether fontconfig support is
successfully detected or not.

This change also removes a false X11 dependency from the freetype test.

Change-Id: I68a596aa06f614a64163772fe29a09edba119a81
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-05 06:14:06 +02:00
Mitch Curtis
d8e457323c Allow 24:00:00 for ISO dates in QDateTime::fromString().
ISO 8601 section 4.2.3 states that "The end of one calendar day [24:00]
coincides with [00:00] at the start of the next calendar day", so
fromString() was updated to account for this.

Task-number: QTBUG-25387
Change-Id: I391db0da755dbc822ba0820c302a2c10391e1f3b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-05 06:12:37 +02:00
Rohan McGovern
1668c47608 Replace QTEST_APPLESS_MAIN with QTEST_MAIN in tests using QProcess
QProcess requires an application object to be created in order to work
correctly on Windows.

Task-number: QTBUG-26023
Task-number: QTBUG-26024
Change-Id: Ifa90946262bc7e2a7df6b6aad54e10b54473fc97
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-06-05 06:12:20 +02:00
Donald Carr
b46d8240ea Introduce gcc machinedump considerations to build system
This information is required by qmake when cross compiling for Debian based
multi-arch devices in order to adequately resolve system libraries and
pkg-config information.

Change-Id: If96e677ab27c6f0453889c8f7cc43bdb9016f8b6
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-04 22:29:24 +02:00
Laszlo Agocs
bc3cfebc66 evdevtablet plugin
Change-Id: Ie8fbaac929180e6d4c626253c4c20d1b3a9083f5
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-04 22:29:10 +02:00
Debao Zhang
13714cdd64 Fix parent-children relationship of QWidgetWindows
For a native child widget,
widget->nativeParentWidget()->windowHandle()
should always equal to
widget->windowHandle()->parent()

Change-Id: I2560689d32b0cb2834ed33f96c1c70ef3c14342d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-04 22:28:48 +02:00
Kent Hansen
f7c2ba9bbe Enter initial state before QStateMachine::started() is emitted
The documentation says that started() "is emitted when the state
machine has entered its initial state", but the implementation
didn't adhere to that.

The consequence is that if you e.g. emitted a signal from a slot
connected to started(), and that signal was used by a transition
from the initial state, the signal would effectively get ignored and
the state machine would remain in the initial state.

Task-number: QTBUG-24307
Change-Id: Ibbeb627d517eaff821d88e256a949eacf6aae350
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-04 16:53:42 +02:00
Kent Hansen
2682165708 Fix typos in QState sorting functions
A QObject can't be a child of itself, so the comparison always
returned false. In practice, this was causing the entry/exit order
of parallel states to be random.

QObject::children() is documented to contain the children in the
order in which they were added, so this fix actually achieves
deterministic behavior.

Task-number: QTBUG-25959
Change-Id: Id3f12d6bfbc249f1d4fed0bafb7d0217093e458e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-04 16:50:24 +02:00
Andreas Holzammer
939aa51138 Fix endian detection for wince
As the qsystemdetection.h is not included
so Q_OS_WINCE is not defined here, so use
the define from the mkspec.

Change-Id: Ic170725d0da89f0c0e675c62bd2aa5c58803de9f
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-04 16:43:21 +02:00
Casper van Donderen
e0bdcf1fc4 QDoc: check if !isNull() before casting prev/next nodes.
Change-Id: Ifac095ef0af0b483fbf53c6a18cf3c3130d37710
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-06-04 10:06:17 +02:00
Laszlo Agocs
b6535f65e1 Fix touchpads with evdevmouse
evdevmouse only worked properly with real mice, the ABS event handling
was somewhat broken, it wasn't possible to properly move a mouse cursor
with a touchpad due to unwanted jumps. The button handling is also
corrected.

Change-Id: Id04ef65d867a75bcfc54240d192a78224a4481d6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-06-04 09:26:09 +02:00
Laszlo Agocs
d0b4c7b159 Report mouse events when the driver says so
Generate mouse events in SYN only, when all available data has
been reported.

Change-Id: I74a9e9dd603ee0747b00115fac0405b1c600bdeb
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-06-04 09:25:39 +02:00
Debao Zhang
3892ccaca7 QWidgetWindow: Fix handleExposeEvent()
When the associated widget of QWidgetWindow is visible but its
updates are not enabled, avoid marking the widget dirty.

Task-number: QTBUG-25991
Change-Id: Ibeac4c0dfd3198a5174372331e50628b0d3a480d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-06-04 09:08:21 +02:00
Rohan McGovern
2268be8040 tst_languagechange: increased timeout on Windows
This test's runtime significantly varies on separate runs on Windows;
runtimes from 10 to 830 seconds have been observed in CI.

Increase the timeout to restore CI stability.

Task-number: QTBUG-26006
Change-Id: Iba153e65264a177d146b2f3647ec6ba529af7135
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-06-04 03:07:48 +02:00
Donald Carr
b930487896 make pre-qmake spec evaluation load device variables
this is needed to correctly resolve the compiler (cf. $$CROSS_COMPILE)

Change-Id: Iaf7266ae464c15e8483780dcf9c970212630a93b
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
2012-06-04 01:19:45 +02:00
Kent Hansen
ff50519768 Change testlib signal dumper hooks to use signal index range
Another step towards getting rid of the class method offset
computation in QMetaObject::activate().

Since QMetaObjectPrivate::signal() is private API, this also
required adding a testlib dependency on core-private (and
getting rid of the duplicated QSignalSpyCallbackSet struct).

Change-Id: I0d830f35392a6b44fc321c5285877ec0bf437100
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-04 01:18:52 +02:00
Debao Zhang
0916394126 QtWidgets: Make QWidgetWindow disappear when its associate QWidget hides
Task-number: QTBUG-25980
Change-Id: I572eb9dd175121b1f1b6070e1849247000b48961
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-04 01:18:18 +02:00
Kent Hansen
6d996dd74d Change QConnectionSenderSwitcher et al to use signal index range
First step towards getting rid of the signal_absolute_index variable
from QMetaObject::activate() (which requires computation of the
class's method offset).

This also required changing the implementation of the public function
senderSignalIndex() so it still returns an index in the full method
range.

Change-Id: I58571eb3c8099ea5b673682872c53875f5ea8c13
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-03 11:04:50 +02:00
Kent Hansen
0d86ca432a Use QMetaObjectPrivate::signalOffset() where appropriate
computeOffsets() was unnecessarily computing the method index, when
only the signal index is needed.

Change-Id: Id682d4447ba283a44cf0ea15cc47bd30edccb57b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-06-03 11:04:33 +02:00
Mike FABIAN
e051819983 Pashto uses Arabic script and is written right to left
QLocale::textDirection() was missing Pashto as a
right to left language.

Change-Id: I1623abf711597a26f283a86708dc756696790b7d
Reviewed-by: Lars Knoll
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-02 12:26:31 +02:00