Associate a 0-context with the window if IME is disabled, store
this state as a flag to QWindowsWindow. Associate default context
again when enabled window gains focus.
Task-number: QTBUG-40691
Change-Id: I78d5494a05f93a39e245ca7c096d45445e684ea8
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Add a capability enumeration to QPlatformInputContext and
use that to turn off input methods for hidden text depending
on platform support. Disable on Windows.
Task-number: QTBUG-40691
Change-Id: I9909005de1f21316ec8f64e2729f1fffcd37c7c3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
As pointed out in 13b939c7f4 the approach
qdevicediscovery_p.h takes is just wrong. The defines it relies on will
often be missing when the header is included from random places in qtbase.
This results in different class layouts. It was working only because the
interface of the class is very limited and the public part was matching
regardless of having the macro defined.
This is now corrected by introducing subclasses and a common, non-variated
base class. QDEVICEDISCOVERY_UDEV is removed completely.
Change-Id: I9c83b5b041440a3a6ea3a604eee4a325d4d74439
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
The current approach of not activating transient windows with the
popup flag set was found to be too restrictive, as it would
e.g stop transient dialogs from being able to contain editable
controls.
This patch will restrict the number of popup types that we
skip activation for to only contain a few subtypes.
Task-number: QTBUG-41613
Change-Id: I381a5a79fb4f7082da18a6b4e06a7255ff400b1a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
On iOS, autoSIP is handled by the platform plugin. We therefore
avoid letting widgets tell the input panel to hide on focus out
so we can gain better control over this from the plugin.
Note that we could also set QApplicationPrivate::autoSipEnabled
to false and achieve the same. But since autoSIP is logically set
on iOS, it's better to report it as set in case the app asks.
Change-Id: I96c68bc446a1e299fd57afe03a9e273491df08a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
When a popup is opened it grabs the input, but the leave event to the other
windows needs to be sent.
Remove the popupEnterLeave test as it did not test any code. The Popup
never gets any enter or leave events so it will succeed always succeed
Task-number: QTBUG-36862
Change-Id: I625c616eeb74b5168af7b751485e2a9a53b76cd3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
qFind is deprecated, so these cause build errors with
configure -no-feature-DEPRECATED
Change-Id: Iefcb061d5e8ce256445528f601ead4c9d5d1dfd2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
so that it can build with configure -no-feature-DEPRECATED
Change-Id: Id2decc05974bad249c79936d99ab63d3cfc375ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
to support configure -no-feature-CURSOR
Change-Id: I8e7f9a7f80d3d44a1f8e25b909d552351b5f37e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
- Fix prototype for glinfo() for Qt 4
- Add more event types and object type flags to event filter.
Change-Id: Ia4160b40486d054e860a339e7b5c9c28695330ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
One of the fontEngine()'s methods was missing hinting. This bug only
manifests on Windows because on Linux QFontConfigDataBase already sets
hinting on both code paths.
Task-number: QTBUG-42534
Change-Id: I3a66a9d4aaa5e390fee305a3d5aacfeba38a1fc3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
In qt_fontHasNarrowOutlines, if we proceed to call alphaMapForGlyph
when the glyph does not exist, there will be a failed assertion.
The docs for FT_Get_Char_Index say that zero means the glyph was
not found.
Change-Id: I371e9a2797a34fa3ebeae44531af51e24dadad79
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Multi QFontEngine should be handled just like all other cases
covered several lines below.
Change-Id: If3dd9a2e38a5f6f61b113576cb188da378fc9efb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
QFont is not POD and shouldn't be instantiated statically,
otherwise we could end up with UB during qApp destruction.
Change-Id: I2372c7a643eb3007957ab2b798732c1a18fd0ae5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
If GetTextMetrics() failed, there is no guarantee that
TEXTMETRIC is initialized with any safe values.
Change-Id: Idb5e3bc1bc2451368950978365487c908ce529e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Never assume the engine is still cached but rather delete it
if we are the last consumer.
Change-Id: I4e3c796d45c53f42722a437482d71e2dae14cad2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Implements isValid(), which should be returning true for subclasses,
and re-orders and adds Q_DECL_OVERRIDE where appropriate.
Change-Id: I03519bf674b6f7b7ccc07a7154c9a1fb9a8105f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This removes some code duplication in the QFontEngineFT and
it also removes the condition that loadTransformedGlyphSet()
will return 0 if the font is too large to be cached, since
this is handled by setting outline_drawing on the glyph set which
will fall back to painter paths.
Change-Id: I2fe6a963e854cdd7c6015154547dc06325cbe3b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The virtual method was added for 5.0 but never called.
The old code (only checking mimetypes) is now the default implementation
for canDropMimeData. Model subclasses can now refine this by having
index-specific logic instead, or in order to inspect the dropped data
(e.g. to accept files and refuse directories, which are all text/uri-list).
[ChangeLog][QtWidgets][QAbstractItemView] now calls canDropMimeData in
order to decide whether or not to accept the drop.
Task-number: QTBUG-30534
Change-Id: Ied3aa964b4025bae6a1a26df89a681bfe61c3faa
Reviewed-by: Stephen Kelly <steveire@gmail.com>
The code in 4696e9dbaa was incorrect. It is perfectly valid to call
these methods with row=-1 column=1 parent=some_index, this is exactly
what happens in QListView and QTableView. Child row/column is only for
trees.
Move the coordinate mapping from QSortFilterProxyModel into a new
mapDropCoordinatesToSource internal method, used by QAbstractProxyModel.
Task-number: QTBUG-39549
Change-Id: I3312210473d84b639cbe4c01f70ea36437db3e91
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
CoreText doesn't seem to provide us with a "maximum advance" value,
but 0 is really wrong, it leads to QLineEdit::minimumSizeHint() being
0 since it's based on maxWidth(). It even led to a negative min width
with setTextMargins(-1, 0, -1, 0).
Change-Id: I4faf8ecfb6d91e9dff66ec63651d003014503cb4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The current implementation returns the DocumentLocation folder.
Since now only cocoa is supported, we can use NSFileManager to get the
correct path.
[ChangeLog][QtCore][OS X] Now QStandardPaths returns the correct path
for the DownloadLocation.
Change-Id: Ic0ea3ebf8585a1e34a7b43c734df78fd3949d4d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When compiling with GCC 4.9's LTO, the compiler realizes that the class
looks different in two different compilation units and prints a warning.
Adding the necessary #define will make sure that the warning isn't
printed.
It's possible the warning indicates a real problem, if the class
actually got used in those two plugins. I wouldn't know.
QtPlatformSupport/private/.../qdevicediscovery_p.h:66:7: warning: type ‘struct QDeviceDiscovery’ violates one definition rule
.moc/.../qdevicediscovery_p.h:66:7: note: a type with the same name but different layout is defined in another translation unit
Change-Id: I73ca8e553e392b8d368f0deaa318d3e6635d73e1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The presence of the inline QTestFontEngine's constructor causes a linker
failure because QFontEngineBox isn't exported. I'd say this is a
compiler bug (GCC 4.9), but it's an easy workaround and a difficult
testcase.
typeinfo for QTestFontEngine: error: undefined reference to 'typeinfo for QFontEngineBox'
vtable for QTestFontEngine: error: undefined reference to 'QFontEngineBox::glyphIndex(unsigned int) const'
Change-Id: I84829d111616977d6f3fcbbb48509d1c7d4f5fa6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If "encrypted" signal is fired the configuration of ssl is not updated.
If someone wants to perform additional checks on the certificate chain
it is now possible to use peerCertificate and peerCertificateChain.
Change-Id: Id5136a8c52727562c36028eaef721cc9ad86619d
Task-number: QTBUG-40401
Reviewed-by: Richard J. Moore <rich@kde.org>
Apple uses __OSX_AVAILABLE_STARTING in enum values too, which ICC
doesn't like. We need to force at least OS X 10.9 so we don't run into
build errors.
FSEvents.h(279): error: expected a "}"
kFSEventStreamCreateFlagMarkSelf __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) = 0x00000020
^
Intel issue ID: 6000071924
Change-Id: Iae1abb8e8e92f228571c5064d96e9d33d3e35173
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Somehow, it doesn't shrink with btrfs, even if you write 1 MB of non-
null data. This does not seem to be a bug in QStorageInfo. strace
confirms that there is a second statvfs call happening.
Change-Id: I9ed99d27d25e191916278e6b8faeae132469fc63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
QDBusMessage is intended to avoid sending reply messages unless
the message is a method call without the NO_REPLY_EXPECTED flag set.
However, since messages which are not method calls will never have
this flag set, the code will currently cause all non-method call
messages to expect a reply. This patch changes the code to examine
the message type, and to only check for the flag in cases where the
message is a method call.
Change-Id: Ic5bb00df69d3cfb38f60bf6bfd8463fb28cf2c99
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If you write xxxx::min(), min() might be expanded as a macro on silly
environments that follow that poor practice (read: inclusion of
<windows.h> without NOMINMAX). However, if you write (min)() or
(xxx::min)(), it means the same but prevents the expansion as macro.
Task-number: QTBUG-42767
Task-number: QTBUG-31469
Change-Id: If3c93aafd4d0bf63ca15f3d01c2297d58d00f6bc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Never start a line with a comma.
Change-Id: Idce1766f2661aa97fd163c02436ef315999985ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The testcase always returns the expected result, independently of the
QEventLoop::ExcludeSocketNotifiers flag to processEvents.
In Qt4 the same test uses an intermediate QEventLoop and already runs
it before the QEventLoop::ExcludeSocketNotifiers:
QEventLoop loop;
// allow the TCP/IP stack time to loopback the data,
// so our socket is ready to read
QTimer::singleShot(200, &loop, SLOT(quit()));
loop.exec(QEventLoop::ExcludeSocketNotifiers);
This fixes and improves the test by connecting, processing and
checking the bytesWritten signal for the pending connection socket.
Change-Id: I1b1d2b7b83910c87ba3fe48e29ac9fd585ac62ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qdevel is an option used from winrtrunner to indicate a specific
environment to the app. QTestLib needs to ignore that parameter similar
to the Visual Studio generated arguments.
Change-Id: I00a3abe19f1e5b4159e65d26050f04e28f40316f
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
customMenuFont was null, so objects was an empty array, and
NSDictionary throws an exception when being called with arrays
of different sizes.
Task-number: QTBUG-42728
Change-Id: I8cdab449fd8c1d12b65c46dd5617a7f5e3e96c6e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Also, no need to create objects to get properties, when the properties
can be had for free.
Make plugin more robust to network-manager or ofono crashes
Change-Id: Ibadb46bd51aa27f130f8d245e8c50aa7bff5f9c8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
This is in order to skip certain nodes that usually only carry
structural information (such as ListItem nodes). However, because of the
flattening, this structural information is never used on iOS, so we can
just skip the accessible node completely.
Change-Id: I17018c6565f8b39831f2d2944422c6670a438ab9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The weather app had a search field with a clear button as a child.
Because of this bug it didn't report the content of the text edit (but
only the clear button)
Change-Id: I174c6e150e1991fa9aa2a911048590030b5ccc40
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Pick up logging rules set by QT_LOGGING_CONF, QT_LOGGING_RULES,
and qtlogging.ini file also for bootstrapped tools. This helps e.g.
in the case of winrtrunner, which uses categorized logging.
Change-Id: I47d392137e17a59cb57b5c0226f282b0ccf29961
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Do not register new timers after closingDown() has been called. They
might call back into QEventDispatcherWin32 after the object has been
destructed, leading to crashes on exit.
registerSocketNotifier has a similar protection using
QCoreApplication::closingDown(). This however does not work in all cases,
because QEventDispatcher::closingDown() is called in
~QGuiApplication(), while QCoreApplication::is_app_closing is set
in ~QCoreApplication(). In between qt_call_post_routines() is called,
which might trigger new timers to be registered.
Task-number: QTBUG-42772
Change-Id: I91325fb10e38c117c1cbedfee272d0ab6a5ca8fa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Using LocalServerSocket is way much safer than ServerSocket because is
not using ports which might be in use by other applications.
Change-Id: I0e2be0b4561362939950861024f1f95ab819f2c2
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>