Commit Graph

8999 Commits

Author SHA1 Message Date
Rafael Roquetto
0fa52909fd Remove relic QT_VERSION from qmake test
Change-Id: Ic9095e3e924543d4f3e6d0f7c3a7b27f842cd300
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-14 03:56:55 +02:00
Mitch Curtis
b92129ff56 Tidy up QEvent::Type enums.
Corrected the list's ordering and added punctuation.

Change-Id: I36a477801cd0cfd3d36db308b4263982b582106b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-14 03:56:55 +02:00
Jan-Arve Saether
2cb9ded6ec Implemented QAccessibleTextWidget
A new class called QAccessibleTextWidget was added.
This class should implement all methods of QAccessibleTextInterface and
QAccessibleEditableTextInterface which only need a QTextCursor, and it
defines two pure virtual methods, to obtain and set the text cursor, so
accessible implementations of widgets which use a text cursor can implement
these two methods.

QAccessibleTextEdit is now a subclass of QAccessibleTextWidget and most of
its methods were moved to QAccessibleTextWidget.

This is a forward port of ba5d7d608cc31fc63354fd74d85a1bad7780fc45 from
Qt 4.8, and is a prerequisite for forward-porting QPlainTextEdit

Change-Id: I6093c4fa7e0a77b84de779479c6074db006efec1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-08-14 03:56:55 +02:00
Jeremy Katz
59117012f2 Document QFile::open() argument "handleFlags"
Change-Id: I5ef909b21ddd4782062dd4ebd0ea7bca33f3387f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-14 03:56:55 +02:00
Frederik Gladhorn
8e1ff45e74 Add Linux Accessibility Bridge
This is a plugin that bridges the QAccessible world
to AT-SPI 2 on Linux.

Change-Id: I7af22621ee6a3cefc723b137b7f227a611cf6641
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-14 01:40:06 +02:00
Mark Brand
85b624a969 qsql_oci: use OCI_COMMIT_ON_SUCCESS for SELECT without transaction
Otherwise, the open statement, say in QSqlQueryModel, will prevent
other statements from running.

Task-number: QTBUG-18608
Change-Id: Icdd6817fb981678be6fb70ade21a8123e152dcf6
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2012-08-13 23:16:38 +02:00
Thiago Macieira
bbec226432 Fix declaration of qt_gettime for Q_DECL_NOTHROW
Since the #include wasn't present in the qelapsedtimer_{mac,unix}.cpp
files, we did not notice that the declaration missed the macro.

Change-Id: I3e4f23b28e127d41b12690cf306f47986be53d89
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-13 22:45:27 +02:00
Jeremy Katz
1fc8f1e49b fix some QElapsedTimer doc grammar issues
Change-Id: I9bdb0b93b101119477a560b28396f88ea8103745
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-13 22:44:58 +02:00
Stephen Kelly
c58a8fa6a6 Use Qt::WindowFlags, not Qt::WFlags.
The latter seems to date from the Qt 1 days, and such abbreviations
are not current Qt style.

Change-Id: I83bc8722a309f4ece7e51881590d07b40fbe6bef
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-13 22:26:27 +02:00
Marius Storm-Olsen
addc9984fb Sync .pr[oi] with the Makefiles so qmake builds again
Change-Id: Ief766ac61f98859b84fc61b03b8c1292d3c06525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-13 14:52:25 +02:00
Thiago Macieira
46e2c94417 Make QElapsedTimer always store nanoseconds in t2
Up until now, the value stored in t2 depended on whether we had found
a monotonic clock or not. Fix that by always storing nanoseconds: we
avoid extra calculations and accessing a global variable all the time.

The impact is contained to the actual getting of the time. And we
mitigate by using clock_gettime to get the realtime clock instead of
gettimeofday, if that's available.

Change-Id: Iceef2d050fd9472f1a66e11e7ded79fe5163a132
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-13 09:34:10 +02:00
Thiago Macieira
bc6568291a Fix a ### Qt5 issue: remove limits.h from qreadwritelock.h
Change-Id: I1fc54561aabd1be693f179e668031ddb0f86a130
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-13 09:33:33 +02:00
Thiago Macieira
b1fd9a93b9 Speed up tst_QGraphicsView::mapToScene test
This test is doing a brute-force mapping. Coupled with changes to
QCOMPARE last year, this now allocates and deallocates a lot of memory
per iteration. On my Sandybridge, it takes two minutes to run:

     111136.781153 task-clock                #    0.999 CPUs utilized
   371,692,633,238 cycles                    #    3.344 GHz
   182,641,818,708 stalled-cycles-frontend   #   49.14% frontend cycles idle
    57,951,552,830 stalled-cycles-backend    #   15.59% backend  cycles idle
   477,216,332,971 instructions              #    1.28  insns per cycle
                                             #    0.38  stalled cycles per insn
    86,959,637,669 branches                  #  782.456 M/sec
       309,185,237 branch-misses             #    0.36% of all branches

     111.264868818 seconds time elapsed

Changing the iteration step from 1 to 5 reduces the runtime to about 5
seconds.

Change-Id: I9cad6f85f535f472319da7cd6c4aa28e12ddf1b7
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-13 09:32:21 +02:00
Stephen Kelly
4b73950cc8 Use POSITION_INDEPENDENT_CODE for these tests.
These projects are expected to fail, but we need to make sure they fail
for the right reason.

Change-Id: I8a7caaa663060712c5c7113ef3b054feba2e2287
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-13 09:31:16 +02:00
Stephen Kelly
7bfb10b498 Add hints for where to find packages for projects expected to fail.
In the CI system, an environment variable is used to convey
the CMAKE_PREFIX_PATH, but that can not be relied upon.

Change-Id: Ie4fbacaac6ae18f95a3b4d1e796a4b4c91a418c4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-13 09:31:16 +02:00
Stephen Kelly
4ff51dd8b2 Add the minimum CMake version to projects built standalone.
Change-Id: If9d2a464d94faee0dccd77bc54946d91dd117db3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-08-13 09:31:16 +02:00
Rohan McGovern
4ef1ddc641 tst_qgraphicsview: increase test timeout further
This test has recently timed out in CI, but appeared to be making
progress. Give it more time to complete.

Change-Id: Ied0fb7aad35ed6d5889dd585a7545687617e5e19
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
2012-08-13 07:14:40 +02:00
Marc Mutz
d370b365da QImage{Reader,Writer}: remove unused local typedef (GCC 4.8 warning)
GCC 4.8 warns:

  warning: typedef ‘PluginKeyMapConstIterator’ locally defined but not used [-Wunused-local-typedefs]

Change-Id: I0225708b590ac3d72ab3cb8f61e686091c187053
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-11 22:35:37 +02:00
Marc Mutz
952d06f7d6 QModelIndex: remove user-defined copy operations
They're identical to the ones the compiler will
synthesize and their presence prevents move
constructor and assignment operators from being
synthesized alongside their copy counterparts.

The destructor can go, too.

Change-Id: Ia9cc26ba1ffaa670f03642af457e632f44bd69c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-11 22:35:06 +02:00
Oswald Buddenhagen
b603fd36c2 support -rpath for modules which are not installed to QT_INSTALL_PREFIX
a module's project file may set MODULE_INSTALL_LIBS before loading
qt_module.prf to have an alternative RPATH linked into the users of that
module.
this is relevant only for linking against non-installed -prefix builds
of that module, as otherwise .libs from the module's pri file is used
for rpath.

Change-Id: Ib240e748cf130a71a5991dc643c368a983092ead
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 10:40:23 +02:00
Oswald Buddenhagen
43af0260b8 fix -rpath-link handling for non-installed prefix builds
forwarding module pris get rpath_link{,_private} fields, which are
used accordingly by qtAddModule().

Change-Id: I0abc2dc8b1e8744dbf7f439aa7fed9ae159c2c74
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-11 10:40:16 +02:00
Frederik Gladhorn
522e892ff4 Fix order of namespace/include guards.
Change-Id: I9ed1e82c90e38a65c15bb9d05ff789270218d4b5
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-08-11 07:30:45 +02:00
Oswald Buddenhagen
0fc4f2b4cf qtAddModule(): put search paths directly into LIBS{,_PRIVATE}
QMAKE_LIBDIR and QMAKE_FRAMEWORKPATH have the downside that they
always effectively end up in LIBS, which makes for weird prl files.

Change-Id: Iaf61b0038504ff91ae5ec7f9b1255fe3a2d134f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-11 00:41:07 +02:00
Oswald Buddenhagen
6f4ff81380 assemble the complete tool commands already in qt_tool.prf
this saves some repeated calculations. also, it's nicer to have most
logic in one place.

Change-Id: Iea362d40f5e6203709ced94d29ca61a4163b8e69
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 00:41:07 +02:00
Oswald Buddenhagen
ff13798708 fix error message about bad qt modules
the variable name is a function parameter now

Change-Id: I46f3ce37c157312e7f70291a0cef2d666d50664c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 00:41:07 +02:00
Andy Shaw
fb3c850581 Fix vcproj file generation for incredibuild handling of moc etc targets
When incredibuild-xge had been turned on by configure then it was not
ensuring that the generated vcproj files had the right extra comments
needed to make incredibuild run moc and other tools in parallel.  By
fixing the prf file to get around a problem in the parser this is now
respected.

Task-number: QTBUG-14482

Change-Id: Ifd24bde2db7d80d3a52719c733d15f228c7b3534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 00:41:07 +02:00
Stephen Kelly
c1df856d6b Make rowIntersectsSelection take account of the parent argument.
Task-number: QTBUG-22370

Change-Id: I497194793eab624b760deea93dac0df767850330
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-08-10 22:02:11 +02:00
Marc Mutz
4fa544c8cd QtWidgets: use new qEnvironmentVariableIs{Empty,Set}()
Incidentally, this patch shows that Qt isn't consistent in how it
treats empty environment variables used as flags, but that is something
for a separate commit. This patch aims to be behaviour-preserving.

Change-Id: I5390cda314858762b76384291373a6f0167d323a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-10 22:00:43 +02:00
Stephen Kelly
146b7a9c8b Take scroll position into account when painting drag pixmap.
Task-number: QTBUG-26793

Change-Id: Ic19cb6581cd5838d26713998e152772a5d12da4f
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-10 21:59:47 +02:00
Alexandros Dermenakis
59cd316d6c Revert "Added default argument for color profile to QImage constructors."
Reverting change after request in the developers mailing list.

This reverts commit 50a5bd5429e0c8b99be81b86d3730737cb7f8514.

Change-Id: Ic4a420d6ad0995810ed61d31edd28e7b603cca5e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-10 21:58:29 +02:00
Mark Brand
816c554017 make currentText the USER property for QComboBox
QItemDelegate takes the USER property as the value to be set using
model->setData(). The text is what is expected.

follow-up to b1b87a73012342dc1619a8e907ea9954d59ca564 which in Qt 4.8.0
broke the interaction between QComboBox and QItemDelegate used by
QDataWidgetMapper and item views.

Task-number: QTBUG-26501
Change-Id: I005a0a6af5265ee22baf417957e520992d16d6e1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-10 21:58:15 +02:00
Stephen Kelly
79a7e6f23b Require CMake 2.8.9 for the qt5_use_modules function.
The newer CMake version has the POSITION_INDEPENDENT_CODE property which is
what we need here. The CMake 2.8.8 implementation uses awkward and incomplete
string manipulation which I don't want to maintain for any amount of time
when Qt 5.0 is released.

Change-Id: If7ace9c6925ccdbf800f1863fa2368e55fa44d7f
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-08-10 21:57:47 +02:00
Jerome Pasion
06ca4e38cf Doc: Added a Qt Network landing page.
-fixed generated HTML file names
-removed qt-network group in qt/qtdoc and removed \ingroup instances

Change-Id: Ida5ded5da30e6db1978382f6742a5da8036e055e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2012-08-10 17:08:34 +02:00
Thiago Macieira
2b4ce2f0ff Use an include guard for qelapsedtimer.h that matches the file name
The class used to be called QTimeStamp before.

Change-Id: I6e543f4f131a80299eb5dae78d8852b7899bab8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-10 16:22:14 +02:00
Thiago Macieira
276f7ee4ad Use Q_LIKELY instead of doing an #ifdef for GCC
This code predated the Q_LIKELY macro. Now that we have it, use the
official macro.

Change-Id: I0e43609f8d6827f8fef7b928655a965cba579b8d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-10 16:21:59 +02:00
Mitch Curtis
478c21239a Correct QTransform::QTransform documentation re m13 initialisation.
Documentation incorrectly states that it is m13 that is set to 1,
when it is instead m33.

Task-number: QTBUG-10232
Change-Id: If3c7d3eb1c478ebef4f13b4842235445afc48049
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-10 11:56:26 +02:00
Morten Johan Sorvig
ca23ae5c4b Handle "-psn_XXX" command line args on Mac
Finder on Mac OS X sends a command line argument of
the form -psn_0_3523420 when launching applications.
Eat the argument like we do in Qt 4.

Change-Id: I09db9dea035e62c0b816a833c9ad6fcd78f83735
Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com>
Reviewed-by: Simo Fält <simo.falt@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-10 11:42:22 +02:00
Laszlo Agocs
8ec3a419d1 kms: Restore VT settings when crashed
This does the job of keeping the terminal keyboard working when
the application segfaults but is somewhat unsafe because ioctl()
is not async-signal safe.

Change-Id: Ie6728a4252e18c29bba8f8308e6c00d4a1eb6a8e
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-08-10 08:03:31 +02:00
Marc Mutz
fa08b143f3 QtGlobal: (new) qEnvironmentVariableIs{Set,Empty}()
These functions are a faster version of {,!}qgetenv().is{Null,Empty}(),
a common pattern in Qt code.

Their main advantage is that they don't need to allocate memory, so
they can be used in noexcept functions, or dynamic initialisation of
namespace-scope statics, because throwing in these contexts invokes
std::terminate().

Change-Id: I651c5bd72f450b5d7df76590f8791572fe992af5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-09 21:27:09 +02:00
David Faure
977441f61c Remove code duplication in QStandardPaths implementations
Using the new getter to access the "test mode" setting.

Change-Id: Id26a350cd3fab4bf2e5f58ba67bc7323f99c9cc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-09 13:48:16 +02:00
David Faure
a23da5fd6b Add bool QStandardPaths::isTestModeEnabled()
Library code might need to know this, e.g. when calling an external
process, to give it the right configuration. (For instance when
ksycoca code calls kbuildsycoca to recreate the DB at the right place).

Change-Id: I343ddefff816586f9d391973c08ff1e1ad86bf0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-09 13:48:13 +02:00
Sean Harmer
d1bb10d9b8 OpenGL: Allow querying OpenGL extensions via the QOpenGLContext
Change-Id: Ia88470554bbfd2a56738dadfcafafe42a990382d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-08-09 13:19:34 +02:00
Janne Anttila
5410299d94 Fix qlayout autotest build for WinCE.
SRCDIR was not defined for WinCE but it should no longer be used.
Fixed test case to use QFINDTESTDATA instead.

Change-Id: I07cbf7d42790d33e2d205d1682ec10e7577a92bd
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2012-08-09 13:18:08 +02:00
Miikka Heikkinen
2ccd34fd20 Use native handles for parent change check in QWindowsWindow.
QWindow::setParent() sets the parent to zero instead of the desired
parent, if platform window has not yet been created for the parent.
This caused QWindowsWindow::setParent() to skip setting the parent
later, when correct window was specified, as the QWindow parent-child
relationship hadn't changed. Fixed by changing the the check to use
native handles instead.

Task-number: QTBUG-26791
Change-Id: I292a1ddf746583a7268f2d07c20166995c0dd7d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-09 13:17:39 +02:00
Shawn Rutledge
5c63820992 Need to have the XI2 import to detect XI_TouchBeginMask
Followup to I5c925ae3e191244c7ab9415e4ba2fe49b93dd2af : touch was not
actually working by default.  A major symptom was getting double-clicks
instead of clicks on buttons and such, making it quite hard to
interact with anything.  There are some problems remaining.

Change-Id: I09fa5965036bac242ccc1f4db71f6d912445ca01
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
2012-08-09 13:17:14 +02:00
Joerg Bornemann
d7ddd92d15 fix conditions in embed_manifest_*.prf
MSVC 2012 was ignored.

Change-Id: I41b2dff85c037ce8057c91036434aa26cd9b5d5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-09 08:49:36 +02:00
Thiago Macieira
6a8537356b Mark QElapsedTimer functions as Q_DECL_NOTHROW
All functions in QElapsedTimer are marked Q_DECL_NOTHROW. This code
is often introduced in many places to deal with timeouts and doesn't
need exception handlers. In particular, it's used in QMutex locking.

In addition, mark QDateTime::currentMSecsSinceEpoch as nothrow, as it
can't throw exceptions either and it is needed by the generic
QElapsedTimer.

Q{Date,Time}::current{Date,Time} operate on local time and run into at
least one cancellation point, which we must consider throwing. And
returning a QDateTime allocates memory.

Change-Id: Id776c5ec831fc06d7419a9ff5442d9b35cff1a22
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-09 03:26:29 +02:00
Thiago Macieira
44e638f069 Add Q_DECL_NOTHROW to QRefCount.
For the same reason as the previous commit (about the atomic classes),
mark these functions as never throwing an exception.

Change-Id: Idf46e41b226f54cb8658416efdf985ca40dd2952
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-09 03:26:27 +02:00
Thiago Macieira
6bf4e448fe Mark all atomic functions as Q_DECL_NOTHROW
Actually, only the "new" atomics are marked. The old implementation,
based on qoldbasicatomic.h is unchanged, but should still work without a
problem.

The following configurations were tested and do work:
 - x86 64-bit
 - x86 32-bit
 - generic GCC
 - generic C++11 std::atomic
 - bootstrap
 - ARMv6 and 7
 - MIPS
 - MSVC 2010 32-bit
 - MSVC 2010 64-bit

The only two configurations untested are IA-64 and ARMv5. Except for
MSVC, all configurations were tested with GCC 4.6 (MIPS and ARM) and 4.7
(x86 and generics).

Change-Id: Iecbfeacd9d20b535453e91335165e9a221e0b47e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-09 03:26:24 +02:00
Thiago Macieira
2d9c2c0562 Add Q_DECL_NOTHROW to the atomic functions
These functions are inline (on most architectures) but they contain
inline assembly which the compiler could not understand. In any case,
if it decides not to inline them, it would need to generate exception
handlers.

Change-Id: If9d50793d715c51781e76d0a539da03a6d83e255
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-08-09 03:26:22 +02:00