Commit Graph

9371 Commits

Author SHA1 Message Date
Gabriel de Dietrich
c904860669 Cocoa: Port QCocoaTheme::fileIconPixmap() to Cocoa
Task-number: QTBUG-30907
Change-Id: Ie460db63413ab9c8e0fb5fb85af907e1c7f12759
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-30 19:23:05 +02:00
Thiago Macieira
08ac38a6e3 Make QLocalePrivate POD
QSharedDataPointer does not actually need a class derived from
QSharedData. All it needs is a member called "ref".

Change-Id: I2f7fe4cc143478ef7ef64681eada16e2d4c2e63a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-30 17:21:21 +02:00
Thiago Macieira
50ab31a5df QLocalePrivate: remove QLocalePrivate::m_index
It's not used anywhere, so we don't need to cache the locale data
index. We already have the pointer to the QLocaleData anyway.

This saves us a few roundtrips calculating the index from the data
pointer only to get the data pointer again.

Change-Id: I6905d20a382ddcb9fb04cc886a17499b467f905a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-30 17:21:21 +02:00
Thiago Macieira
600c538cd6 Move the code that creates QLocalePrivate to separate functions
Direct benefit is that the code between the two QLocale constructors
taking language, country and (maybe) scripts is merged.

This will also allow us to cache the QLocale::c() result.

Change-Id: Ia46c5a37764dc287bfcd3a52a022ac413c53a582
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-30 17:21:21 +02:00
Paul Olav Tvete
6c719079ec Android: don't crash on exit
We have to call DetachCurrentThread() for each time we call
AttachCurrentThread(). Fortunately we have this convenience
class that we prepared earlier.

Task-number: QTBUG-30847

Change-Id: I5ffb94b336d3787a3bae197bab22b91770d58848
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-30 17:21:21 +02:00
Paul Olav Tvete
8d1b8b97ac Don't block back button after keyboard is hidden
The back button would be non-responsive for 5 seconds after
hiding the software keyboard. This is a minimal change that
does not look into why we need to have a 5 second delay in
the first place.

Task-number: QTBUG-30752

Change-Id: Ied514b77650cea7accc37a03efef2ce861090f65
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-30 17:21:21 +02:00
Frederik Gladhorn
c56372e379 Clarify documentation for QKeyEvent::text
Change-Id: I4b455a512b2e678b6127ea488b456c68eb80cdbc
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 15:11:23 +02:00
Tor Arne Vestbø
299154bd65 iOS: Simplify context format setup
Change-Id: I6a6a025410298cecd5f62abd08388a7379359af7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-30 12:45:30 +02:00
Gabriel de Dietrich
5e652bbcbc Mac style: Fix text offset within 'small' combobox
Change-Id: I2bde1c71e0e79a6d8ef2897acc053357b12dc00c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-30 12:45:30 +02:00
Gabriel de Dietrich
16413d8bd1 Mac style: Update appearance of 'button with menu'
Most of the logic was still following the 10.6 UI guidelines, and had
not yet been upgraded to the 10.7 new button look. We tried to keep
10.6 compatibility were possible, and improve 'small' and 'mini' Aqua
sizes support.

Change-Id: I64139f24cccd095e9349b27a987395210b55c586
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-30 12:45:30 +02:00
Martin Smith
08be36c176 qdoc: Config class uses current path for each path var
The Config class is further modified to make
use of the current directory information it
stores with each configuration variable.

Task-number: QTBUG-30725
Change-Id: I34c845e6c05d7868266324f1d54e56f94d709f95
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 12:45:30 +02:00
Martin Smith
a2892ad1d7 qdoc: Config class keeps track of current path
The Config class is modified to build a single
multimap containing a record for each variable
found in each .qdocconf file. Each reacord
contains not only the name and value of the
variable, but also its location in the qdocconf
file it was read from and the path to that file.
This single multimap replaces 3 maps in the
Config class.

Task-number: QTBUG-30725
Change-Id: I049a69790f943b24c014a24b55b2b39725a1b56f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 12:45:30 +02:00
Shawn Rutledge
542e3be40d don't customize dialog buttons if GTK version is too old
gtk_dialog_get_widget_for_response was introduced in GTK 2.20

Task-number: QTBUG-30610
Change-Id: I30510f132c1d81c5d44863b3efddbc5e50771362
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-30 12:45:30 +02:00
Shawn Rutledge
124da0f5e6 Fix possible segfault when setting up window's transient parent
tp->handle() can be null.

Task-number: QTBUG-30919
Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-04-30 12:45:30 +02:00
Caroline Chao
dc5a579a16 QPlainTextEdit: add missing feature zoom on Ctrl+Wheel
When the control is read only. This is documented but not implemented.

Add functions to zoomIn and zoomOut.

Task-number: QTBUG-30845

Change-Id: I692b5f8cc5791498d34d35ea3dafa18b6e5d3e65
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-30 12:45:30 +02:00
Caroline Chao
7375c06328 Doc: Zooming inside QTextEdit
One can zoom in/out text inside a QTextEdit when the widget is
read-only or when using the zoomIn/zoomOut functions.

Zooming inside a HTML document only works if the font-style is not set
to a fixed size inside the document though. Adding this information
to the documentation.

Change-Id: I66a62da53827e1ce3241ba16b91e86926b97c297
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-30 09:40:40 +02:00
Sze Howe Koh
bf9ae9018e Doc: Give C++ class lists consistent titles
The majority format is "<Qt Module> C++ Classes" (see
http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html)

Also, fix a broken link (Qt Network C++ Classes)

"<Qt Module> C++ API" is perhaps the more correct format, but that's
part of a much bigger cleanup: QTBUG-30556

Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-29 19:01:48 +02:00
Tor Arne Vestbø
62eb4d7f3d iOS: Don't resize backing store twice in beginPaint()
The first call to resize() was a left-over from before we had retina-support.

Change-Id: I637e8d40f443f81fe7cfc367650bb28b917da2bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-29 16:56:58 +02:00
Eskil Abrahamsen Blomfeldt
d59e9af592 Make sure window is updated on resize event
After 475d1ed4f6a21686828fbd018542b469a8b2dbcd in qtdeclarative,
orientation changes on Android were broken, because the resize
event no longer implicitly causes an expose event. So we need
to post both when doing the resize.

Task-number: QTBUG-30909
Change-Id: I87c8c38e14d96a03b3409ef6439c3ac6ef432005
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-29 14:50:49 +02:00
Holger Hans Peter Freyther
694559a201 uclibc/pcre: Fix the linking of libQtCore for mips/uclibc
The mips/uclibc features.h of the toolchain used by a former key
account of PSO is defining both __USE_XOPEN2K and __USE_BSD this
will lead to POSIX_MADV_* and MADV_* being defined while only the
symbols for madvise are present. Change the order to make it link.

Change-Id: If324b978d72ad2b37b8cd624562e81503c9465d4
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-04-29 14:50:49 +02:00
Olivier Goffart
529b648ece Fix possible race in QMutex
As described in the QTBUG-30872, there may be a race condition involving
3 threads fighting for a mutex.  I am surprised it was not caught
before despite all the Q_ASSERT and the stress test in tst_qmutex.

We do not need to call store(0) because the unlocking thread will
eventually remove the BigNumber flag. And perhaps it even did it
already, and another thread has incremented waiters (hence the Q_ASSERT
is wrong)

Here is a paste of part of the description from the bug report:

---
many threads, one of them is ready to release mutex, while at least two other trying to acquire it
d->waiters is 0
Thread 1 release mutex in unlockInternal:

   if (d->waiters.fetchAndAddRelease(-QMutexPrivate::BigNumber) == 0)

d->waiters is now -QMutexPrivate::BigNumber
Thread 2 try to acquire mutex in lockInternal:

   old_waiters = d->waiters.load();
   if (old_waiters == -QMutexPrivate::BigNumber) {
   if (d_ptr.testAndSetAcquire(d, dummyLocked())) {

It acquire 'about to release mutex' by changing d to dummyLocked
Thread 1 continue release procedure:

   d->derefWaiters(0);

d->waiters is now back to 0
Thread 3 try to acquire mutex in lockInternal:

    while (!d->waiters.testAndSetRelaxed(old_waiters, old_waiters + 1));

d->waiters is now 1
Thread 2 continue its dummy lock:

    d->waiters.store(0);

d->waiters is force to 0

Thread 3 continue wait procedure
but it realize that mutex was already unlocked so decrease back waiters

   if (d != d_ptr.loadAcquire()) {
   if (old_waiters != QMutexPrivate::BigNumber) {
   d->waiters.deref();

d->waiters became negative value of -1
Neither thread need internal data so it is released back to pool
The waiters counter in released internal structure is still -1
---

Change-Id: I1b22555db764482775db6e64a8c9ffa9e1ab0cf6
Task-number: QTBUG-30872
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-29 11:15:35 +02:00
Gatis Paeglis
7f943968ad Fix QKeySequence matching
QKeySequence failed to find a match in the shortcut table when QKeyEvent
contained Qt::GroupSwitchModifier modifier. It's not a part of the shortcut,
it simply shifts character group in a keyboard mapping table.

Task-number: QTBUG-26302
Change-Id: Id91cd4999777f7085068e9dba5cb22b40653e23d
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-29 08:56:09 +02:00
Samuel Rødal
a298216bb4 Prevent crash due to giving QWidget::update() a large rect.
We can simply clip the update rect against the widget's rect and return
if it's empty. Otherwise we risk ending up with update rects that are
larger than INT_MAX due to multiple update rects being merged.

Task-number: QTBUG-30876
Change-Id: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-29 08:09:24 +02:00
Kai Koehne
3d42f6fed2 QFlags: Remove text promising 64 bit enums for 5.1
Change-Id: I34173abd693cb124beb8feec5e0cee1f7842725e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-28 10:33:20 +02:00
Jan Arve Saether
c29cbfa858 Get rid of this hack where QAccessible inherits from QObject.
This was added just so that moc could pick up the enums and so that
we could use the enums in Q_PROPERTY declarations, which was needed for
accessibility in QML. It turns out that Q_GADGET is enough for us.

This is a strictly a binary compatible change.
However, QAccessible was marked internal in 5.0, so we are free to
change it. In addition, this class is static and cannot be instantiated.

Change-Id: I27e2e97c5f4b45c38678264c6b593a4383db8d3e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-26 23:27:18 +02:00
Paul Olav Tvete
53ac80c50c Android: fix crash on exit
QTouchDevice is already automatically deleted at shutdown.

Task-number: QTBUG-30847
Change-Id: Id6a407083efed849a34ccb1caa315204fc5a5891
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-26 21:19:23 +02:00
Richard Moe Gustavsen
f46a732a4f iOS: remove setMouse/keyboardGrabEnabled warning
Setting mouseGrabEnabled means that the window should continue
to receive mouse events even when the mouse is not over the
application. This is not an issue on iOS, but the warning is
still annoying.

Change-Id: I0dd7c3828bcb1a51a4eae534aca1da5bfa258f03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Richard Moe Gustavsen
08f0b5dbc4 iOS: stack true popup windows ontop of tool windows
The current implementation would never hit the Qt::Tool case, since
a tool is also a Qt::Popup. This patch fixes that by making the
logic more explicit.

Change-Id: I0e6898081a18289e1007c8a168b374740915b3ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Richard Moe Gustavsen
ff9b3fcf69 iOS: add convenience functions for getting window type
Change-Id: I971df06dd348d1da68578e04076a02e85866e141
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Jørgen Lind
fca94fa5ed Add QXcbWindowEventListener
This makes it possible to listen for events on xcb_window_t which are
not platformwindows inside the xcb plugin

Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-26 14:18:16 +02:00
Jørgen Lind
7288625c52 Moving logic from Qt4 for grabbing the X server
Basically you don't want to grab the X server while your debugging.
Also added an environment variable which lets you force to not grab
the X server

Change-Id: Iba03f11c8f486ce71c55fac7716bffcb7cc8cb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-26 14:18:16 +02:00
Morten Johan Sørvig
f8e2a8469f Don't crash on null QCoocaMenuItem.
Change-Id: Ia70f616983141134afe874b69a5957e31f6f5ed9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 14:18:16 +02:00
Josh Faust
c90d9b697f Fix ignoring close events on OSX
QNSWindowDelegate was not handling windowShouldClose, which is how you
can tell Cocoa that your window should not close if the close button is
pressed. This change moves the close handling from windowWillClose to
windowShouldClose, and adds an optional "accepted" pointer to
QWindowSystemInterface::handleCloseEvent so that QNSWindowDelegate can
return a true/false value for whether the window should actually close

Task-number: QTBUG-28965
Change-Id: I67c6296ad42cbeeb71413e05411467d4e558adb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-26 14:18:16 +02:00
Topi Reinio
e12d384d7b Doc: Fix module name in .qdocconf
Use CamelCase for module name(s) used in in .qdocconf - this is
required as qdoc will generate visible output (tags in example
manifest files) based on these names.

Change-Id: Ie246e740203ee0b996fea5dee612bf7f61638991
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-26 14:18:16 +02:00
Topi Reinio
e80a8fe861 qdoc: Adjust regexp that generates tags from module names
Use a slightly better regular expression for splitting module names
into tags used for example manifest files.

This will correctly split words with consecutive capital letters
(e.g. QtDBus)

Change-Id: I1320e08a1fbd44f718b82a1fcfea19eabca035fc
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-26 14:18:16 +02:00
Shawn Rutledge
9f1b64766b Don't use the SubWindow flag for windows embedded in foreign windows
Instead, add QCocoaWindow::setEmbeddedInForeignView which can be called
via QPlatformNativeInterface::NativeResourceForIntegrationFunction

Task-number: QTBUG-30805
Change-Id: I05861e80ca664ddb430216388cf0fec573a4d32b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-26 12:08:24 +02:00
Morten Johan Sørvig
2e69015d74 Increase the loopLevel when activating menu items.
Apply 0293aff5c44202e5c62e229b74d8bd0bf9206185
from Qt 4.

Without this, calls to deleteLater() may create delete
later events with a loopLevel of 1. Those events will
not be processed until QApplication::exec() returns.

Add a QScopedLoopLevelCounter that increases the loopLevel
for the duration of the activated() call.

Task-number: QTBUG-30660

Change-Id: I7ab3bb3a53243691b8f7f64e025150e5cc7da2c8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 12:08:24 +02:00
Frederik Gladhorn
4ca105b9bb Fix shortcut override for menus
Since we use native Cocoa menus, we cannot rely on the
normal shortcut handling. Shortcuts can be overridden by
the currently focused object in Qt.
In order to make that possible we need to send a
QShortcutOverride event before accepting any key event.

For menus the key event goes from the NSApp directly to
the menu, so the shortcutOverride would not work.

This is mostly an adaptation of the Qt 4 code.

Task-number: QTBUG-30695

Change-Id: Icb4979309d2d6f9606eb9c8abc4130dc79926593
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 09:42:34 +02:00
Andy Shaw
89e2319322 Don't do any transitions if the widget is disabled
On Windows 8 it would end up changing the look of the QLineEdit when the
mouse hovered over it even though it was not enabled. None of the
Windows platforms show the lineedit changing when hovered over if it is
disabled so we can skip the whole thing.

Task-number: QTBUG-29224

Change-Id: Ib9495bf395477f114e91b744e1b1209c9e11f336
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-25 19:59:16 +02:00
Andy Shaw
b06b519759 Respect the hotspot when creating the cursor in Cocoa
The hotspot was not taken from the QCursor so if one was set then it
was reset to 0x0.

Change-Id: Ie81f1c2ac15a16f10436738367e612c44dc42d38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 19:59:16 +02:00
Friedemann Kleint
3860848674 Windows: Update transient parent in show().
Similar to XCB.

Task-number: QTBUG-30707

Change-Id: I6dd7aa370891a46aa5a2243528692180d8366486
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
220b2b92b6 Cocoa: Improve text heuristic menu item syncing logic
Don't try anything after the original syncing, particularly after
changing the menu item's text. Also, don't try anything if the menu
item cannot be linked up to a menubar (see QTBUG-30756). This latter
point requires extra syncing after adding a menu in the menubar.

Finally, to be able to find the menubar, we need to clean the code for
moc's eyes.

Task-number: QTBUG-30756
Task-number: QTBUG-30812
Change-Id: I88fad663f1c35d03a0cb167d1723d16f590918c0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
370e89f064 Cocoa: Reflect menu hierarchy in QCocoaMenu* objects
QCocoaMenu is child of either a QCocoaMenuBar, a QCocoaMenuItem as a
submenu, or nothing as a standalone menu. QCocoaMenuItem is child of
its containing QCocoaMenu.

The parent is set during insertion and cleared during removal.

QMenu needs to be updated to avoid double deletion and leaking its
own platform menu.

Change-Id: Iadf60d8062d7466fa616f84f3761fe322fc9aa2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
7a1cdac052 Cocoa: Remove dead code in QCocoaMenu*
Change-Id: I56136594f073295ced645d06f657187a54e84384
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Oswald Buddenhagen
da55d48ad7 fix namespaced build
Change-Id: I9d0a3cb08de5e91807da7f0358c83b6693ebd1ea
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-25 17:56:26 +02:00
Oswald Buddenhagen
0dea24054f fix QProcessEnvironment documentation re case conversion
Change-Id: I854382d1d431ee084ef0faa2e240e093b9183ec8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-25 17:56:26 +02:00
Friedemann Kleint
42760e43ea Windows native save file dialog: Do not append suffix afterwards.
Instead, set the currently selected filter's suffix as
default suffix of the dialog unless another default suffix
has been set.

This emulates the behavior of Qt 4 behavior which would set
the selected name filter's suffix as default suffix in
QFileDialog::getSaveFileName().

Task-number: QTBUG-30748
Change-Id: I111cd6190ddab8775a0fa72b94b3c728dd411c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-25 17:56:26 +02:00
Jan Arve Saether
b9db3e4785 Do not include the treeview header if its hidden
Previously, accessibleTree->child(0) would return an interface for the
header even if it was hidden.

Also, the assertion was wrong since the index would be 0 if both row
and column were 0. The assertion was actually found while using the
project explorer of Qt Creator (2.7)

Change-Id: I9f3cc2c13b6887569d10c4e062a64552f898231a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-25 17:56:26 +02:00
Gunnar Sletta
2e0575ce89 Fix windows expose logic
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.

This provoked a couple of existing issues in the qwidget test.

setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.

The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.

resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.

Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-25 15:41:54 +02:00
hluk
b43609404c Fix segfault while handling system-wide shortcuts with xcb
Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-24 18:30:33 +02:00
Jan Kundrát
78fc0d4872 Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS message
This change restores a proper function of the "(?)" button in the window
decorations which is used as a clue for the user to check what a particular
widget is supposed to do. The change is only implemented for QtWidgets because
the underlying QWhatsThis is inherently widget-specific -- which is why it sends
an event to QGuiApplication, but only processes it in the QtWidget-specific
QApplication.

Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch.

Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-24 16:24:40 +02:00
Tor Arne Vestbø
4afb128d31 iOS: Don't try to set screen orientation before QApplication startup
We create our QIOSViewController in didFinishLaunchingWithOptions,
and schedule a timer to run the user's main. If the device is
placed in landscape orientation at startup, we will receive a
willRotateToInterfaceOrientation message before the timer is
triggered to run the user's main, which means we do not yet
have a QApplication.

To fix this crash we exit early, but we might have to store the
new orientation for later, and make sure the initial QScreen is
then created with the correct orientation.

Change-Id: I0cc02f0d36b992d190736e98858dc7d002d595b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-24 13:36:53 +02:00
Friedemann Kleint
ded4613ae4 Windows: Position full screen windows on the correct screen.
Find effective screen by searching the virtual sibling that
contains the center as does QDesktopWidget::screenNumber().

Task-number: QTBUG-30724
Change-Id: I8441ab4f3e5ee8169613a82f150d1a4f1777b662
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-24 11:10:02 +02:00
Peter Hartmann
b4985215df QNX host lookup: do not try to load libresolv.so, it is not there
Not trying to load the lib saves 30 - 50ms upon an apps' 1st host
lookup.

Task-number: QTBUG-30809
Change-Id: Id893cec09ff57494776625700c93f7efe96fcc6b
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-04-24 09:01:14 +02:00
Samuel Rødal
2cea97bc61 Fixed documentation of QWidget::mouseDoubleClickEvent.
Since change 3bb9024952 the documentation is invalid.

Task-number: QTBUG-29680
Change-Id: I7d5fcb6bc490aa5cba83439d33f798459640c42d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-24 09:01:14 +02:00
Samuel Rødal
9d7fe3eb3d Fixed crashes relating to SVG icons.
Creating a second QFactoryLoader for the same plugins seems to trigger
an unload of the plugins loaded by the first factory loader. The
QIconEngine created by the SVG icon plugin thus gets an invalid virtual
table pointer, which causes a crash when attempting to call any virtual
function in the QIconEngine (pixmap(), the virtual destructor, etc).

Reusing a single QFactoryLoader instead fixes the crash.

Task-number: QTBUG-30496
Change-Id: I80c5fa8b52ab9b0db68499f8c37fad14a1ac4f3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-24 06:49:44 +02:00
Mark Brand
af35ee291a qsql_odbc: fix SQLGetStmtAtt usage
Failure to initialize the variable can cause spurious non-zero
values.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx

"..value can either be a SQLULEN value or a null-terminated character
string. If the value is a SQLULEN value, some drivers may only write the
lower 32-bit or 16-bit of a buffer and leave the higher-order
bit unchanged. Therefore, applications should use a buffer of SQLULEN
and initialize the value to 0 before calling this function. Also, the
BufferLength and StringLengthPtr arguments are not used."

Follow-up to 1509316a37

Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-24 01:30:20 +02:00
Stephen Kelly
4341ae32f4 Enable OpenGL library detection for mac.
Change-Id: If99d3faf2b08ac5109d619ff69efdaa3857c007f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-24 01:30:20 +02:00
Peter Hartmann
e145b67fbd SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.

Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-23 23:22:43 +02:00
Thomas McGuire
e0cf3fcd8f Fix retrieving of the generic system proxy via environment variables
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.

Add a unit test that is enabled for those platforms that use the generic
system proxy.

Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-04-23 21:02:50 +02:00
David Faure
1ea1abeb91 Implement startup notification spec again.
This functionality was in Qt4's qapplication_x11.cpp and was missing
from the XCB QPA plugin. Ported the code from xlib to xcb.

This code was actually tested (with plasma), unlike the Qt-4.8 code which
skipped every other character...
    for (uint i = 0; i < 20 && i + sent <= length; i++)
        xevent.xclient.data.b[i] = message[i + sent++];

Provide a QPA native-function for accessing the startup id, for cases where
an application doesn't show a window, but starts another app instead, or asks
a running app to show the window on its behalf.

Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 21:02:50 +02:00
David Faure
71a1ff39bc qxcb: output clear error message when running on an 8-bit display
Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth)
outputs a stream of error messages, starting with:
QWidget::paintEngine: QWidget::paintEngine: Should no longer be called

Better output clearly the reason why we end up in that method: painting
on a null image, due to the unsupported image format.

Maybe this should even be a qFatal...

Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-23 21:02:50 +02:00
Konstantin Ritt
3821047e6c Fix memory access violation
The pointer returned by unicode() was deleted right afterwards.

Change-Id: I7cef72386d02c7be42e71134f616926506d37ea6
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 21:02:50 +02:00
hjk
01cbd7e4b5 Remove QLocalePrivate::m_localeID
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.

This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.

The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.

Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 18:57:45 +02:00
hjk
649da796f5 QDataStream: Be a bit more verbose about operator>>(char *&)
This also fixes a few "sloppy" mentionings of "new" into "new []".

Task-number: QTBUG-30777
Change-Id: I3f4add07777b59cd09cac97b672c73273b3b97eb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-23 18:57:45 +02:00
hjk
32629676b9 Use a QVector<QDateTime> instead of an array in QFileInfoPrivate
Since QDateTime is pimpled, default allocation is expensive and
regularly shows up in profiles of code using QFileInfo.

For Qt 6, QDateTime's data members should be put into the class
proper, and this change here reverted.

Change-Id: I94a50e467b12772e1076181eb2ac6031984d8802
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
38bf6da7dd Cocoa: Fix disabled minimize button on main windows
Task-number: QTBUG-30775

Change-Id: Idec64f2cc6181e6889498171ead676d33c66e537
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-23 18:57:45 +02:00
Morten Johan Sørvig
56cc59110a Don't crash on a null window pointer.
Task-number: QTBUG-30731

Change-Id: Id256b915012b43d1eb85bba62cbc1d42cfb58b34
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
f2fa65e4bf Cocoa: Add setAlertState(), isAlertState(), beep() functions
Also, fix operator precedence error in QApplication::alert().

Change-Id: I140ccfba29638d24bc1c97f5f9a9611f66eb6b8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-23 18:57:45 +02:00
Samuel Rødal
1f6ab6a661 Fixed QGLWidget not being able to be made current with a context.
If the QGLWidget's creation is triggered by a sibling or similar being
created it would end up without the surface type OpenGLSurface. We need
to make sure the QWindow has the correct surface type to prevent
QOpenGLContext::makeCurrent() from failing.

Task-number: QTBUG-30811
Change-Id: Ifc85f9120d89bd0bed4a3911233799830cb3a0f3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-23 18:57:45 +02:00
Jan Arve Saether
146658a10f Fixed QLayout::addChildLayout(QLayout *l) when l had a parent
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.

Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-23 18:57:45 +02:00
Friedemann Kleint
ad3b61554b Move Mac translations to .cpp file for lupdate to pick them up.
Task-number: QTBUG-30125

Change-Id: I4e56fd3021b4ef5f344d4d36ae594dd88e2aa1bd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Stephen Kelly
ecc11ccd65 Set the sysroot if cross compiling the cmake tests.
Change-Id: Iae268f30b86a67fcf978983ca9b12f850948dd24
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Thiago Macieira
06b6784c28 Fix header check: you must #include qconfig.h before QT_NO_OPENGL
Change-Id: I50518bd1b721d19e4712a6c11afb0a93afeaa7ea
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-04-23 16:38:09 +02:00
Frederik Gladhorn
9c47a273ff Accessibility: Ignore negative child indices in main window
Change-Id: I6b3d0b066bf20a09b43d6d80255fb8d428d38df1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 14:10:05 +02:00
Stephen Kelly
93aa83e074 Fix typo in docs
Change-Id: I3ee3e3d061fc87c0c2ea05197b37a952c8d63dd2
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-23 14:07:50 +02:00
Stephen Kelly
38fea4d642 Fix build with QT_NO_CLIPBOARD
Change-Id: I138a29e1099e691770b9e3e094a108fc8c52f8cb
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-04-23 14:07:37 +02:00
J-P Nurmi
a7dc708eb5 Fix QAbstractItemModel::moveColumn()
Task-number: QTBUG-30346
Change-Id: I3d6dbe1e88bb5e2748eadabb2663f30be16f8d18
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-23 13:35:31 +02:00
Gabriel de Dietrich
e324f5bc0e Fix crash when deleting a QMenu on exit
If the application object is an ancestor of QMenu, dereferencing qApp
in its destructor will cause a crash.

Task-number: QTBUG-30756
Change-Id: I31a33db0fd783bb210a420618911ea8b412e9a0f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 13:12:33 +02:00
Frederik Gladhorn
a7ce34dba4 Accessibility: Menu item should keep track of owner being valid
The QAction may stay around while the parent/owner gets deleted.
This is for example the case for some dynamically created menus.

This is required for fixing QTBUG-30792

Change-Id: I7b6122edec6def69aed77502403134e1568e21c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 13:11:22 +02:00
Liang Qi
8d60a10462 QWindow: expose active as property
And add activeChanged signal for it.

Change-Id: I9ebe9263e99863267c3a81b9286eaa5b29222085
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:32 +02:00
Liang Qi
941f7a5283 Make requestActivate() as a slot in QWindow
Then it could be used in QML world.

Task-number: QTBUG-28667
Change-Id: Ib65ad3b271a07ba50d3ca50d61f486f829f69119
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:30 +02:00
Kai Koehne
a6e903299b Fix def files for Mingw (32 bit)
Add missing symbols.

Change-Id: I73579f13b0cbc8b4b405a50b3745785e088cf82d
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:22 +02:00
Kai Koehne
43e1c61a19 Add missing intrin.h include for __cpuid
This is already fixed upstream in

https://codereview.appspot.com/8615046/patch/1/2

Change-Id: I4b9e865f6b5622c484418a8381334381bc256887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:16 +02:00
Libor Tomsik
2fbfad8b0d Added grabbing option for qevdevkeyboard and mouse.
Added option grab=1/0 which allows user to choose using environment variable
if the application will exclusively grab the input device or let
the OS read it in paralel(default).

Task-number: QTBUG-30004

Change-Id: If3caa8419584be46f320931ddb152a41893d8693
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-04-23 12:39:14 +02:00
Gabriel de Dietrich
3b992f8319 Enforce focus policy in item delegate's editor
Focus policy can be wider in this case given the limited scope of the
editor widget. This helps workaround platform specific focus policies,
like on Mac, were focus can be restricted depending on the widget type.

Task-number: QTBUG-30715
Change-Id: I69acf8ebff4ba16d473964c91680a1cb0235e3cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 12:32:47 +02:00
Mitch Curtis
7dd81686e8 Fix QKeySequence::toString() returning gibberish for Qt::KeypadModifier
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.

Task-number: QTBUG-4022

Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 12:26:13 +02:00
Morten Johan Sørvig
f9ecaa8825 Return GroupRole for unknown accessibility roles.
UnknownRole draws attention from the screen reader
and makes it focus on the unknown item. GroupRole
is ignored and passes focus to child items.

Change-Id: If7b4cd9ec02b1890929a709b84d897f452c39587
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 07:44:20 +02:00
Morten Johan Sørvig
d576d77f03 Don't set WA_AcceptTouchEvents on Mac OS X.
Setting this flag causes scroll event lag, so we want
to keep it off for all widgets that do not need touch
events. QPanGestureRecognizer is installed on all
QAbstractScrollAreas. Prevent it from setting the
flag.

Change-Id: Idd4fcc545ff26377607b56f75db75c2865a5fc82
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 07:44:02 +02:00
Thiago Macieira
ccb7db2ee3 Document that the mutex passed to QWaitCondition::wait must be locked
Simply say that the behaviour is undefined if you don't do what you must
do. I don't want to introduce a check: it can't be done reliably anyway.

Task-number: QTBUG-30806
Change-Id: Iba1bbbdfe62ffcb133f9c52215efdcc0ee7bd9bd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
e5e54a9ceb Accessibility Windows: always check for negative child ids
Some screen readers will pass in child id's that are negative
as response to notifications.
We should always check for negative id's on incoming calls.

Task-number: QTBUG-30792
Change-Id: Idaba3d1931d35ed068cfd9f20e70aa26da427616
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
Stephen Kelly
bc4fbcd215 Add IMPORTED targets for the GL libraries used by Qt.
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.

In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.

This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.

On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.

Task-number: QTBUG-29132

Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
d257e69a79 Accessibility Mac: Implement accessibilityFocusedUIElement
Change-Id: I17b5b1f741a8b340d8f4b16f4ec39cc9a8159bfa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
J-P Nurmi
00b11ccdea Fix QTableView::doItemsLayout()
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).

Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Eskil Abrahamsen Blomfeldt
241ee2ee42 Read correct font hinting config on Gnome/Unity
Fixes regression against Qt 4. This tries to recreate the logic
from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we
on Gnome would override the default hint style specified in
FontConfig with Xft.hintstyle settings. This is the configuration
used for changing the hint style in the Gnome Tweak Tool.

Task-number: QTBUG-29582
Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-22 18:35:52 +02:00
Morten Johan Sørvig
353f7340a1 Revert "Don't warn on 0x0 sized windows."
This reverts commit 88272d6c04,
which accidentally re-introduced a crash.

Change-Id: Ie60bcf55f940b24f982eed4f20c6af3320b040a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:53:39 +02:00
Richard Moe Gustavsen
8a00a42d0d iOS: don't delete m_touchDevice, QPA takes ownership
When registering m_touchDevice with QWindowSystemInterface, it
will also transfer ownership to it. It will eventually be
deleted in clenupDevicesList on qtouchdevice.cpp.

This patch will also stop the app from crashing when telling it
to quit.

Change-Id: I97070efdf16b4db7d076935fbec62e60f094a7df
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:38:28 +02:00
Kai Koehne
38f6467b81 ANGLE: Fix compilation with MinGW
Make sure ImageSSE2.cpp is compiled with the right flags (-msse2)

Change-Id: I410bbd1fd78112d01ebd486908cd22d827e2e472
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-22 14:30:03 +02:00
Andy Shaw
d672ef0768 Convert the CGImage into a QPixmap after reading from clipboard
Now that the relevant function is available we can do the conversion
inside QMacPasteboardMimeTiff when obtaining an image from the clipboard

Change-Id: Ie41b0fffedf4dd3f8ef49431482bd075a69722b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-22 08:57:48 +02:00
Andy Shaw
f78842abe4 Ensure the QLineEdit::returnPressed() signal is still emitted
The signal needs to be emitted directly as the event is not passed to
the QLineEdit if the QSpinBox gets the Key_Return. Since this signal
may be relied upon then we ensure it is emitted directly.

Change-Id: I17cdec62c9f995bacfd7d3cc66d6324f26c84c67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-21 02:01:29 +02:00