profile/ivi/qtbase.git
11 years agoCocoa: fix memory leaks
Teemu Katajisto [Mon, 22 Oct 2012 11:55:00 +0000 (14:55 +0300)]
Cocoa: fix memory leaks

Change-Id: I2e805aa64c65b90d33924ea4a8671735dee581fd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoFix inconsistent leave/enter events for main window when popup is open
Miikka Heikkinen [Thu, 1 Nov 2012 09:28:16 +0000 (11:28 +0200)]
Fix inconsistent leave/enter events for main window when popup is open

Changed the platform leave event handling logic in QWidgetWindow to
match platform leave event handling logic in Qt4, where last mouse
receiver is used as leave target only if last mouse receiver wasn't
a native window itself. In that case it is assumed to get leave event
of its own when relevant.

Task-number: QTBUG-27639
Change-Id: Id6edcd29754a15c959f18ab38b20d66e5d446510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
11 years agoMac: remove some unused code in QFontDialog
Liang Qi [Tue, 30 Oct 2012 12:46:50 +0000 (13:46 +0100)]
Mac: remove some unused code in QFontDialog

Those code was warpped by Q_WS_MAC and should be part of QPA already.

Change-Id: I48b751aad0509b50ccf9e82778c962ed80a2a9f9
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoAllow connect to functors with less parameters than the signal
Olivier Goffart [Sat, 3 Nov 2012 17:17:59 +0000 (18:17 +0100)]
Allow connect to functors with less parameters than the signal

Before, the functor slot (or lambda expression) had to have the same amount
of arguments as the signal.
This shown to be a big problem to be able to connect to signals that had
a QPrivateSlot.

This implementation use the type of the operator() of the functor to
know how many arguments we have.
As a bonus, we also can check the arguments in a static assert.

The test comes from https://codereview.qt-project.org/#change,38703
But this patch also works without variadic template

If the compiler does not support decltype, we workaround the lack of it
by using another level of indirection.

Change-Id: I9850b43e8caf77356a2ec3f4c0b0ed532d96029e
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoDon't include qaccessible.h on QT_NO_ACCESSIBILITY
Kevin Funk [Tue, 6 Nov 2012 06:25:43 +0000 (07:25 +0100)]
Don't include qaccessible.h on QT_NO_ACCESSIBILITY

Change-Id: I1da4036c211172a72b73440648f4ff9ede761a69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoSend QContexMenuEvent when Context Menu key is pressed.
Friedemann Kleint [Fri, 2 Nov 2012 10:59:14 +0000 (11:59 +0100)]
Send QContexMenuEvent when Context Menu key is pressed.

Bring back code from keymapper_x11.cpp.

Task-number: QTBUG-27648
Change-Id: I2a189a0537bcd2ae0eb093576c84814b2f09933b
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoImprove Direct X SDK detection in configure.exe
Friedemann Kleint [Fri, 2 Nov 2012 09:41:22 +0000 (10:41 +0100)]
Improve Direct X SDK detection in configure.exe

Check presence of Direct X SDK depending on
compiler version.

Check for presence of the headers d3dcompile.h and
intrin.h (SSE2) as well as d3d9.lib and the shader
compiler since the header d3dcompile.h is
also present in MinGW.

Change-Id: I7ee9701f4f9dc175ed2d733db79dda46de4d69f1
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoDynamically resolve functions of dwmapi.dll.
Friedemann Kleint [Tue, 6 Nov 2012 08:25:13 +0000 (09:25 +0100)]
Dynamically resolve functions of dwmapi.dll.

The library is not present on Windows XP, for which /DELAYLOAD
is used in ANGLE. However, as this causes problems with MinGW,
use dynamic resolution.

Task-number: QTBUG-27741
Change-Id: Ie4a2706d57b751fbb6fc6f3e76ef2e8ddac3b892
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
11 years agoQGtkStyle: GTK3 compatible combo boxes
J-P Nurmi [Tue, 6 Nov 2012 15:03:45 +0000 (16:03 +0100)]
QGtkStyle: GTK3 compatible combo boxes

Use gtk_combo_box_new_with_entry when gtk_combo_box_entry_new is not
available. The latter was deprecated since 2.24 and is no longer
available in GTK3.

Notice that gtk_combo_box_new_with_entry returns a GtkComboBox, whereas
the old gtk_combo_box_entry_new returned a GtkComboBoxEntry.

Change-Id: I4aa3c528c6e04967ed783fce72036acb6063445b
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoQGtkStyle: GTK3 compatible type checking
J-P Nurmi [Tue, 6 Nov 2012 13:04:21 +0000 (14:04 +0100)]
QGtkStyle: GTK3 compatible type checking

- GtkType -> GType
- GTK_CHECK_TYPE -> G_TYPE_CHECK_INSTANCE_TYPE

Both are deprecated aliases in GTK2 and do not exist in GTK3.

Change-Id: If2dc4ba09451cabb6730f8b23e15db7554a9f829
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoQGtkStyle: handle focus & default widgets in GTK3 compatible way
J-P Nurmi [Wed, 10 Oct 2012 16:39:51 +0000 (18:39 +0200)]
QGtkStyle: handle focus & default widgets in GTK3 compatible way

Change-Id: Ib4409c15599953a6626738543b27d14d711e7109
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoMake test class name consistent with file name.
Frederik Gladhorn [Sun, 28 Oct 2012 09:36:58 +0000 (10:36 +0100)]
Make test class name consistent with file name.

Change-Id: I2b0e7068d7476673981c7c7f03012db8eabc8ee2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoDe-inline some destructors in QtWidgets
Marc Mutz [Mon, 22 Oct 2012 06:30:32 +0000 (08:30 +0200)]
De-inline some destructors in QtWidgets

Destructors should be out-of-line so that the compiler doesn't generate
one per translation unit.

Apart from creating more work for the compiler, it can also lead to
duplicated vtables if the dtor is the first virtual function
(reimplementation), and all other virtuals are inline, too.
Duplicate vtables then break RTTI.

In addition, having virtual dtors de-inlined allows us to add code
to them in a BC way.

As a final argument, this change may lead to less code app-side, since
a sequence of cross-DLL calls (to member variable dtors) is replaced
by a single cross-DLL call to the new out-of-line dtor.

Change-Id: Ifb8c4aa992c75d61ba9ac8de5ab41d1e96b0a0b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoFix native RGB text on OpenGL ES 2 without BGRA extension
Eskil Abrahamsen Blomfeldt [Tue, 6 Nov 2012 11:22:39 +0000 (12:22 +0100)]
Fix native RGB text on OpenGL ES 2 without BGRA extension

Angle, for instance, which is now the default on Windows,
does not support the GL_BGRA_EXT format as input for
glTexSubImage2D(). In the case where it's not detected, we
therefore need to flip the bytes in the input.

Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoFix connection to const slots (or from const signals)
Olivier Goffart [Thu, 12 Jan 2012 19:46:15 +0000 (20:46 +0100)]
Fix connection to const slots (or from const signals)

Pointer to const member function have a different signature, and hence
need their own traits code.

Change-Id: Ie4b2434a412f412444fb07ef1388a37cab105ecd
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoAdd OOM unit test for QVarLengthArray
Peter Kümmel [Wed, 10 Oct 2012 18:08:10 +0000 (20:08 +0200)]
Add OOM unit test for QVarLengthArray

Change-Id: Idf22ee6747aca8f0322e68b71f2c32e9ea562d4c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
11 years agoFix QAccessible to build when QT_NO_ACCESSIBILITY is defined
J-P Nurmi [Fri, 2 Nov 2012 16:13:32 +0000 (17:13 +0100)]
Fix QAccessible to build when QT_NO_ACCESSIBILITY is defined

Change-Id: I6104633cdc80425b8f4697acd28c9a156cd0d76f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoQGtkPainter: use gtk_widget_get_style()
J-P Nurmi [Mon, 5 Nov 2012 14:47:21 +0000 (15:47 +0100)]
QGtkPainter: use gtk_widget_get_style()

Do not access GtkWidget::style directly, it doesn't exist in GTK3.

Change-Id: I1ee4ad5ca0894c9277219fc2a70f5f1c69ec632f
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoAccessibility: clean up and simplify test
Frederik Gladhorn [Fri, 19 Oct 2012 17:32:13 +0000 (19:32 +0200)]
Accessibility: clean up and simplify test

We don't need to define pi.
Use some clearer names in navigateHierarchy.
Use smart pointers.

Change-Id: I482efe9235a3419f048baede6886d29d46e3057c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoAccessibility: clean up test
Frederik Gladhorn [Fri, 19 Oct 2012 17:11:40 +0000 (19:11 +0200)]
Accessibility: clean up test

Use smart pointers.
Navigation to siblings is long gone.

Change-Id: I81a10633960eefb9738990682734dcfbdd65330c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoconfigure: Fix key prompt handling.
Friedemann Kleint [Thu, 1 Nov 2012 11:53:24 +0000 (12:53 +0100)]
configure: Fix key prompt handling.

- Introduce function for key prompt for usage in
  verifyConfiguration() and showLicense().
- Prompt only once in  verifyConfiguration().

Change-Id: I7028da1bda703a424e39477bd06b2639475739a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoconfigure: Use forward slashes in findFile-functions consistently.
Friedemann Kleint [Mon, 5 Nov 2012 14:21:52 +0000 (15:21 +0100)]
configure: Use forward slashes in findFile-functions consistently.

Convert to native where required.

Change-Id: I11ff99ff9921bc470ebd804944e3b0773d49387c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoImprove path search in configure.
Friedemann Kleint [Thu, 1 Nov 2012 13:31:16 +0000 (14:31 +0100)]
Improve path search in configure.

- Remove duplicated code locateFile/locateFileInPaths.
- Move basic path search functionality to Environment.
- Add functions for headerPaths/libraryPaths to  Environment.
- Use QStandardPaths::findExecutable().
- Replace Environment::detectExecutable by
  QStandardPaths::findExecutable().
- Introduce static path lists in findFile() to avoid
  repeated directory scans

Change-Id: I9b93066a3de65f40527780d6ddf7989bca35cd04
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoFix hellowindow example generating excess timers
Miikka Heikkinen [Mon, 5 Nov 2012 11:51:54 +0000 (13:51 +0200)]
Fix hellowindow example generating excess timers

The example was creating a new timer on every expose event, which
quickly leads into massive excess of timeout signals.

Fixed by only creating one timer.

Task-number: QTBUG-27836
Change-Id: Ia6ed1bd9575e296f4c6c5b12509095e4d5c016dd
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoFix GDI leaks in fontengine
Miikka Heikkinen [Mon, 5 Nov 2012 11:00:34 +0000 (13:00 +0200)]
Fix GDI leaks in fontengine

GDI objects that are created need to be deleted once no longer needed,
instead of just released.

Task-number: QTBUG-27812
Task-number: QTBUG-27825
Change-Id: I53b04b54cea9e2aaa8fc72365c215f516c5682e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoFix "-no-opengl" configuration in Windows
Miikka Heikkinen [Mon, 5 Nov 2012 09:48:07 +0000 (11:48 +0200)]
Fix "-no-opengl" configuration in Windows

"-no-opengl" didn't clear the default value for "OPENGL_ES_2", which
meant "opengles2" got configured in.

Task-number: QTBUG-27840
Change-Id: Id7b8e3e268571d820bebfb3700d3961ec96be7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoQWindowsVistaStyle: Restore altered brush origin.
Friedemann Kleint [Mon, 5 Nov 2012 09:31:52 +0000 (10:31 +0100)]
QWindowsVistaStyle: Restore altered brush origin.

The line to restore it was missing, and the leftover variable
caused a warning, which was removed in
abe5a0a432116963d22c4ef501a4dfd2393d66fb .

Task-number: QTBUG-27828

Change-Id: I00b8b89b07bec38a1660c3a9c61220b6d0d7eb48
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
11 years agoQtWidgets: add some explicit
Marc Mutz [Mon, 22 Oct 2012 06:24:53 +0000 (08:24 +0200)]
QtWidgets: add some explicit

Change-Id: I0650db3d47b506c67074c526ab9857f8159fd599
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoDoc fixes.
Frederik Gladhorn [Thu, 20 Sep 2012 15:51:53 +0000 (17:51 +0200)]
Doc fixes.

Change-Id: Id2042c33a9762261756d1065781005dfef341797
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
11 years agoImplement editable text interface for QLineEdit.
Frederik Gladhorn [Thu, 18 Oct 2012 14:59:08 +0000 (16:59 +0200)]
Implement editable text interface for QLineEdit.

This was uncovered by the linux accessibility test which
tried to call non-existing functions.

Change-Id: Iaa9640c23ee77d7c5b2321d7f8cfa6d12d61c0e9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
11 years agoQTscii and QIscii are not big codecs
Peter Kümmel [Tue, 23 Oct 2012 07:03:15 +0000 (09:03 +0200)]
QTscii and QIscii are not big codecs

This fixes the build when QT_NO_BIG_CODECS is defined.

Change-Id: I832fb8ba5df6c4a6c1db9bdaecc498690357a56a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agotest: Remove some QSKIP's from tst_QStyle
Sergio Ahumada [Sun, 21 Oct 2012 19:49:43 +0000 (21:49 +0200)]
test: Remove some QSKIP's from tst_QStyle

Change-Id: Ic277889a75871a8bf72ab2eb2b97e6deeed498e9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
11 years agoFix conditional jump based on an uninitialized variable.
Jędrzej Nowacki [Fri, 2 Nov 2012 12:59:04 +0000 (13:59 +0100)]
Fix conditional jump based on an uninitialized variable.

Valgrind warns about the jump in qfontconfigdatabase.cpp:522 based on
uint QFondDef::hintingPreference:2 property. Surprising thing is that
the property is initialized in the default constructor, so there should
not be an issue.

The warning disappear if the property is _not_ placed on a boundary of a
two words, or if bit field is fully initialized. So I suspect that only
one bit of the two was initialized properly.

I decide to implement both solutions because of a potential minor
performance improvement, during reading the property.

I still fail to say why the value was uninitialized, I believe that this
patch simply workarounds gcc bug or valgrind bug.

Change-Id: I2e87738f66a435ef6e30b3d2db6baa73da025426
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
11 years agoImprove QByteDataBuffer::read() performance with partial reads
Antti Harju [Wed, 24 Oct 2012 07:56:46 +0000 (10:56 +0300)]
Improve QByteDataBuffer::read() performance with partial reads

Add a read position variable to eliminate excessive memcpy'ing when
reading a partial buffer.

Specifically, fix performance issue of reading large files from
QNetworkDiskCache in QtWebKit2.

Task-number: QTBUG-27522
Change-Id: I21edc909bf9223971b2c3db5f1fa6b89c5b61c5f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Antti Harju <antti.harju@ixonos.com>
11 years agoAngle: Make it call the correct host tools
Yuchen Deng [Sun, 28 Oct 2012 09:53:51 +0000 (17:53 +0800)]
Angle: Make it call the correct host tools

Change-Id: Ib5a0da0ac50e0d2abebc825d6d6105ad5d84acd8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jason Barron <jason.barron@digia.com>
11 years agoMake QGLWidget::paintGL() call glClear().
Morten Johan Sorvig [Tue, 23 Oct 2012 09:31:48 +0000 (11:31 +0200)]
Make QGLWidget::paintGL() call glClear().

Creating and displaying a plain QGLWidget on Mac would
display "garbage" or previous frame buffer content
on screen. This looks broken and raises interesting
privacy concerns.

Fix by adding a call to glClear().

Change-Id: I507c24275e41fac0be5f518c5a70d151099ae6b8
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoCocoa: make text subpixel rendering check to work for non-Apple displays
Teemu Katajisto [Mon, 29 Oct 2012 10:54:17 +0000 (12:54 +0200)]
Cocoa: make text subpixel rendering check to work for non-Apple displays

Task-number: QTBUG-27386

Change-Id: I4e12663f80060dfcea6970a705861af388d816ac
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoQIdentityProxyModel: fix sibling() reimplementation
Mark Brand [Fri, 2 Nov 2012 20:49:44 +0000 (21:49 +0100)]
QIdentityProxyModel: fix sibling() reimplementation

The previously missing mapFromSource() sets the proxy model in the
returned index. Otherwise, the returned index refers incorrectly to
the source model.

Follow-up to 9dfba89c28bbff3316cb7aed6c07f90c0f2d5a22.

Change-Id: I78ab9183820909b646a7333f28aa5ec7266fa675
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoUpdate mac-specific code in qtestlib for Qt5
Liang Qi [Mon, 9 Jul 2012 11:00:45 +0000 (13:00 +0200)]
Update mac-specific code in qtestlib for Qt5

1. Remove the code for activate application, due to Qt 5 already
has this feature
2. Update the code for power setting

Task-number: QTBUG-23267

Change-Id: Id257c2e10e8e750a4b68cd2995c2ac4b70f8910c
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
11 years agoQt 5.0 QTreeView. Prevent manual moving of the first section
Thorbjørn Lund Martsum [Tue, 30 Oct 2012 14:25:02 +0000 (15:25 +0100)]
Qt 5.0 QTreeView. Prevent manual moving of the first section

This prevents the user of moving the leftmost column.

There will be no API to allow move of the tree-structure.
It is very weird to do that, so it shouldn't be a problem.

In case it is a big problem somewhere it can be hacked with:
QTableView unused;
unused.setVerticalHeader(tree->header());
tree->header()->setParent(tree);
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));

Task-number: QTBUG-332

Change-Id: I3a251c8d0fd472ec0ad7edb20a7f3e00af7e0da8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoMac: refactor scrollbar animations
J-P Nurmi [Tue, 30 Oct 2012 12:47:20 +0000 (13:47 +0100)]
Mac: refactor scrollbar animations

Get rid of QWidget-centric QMacStyle::eventFilter() and implement the
fade out animations for scrollbars using QNumberStyleAnimation-based
QFadeOutAnimation.

Change-Id: I2000fa50d46b153e981ceafc12a53932a196382e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoMake it possible to use mini and small size on mac without widget
Jens Bache-Wiig [Fri, 2 Nov 2012 17:35:15 +0000 (18:35 +0100)]
Make it possible to use mini and small size on mac without widget

We need to add the styleoption when evaluating the small and
mini size hints.

Change-Id: I00f8709912aa2202caef4dbdeaebb5d67cc9a9b4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agoReview of documentation.
Michele Caini [Tue, 23 Oct 2012 20:39:35 +0000 (22:39 +0200)]
Review of documentation.

Documentation has been updated, changes apply to Qt5 as well as Qt4.

Change-Id: I13241a3b4c16d2cb1b24f80fe26832467621923a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
11 years agoMake it obvious that adding a QLayout to QSplitter is not supported.
Mitch Curtis [Fri, 2 Nov 2012 16:19:59 +0000 (17:19 +0100)]
Make it obvious that adding a QLayout to QSplitter is not supported.

It does not make sense to add a QLayout to a QSplitter, since the
splitter manages its child widgets in the same manner as a QLayout.
The result of doing so is that the child widgets inside that layout
will lead to the splitter and the layout fighting to position the child
widgets.

QSplitter::addWidget should be used to add widgets directly to the
splitter instead.

Change-Id: I640b463cae8673f87354d28636bff4dd3cfb9679
Reviewed-by: Samu Voutilainen <samu.voutilainen@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoxcb: Fix a trivial reply leak
Uli Schlachter [Thu, 1 Nov 2012 18:25:55 +0000 (19:25 +0100)]
xcb: Fix a trivial reply leak

Change-Id: Ib9a0f96007e6dc5e125bfcd39bd1ef09baebae3b
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoxcb: Fix a colormap leak
Uli Schlachter [Thu, 1 Nov 2012 18:22:18 +0000 (19:22 +0100)]
xcb: Fix a colormap leak

The function createDummyWindow() allocated a colormap, but never freed
it. Freeing it is safe after the window is created.

Change-Id: I4c876568572c9e1e9dde7047850a51917ef3702f
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoXCB: Handle connection errors
Uli Schlachter [Thu, 1 Nov 2012 17:40:37 +0000 (18:40 +0100)]
XCB: Handle connection errors

When the XCB connection breaks, all following XCB function calls will fail and
function calls that are currently in progress will return. This means that
xcb_wait_for_event() will return NULL and thus the QXcbEventReader thread will
exit.

This patch uses the above behavior to make sure that processXcbEvents() will be
called. The error handling should always be done before normal event processing,
because all XCB calls will fail once the connection is in an error state. This
is especially unexpected for xcb_get_setup() which suddenly returns a NULL
pointer.

Task-number: QTBUG-27686

Change-Id: Ie3e4058f9d92bcbfc45934a8b36d9a7254e2b4bb
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoQTranslator: Use resource memory instead of copying it
Thomas McGuire [Mon, 29 Oct 2012 16:14:07 +0000 (17:14 +0100)]
QTranslator: Use resource memory instead of copying it

Previously, translations in resource files were loaded through
QFile and the data was copied. Now, simply use the resource memory
in-place.

Change-Id: I55a06c1e7bb15c169cc69b908b3021136beac9d2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoFix progressbar animation on macstyle
Jens Bache-Wiig [Fri, 2 Nov 2012 13:18:54 +0000 (14:18 +0100)]
Fix progressbar animation on macstyle

The animation is not just supposed to run when indeterminate, but
also while it is progressing.

Change-Id: If176bd230c2f6f83781e01ea77526c24d54c8477
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agodon't return false from removeTranslator() just because of shutting down
Oswald Buddenhagen [Thu, 1 Nov 2012 16:50:44 +0000 (17:50 +0100)]
don't return false from removeTranslator() just because of shutting down

the condition is supposed to suppress the event emission, not to trash
the return value.

Change-Id: I3e327ceedb909ac29ba975c49b0f039b50eb4ee1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agodo not add DEPENDPATH to VPATH
Oswald Buddenhagen [Thu, 1 Nov 2012 13:50:03 +0000 (14:50 +0100)]
do not add DEPENDPATH to VPATH

DEPENDPATH merely says where to look for impliciit dependencies, not
where to find explicit ones.

fwiw, the other way round may be considered correct, but DEPENDPATH
exists for the sole purpose of limiting which paths should cause
recompilations, so it would be counterproductive to extend with with
VPATH.

Task-number: QTBUG-11912
Change-Id: I86450b5fd5aeb1f1b015b53f0adcd167ff4ce04d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agodon't unset TARGET_VERSION_EXT
Oswald Buddenhagen [Thu, 1 Nov 2012 13:41:49 +0000 (14:41 +0100)]
don't unset TARGET_VERSION_EXT

otherwise we may remove a user-provided setting.

Change-Id: If3217a3d92938fe2f3ac3740a645d3ace0ce9ab0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoFix height of combobox in macstyle without a widget
Jens Bache-Wiig [Fri, 2 Nov 2012 13:27:09 +0000 (14:27 +0100)]
Fix height of combobox in macstyle without a widget

When no widget is provided we hardcode the height and the value
was off by 2. There is no change when a widget is provided.

Change-Id: I555b5206b8750db06595a1e2572a3f8212635a9d
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
11 years agofix cleanup of QWinIoCompletionPort
Joerg Bornemann [Thu, 1 Nov 2012 13:57:27 +0000 (14:57 +0100)]
fix cleanup of QWinIoCompletionPort

The QWinIoCompletionPort thread was never properly cleaned up.
Maintain a reference count for QWinIoCompletionPort and create/destroy
it on demand.

Change-Id: I607b574484554dd3ad107dfb43b0a248bcf8b7a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agomove QT_NAMESPACE define to qtcore's module pri file
Oswald Buddenhagen [Thu, 1 Nov 2012 13:23:41 +0000 (14:23 +0100)]
move QT_NAMESPACE define to qtcore's module pri file

it's basically an attribute of qtcore (and everything that depends on it).

Change-Id: I6eeefeb5df70764399d9f22dca9dbec1843b8d68
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agolet winmain just use qtcore
Oswald Buddenhagen [Thu, 1 Nov 2012 13:23:47 +0000 (14:23 +0100)]
let winmain just use qtcore

this is correct dependency-wise (anything which links to this needs to
link qtcore), and just cleaner.

Change-Id: I2c49d16fc8a0ee8bc55a3c165993fd1c4e313dab
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agomove invariant CONFIG flags out of the configures
Oswald Buddenhagen [Tue, 23 Oct 2012 19:06:08 +0000 (21:06 +0200)]
move invariant CONFIG flags out of the configures

we now have qt_build_config.prf which can contain static code.

Change-Id: I3f0ae142fdc5ffb4e1d25e628e809ba15b5f0ac4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoremove pointless messing with CONFIG+=fix_output_dirs
Oswald Buddenhagen [Tue, 23 Oct 2012 18:52:09 +0000 (20:52 +0200)]
remove pointless messing with CONFIG+=fix_output_dirs

the function is automatically performed by debug_and_release.prf,
regardless what we do with this flag.

Change-Id: Iddec69b35e0e905fdf4133ee240af37d3a8ada0b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoQNX: Fix build with QNX SDP 6.5.
Sergio Martins [Fri, 2 Nov 2012 11:48:49 +0000 (11:48 +0000)]
QNX: Fix build with QNX SDP 6.5.

__EXT_LF64SRC isn't defined in this case.

This also makes it consistent with mkspecs/common/posix/qplatformdefs.h
which uses QT_USE_XOPEN_LFS_EXTENSIONS and QT_LARGEFILE_SUPPORT
to decide which type of stat struct to declare.

Change-Id: Iaa155acc270783901376b543fdeffb5263294754
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
11 years agoBlackberry: Fix QCoreApplication::applicationFilePath() performance.
Sergio Martins [Thu, 25 Oct 2012 16:50:47 +0000 (17:50 +0100)]
Blackberry: Fix QCoreApplication::applicationFilePath() performance.

Listing all files with QDir is slow.
Instead, use argv[0] for zygotized apps and _cmdname() for
non-zygotized.

Apps run through the terminal will fall in the zygotized case,
which is ok.

Note about zygotized apps:
  Zygotized apps don't have an executable, they live in a shared
  object file.

  These apps are run through a deamon that forks and dlopens()
  the shared object ( for performance reasons ).

  For this reason we can't use _cmdname(), since it just contains
  the the file path of the daemon.

  On the other hand, non-zygotized apps have a bogus argv[0]
  when run through the navigator ( command line is fine ).

Change-Id: I9953e8fa05c9fb11c33b3a38ebab00fe33ba4c44
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
11 years agoQHeaderView 5.0 - correct drop on manual QHeaderView sectionmove
Thorbjørn Lund Martsum [Thu, 1 Nov 2012 15:33:25 +0000 (16:33 +0100)]
QHeaderView 5.0 - correct drop on manual QHeaderView sectionmove

This fixes an error in the calculation of the exact drop position
when an user is moving a section in QHeaderView.

Before we compared a mouse-position local to the widget
(pos) with a summed length of sections (posThreshold).

However we need to consider/substract the headers offset to make
the posThreshold comparable to the local mouse position.

This solves e.g.
Task-number: QTBUG-14814

Change-Id: If0281cf0c7b98316474f18e8eaa32c6d062dda56
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoQHeaderView - call invalidateCachedSizeHint() on clear
Thorbjørn Lund Martsum [Thu, 1 Nov 2012 06:29:12 +0000 (07:29 +0100)]
QHeaderView - call invalidateCachedSizeHint() on clear

This calls invalidateCachedSizeHint on clear, which is a logical
thing to do.

Task-number: QTBUG-22528
Change-Id: I0befb2d492599fa8a05b1c2162bbca586e1b019d
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agoAdd implementations of QAIM::sibling in public APIs.
Stephen Kelly [Wed, 26 Sep 2012 16:16:08 +0000 (18:16 +0200)]
Add implementations of QAIM::sibling in public APIs.

Change-Id: I2248641f2ed8735c28bd9572470520995a4a5b62
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agospeed up tst_QLocalSocket::readBufferOverflow
Joerg Bornemann [Fri, 2 Nov 2012 11:25:58 +0000 (12:25 +0100)]
speed up tst_QLocalSocket::readBufferOverflow

Ifdef out waitForBytesWritten on Windows.
See comment in source.

Change-Id: I7a2268d2634c2524cd8291c72dd9708e430e314e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoCocoa: Fix fonts on retina displays.
Morten Johan Sørvig [Fri, 2 Nov 2012 08:03:21 +0000 (09:03 +0100)]
Cocoa: Fix fonts on retina displays.

Hardcode logical dpi to 72 again. NSDeviceResolution
gives us the physical dpi (144) and results in double-
sized fonts in Qt. QPlatformScreen does not currently
have a physicalDpi virtual, perhaps this can be added
later on.

Unfortunately the usefulness of a per-screen correct
DPI metric seems questionable to me:
1) The value returned by the system is not correct,
   pixels per inch on the rMBP is around 220.
2) Qt always uses the dpi for the main screen, via
   qt_defaltDpiX/Y.

Change-Id: Ia35804be62ee7f1c623bad854f65d744dc9075d4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
11 years agoQWindowsVistaAnimation: inherit QBlendStyleAnimation
J-P Nurmi [Tue, 23 Oct 2012 14:39:57 +0000 (16:39 +0200)]
QWindowsVistaAnimation: inherit QBlendStyleAnimation

Change-Id: I15b348eb842730513480ecbb90bca87174d7c771
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoIntroduce QBlendStyleAnimation (based on QWindowsVistaAnimation)
J-P Nurmi [Wed, 17 Oct 2012 14:41:42 +0000 (16:41 +0200)]
Introduce QBlendStyleAnimation (based on QWindowsVistaAnimation)

Change-Id: Ie289debe69ea7f6bb7833f979e39bb91290cc49c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoCocoa: Disable malfunctioning updateScreens().
Morten Johan Sørvig [Fri, 2 Nov 2012 14:21:19 +0000 (15:21 +0100)]
Cocoa: Disable malfunctioning updateScreens().

The current updateScreens() implementations deletes
QScreens and creates new ones. Deleting a QScreen hides
all its windows. The result is that Qt windows disappears
when applicationDidChangeScreenParameters is called.

Change-Id: I5870d025d2bbf36621817cb220a835d1a6b367dc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
11 years agospecify MODULE to avoid module .pri filename clash
Mark Brand [Fri, 2 Nov 2012 00:36:31 +0000 (01:36 +0100)]
specify MODULE to avoid module .pri filename clash

Since 733ac1f6e6b3155a594376ef99288c6117124000 the default MODULE
is the base of the .pro file for the plugin (i.e., "windows"). Since
MODULE becomes the base of the module .pri, the names of the module
.pri files can clash. Now we explicitly specify MODULE for
printersupport plugins to avoid overwriting the module .pri files of
the platform plugins whose .pro files have the same names.

Follow-up to 81f8f0db5cb75e29b041a011ca4e7dbbf2d903c5 which renamed the
TARGET.

Change-Id: Ie83892dc419257e1df3b81bcf6ecec751ae345b0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoFix font and positioning of headerview labels on mac
Jens Bache-Wiig [Fri, 2 Nov 2012 12:28:57 +0000 (13:28 +0100)]
Fix font and positioning of headerview labels on mac

The old code rendered text too large. On desktop components,
the widget workaround ensured that text was clipped.

This should address both problems. Since we anyway do not
adapt the height to font size, I dont se a point in
supporting custom fonts here.

Change-Id: If3c0509cdff4dbadfd98bd4b1934eaa665148cbf
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
11 years agoFix submenu navigation.
Friedemann Kleint [Tue, 30 Oct 2012 10:26:40 +0000 (11:26 +0100)]
Fix submenu navigation.

Bring back code that was removed
in Qt 4: 60324267fbb8a8554e62aaf9ef01360709292320 for QTBUG-7411 .

This code reselects the submenu action of a currently opened
popup when the mouse is moved to the submenu crossing other
actions. In addition, make sure it only triggers when
the reason is not keyboard selection.

Task-number: QTBUG-20094
Change-Id: Ibb73f83e86635083aad8b1e79fc0fdd512c65754
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoAllow QStandardPaths (Mac, Windows, Unix) to be bootstrapped
Thiago Macieira [Fri, 26 Oct 2012 20:13:03 +0000 (13:13 -0700)]
Allow QStandardPaths (Mac, Windows, Unix) to be bootstrapped

This allows using QStandardPaths in one of the bootstrapped tools, if
required for a future need.

The Blackberry version appears to be usable in bootstrapped mode
already.

Change-Id: Ia4e9b9564395d2e151f8ac229ac2a2aa2982e92f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoAdded MultipleWindows platform capability.
Samuel Rødal [Wed, 31 Oct 2012 11:32:31 +0000 (12:32 +0100)]
Added MultipleWindows platform capability.

Several platform plugins, like eglfs, kms, etc don't support multiple
windows as there's no system compositor, they're rendering directly to
a single back buffer. By adding a platform capability we'll be able to
provide better error reporting when an application tries to create
multiple QWindows on a single-window platform. Also, QML apps can use
this capability to figure out whether they should create a QWindow for
dialogs / popups / menus, or whether to just create items in the same
scene, that are shown on top of the rest of the content.

Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
11 years agoExclude ANGLE headers from syncqt-checks.
Friedemann Kleint [Wed, 24 Oct 2012 15:15:06 +0000 (17:15 +0200)]
Exclude ANGLE headers from syncqt-checks.

Change-Id: I08797e1cdfc2d79b0292f4d8077847496c4bac62
Reviewed-by: Jason Barron <jason.barron@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agoQFileDialog: Do not pass on file model root to QFileDialogOptions.
Friedemann Kleint [Fri, 26 Oct 2012 13:03:00 +0000 (15:03 +0200)]
QFileDialog: Do not pass on file model root to QFileDialogOptions.

QFileDialog::selectedFiles() defaults to file model root
for 'AnyFile', which confuses native dialogs since
selectedFiles == directory in that case. Split up
QFileDialog::selectedFiles() and skip the default when
initializing QFileDialogOptions for native dialogs.

Change-Id: I65cda182df8b1748159058fc361c10d97f5650ce
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
11 years agofix error handling bug in QWindowsPipeReader
Joerg Bornemann [Thu, 1 Nov 2012 11:14:09 +0000 (12:14 +0100)]
fix error handling bug in QWindowsPipeReader

If ReadFile returns with an error then we must set our internal state
accordingly. QWindowsPipeReader::readSequenceStarted must be set to
false. If ReadFile fails, we're not within a read sequence.
Also, we must handle the ERROR_BROKEN_PIPE error.

Task-number: QTBUG-25342

Change-Id: Ic9247f170fa9cc47fa7e45d0f47ccfedac06a593
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agofix tst_QProcess::batFiles for shadow builds
Joerg Bornemann [Tue, 30 Oct 2012 10:37:39 +0000 (11:37 +0100)]
fix tst_QProcess::batFiles for shadow builds

Change-Id: If7a9c9aa6ba16b7744d8ef8a66b43e40f375b5e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoUse fusion instead of motif.
Frederik Gladhorn [Fri, 26 Oct 2012 08:58:21 +0000 (10:58 +0200)]
Use fusion instead of motif.

Change-Id: Ic75ea959ac825efabf0f3a8606dfca4b65fae474
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoFix the gregorian date <-> julian day calculations in QDate
Jon Severinsson [Mon, 8 Oct 2012 04:46:28 +0000 (06:46 +0200)]
Fix the gregorian date <-> julian day calculations in QDate

The old code is just plain wrong for negative julian days. Replaced
with plain math from The Calendar FAQ [1], which is correct for all
julian days, provided you use mathematical integer division (round to
negative infinity) rather than c++11 integer division (round to zero).

[1] http://www.tondering.dk/claus/cal/julperiod.php

While the conversion code works for up to around JD +/- (2^63/4), we
only use an int for the year in the API, so this patch limits minJd()
and maxJd() to 1 Jan (2^31) BC and 31 Dec (2^31-1) AD, respectively.

Note that while the new conversion code looks like it would be more
expensive than the old, gcc will in fact be able to optimize it to be
slightly faster (probably because x86 hardware implements round to
negative infinity, and so GCC manages to optimize floordiv to a single
instruction, compared to the three instuctions needed for operator/).

In the following test application, run with a release mode Qt and
redirecting stderr to /dev/null, I measured an improvement from
6.81s +/- 0.08s to 6.26s +/- 0.16s user time over five runs on an
otherwise idle x86_64 system.

int main(int, char *[])
{
    int year, month, day;
    qint64 jd;
    for (qint64 i = Q_INT64_C(-1048576) ; i < Q_INT64_C(1048576); ++i) {
        QDate::fromJulianDay(i).getDate(&year, &month, &day);
        jd = QDate(year, month, day).toJulianDay();
        qDebug() << jd << year << month << day;
    }
}

Change-Id: Ifd0dd01f0027f260401f7f9b4f1201d2b7a3b087
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
11 years agoIntroduced QWindow properties {min/max}imum{Width/Height}
Samuel Rødal [Thu, 1 Nov 2012 16:03:45 +0000 (17:03 +0100)]
Introduced QWindow properties {min/max}imum{Width/Height}

These are useful when QWindow is exposed to QML.

Change-Id: I7ec49ef365183e2c784605889e8ea22c2ef34781
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agoUpdate QDateTime serialisation docs and increase version number.
Mitch Curtis [Tue, 23 Oct 2012 13:06:11 +0000 (15:06 +0200)]
Update QDateTime serialisation docs and increase version number.

Refer to Qt::TimeSpec instead of listing potential values (which are
incomplete).

Also, the current QDataStream version number is now 13.

Change-Id: I9a68385977dc2fe4dacee75330cb539850478480
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
11 years agoImprove QDateTime test coverage.
Mitch Curtis [Fri, 19 Oct 2012 10:01:03 +0000 (12:01 +0200)]
Improve QDateTime test coverage.

Change-Id: Ic521d9d2ffb1b8e3b14d9cebdeb3dc7a5e08580e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
11 years agoRemove a couple of unused variables.
Miikka Heikkinen [Tue, 30 Oct 2012 14:27:48 +0000 (16:27 +0200)]
Remove a couple of unused variables.

Change-Id: I33528cdb27801317d311d39e4499d2db6a291377
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
11 years agoExpose IAccessibleTable2 to non-conformant screen readers
Jan Arve Saether [Thu, 1 Nov 2012 13:32:46 +0000 (14:32 +0100)]
Expose IAccessibleTable2 to non-conformant screen readers

This seems to be the established practice.

Change-Id: I75a65d722a026ab0eb1805688743f46aba406e6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
11 years agoCompile cocoa with QT_NO_ACCESSIBILITY
Jan Arve Saether [Thu, 1 Nov 2012 14:07:16 +0000 (15:07 +0100)]
Compile cocoa with QT_NO_ACCESSIBILITY

Change-Id: I82b5dbf1bce94bd928eee207992c0036edc527ad
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
11 years agoXCB: Use screen's client leader as fallback for transient parent.
Friedemann Kleint [Wed, 31 Oct 2012 13:23:26 +0000 (14:23 +0100)]
XCB: Use screen's client leader as fallback for transient parent.

Modal dialogs that do not have a QWidget parent may be hidden
by their parent unless they actually have a transient parent.

Task-number: QTBUG-27786
Change-Id: I7847df3517e5ba6e8d77a2a18c905e908a3cd2f4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
11 years agoSSL certificate printing: Fix auto test for OpenSSL 1.0.1 version.
Janne Anttila [Tue, 30 Oct 2012 13:28:17 +0000 (15:28 +0200)]
SSL certificate printing: Fix auto test for OpenSSL 1.0.1 version.

Different OpenSSL versions  produce slightly different output when
dumping a certificate.

Change-Id: Ida98b24422302e287641be074d6740ca292cf203
Reviewed-by: Richard J. Moore <rich@kde.org>
11 years agoFix warnings when using QImage as QtConcurrent::mapped return type
Liang Qi [Wed, 31 Oct 2012 09:05:46 +0000 (10:05 +0100)]
Fix warnings when using QImage as QtConcurrent::mapped return type

Task-number: QTBUG-27391

Change-Id: I68b37ffa645be21d4d23b205bc052540b9aba7f4
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao@abecasis.name>
11 years agoMac: Add support for WindowMasks platform capability
Gabriel de Dietrich [Wed, 24 Oct 2012 14:09:52 +0000 (16:09 +0200)]
Mac: Add support for WindowMasks platform capability

Also brings back a working QWidgetPrivate::setMask_sys().

Change-Id: Idde9eea15d28bb0299258df81322a5a3ff0b9493
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
11 years agolet static plugins have "module" pri files
Oswald Buddenhagen [Wed, 24 Oct 2012 13:02:08 +0000 (15:02 +0200)]
let static plugins have "module" pri files

... and use them in qt.prf instead of (not) maintaining hand-coded lists.

Change-Id: Ia21f7864eaf3ca92fa75f23876f71075d0521f4b
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
11 years agodisambiguate plugin name vs. windows platform plugin
Oswald Buddenhagen [Tue, 30 Oct 2012 09:15:20 +0000 (10:15 +0100)]
disambiguate plugin name vs. windows platform plugin

static plugin linking needs unique names.
also, non-unique names are generally somewhat counterproductive.

Change-Id: Idffba2b442b98dd2b0917f9f0af89f0694a99196
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
11 years agoImprove / fix QRegularExpression* docs
Giuseppe D'Angelo [Wed, 24 Oct 2012 15:46:58 +0000 (17:46 +0200)]
Improve / fix QRegularExpression* docs

Fixed a couple of typos; also, wrapped the snippets in a main() function,
so that now the snippet file can be compiled
(and therefore the compiler can help us at detecting those typos).

Change-Id: Ie182a9c4cb451db13a6f4bfa5eaed66bc6966c8f
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
11 years agomove remaining configure'd CONFIG flags to qmodule.pri
Oswald Buddenhagen [Tue, 23 Oct 2012 18:45:18 +0000 (20:45 +0200)]
move remaining configure'd CONFIG flags to qmodule.pri

so they are uniformly available to all modules.

Change-Id: I734f703c5923c42cb26f1456ed960cecc01c4b41
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agoUse the new QMAKE_XSPEC to get the mkspec.
Stephen Kelly [Mon, 29 Oct 2012 14:16:51 +0000 (15:16 +0100)]
Use the new QMAKE_XSPEC to get the mkspec.

Change-Id: I7f307ffe0954464f68192f9f3781bdb206f87809
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
11 years agorewrite default spec handling
Oswald Buddenhagen [Mon, 29 Oct 2012 11:43:43 +0000 (12:43 +0100)]
rewrite default spec handling

instead of symlinking (on unix) or creating a forwarding spec (on
windows), just put the default specs into (the bootstrapped)
QLibraryInfo.

Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
11 years agopurge dead defines
Oswald Buddenhagen [Mon, 29 Oct 2012 18:59:48 +0000 (19:59 +0100)]
purge dead defines

Change-Id: I8770416a19fb0951c0096cedf3f36c3493437903
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoremove pointless indirections
Oswald Buddenhagen [Mon, 29 Oct 2012 17:32:04 +0000 (18:32 +0100)]
remove pointless indirections

Change-Id: I2bf6d9a0352dea75f8fd596859ca7939685c9cec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agouse .qmake.conf instead of sync.profile as "anchor"
Oswald Buddenhagen [Mon, 29 Oct 2012 10:22:17 +0000 (11:22 +0100)]
use .qmake.conf instead of sync.profile as "anchor"

this is less expensive, as qmake already provides us with it.

Change-Id: Ifb44ea9126e6b52c02025858c5d88032e7a6cc2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agobeef up qt_plugin.prf
Oswald Buddenhagen [Wed, 24 Oct 2012 12:00:12 +0000 (14:00 +0200)]
beef up qt_plugin.prf

it now defines the DESTDIR and creates an INSTALLS rule.

Change-Id: I15a462ccad9acbe3521c352fa98327825dc27c05
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
11 years agoSome Vista style cleanup
Jens Bache-Wiig [Thu, 25 Oct 2012 14:16:14 +0000 (16:16 +0200)]
Some Vista style cleanup

Creates a function for cloning the style options
used by Vista style.

Change-Id: I4d83661acd6bdfff5c633447046a206018b537af
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>