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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
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>
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>
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>
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>
Since change 3bb9024952 the documentation is invalid.
Task-number: QTBUG-29680
Change-Id: I7d5fcb6bc490aa5cba83439d33f798459640c42d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
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>
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>
... 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>