Now that it's a plugin, the restrictions for the compiled-in hooks
do not apply. Make it maintainable and prepare for future development
by splitting up properly.
The actual functions are not touched at all in this patch.
Change-Id: I4c666817afe15b31a63c1f9fc01413e9a2376a3b
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
We have to set a default arrow cursor on startup because non-widget
apps will not request one. This is how we behave with non-kms backends
too.
Change-Id: I11b7bf96e46f570bc49f3e8701616b13c480fda6
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.
Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QDateTimePrivate::setDateTime has a comment saying this is intentional,
so document it.
Task-number: QTBUG-43704
Change-Id: Ic5d393bfd36e48a193fcffff13b965409eaf7be9
Reviewed-by: Martin Smith <martin.smith@digia.com>
When programatically setting a text selection on iOS, we
call [UITextInputDelegate selectionWillChange] to report
the change. If auto correction is enabled, UIKit will then
reset the current tracking, and for some reason tell us to
clear the selection. This is contradictory to us
saying the the selection is about to change, and will
cause an unwanted recursion back to Qt.
Since there seems to be no way to stop UIKit from doing
this, this patch will instead add a guard that refuses
to change the selection recursively while processing
a selection change from Qt.
Task-number: QTBUG-43716
Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Add the missing definition for IFF_RUNNING like
documented on http://ports.haiku-files.org/wiki/CommonProblems
Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The step logic in scrollByDelta() made scrollbar position to go
temporarily outside its min/max boundaries, and then setValue()
corrected it immediately back within its bounds. The false change
notifications caused by this position vs. value ping pong caused
plenty of unnecessary updates.
Task-number: QTBUG-30316
Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
When changing models it makes no sense to keep the old root model index,
pointing into a possibly deleted model. Reset it to the root
of the new model is the best line of action.
[ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root
model index when a new model is set on it.
Task-number: QTBUG-43350
Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
In replacement for Q_ENUMS and Q_FLAGS.
Q_ENUM(Foo) has to be put after the declaration of Foo in an object.
It will tell moc to include the enum in the meta object (just like
Q_ENUMS) and will allow templated code to get the metaobject for
that enum.
Will be used by QDebug and QMetaType
Change-Id: Iefaf8ae07dc0359828102bf384809346629b3e23
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This is analogous to 0a92295ca8
which added QMouseEvent::source.
For now, we say that a wheel event is synthetic when it comes from
a trackpad or other device that provides scrolling by some means
other than an actual wheel.
Change-Id: I0452ca2080b551b18b9c2f6e42db925d14ae339e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
If the user has some objects selected and holds down the "extend selection"
key (Control on Windows, Command on Mac OS X), clicking and dragging a
rubber band selection deselects the current selection. This is
counter-intuitive and confusing for users.
This commit fixes the behavior so users can extend selections using the
rubber band when the proper key is held down.
Task-number: QTBUG-6523
Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
The call was invalid from C99 perspective.
Change-Id: Ie07310735736eddf5eb0e142297e56164fde7fe4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Disable compiler warning 4996 about the use of C++ standard
library functions like std::copy:
'std::copy': Function call with parameters that may be unsafe -
this call relies on the caller to check that the passed values are
correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See
documentation on how to use Visual C++ 'Checked Iterators'
Commit 0a76b6bc already silenced the warning in the
general MSVC mkspecs, the flags set there are however overwritten
for ANGLE.
Change-Id: I8f9a84d19171057715a8f9be1e8338e02a6c5ba0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This avoids having to define operator< for types where operator== is
required but operator< doesn't make any sense (e.g. QGeoCoordinate).
Change-Id: I81f6a9d8fc0009a4514c974b5e02b446c50d1e31
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Commit 96995db4af implements the necessary bits for this to work
under QNX.
Change-Id: Ie9e2f421f4f27fcaf40697dd363e9ed047754f0d
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
In ancient times, the existence of QMAKE_RUN_CXX_IMP determined the
use of implicit rules. The code path for implicit rules was turned
off in 2006 (0287fe3c), which probably was a refactoring artifact.
Later, implicit rules were enabled again using a different approach.
These days, the non-existence of QMAKE_RUN_CXX determines the use of
implicit rules.
We remove the dead code path now and rely on the latter condition.
One part of the dead code is a feature that turns off inference rules if
the OBJECTS_DIR is set or source file names do not match expectations.
If somebody ever missed this, it has been reimplemented otherwise.
Or not.
Change-Id: If3ce9904d9c1df6e4048c58c2452854cce7fa206
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Naming for different logo sizes on WinRT has been varying in the
past and evolved from using small/medium/large to some being
explicit (71x71).
Add new values introduced by 8.1 (310x150, 310x310,...) and clean up
mixed usage. Detailed pixel versions overrule general specification
and latter ones stay mostly for compatibility reasons. Still the
preferred way is to use explicit pixel values.
Task-number: QTBUG-43644
Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Contrarily to Q_OBJECTs, Q_GADGETs are not guaranteed to
descend from a Q_GADGET. Here, we ensure that if the first
superclass is a Q_GADGET, then the derived class will be
treated as one. This allows gaps in the Q_GADGET hierarchy
while preventing from trying to link to the inexistent
staticMetaObject if there's no such ancestor.
Change-Id: If10fb952e23655102a425bb18fe8babaf447a47f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Moved doc D-Bus Viewer from qdbusviewer.cpp to qtdbus-index.qdoc
Doc moved from qttools to qtbase
Task-number: QTBUG-43537
Change-Id: I718781a8f5029f64fea0f2be241b4d584cc8bfce
Reviewed-by: Martin Smith <martin.smith@digia.com>
qdoc's link command (\l) allows an optional first argument enclosed in
square brackets. This argument is used for narrowing and focusing the
search for the link target. The argument should not be evaluated until
the generate phase, but it was being evaluated in the prepare
phase. This was also a problem when running qdoc in the single-exec
mode. This update prevents qdoc from evaluating the argument until it
is used in the generate phase.
Change-Id: I82785e97077053fb5f5c11f0592155675334aaeb
Task-number: QTBUG-42880
Reviewed-by: Martin Smith <martin.smith@digia.com>
Some of these tests are verifying things that are not supported
on Android, so we XFAIL these cases when we see the appropriate
error message.
Change-Id: I8245266f061c902515bb12251521159a8e19bfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calculate the logical DPI independently per screen, but
only when auto dpr is enabled.
Using a constant DPI value for all screens, based on the combined
geometry is arguably incorrect, but changing this now will
cause pixel-size fonts to behave visibly different from point-size
fonts when moving the window to a different screen.
However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are
already changing when the devicePixelRatio changes. Without this change,
the point-size fonts will *not* adapt, which is a clear bug.
Task-number: QTBUG-43713
Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix screen detection and window geometry when screens have
different displayPixelRatios.
We must use the native coordinate system to figure out which
screen a window belongs to. Also, when a window moves to a
screen with a different devicePixelRatio, we must recalculate
the Qt geometry.
Task-number: QTBUG-43713
Change-Id: I93063e37354ff88f3c8a13320b76dfb272e43a9c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Add marshalling for icon pixmaps to be used in DBus tray icon support
according to the specification
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/Icons/
Task-number: QTBUG-31762
Change-Id: I16e66c272eef413a7c94345c273e5fd3a8c0f771
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
When XCB_USE_XLIB was not defined QXcbXSettings still used XIproto.h.
This change removes XIProto.h dependency and leaves QXcbXSettings
uninitialized when XCB_USE_XLIB is not defined.
QXcbXSettings::initialize() is already used in other parts of code e.g.
qxcbcursor.cpp.
Change-Id: I48eb82e39c5c091b41e8ec19e742a21d41de2610
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
These macros existed for working around an RVCT compiler bug, but since
we stopped trying to work around it, the macros are no longer necessary.
Change-Id: I76cc88d863b41f74f60cd9975dcc1959778c2740
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
By using the special "ar" and "ranlib" tools, the symbol table is made
visible, so we don't need fat LTO binaries. Since we need to store the
new tool names, we may as well clean up ltcg.prf with variable names for
the fat mode too.
Change-Id: I7e53af0c74a3d069313f38500b72538af1d61128
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Instead of trying to load in ltcg.prf and cache the value.
Change-Id: If485ff68fc6ff9d9cf7009cd72d5e702d0199c7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
QLatin1String are actually Unicode, so print them with \uXXXX sequences.
QByteArray are binary (arbitrary), so print as hex. Since hex escape
sequences in C are not limited in length (\x00000F is a valid hex
sequence), we need to insert "" if the next character is a valid hex
digit.
[ChangeLog][QtCore][QDebug] Similarly, printing of QByteArrays whenever
"noquote" is not active now prints the arrays in a format consumable in
C++, with all non-printable characters printed in hex escape sequences.
Change-Id: Ibd0c1a97cbac98610c65c1091bfbcf5581c835db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
[ChangeLog][QtCore][QDebug] Printing of QStrings and QStringRefs
whenever "noquote" is not active now prints the strings in a format that
can be copied back to C++ code. All characters that aren't printable in
US-ASCII are escaped (this includes printable Unicode characters outside
of US-ASCII). Pretty-printing will not respect QTextFormat padding or
field widths.
Change-Id: I169a8a0508e24693f5652f0129defe7f709e5d08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Two serious mistakes:
- we need to call dbus_server_free_data_slot as many times as we call
dbus_server_allocate_data_slot
- we need to delete the d pointer...
The changes to the unit tests are simply to cause the used peer
connections to be removed so they don't show up in valgrind.
Change-Id: I9fd1ada5503db9ba481806c09116874ee81f450d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This just reindents and makes it easier to read what's going on.
Change-Id: Id0afcdfb8f468b4553bba8c5a572a1d0115b0886
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
instead of having each generator do its own magic (little surprisingly,
with different outcomes), add "stuff" to the search path in one place
used by all generators. this has several consequences:
- (unless disabled via CONFIG+=no_include_pwd) $$PWD is now consistently
prepended by all generators. most notably, this was entirely missing
from the MSVC generators (both nmake and VS) - despite them needing it
most. this also affects Xcode projects.
- $$OUT_PWD (if different from $$PWD) is now added right after $$PWD,
not at the end. this precedence clarification only makes sense, given
that qmake tries to make shadow builds as transparent as possible.
- the qmakespec's dir is now consistently appended. the UNIX and PBX
generators prepended it, while the rest already appended. few files
actually include qplatformdefs.h, so having it late in the search path
seems reasonable.
- the effect of CONFIG+=depend_includepath is now fully consistent with
the actual include path.
Change-Id: I5f7570183351ade29342ea74fef706a0738842bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
neither qmake_getpwd()'s return value nor a fileFixify()'d version of it
can be empty.
Change-Id: Ic3b7d20becc57209b9dbe71ad9dc8e7547d435b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The outer QNativeSocketEngine::bind() function will call
fetchConnectionParameters() as soon as nativeBind() returns, so don't
bother copying localAddress.
Change-Id: Ice13e507ccb9c575a7d3bdf0b41394f35230b746
Reviewed-by: Richard J. Moore <rich@kde.org>
Also make the fragment shader a bit simpler
Change-Id: Ie50940da0a4f896504c9f5962cdb6c455983302f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
- After reset a surface we must call makeCurrent before we are usign
swapBuffers.
- No need to set the surface in QPA when surfaceCreated are called in
QtSurface.java, some time the OpenGL surface is not fully initialized at
this stage. Is better to wait for surfaceChanged which is always fired
at least once.
- DO NOT reset m_surfaceId to 1 when there is no surface. The problem
is that if we have one surface and when we distory it we don't (need to)
wait for its surfaceChanged/surfaceDestroyed notifications, and if we
create another one quicly it will have the same id (1).
Task-number: QTBUG-39712
Change-Id: I2aa31e5b59d81ef3b03624d4636a4381eea6d543
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>