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>
Introducing a new method which allows us to know before hand if an URL
scheme will be supported by QNetworkAccessManager. It is especially useful in
combination with QFileDialog URL based methods to pass this list as the
allowed schemes the user can select in the dialog.
Change-Id: If625b045e87959bfd78fea2c9213b69caf506886
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add a new button with which any color present on the screen can be picked
up. This feature is very useful in any image processing application.
Notice:
--I have setMouseTracking to true because I consider that it makes much
easier to grab the desired color.
--I have set the cursor manually because for some unknown reason the
cursor wouldn't change with grabMouse(Qt::CrossCursor).
Task-number: QTBUG-14332
Change-Id: I39e3543d3ed55276f43d569a2f03087bbf89b27a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@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>
this way we can use it for "regular" apps (gui tools) as well.
Change-Id: I3b00d0bde215dff1c2726b35626c4c0c256d92c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
there is at least one examples-only repo (qtwebkit-examples).
we look for tools/ only when src/ is also present, based on the
assumption that if there was only tools/, it would be actually named
src/ (like in qttools). the split between the two is nowadays arbitrary
anyway.
Change-Id: I982b1d0e26dd7d0a5de751546099a58f86390124
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
the idea is that "tools" actually means "graphical applications". that
means that all bootstrapped/build tools are consistently built,
regardless of their location in the source tree.
non-bootstrapped non-graphical tools are a bit of a grey area. it's
going to be decided on a case-by-case basis.
Change-Id: I28b959b7e659d8aa86cf6769ab6d2689c855ec6b
Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
and consequently that it finds qt.conf.
Task-number: QTBUG-30583
Change-Id: I48441477e941d9609270d6e5e1b405127c0c0aca
Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
This way I can have in my QtQuick something like
Text {
text: "<font color='#ff0000'>H</font> <font color='#99ff0000'>H</font>"
}
and it works properly
QtQuick already supports #AARRGGBB for color: properties so I've
decided to go the notation
Once this is merged we can remove the extra code
in QQuickColorProvider::QColorFromString
I've also added some tests for the hex -> QColor conversion that where
non existent
Change-Id: I1dd4a2ec113293aec26968329b2e4930df6fdcb7
Reviewed-by: Gunnar Sletta <gunnar.sletta@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>
This removes some XFAILS that were no longer correct and
fixes some existing problems in the tests where ODBC is
concerned.
Change-Id: I91de526bb50ad4046ba07ddb5336aa3714966687
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Caroline Chao <caroline.chao@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>
Previously resizes along with the animation was implemented using queued
signals and slots, potentially causing a huge lag between the size of
the window and the rendered contents. Now the animation is always driven
by the rendering thread and is triggered based on the window's
isExposed() status.
Change-Id: Ifd89a63c2a436671a7b15326ff56be9ec2a5362d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
UNKNOWN now means generic unix theme, rather than Gtk: there
are other KDE/Qt-based desktops, and there's also the case of
no desktop at all (e.g. bare Xvfb, as used by automated builds).
To make this correct for GTK-based desktops, this commits improves
the detection of the current desktop environment.
Change-Id: Ib696624de39d5024527880df7adc26c65b838d15
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QPrinter is not implemented on android, so the test fails to
link there.
Change-Id: I10ca0179323362a9c9f74325332043c968d67d3c
Reviewed-by: Sean Harmer <sean.harmer@kdab.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>
- don't check if m_directWriteFontFace is not null, it MUST be initialized
just in the constructor;
- fix support for surrogate pairs in stringToCMap();
- reorder some affected code for better readability.
Change-Id: Ibdcf7b50f06910e95cefe074f33932b8fbcdcfe1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.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>