This is hit in case of a recursion in the message handler, and message
hasn't gone through qMessageFormatString at this point and thus lacks
the newline.
Change-Id: Ia098b6ccbcc1aff22a4695865f39143ba0152d9c
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Added some #ifdef guards around usages of composeMode().
Change-Id: If2f2d3cae21b270933b38ea67dcc885f5871785f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
m_backingStore pointer has a limited 'lifetime' - usually
it is set in -flushBackingStore:region:offset: method, then -drawRect:
is invoked/forced by -setNeedsDisplayInRect:, after that it's dangerous to
have a non-null pointer to a backing store (and we reset it).
But if Cocoa invokes drawRect (due to some reason) our null backing store pointer is also
not good. This patch instead is using a shared resource (QImage) from a backing store.
This patch also makes getBackingStoreCGImage() redundant - -drawRect: was the only
place we called it.
Task-number: QTBUG-42206
Change-Id: Ie7726336f05d07c52f660f6326ae5cef114201dd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
There are no methods called name() and path(), replace them by
fileName() and filePath().
Task-number: QTBUG-41881
Change-Id: I001a8ead197327fac69e69d94230587ddb1a4692
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
QSocket and QSocketDevice are not part of Qt 5.4
Task-number: QTBUG-40362
Change-Id: Ieffd992c203af94cac0eb21a630b6ac98754f358
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Since we know and control whether or not we are making a new QUIView first
responder, we can take not of this at that point, and use that information
when another view is resigning first responder.
Change-Id: I508720d418c92dc8a8011b489cc5cace8fc82633
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
OS X now has a setting (General->Show scroll bars) to use only transient scroll bars.
Task-number: QTBUG-41340
Change-Id: Iffe30e9d601c169d955a380002743bab518f41ea
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
ICU would return a utf-16 (endian dependent) codec for unicode
which is very rarely what people want. In most cases, unicode is
encoded in utf8 these days, so return a utf8 codec for it.
Task-number: QTBUG-41998
Change-Id: I51ee758d520702b263a8b2011787eb1f3455ed96
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
If the list of configurations takes time in the backend,
the defaultConfiguration will be invalid at this time, but will
be updated by the backend.
Change-Id: I2886a8f6c569c993814172ccaa46e4bb5ba5e0d6
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Remove QtWidgets from buttontester.h and QtGui from main.cpp.
Change-Id: Ie5925a33c58c1abd9747ab0ab7040e7d1b0769a9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Snow Leopard is unsupported from 5.4.0.
Change-Id: I5c269cbdc93000a4657b63559cc3c526e298e3db
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Snow Leopard is unsupported from 5.4.0.
Change-Id: I0c49a8353d5dc38169ab9679a986c35ab2df8d2f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QGtkStylePrivate::setupGtkWidget() cannot use a local static variable
for the container, but it must insert it to the GTK widget map together
with all other GTK widgets. The container is destructed as a GtkWindow
child in the Qt post routine QGtkStylePrivate::destroyWidgetMap().
Task-number: QTBUG-41145
Change-Id: If1fda372ed1227edc779fa4951cbd6fbf6038499
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Shortcut handling with non-latin keyboard layouts
were broken for checks like:
QKeyEvent key = ...;
key == QKeySequence::SelectAll
In Qt4 this was handled transparently when getting
keysym from XLookupString. When ctrl modifier was set,
XLookupString performed "keysym transformation" to obtain
a latin keysym. Still this did not solve the non-latin
shortcut issues for all cases due to some of Xlib
assumptions which could not be controled by user.
This patch implements XLookupString-like behavior
in lookupLatinKeysym(). It is not a 1-to-1 copy of how
XLookupString perfoms latin keysym lookup, but it
serves our needs just fine. lookupLatinKeysym() also
handles the cases that did not work in Qt4 with
XLookupString, thanks to libxkbcommon keymap query API.
And lookupLatinKeysym() replaces the fragile implementation
of "fallback latin key" code path in possibleKeys().
Done-with: Ruslan Nigmatullin
Task-number: QTBUG-33182
Task-number: QTBUG-32274
Change-Id: I56a5b624487ca6c2c3768220301a37dac39b439a
Reviewed-by: Ruslan Nigmatullin <euroelessar@yandex.ru>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Replace the boolean 'started' member by an enumeration which indicates
the startup phase. While in that phase, do not cancel when pressed
points are detected for fewer than 3 touch points.
Task-number: QTBUG-15768
Change-Id: Ic57b19e3002392fb632f551f615d80ada9831d34
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This fixes the "expose event received for window
with invalid geometry" warning from Qt Quick. The
window's current screen is now up to date when
processing the expose event.
Change-Id: Ia5c83e34154182699ec587835f9063809d819d7d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The CFNumberGetValue() function does not work as advertised: For some
(but not all) CFNumbers containing a long long value outside the range
of int, it returns true when asked to convert to an int, so the wrong
value is extracted from the CFNumber.
As a workaround, use CFNumberGetType() to find out whether the value
is actually an int.
Task-number: QTBUG-42017
Change-Id: Ib95395491d0db61d2bdc0f058a6a2f6be05da432
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Since commit be0bfe09ee we return -1 in
QTextEngine::findItem if the item cannot be found.
Calling code must be prepared for this case.
Otherwise we run into an out-of-bounds vector access later on.
Task-number: QTBUG-42103
Change-Id: Ie338cd1fc3cf0ce1e8edfa59dead635669020a33
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This fixes a compilation issue with X-MinGW builds and
is more appropriate here.
Change-Id: Id97e387c6e22a2c09d2f4dda35ce1bed2831fffe
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Do not automatically add a \n to all messages formatted by
qFormatLogMessage. Some backends require a final newline,
some don't, so it's best to only append it where it's actually needed.
The returned string will be null if the pattern is empty. This allows
to differentiate between the case that the pattern just didn't apply
(empty line is printed), and the case that qSetMessagePattern(QString())
have been called (nothing is printed).
Change-Id: I17fde997a4074f58f82de6dea129948155c322d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
The common format for lock files is to only contain the PID.
(See http://www.pathname.com/fhs/2.2/fhs-5.9.html)
Qt includes some extra information but we can not expect this
information to be present. Otherwise lock files created by other
(non-Qt) processes are not handled correctly.
Change-Id: Ib9be3c9f07eb8e87193f56d96f5559bbdd5180b8
Reviewed-by: David Faure <david.faure@kdab.com>
1. If the interface used by a configuration changes, remove the whole
configuration and replace it with a new one (instead of updating it).
While this isn't intuitive, this is the exact behavior we used to have
on android when using the generic plugin...
2. Setting the session state to roaming is not correct in this context
as it's a transitional state where we should end up in connected state
(forced roaming). Before this patch we would get stuck in the roaming
state for mobile networks.
4. Use QNetworkInterface::name() instead of
QNetworkInterface::humanReadableName(), as this is the expected
value when querying the interface used.
3. Don't re-iterate through the interface list for each configuration.
Task-number: QTBUG-41832
Change-Id: I315f725434bc6a1a8dca13dffd41f606c87bd06d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This fixes QNetworkConfigurations when user:
- configures new AP
- deletes connection configuration
- switches wifi AP
Change-Id: I38c543c6de7b61f49d7ac96fa05f7a6fc4fba70f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
The search state is used by VoiceOver on iOS to announce a search field.
Change-Id: I464125827dbbf275daf38104e26e9591bb23365a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
The previously produced code was valid C++. Add the declaration
nevertheless to help people who want to use the switch in their
own code.
Task-number: QTBUG-42119
Change-Id: Ia47cf3930684474ff65e5cf37335d7d7f57a1d31
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QLineEdit commits and hides QInputMethod on enter key press. When
Qt::ImhMultiLine input method hint is set, virtual keyboard is not
hidden.
Task-number: QTBUG-37850
Change-Id: I018351caa18bd2116665771e5f024a57182a01b9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
[NSString lengthOfBytesUsingEncoding] only returns the number of bytes
required for the actual string, not including the zero terminator, so
when we then used cStringUsingEncoding to fill the malloced buffer with
data, we overwrote the byte after our buffer with 0, resulting in random
and hard to reproduce crashes at application startup, seemingly depending
on the application name.
Change-Id: I35d261bea5924e917475b0270bfa280bfb0c787a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
We should have more font weights in QFont::Weight to allow for
finer grained control.
For the time being, we can simply use intermediate weights to better
support the different font weights falling in between the ones
defined in QFont::Weight.
Also amend the documentation to clarify the fact that QFont supports
and can return weights falling outside the predefined values, which
is already the case (e.g. when using fontconfig).
Done-with: Gabriel de Dietrich
Change-Id: I693cdd48b8b77e7ed550cdf991227bcb819d8e7b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add missing semicolon, include QtWidgets instead of QtGui and
use cast for a const pointer because the example with casting
relates to the code above where 'widget' is const.
Task-number: QTBUG-31736
Change-Id: I5cb6d33ec692deaf41e9a1be9e36e752a8da8739
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Replace "Apple Roman" by "Macintosh" which is registered by IANA:
http://tools.ietf.org/html/rfc1345.
Replace unsupported "GB18030-0" by "GB18030".
Remove "JIS X 0201" and "JIS X 0208" as they are supported as parts of
other Japanese encodings but not directly.
Add "HP-ROMAN8" which is supported by both Qt and ICU.
Also clean the codecs test.
Change-Id: Iaf8e8ff1900d3f92ea0e0df75c60fe1534de23ac
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Substitute this encoding by "macintosh" when Qt is built with ICU.
It is for compatibility with Qt 4.x.
Change-Id: I70c51cba7d473ac81e25862736cb71a2f6894055
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Removing and adding toplevel items could result in invalid stacking
order (not corresponding to insertion order).
Task-number: QTBUG-19316
Change-Id: Ia8646784a2181cfa936b101e2adaf7e7e73bb83d
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Selection rectangle was incorrectly mapped to scene space when the
view was rotated. It became a rotated rectangle instead of the correct
polygon (rhombus).
Task-number: QTBUG-42008
Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Add support to get/set the DuplexMode on Windows and Mac, improve the
CUPS duplex handling, ensure support is the same on all platforms.
[ChangeLog][QtPrintSupport][QPrinter] Added duplex support for Windows
and OS X.
Task-number: QTBUG-11332
Change-Id: I9d61d63233d828c3b1fd6df54072c6049f3c6298
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Set QT_QTESTLIB_RUNNING=1 on QTestLib startup.
This allows Qt to adapt its behavior to the testing
environment, WHICH IS NORMALLY NOT SOMETHING YOU WANT
TO DO. Use with caution.
Change-Id: I31de80e7c2cc91ff1ed8137926e6b729ef6efdc6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The sample lineedit in Qt's own font dialog shouldn't have its font
affected by stylesheets.
Not only does this hampers the ability to preview the font, it actually
overrides the font selection as that one is taken directly from the
widget.
Task-number: QTBUG-41513
Change-Id: I11d0bef8c7bf7bdae4cc08b6b9276d0fc14a75fb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>