profile/ivi/qtbase.git
12 years agoQThreadPool: use swap() when making a copy of allThreads
Marc Mutz [Fri, 17 Aug 2012 08:55:38 +0000 (10:55 +0200)]
QThreadPool: use swap() when making a copy of allThreads

This is the C++98 version of std::move().

Change-Id: Icb73da16bb05bf07114a38e4fd48732b612e2d51
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQThreadPool: don't loop unless needed
Marc Mutz [Fri, 17 Aug 2012 08:53:53 +0000 (10:53 +0200)]
QThreadPool: don't loop unless needed

The resulting code is easier to understand, too.

Change-Id: I3cd84d85b3186860dd3ccd67c3771b82695e7f83
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQFutureInterface<void>: const-correct reportFinished()
Marc Mutz [Fri, 17 Aug 2012 08:51:48 +0000 (10:51 +0200)]
QFutureInterface<void>: const-correct reportFinished()

The primary QFutureInterface::reportFinished() takes a const T *, so should the
void sepecialisation.

Change-Id: I4d3173f4fd4f8d27baecd407369659a42445aed7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoqmake: object_with_source feature removed
Joerg Bornemann [Thu, 16 Aug 2012 11:02:30 +0000 (13:02 +0200)]
qmake: object_with_source feature removed

By putting object_with_source into CONFIG one could force qmake to
output each object file into the same directory as its source file
came from. This was a rather nasty work-around from Qt 3 times to
support source files with the same file name in a project.
Unfortunately this doesn't play nicely with shadow builds.

Change-Id: Ie79e14d36ba6eac4219edc14ea75ab6a96f9ea96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agounbreak "aux" template for mingw & msvc
Oswald Buddenhagen [Wed, 15 Aug 2012 17:42:42 +0000 (19:42 +0200)]
unbreak "aux" template for mingw & msvc

we cannot just completely stub it out, as then there are no dependencies
on whatever targets we actually *want* to be built.

Change-Id: I32a92fa937d099c153a0082feae5d23e3998ba48
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agobeautify "aux" target
Oswald Buddenhagen [Wed, 15 Aug 2012 17:41:22 +0000 (19:41 +0200)]
beautify "aux" target

it works better when it castrates the app template, rather than staticlib

Change-Id: If52960fb48d770e8ec096c66b579539512b8d299
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove unnecessary magic
Oswald Buddenhagen [Tue, 14 Aug 2012 19:53:25 +0000 (21:53 +0200)]
remove unnecessary magic

getXQMakeConf now gives properly expanded variables

Change-Id: I17d82a1889fc4e1ee6b74c90aa0e4179ece0e415
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoFix compilation of QThread on QNX
Sean Harmer [Thu, 16 Aug 2012 08:22:46 +0000 (09:22 +0100)]
Fix compilation of QThread on QNX

Commit 3ef51efbe75bfb9f1dfbe7df073e9eb745a72ad8 broke compilation of
qthread_unix.cpp on QNX. This fixes it by passing in the threadId to
setCurrentThreadName().

Change-Id: I24f32d8054baedbd9a65b6a80fb1f6f37e07092d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoQNX: Allow app to run when spurious 2nd screen is reported
Sean Harmer [Thu, 16 Aug 2012 10:21:06 +0000 (11:21 +0100)]
QNX: Allow app to run when spurious 2nd screen is reported

On the PlayBook, libscreen always seems to report the presence of a 2nd
display even when none is connected. This of course leads to the failure
to query this display for its physical size.

This patch relaxes the demand for a physical size to being for the
primary screen only.

Change-Id: If30b1fd704e7a194a426a0a9f0b85557478105f7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
12 years agoWinCE: Fix call of GetAncestor in setParent_sys()
Kevin Funk [Tue, 14 Aug 2012 14:05:52 +0000 (16:05 +0200)]
WinCE: Fix call of GetAncestor in setParent_sys()

There is no GetAncestor under Windows CE.
Use GetParent instead.

Change-Id: I87b86961dade0d5c7c8bf6a470f777d32188dcd2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoFix setParent_sys() to use native methods when checking for toplevel
Miikka Heikkinen [Thu, 16 Aug 2012 10:03:32 +0000 (13:03 +0300)]
Fix setParent_sys() to use native methods when checking for toplevel

QWindowsWindow::setParent_sys() was checking if window was toplevel
using non-native method, which caused wrong result in some cases
involving native windows. Changed the toplevel check to utilize
native method instead.

Task-number: QTBUG-26826
Change-Id: I72ca17c53c1ed7611f141cee17b2edaaa80c6c17
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoFix GDI object leak
Miikka Heikkinen [Wed, 15 Aug 2012 09:54:48 +0000 (12:54 +0300)]
Fix GDI object leak

DeleteObject parameter must be a handle, not a pointer to a handle.

Task-number: QTBUG-26835
Change-Id: Id5de2b0b067bd9fc45c1c8ead4f7d67f0162f070
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove install/removeEventFilter from QRollEffect
Joerg Bornemann [Wed, 15 Aug 2012 10:39:44 +0000 (12:39 +0200)]
remove install/removeEventFilter from QRollEffect

This class doesn't have an eventFilter method.

Change-Id: Ibd7b3b5b954dd2467c9b4dadd85d3613964d9f7c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
12 years agoqmake: support incremental linking when embedding manifests
Joerg Bornemann [Wed, 15 Aug 2012 10:18:49 +0000 (12:18 +0200)]
qmake: support incremental linking when embedding manifests

When embedding manifests we modified the EXE/DLL after linking using
the manifest tool. This breaks the incremental linking feature of MSVC.

The MS way to embed a manifest without breaking incremental linking is:
   - let the linker create the manifest file,
   - create a resource that contains the manifest file,
   - invoke the linker again to embed the resource.

The embed_manifest_{exe|dll}.prf files have been removed.
All manifest logic is now in qmake's nmake makefile generator.

With QMAKE_MANIFEST one can specify a custom manifest file that gets
embedded without disturbing incremental linking.

Task-number: QTBUG-22718
Change-Id: Idb9d2644a0577b2002cbdd2d62b695b9171b1bd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQSlotObjectBase: re-enable tail-call optimisation in impl()
Marc Mutz [Wed, 15 Aug 2012 14:42:06 +0000 (16:42 +0200)]
QSlotObjectBase: re-enable tail-call optimisation in impl()

Two of the three operations in impl() return void, among them the
most common one, call(). Having impl() return bool prevents tail-
call optimisations for these.

Fix by passing the bool return value for Compare as an out-parameter.

Results in a nice decrease in text size
(GCC 4.8-pre -O2 -std=c++11, stripped):

   text    data     bss     dec     hex filename
 507343   13984      48  521375   7f49f tst_qobject (old)
 505551   13984      48  519583   7ed9f tst_qobject (new)

Reported-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I7538c5b3f0992970c089e44f07244e6b62794a1d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQSlotObjectBase: combat virtual function "bloat"
Marc Mutz [Fri, 10 Aug 2012 14:12:58 +0000 (16:12 +0200)]
QSlotObjectBase: combat virtual function "bloat"

In C++, the compiler creates extra functions and data for classes
with virtual functions. This can lead to "virtual function bloat":
  http://www.boost.org/doc/libs/1_47_0/doc/html/function/misc.html#id1382504

This is especially true when the number of instances is of the same
order of magnitute as the number of derived classes, such as is
common with type erasure techniques.

One such case is the QSlotObjectBase hierarchy, which this patch
tackles.

The mechanics of this optimisation are simple: re-implement the
virtual function call mechanism by hand, with function pointers.

But we go one step further and collapse the vtable into a single
pointer to a function that implements all three currently-defined
operations, swtching on an 'int which' argument. This even allows
us to extend this in a BC way, should that become necessary later,
by adding a new Operation and using the void** argument to
transport arguments, if any.

This approach was inspired by:
  Ulrich Drepper: How To Write Shared Libraries, Section 2.4.4
  http://www.akkadia.org/drepper/dsohowto.pdf

Also move the QSlotObjectBase hierarchy out of QObject so as not
to export all the derived classes.

This was pointed out in review by Thiago.

Results (Linux amd64, GCC 4.8-pre -O2 -std=c++11, stripped):

  size tst_qobject*

     text    data     bss     dec     hex filename
   523275   21192      48  544515   84f03 tst_qobject (old)
   507343   13984      48  521375   7f49f tst_qobject (new)

  relinfo.pl tst_qobject*

   (old) tst_qobject: 473 relocations, 0 relative (0%), 240 PLT entries, 240 for local syms (100%), 0 users
   (new) tst_qobject: 323 relocations, 0 relative (0%), 238 PLT entries, 238 for local syms (100%), 0 users

Change-Id: I40ad4744dde8c5c29ef62ed2d82d4b1ede178510
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAvoid an expensive call to toLocal8Bit upon thread creation
Thiago Macieira [Wed, 15 Aug 2012 16:03:50 +0000 (18:03 +0200)]
Avoid an expensive call to toLocal8Bit upon thread creation

QString::toLocal8Bit() will need to call QTextCodec::codecForLocale(),
which isn't the cheapest of the functions, at least the first time it's
run. So avoid calling it when in most scenarios, the name of the QObject
isn't set, and the information is purely for debugging.

Additionally, avoid allocating memory when setting the thread name to
the class name. The class name coming from the meta object is a static
constant string and we can use it directly.

Change-Id: Ief643bad87a51487b1d41c0a2f323e80bb53e8a7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoRemove trailing comma in enum
Thiago Macieira [Tue, 14 Aug 2012 11:15:14 +0000 (13:15 +0200)]
Remove trailing comma in enum

Spotted by ICC:
qfreelist_p.h(127): warning #271: trailing comma is nonstandard
          BlockCount = 4,
                        ^

Change-Id: Ib64d1d19ca0514e7582a295da48cbf6705aa8c44
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoQUrl is not necessary for configure.exe, drop it from the .pro
Thiago Macieira [Wed, 15 Aug 2012 14:40:30 +0000 (16:40 +0200)]
QUrl is not necessary for configure.exe, drop it from the .pro

qurl.cpp was removed from the Makefiles on 6ab6b0fc1c594a589d96d17b5ab7,
but I missed the .pro file. You're not supposed to use the .pro file
anyway, it's just for opening in Creator.

But if you forget to remove the qmake build step, it would get compiled.

Change-Id: Ia52ae7349e195df58f76f8d2c5f8b46adfdc7454
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoSilence a false-positive warning about uninitialised variable with ICC
Thiago Macieira [Tue, 14 Aug 2012 11:29:24 +0000 (13:29 +0200)]
Silence a false-positive warning about uninitialised variable with ICC

ICC complains like so:
harfbuzz-gpos.c(95): warning #592: variable "error" is used before its value is set
      return error;
             ^

However, line 95 is never executed because the condition on line 94 is
always false. That's why it's a false positive. The same construct
happens in the other two places.

Still, silence the warning.

Change-Id: I168d916d6837d4ac346facfd22b3e5b4e22ef7f0
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
12 years agoMade eglfs work with backing store based applications again.
Samuel Rødal [Wed, 15 Aug 2012 10:18:35 +0000 (12:18 +0200)]
Made eglfs work with backing store based applications again.

Make sure we pick the same config for the context and window surface,
and do not create unnecessary window surfaces for the desktop widget.

Change-Id: I3c8fb3df9ab8a658196e41dfa1705cfca625a2d7
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
12 years agoDocumentation for QWidgetItem::controlTypes.
Frederik Gladhorn [Wed, 15 Aug 2012 11:13:33 +0000 (13:13 +0200)]
Documentation for QWidgetItem::controlTypes.

Change-Id: I673b884ac8513714d733411729a7418c19f05682
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
12 years agoUpdate docs.
Frederik Gladhorn [Wed, 15 Aug 2012 11:13:01 +0000 (13:13 +0200)]
Update docs.

Change-Id: I7bd1f1efe2d6ce3aee8cb7454f43cfef2979f525
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove docs for removed enum values.
Frederik Gladhorn [Wed, 15 Aug 2012 11:03:20 +0000 (13:03 +0200)]
Remove docs for removed enum values.

Change-Id: I225ea48606d60894a851c1dd620983b7a65d234d
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoMove docs for QSessionManager to the right file.
Frederik Gladhorn [Wed, 15 Aug 2012 10:56:14 +0000 (12:56 +0200)]
Move docs for QSessionManager to the right file.

Change-Id: Ia3735ac14fe91de8cfbb58fc68f1a37f04d7b668
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoRemove outdated docs.
Frederik Gladhorn [Wed, 15 Aug 2012 09:56:32 +0000 (11:56 +0200)]
Remove outdated docs.

Change-Id: Ic878226c3b627b445ac45f56497a6a4ae77b2d38
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoRemove deprecated docs for QActionGroup.
Frederik Gladhorn [Wed, 15 Aug 2012 09:51:30 +0000 (11:51 +0200)]
Remove deprecated docs for QActionGroup.

Change-Id: If086395d3e1d151324df3cc1c59152715cb4af40
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoAdd parameter docs for QAbstractEventDispatcher::filterNativeEvent.
Frederik Gladhorn [Wed, 15 Aug 2012 09:45:57 +0000 (11:45 +0200)]
Add parameter docs for QAbstractEventDispatcher::filterNativeEvent.

Change-Id: If028d2560d7bb18c9dd3e0f5fa6677c42fbf7d4b
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
12 years agoDisable CPUID checking with GCC 4.2 or older
Thiago Macieira [Tue, 14 Aug 2012 12:07:31 +0000 (14:07 +0200)]
Disable CPUID checking with GCC 4.2 or older

This is not the first time that GCC 4.2 on Mac has produced bad code
surrounding the CPUID instruction (see also commit 81d1f79a7f4b0f67d71).
So declare it broken beyond repair and don't run the instruction at all.

Instead, initialise the set of features found to be exactly that which
we detected at compile-time. For that reason, we can also disable the
runtime checking of the processor (minFeatures == detected features).

At the time of this commit, only the draw helpers and one QImage
helper make use of the runtime detection. Since the detection now
switches to compile-time, QtGui will start carrying dead code for GCC
4.2 and earlier: it will never run the SSE2/SSSE3 code on 32-bit
builds. (GCC 4.2 does not support AVX, so that code won't be built)

Note: all Clang versions report that they are GCC 4.2, so we need to
exclude it from the test; ICC reports the same version as the system's
GCC.

Change-Id: I43f168a9480a2479c6444eea175782b2eadc2ab2
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix tst_qbytearray on QNX
Rafael Roquetto [Wed, 15 Aug 2012 10:04:35 +0000 (12:04 +0200)]
Fix tst_qbytearray on QNX

qUncompressCorruptedData() no longer hangs on QNX 650 and Blackberry OS
sytems.

Change-Id: Id131f9f1c6dcd358c152675c7e29ab937052c1d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoOnly emit headerDataChanged for valid proxy intervals.
Stephen Kelly [Wed, 8 Aug 2012 12:56:14 +0000 (14:56 +0200)]
Only emit headerDataChanged for valid proxy intervals.

Modeltest asserts before the patch, and passes afterward.

Task-number: QTBUG-26515

Change-Id: I08a89cd5c9c59613badcddbd056a3d0b8fbbca13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agotst_QUdpSocket: Remove unneeded ./ in application name printing
Marc Mutz [Wed, 15 Aug 2012 10:52:13 +0000 (12:52 +0200)]
tst_QUdpSocket: Remove unneeded ./ in application name printing

Reported-by: Shane Kearns <shane.kearns@accenture.com>
Change-Id: I12f2a23b98c3b0161a2961a9117c196cd7d72a6d
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoFix "might be used uninit'ed" warning
Marc Mutz [Wed, 15 Aug 2012 10:16:58 +0000 (12:16 +0200)]
Fix "might be used uninit'ed" warning

GCC 4.8 warns:

  main.cpp:165:60: warning: ‘type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                               app.arguments().at(3).toInt());
                                                            ^

Change-Id: Ib0f6847031437b588e14c6708fdddea5fd474b58
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoEmit the highlighted signal if the model changes.
Stephen Kelly [Mon, 13 Aug 2012 16:12:28 +0000 (18:12 +0200)]
Emit the highlighted signal if the model changes.

The bug is that the connection to emit that signal can be made
obsolete if the connection is made too early and the model is replaced.
In the bug report, the connection is made by calling view() early (thereby
causing the creation of a view and a QItemSelectionModel which operates on
the built-in QItemSelectionModel, and then connecting to that
QItemSelectionModel), and then when QComboBox::setModel() is called later
the built-in view creates a new QItemSelectionModel for it. The bug was
that that new QItemSelectionModel is not connected to. This patch fixes that
bug.

Task-number: QTBUG-4454
Change-Id: Ibbdb8731f16ab071008b4a19dc2cc7ae03cebc84
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix QMessageLogger and associated qdoc errors
Jeremy Katz [Mon, 6 Aug 2012 14:01:30 +0000 (16:01 +0200)]
Fix QMessageLogger and associated qdoc errors

Change-Id: I4b9555c8a15a698ef5ce270288c88a0aa88e0033
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoDoc: Fix broken return codes for a few examples
Geir Vattekar [Tue, 14 Aug 2012 13:38:53 +0000 (15:38 +0200)]
Doc: Fix broken return codes for a few examples

This reverts remnants of 79747d38987ce42adc510be0c5bb1565f55fd3d6.

Task-number: QTBUG-25571
Change-Id: I1dbf64cfcba889fb0c70ceaeeeffad8334a8aab1
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoAdd a module page for QtConcurrent
Lars Knoll [Tue, 14 Aug 2012 14:43:39 +0000 (16:43 +0200)]
Add a module page for QtConcurrent

Fix some foward references from QtCore in addition. This
will require more work.

Change-Id: Ib1bade18c2cc220a7afe25e9fca6a3f50cb1174b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoIgnore Q_DECL_NOEXCEPT in qdoc
Lars Knoll [Tue, 14 Aug 2012 15:26:52 +0000 (17:26 +0200)]
Ignore Q_DECL_NOEXCEPT in qdoc

This fixes a large bunch of qdoc errors in Qt Core.

Change-Id: Ie3c3cebc730081a0927a0998d8937d721719c1c6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoMark QCollator as internal.
Lars Knoll [Tue, 14 Aug 2012 15:05:30 +0000 (17:05 +0200)]
Mark QCollator as internal.

The class is private in 5.0, we'll publish it in 5.1

Change-Id: Ia7511db0393528aafa8c8059b4eb1657c8cdcc64
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix QPointer qdoc errors
Lars Knoll [Tue, 14 Aug 2012 15:03:51 +0000 (17:03 +0200)]
Fix QPointer qdoc errors

Change-Id: I54082a87f076aa511329cfb7a6ed6ecabcfb40f7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoMake the "\internal" qdoc command stand on its own line
Laszlo Papp [Wed, 15 Aug 2012 05:37:01 +0000 (06:37 +0100)]
Make the "\internal" qdoc command stand on its own line

The qdoc manual currently claims that the command must stand on its own line.

The change follows the consistency with the rest and how the example looks like
inside the qdoc manual for this command.

Change-Id: I6b653dc95cf9d84e4adf32220dace5d313678419
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix undo and redo in QLineEdit when in password mode
Jani Honkonen [Mon, 6 Aug 2012 10:18:48 +0000 (13:18 +0300)]
Fix undo and redo in QLineEdit when in password mode

There are some security issues with undo/redo. User should not be
able to get the erased password back in any situation. Therefore
redo must be disabled completely and undo is limited only for erasing
previously entered text.

Task-number: QTBUG-14226
Change-Id: I2b38aca84adbad1c14db76b56ad6303d56b35b4d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoMake selectAll() do nothing if the mode is NoSelection.
Stephen Kelly [Wed, 8 Aug 2012 13:50:31 +0000 (15:50 +0200)]
Make selectAll() do nothing if the mode is NoSelection.

Task-number: QTBUG-26687

Change-Id: Iaa0197efe64c61505e22e4a63a1f5c012af0bc78
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoset QT_PLUGIN_PATH for tools
Oswald Buddenhagen [Mon, 13 Aug 2012 15:01:38 +0000 (17:01 +0200)]
set QT_PLUGIN_PATH for tools

Change-Id: Ie76b25b605ab4271eff161ee9bfc4f54df640f4a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agomake .private_includes in module pri files "self-contained"
Oswald Buddenhagen [Mon, 13 Aug 2012 13:35:35 +0000 (15:35 +0200)]
make .private_includes in module pri files "self-contained"

this puts the whole logic of assembling those paths into qt_module.

Change-Id: Iafbe3969e3092e294bdb8243b2dffa7a899a7eb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoSpeed up construction of basic QVariants
Harald Fernengel [Tue, 14 Aug 2012 11:15:11 +0000 (13:15 +0200)]
Speed up construction of basic QVariants

Instead of first creating an initialized Private struct, then overwrite
the member variables, we added an internal constructor that
initializes the private struct sanely.

In the new (inlined, internal) constructor, both the MSB bits in the
bitfield are 0, and since the value of internal meta-type ID is so
low that the two MSB bits should never be set, the compiler can
(hopefully) optimize away the bit-fiddling initialization of the bit-field.

Callgrind shows about 33% speed-up in e.g. QVariant::QVariant(int)

Change-Id: I706773a71c0d8dcbe119ad15411578b81892deb5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agorevamp preparation of command line for qmake calls in makefiles
Oswald Buddenhagen [Thu, 9 Aug 2012 16:54:40 +0000 (18:54 +0200)]
revamp preparation of command line for qmake calls in makefiles

instead of re-assembling a list from the variables, take the original
command line minus some explicitly stripped out options. this is way
less code and poses no synchronization problem between the two parts.

as a "side effect", variables obtained from $QMAKEFLAGS won't multiply
with each makefile nesting level, as the generated command line won't
replicate data obtained from the environment.

Change-Id: I5d1ce0f11efb338f60405529f9818910103b1b0e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agomake command line parser use qt containers
Oswald Buddenhagen [Thu, 9 Aug 2012 16:45:48 +0000 (18:45 +0200)]
make command line parser use qt containers

way more legible code

Change-Id: I7ba5a66f1f0bc7ae78ba0537ef8e5c780506a149
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agotake parsing of qmake mode out of parseCommandLine()
Oswald Buddenhagen [Thu, 9 Aug 2012 14:13:56 +0000 (16:13 +0200)]
take parsing of qmake mode out of parseCommandLine()

it wouldn't do anything particularly useful when parsing QMAKEFLAGS, so
take it out of the common path.

Change-Id: I60f1215c4645707e1f99932dd19160e1d1c9d953
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agoremove rather pointless parameter from parseCommandLine()
Oswald Buddenhagen [Thu, 9 Aug 2012 14:13:07 +0000 (16:13 +0200)]
remove rather pointless parameter from parseCommandLine()

Change-Id: I97998555c41e8eab2438ac355950abf9dace24a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
12 years agorcc: use new qEnvironmentVariableIsEmpty()
Marc Mutz [Mon, 6 Aug 2012 22:19:59 +0000 (00:19 +0200)]
rcc: use new qEnvironmentVariableIsEmpty()

Change-Id: I48dd9b7b8dd51e1c662273eb37ac2e1f4c1c4d15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQtTestLib: use new qEnvironmentVariableIsEmpty()
Marc Mutz [Mon, 6 Aug 2012 22:18:45 +0000 (00:18 +0200)]
QtTestLib: use new qEnvironmentVariableIsEmpty()

Except where using the contents of the variable, in which case
collapse two calls to qgetenv() for the same variable into one
that stores the result in a temporary QByteArray and continues
working with that one instead.

Change-Id: I6c09a20ae946327ccb85e4833a60a373a8a07355
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQtGui: use new qEnvironmentVariableIsEmpty()
Marc Mutz [Mon, 6 Aug 2012 22:11:51 +0000 (00:11 +0200)]
QtGui: use new qEnvironmentVariableIsEmpty()

In particular, static bool showRasterOverlay is safer.

Change-Id: I9df6c9a9a56d2e61b13391b6889c0ac6e259e801
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQtDBus: use new qEnvironmentVariableIsEmpty()
Marc Mutz [Mon, 6 Aug 2012 22:11:00 +0000 (00:11 +0200)]
QtDBus: use new qEnvironmentVariableIsEmpty()

Change-Id: If983083cc7f360199716a060464344340c089236
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQtCore: use new qEnvironmentVariableIs{Set,Empty}()
Marc Mutz [Mon, 6 Aug 2012 22:10:11 +0000 (00:10 +0200)]
QtCore: use new qEnvironmentVariableIs{Set,Empty}()

In particular, qEmergencyOut() is now completely exception-free.

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,
except in exceptional circumstances, of course.

Change-Id: Ie106e7b430e1ab086c40c81cc1e56cd0e5400cb4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix warning about change of sign
Thiago Macieira [Tue, 14 Aug 2012 11:21:34 +0000 (13:21 +0200)]
Fix warning about change of sign

method_relative_ is unsigned, so we can't store a -1 in it.

qobject.cpp(434): warning #68: integer conversion resulted in a change of sign
        callFunction_(0), method_offset_(0), method_relative_(-1)
                                                              ^

Change-Id: If8bf3835590ef2c26b9ca5010d638aa84675ff62
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd some more of my 5.0.0 changes
Kent Hansen [Tue, 14 Aug 2012 08:58:49 +0000 (10:58 +0200)]
Add some more of my 5.0.0 changes

Change-Id: I606a11cb11d1559476eab6532db22f4bc81fed90
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoMerge L_FLAGS and l_FLAGS in configure
Thiago Macieira [Sat, 11 Aug 2012 19:55:20 +0000 (21:55 +0200)]
Merge L_FLAGS and l_FLAGS in configure

This is prompted by the fact that QMAKE_LIBDIR_FLAGS is no longer
honoured by qmake, so we need to use LIBS. It didn't make much sense
to have the flags separate anyway...

Change-Id: Iaec4d58f9dbac25755bbc3bad7550e03edb5332b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agointroduce compileTest function
Oswald Buddenhagen [Sun, 12 Aug 2012 08:14:59 +0000 (10:14 +0200)]
introduce compileTest function

this cuts down the enormous duplication of identical command line args
passed to compile.test.
this necessitates the addition of a -config parameter to compile.test,
as QMAKE_CONFIG needs to be extended in some cases.

Change-Id: I677b2fea4a407b9e4395e70a25e4e349efb0a946
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoDeprecate Qt::WFlags.
Stephen Kelly [Mon, 13 Aug 2012 09:01:57 +0000 (11:01 +0200)]
Deprecate Qt::WFlags.

It seems to date from the Qt 1 days, and such abbreviations
are not current Qt style.

Change-Id: Iea7259bd7ba78b2c0863e3f6675e10826712ffd9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years ago(QNX) Make it possible to set physical screen size
Andreas Holzammer [Thu, 9 Aug 2012 11:02:44 +0000 (13:02 +0200)]
(QNX) Make it possible to set physical screen size

It can happen that the system is reporting a screen
width or height of zero, if the system does not know the
size instead of returning an error. You can either
set a define QQNX_PHYSICAL_SCREEN_WIDTH/QQNX_PHYSICAL_SCREEN_HEIGHT
or set it as environment variable QQNX_PHYSICAL_SCREEN_SIZE.

The preference order is:
1) Take detected size
2) Take size from env var
3) Take defined size if any define is set

Change-Id: I493a2c8988a225224587a6c323efeb9e9b7b5a54
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agobuild: Fix the FreeBSD build due build system change.
Holger Hans Peter Freyther [Sat, 11 Aug 2012 20:28:25 +0000 (22:28 +0200)]
build: Fix the FreeBSD build due build system change.

Revision 6f4ff81380862ad0e788151b35d742f548241d5a broke the
QtDeclarative build. FreeBSD's ld.so is using the LD_LIBRARY_PATH
environment variable as well.

Change-Id: I0a91cedfb9d1935a08d348212f5ff1a54bfe3e53
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoGroup functions in QAccessibleTextInterface
Jan-Arve Saether [Wed, 8 Aug 2012 15:17:24 +0000 (17:17 +0200)]
Group functions in QAccessibleTextInterface

Do the same in QAccessibleTextWidget

I got a bit annoyed by this, should hopefully make life easier
when forward porting QPlainTextEdit

Change-Id: Ib4b90d1892974ea39ecfcbc5cad6ed0694207b58
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agotst_QToolBar: fix "might be used uninit'ed" warnings
Marc Mutz [Mon, 13 Aug 2012 20:36:54 +0000 (22:36 +0200)]
tst_QToolBar: fix "might be used uninit'ed" warnings

GCC 4.8 warns:

  src/testlib/qtestmouse.h:219:67: warning: ‘popupMenu’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     { mouseEvent(MouseClick, widget, button, stateKey, pos, delay); }
  tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp:862:12: note: ‘popupMenu’ was declared here

Change-Id: I19cfd1790fbd948e97bf740d4412ccf3bb98a330
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
12 years agoFix sockets for Windows CE
Andreas Holzammer [Mon, 13 Aug 2012 15:40:08 +0000 (17:40 +0200)]
Fix sockets for Windows CE

Version numbers for CE are higher then for the desktop,
so insert a check for this, as the api is not working as
for windows 7 and above.

Change-Id: I79baba9183e11c714cffd0bb43327c197043d6e0
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
12 years agoRemove relic QT_VERSION from qmake test
Rafael Roquetto [Mon, 13 Aug 2012 13:42:01 +0000 (15:42 +0200)]
Remove relic QT_VERSION from qmake test

Change-Id: Ic9095e3e924543d4f3e6d0f7c3a7b27f842cd300
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoTidy up QEvent::Type enums.
Mitch Curtis [Fri, 10 Aug 2012 07:44:28 +0000 (09:44 +0200)]
Tidy up QEvent::Type enums.

Corrected the list's ordering and added punctuation.

Change-Id: I36a477801cd0cfd3d36db308b4263982b582106b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoImplemented QAccessibleTextWidget
Jan-Arve Saether [Wed, 8 Aug 2012 14:06:33 +0000 (16:06 +0200)]
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>
12 years agoDocument QFile::open() argument "handleFlags"
Jeremy Katz [Thu, 9 Aug 2012 12:54:07 +0000 (14:54 +0200)]
Document QFile::open() argument "handleFlags"

Change-Id: I5ef909b21ddd4782062dd4ebd0ea7bca33f3387f
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoAdd Linux Accessibility Bridge
Frederik Gladhorn [Thu, 10 May 2012 21:52:05 +0000 (23:52 +0200)]
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>
12 years agoqsql_oci: use OCI_COMMIT_ON_SUCCESS for SELECT without transaction
Mark Brand [Tue, 17 Jul 2012 07:32:20 +0000 (09:32 +0200)]
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>
12 years agoFix declaration of qt_gettime for Q_DECL_NOTHROW
Thiago Macieira [Sun, 12 Aug 2012 10:38:39 +0000 (12:38 +0200)]
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>
12 years agofix some QElapsedTimer doc grammar issues
Jeremy Katz [Fri, 10 Aug 2012 12:10:09 +0000 (14:10 +0200)]
fix some QElapsedTimer doc grammar issues

Change-Id: I9bdb0b93b101119477a560b28396f88ea8103745
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse Qt::WindowFlags, not Qt::WFlags.
Stephen Kelly [Mon, 13 Aug 2012 08:45:37 +0000 (10:45 +0200)]
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>
12 years agoSync .pr[oi] with the Makefiles so qmake builds again
Marius Storm-Olsen [Thu, 26 Jul 2012 17:47:33 +0000 (12:47 -0500)]
Sync .pr[oi] with the Makefiles so qmake builds again

Change-Id: Ief766ac61f98859b84fc61b03b8c1292d3c06525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake QElapsedTimer always store nanoseconds in t2
Thiago Macieira [Fri, 10 Aug 2012 13:00:50 +0000 (15:00 +0200)]
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>
12 years agoFix a ### Qt5 issue: remove limits.h from qreadwritelock.h
Thiago Macieira [Sat, 11 Aug 2012 17:04:22 +0000 (19:04 +0200)]
Fix a ### Qt5 issue: remove limits.h from qreadwritelock.h

Change-Id: I1fc54561aabd1be693f179e668031ddb0f86a130
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSpeed up tst_QGraphicsView::mapToScene test
Thiago Macieira [Sun, 12 Aug 2012 22:24:27 +0000 (00:24 +0200)]
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>
12 years agoUse POSITION_INDEPENDENT_CODE for these tests.
Stephen Kelly [Fri, 10 Aug 2012 09:14:10 +0000 (11:14 +0200)]
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>
12 years agoAdd hints for where to find packages for projects expected to fail.
Stephen Kelly [Fri, 10 Aug 2012 09:13:02 +0000 (11:13 +0200)]
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>
12 years agoAdd the minimum CMake version to projects built standalone.
Stephen Kelly [Fri, 10 Aug 2012 09:12:15 +0000 (11:12 +0200)]
Add the minimum CMake version to projects built standalone.

Change-Id: If9d2a464d94faee0dccd77bc54946d91dd117db3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotst_qgraphicsview: increase test timeout further
Rohan McGovern [Mon, 13 Aug 2012 00:28:35 +0000 (10:28 +1000)]
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>
12 years agoQImage{Reader,Writer}: remove unused local typedef (GCC 4.8 warning)
Marc Mutz [Fri, 10 Aug 2012 22:03:24 +0000 (00:03 +0200)]
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>
12 years agoQModelIndex: remove user-defined copy operations
Marc Mutz [Fri, 24 Feb 2012 16:15:25 +0000 (17:15 +0100)]
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>
12 years agosupport -rpath for modules which are not installed to QT_INSTALL_PREFIX
Oswald Buddenhagen [Thu, 9 Aug 2012 13:02:44 +0000 (15:02 +0200)]
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>
12 years agofix -rpath-link handling for non-installed prefix builds
Oswald Buddenhagen [Wed, 8 Aug 2012 19:38:35 +0000 (21:38 +0200)]
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>
12 years agoFix order of namespace/include guards.
Frederik Gladhorn [Fri, 10 Aug 2012 16:33:07 +0000 (18:33 +0200)]
Fix order of namespace/include guards.

Change-Id: I9ed1e82c90e38a65c15bb9d05ff789270218d4b5
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoqtAddModule(): put search paths directly into LIBS{,_PRIVATE}
Oswald Buddenhagen [Wed, 8 Aug 2012 07:56:39 +0000 (09:56 +0200)]
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>
12 years agoassemble the complete tool commands already in qt_tool.prf
Oswald Buddenhagen [Wed, 8 Aug 2012 09:33:26 +0000 (11:33 +0200)]
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>
12 years agofix error message about bad qt modules
Oswald Buddenhagen [Wed, 8 Aug 2012 09:25:54 +0000 (11:25 +0200)]
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>
12 years agoFix vcproj file generation for incredibuild handling of moc etc targets
Andy Shaw [Fri, 10 Aug 2012 12:54:32 +0000 (14:54 +0200)]
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>
12 years agoMake rowIntersectsSelection take account of the parent argument.
Stephen Kelly [Fri, 10 Aug 2012 16:30:19 +0000 (18:30 +0200)]
Make rowIntersectsSelection take account of the parent argument.

Task-number: QTBUG-22370

Change-Id: I497194793eab624b760deea93dac0df767850330
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoQtWidgets: use new qEnvironmentVariableIs{Empty,Set}()
Marc Mutz [Mon, 6 Aug 2012 22:14:45 +0000 (00:14 +0200)]
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>
12 years agoTake scroll position into account when painting drag pixmap.
Stephen Kelly [Thu, 9 Aug 2012 12:49:38 +0000 (14:49 +0200)]
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>
12 years agoRevert "Added default argument for color profile to QImage constructors."
Alexandros Dermenakis [Thu, 2 Aug 2012 10:51:13 +0000 (12:51 +0200)]
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>
12 years agomake currentText the USER property for QComboBox
Mark Brand [Wed, 18 Jul 2012 20:02:43 +0000 (22:02 +0200)]
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>
12 years agoRequire CMake 2.8.9 for the qt5_use_modules function.
Stephen Kelly [Thu, 2 Aug 2012 08:07:19 +0000 (10:07 +0200)]
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>
12 years agoDoc: Added a Qt Network landing page.
Jerome Pasion [Fri, 3 Aug 2012 15:39:21 +0000 (17:39 +0200)]
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>
12 years agoUse an include guard for qelapsedtimer.h that matches the file name
Thiago Macieira [Fri, 10 Aug 2012 09:55:50 +0000 (11:55 +0200)]
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>
12 years agoUse Q_LIKELY instead of doing an #ifdef for GCC
Thiago Macieira [Fri, 10 Aug 2012 09:51:42 +0000 (11:51 +0200)]
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>