QGLWidgetGLPaintDevice::size now returns the size
in device pixels.
This fixes the QPainter "overpainting" and GraphicsView
with a QGLWidget viewport use cases.
Task-number: QTBUG-30217
Change-Id: I01998d39d7b4d755cf8b7b3fab5f75cd0d899ccf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Previously QPainter computed the devicePixelRatio
based on the physical and logical dpi, and expected
that the ratio between them would be either 1x or
2x.
This was problematic for paint devices like printers
where the physical dpi can be much higher than the
logical dpi, and also for QScreen where the physical
dpi would have to be defined as a multiple of the
logical dpi.
Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice::
devicePixelRatio() getter and implement it for the
QPaintDevice subclasses. Use it when calculating the
highdpi scale transform in qpainter.cpp and when scaling
the clip rect in qwidget.cpp.
Remove physical dpi scaling for QImage, QPixmap and
QOpenGLPaintDevice, reverting to the old behavior.
Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus
must be released with IDWriteFontFamily::Release().
Task-number: QTBUG-26861
Change-Id: I314153f97b8b59c9ba728220f93b493b13337039
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We know the size of constructed list, so it may be worth to reserve
memory space for it.
Change-Id: Idad061bc1dbf5acecaec48d2e00ca3504b9db8b8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This caused glitches up to unreadable text with i.e.
pixelSize 256 and stretch factor 4x /* ((256*4)<<16)<<6 */.
Change-Id: Ib6a038a043d820a94bd2019c50390a815a2a8277
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
QFontCache::clear() now frees everything it keeps and resets the cache costs.
Change-Id: I23ac2cab5c7c7d70db03f048b6fde151a18f92e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The comments in this file suggested that the bug was only present in clang/3.1.
However, qRegisterMetaType was failing even on clang 3.2
("tags/RELEASE_32/final"). The clang's bugzilla says [1] that the problem was
fixed two days before the release of 3.2, but apparently it didn't make it to
the release branch.
[1] http://llvm.org/bugs/show_bug.cgi?id=13470
Change-Id: I37db8f6f6b22ab939110e79240d92313c1786d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Use the correct metrics for the requested PageSize instead of always
defaulting to A4.
Task-number: QTBUG-30494
Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
uint32_t is in C++11, which we can not rely on being present. It is also
in C99, but some compilers do not support that in C++ mode.
Change-Id: I29bada724f5646a0a0562b3ab133cb49cf928d6d
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
There is no 'name' variable, but apparently 'd->serverName' is correct
variable here. Some other methods take 'name' as an argument and have
similar code block, so I think this is a copy/paste error introduced
somewhere in the past.
Change-Id: I2e82b42688b9928e0dcc5054df04e87d30a5e38e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QFontCache now references QFontEngineData-s it maintains,
so that QFont instances not freed prior to calling ~QFontCache()
would destroy QFontEngineData on their own.
Task-number: QTBUG-25434
Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
This class of bug seems to occur in 'flaky' CI tests, so give
more information about what the problem is. Found here:
https://codereview.qt-project.org/#change,44210
Change-Id: I73908e309bdecf1fd3bc323dd4e8febe47c1239a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The expected versions are only set if the cmake tests are set up by
qmake by running
qmake && make check
If instead someone uses cmake directly:
mkdir build && cd build && cmake .. && ctest
the expected versions are not known, and the test fails without
this patch. So, don't test the versions if they are not known.
Change-Id: I2e8a4f651a69a8817c819d881be75ca07bc1bfd4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Apple Clang 4.2 caught private members that aren't used in a class
with no friends. Since this code is in a tool, there's no binary
compatibility requirement.
databaseinfo.h:71:13: error: private field 'driver' is not used [-Werror,-Wunused-private-field]
quoter.h:86:10: error: private field 'validRegExp' is not used [-Werror,-Wunused-private-field]
qmlvisitor.h:123:11: error: private field 'tree' is not used [-Werror,-Wunused-private-field]
Change-Id: Iba9995f28ddef983c9ffc1dc551f042539252704
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents
is taken into account when synthesizing mouse from touch events, in
QApplication only the PlatformIntegration syle hint
QPlatformIntegration::SynthesizeMouseFromTouchEvents.
With this patch both attributes are checked. Furthermore the check was
moved out of translateTouchToMouse in QApplication in order not to
influence the result which is returned to the user, when mouse events
are not be synthesized.
Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When a string comes from the native APIs then it may need to be
normalized.
Task-number: QTBUG-14787
Change-Id: I5164e80efcd1d99a50263c72bcf97d7fb31b38f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
We should only warn about missing a11y plugins if iface is 0, since
we obviously have the plugin otherwise.
This got triggered by that a visible widget got destructed, which in
turn called hide(), which ultimately ended up calling
QAccessible::updateAccessibility(QAccessible::ObjectHide).
When QAccessibleEvent::accessibleInterface() then called
queryAccessibleInterface(), QAI::isValid() would return false because
the widget was in its destructor.
Change-Id: If655e00e7bb3737a39e24e26dbd1e23edd515bf5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure this cmake function only searches
for sibling packages as dependencies.
Change-Id: Icab23d333fa6a750ee262b592fae39f0ba334fee
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure cmake only searches for sibling
packages as components.
Change-Id: I9e0c13dfcdba28a9fd6892828b0f509dd63e6604
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
QFontEngine::FaceId::filename is intended to be local8Bit-encoded
but QFreetypeFace::getFace() always treats it like UTF-8-encoded.
Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename
conversions with QFile::(en|de)codeName, where appropriate.
Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
When populating the font database, FcPatternGetString(FC_FAMILY) gets
a localized font family name; but, in fallbacksForFamily, it gets
a non-localized font family name, so it unable to find the proper font to fallback.
Simply register all family name variants as aliases to localized name
and make sure they are checked when getting fallback families.
Task-number: QTBUG-28806
Task-number: QTBUG-30415
Change-Id: I71c03ae9b51a28736c2576f3442f1bbdb3497c09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
It should also have an effect for Visual Studio project files, not
just makefile generators.
Change-Id: I395071f09b29a6e8967a3d44e41d30480ae783f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Perhaps this made sense when all our open gl examples were black,
but with components and I would assume the majority of use cases
we should use the default window background color to fill exposed
window background during a resize.
Change-Id: Ia439a7c3919243efa6026e2e07bee62c25557df0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
... before trying to update the configurations. Before, we would check
whether the pointer to the QNetworkConfigurationManagerPrivate instance
was 0 and in that case construct it. This would mean that this code path
was taken "at app shutdown", i.e. when the qAddPostRoutine had already
been called but the other statics were still accessed.
Note: This is not thread safe, but neither is the rest of the code;
making it thread-safe would require additional changes.
Task-number: QTBUG-30585
Change-Id: I8f6cf616e3f3ba1e84b8246589fb7210d2dae57a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
These macros are useless from Qt 5.1 on.
Change-Id: I4574e87ef36e7bc67d2f1caa38c685a837708764
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The name field string was not set in native dialog when one was present.
The previous fix is not correct. In the doc of setNameFieldStringValue,
it said "The value must not be nil".
Task-number: QTBUG-28342
Change-Id: I847fb7472b8fecc0303433d8bf72b6a5bd7da72b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Initial window position is at 0,0 by default, then it's corrected
in createNSWindow (by calling initialGeometry). After window
creation, QNSWindowDelegate will receive the windowDidMove
notification and call QCocoaWindow::windowDidMove() which then
calls QNSView::updateGeometry(). It will not call
QWindowSystemInterface::handleGeometryChange() because the window
is still being constructed. So we can fix this by directly
setting QWindow::geometry in the QCocoaWindow constructor.
Task-number: QTBUG-30382
Change-Id: I3db7a6e83693e5787ae82dcab1767de938d2e5d1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Changing "C++ API" -> "C++ Classes" to match all the other modules.
Change-Id: I434cd9c32b1db18395242e73564fe309c8ebb99e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This completes the change started with
0bdc86d9ef by providing the implementation
for the Oracle and DB2 sqldrivers
Change-Id: Ia14415c6d7dea51f1369a81236f79aff892b3af7
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
QDoc needs correct capitalization to create a link to the class ref
Change-Id: If95ab1245fcad6c0f624b88eb4522ba78be7d6a6
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
We seem to have two tables. That's a bad idea, but they are there.
I won't add Qt 5.1 until we're certain that the datastream isn't
changing. It's preferable to lack information than to show the wrong
value.
Change-Id: Ibc7eb95bbbf3b35388f910154372fdd896735430
Reviewed-by: Martin Smith <martin.smith@digia.com>
The documentation used to have "Main Classes" list for C++ classes,
and qdoc kept track which classes were supposed to be listed as "main"
classes. This is no longer used, so this change removes the code that
marked a C++ class as a main class and tested whether a class was a
main class. This dead code was seen while preparing the way for
changing qdoc to output a documentation page for obsolete C++ classes
and functions and obsolete QML types and functions.
Task-number: QTBUG-30511
Change-Id: Iccc31b46b7c3c144038372cad4771d974f207937
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Also, get rid of qt_mac_toCGImage and QPainter warnings.
Change-Id: I9e2a0e93d74c318d99651de9222994615e082ac9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
These are the same for normal builds, but differ when cross-compiling Qt.
Change-Id: I75eccc6f4b67b440a08c4aba41aabb7df686c9f9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
By calling itemData() of the source model directly, the result cannot
contain data provided by the proxy model itself. The base class
implementation however will call data() on the proxy instead.
Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The evaluation message box caused the QtWebProcess
to quit due to the fact that the process has no other
windows and EvalMessageBox was both set to be closed
on quit and ended up being the last window in the process.
Change-Id: Iad6461d014258fdc5fade7dafe48da33903377bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
With data=0, ANGLE can crash when setting the buffer data. As this
should be a legal operation, don't perform a memcpy when data is null.
Change-Id: I3fa1260482549b1da50d7a68001a65decb98f258
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This allows the Direct3D 11 version of ANGLE to gracefully allow
surfaces with dimensions of 0. This is important because Qt may resize
the surface to 0x0 because of window minimization or other user
action (window resize). As EGL specifies that empty (0x0) surfaces are
valid, this makes sure an assert doesn't occur in the case that a valid
surface is resized to an empty one.
Change-Id: Ia60c4c694090d03c1da7f43c56e90b925c8eab6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Upgrades ANGLE to dx11proto (dx11-MRT-support tag), which splits out support
for DirectX9 & DirectX11. The DX9 codepath is used by default;
CONFIG+=angle_d3d11 must be passed to the ANGLE project to build for DX11.
Existing patches to ANGLE have been updated (or removed if no longer
needed), and a patch has been added to make DX9/DX11 codepaths mutually
exclusive.
Change-Id: Ibe13befadb94f04883eca449d0ee1f0da955ff92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Axel Waggershauser <awagger@gmail.com>
This allows re-using the function in QtQuick.
In addition TextBoundaryType is moved to QAccessible
and QAccessible2 as namespace ceases to exist.
Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Change 595deca5 for QTBUG-22316 resulted in having titlebars only on
modal dialogs.
Change-Id: Ic23c957e0e95cf567d90831e105cc402465df982
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Note that GtkSettings is already used for retrieving the icon
theme name.
Change-Id: I935d903c703f7d832b0350d3cfd3a638f22d1391
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This uses explicit handshakes between the application and the
gdbserver start and the host side by using the gdbserver socket
and two files ("ping" file in the application dir, "pong" file
in /data/local/tmp/qt)
The sequence is as follows:
host: adb forward debugsocket :5039
host: adb shell rm pong file
host: adb shell am start
host: loop until ping file appears
app start up: launch gdbserver --multi +debug-socket
app start up: loop until debug socket appear
gdbserver: normal start up including opening debug-socket,
not yet attached to any process
app start up: touch ping file
app start up: loop until pong file appears
host: start gdb
host: gdb: set up binary, breakpoints, path etc
host: gdb: target extended-remote :5039
gdbserver: accepts connection from gdb
host: gdb: attach <application-pid>
gdbserver: attaches to the application
and stops it
app start up: stopped now (it is still waiting for
the pong anyway)
host: gdb: continue
gdbserver: resumes application
app start up: resumed (still waiting for the pong)
host: write pong file
app start up: java code continues now, the process
is already fully under control
of gdbserver. Breakpoints are set etc,
we are before main.
app start up: native code launches
Change-Id: Iaa28b8664dbebc39022d1be7ff5533c52ce39715
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The Android style is not fully implemented yet, so prefer the
Fusion style by default.
Task-number: QTBUG-29565
Change-Id: Ida413e6b34a41b618b8e2206688922195ffcc519
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The mathematically correct way would be to set logicalDPi to
160*scaledDensity, but then a 12 pt font would be gigantic. On
iOS, we use a factor of 72 to be compatible with the native APIs,
but that means that a 12 pt font is very small.
A factor of 100 means that desktop apps look reasonable by default.
Task-number: QTBUG-29674
Change-Id: I607f110150fb95685a6980b92f6f92f2b489f959
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Calling clear_mapping causes the persistent indexes to be queried, and
mapped using map_to_source, so that they can be restored later. That
is not the appropriate response to the source model being deleted
because there won't be anything to restore.
Simply clear the stored mapping information instead so that the source model
actually exists when mapToSource is called by the framework.
Change-Id: I99692ee7aa9c6714aec45c68fe4a2d62be189d60
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
When undocking a dock using the undock button on a main window
with native children, the dock widget goes to 0,0 (content
position) causing the window frame to be off-screen since
the frame is still 0,0. This change causes the frame to be
recalculated such that the frame position is 0,0.
Task-number: QTBUG-28872
Change-Id: I32896107cd7b982811f45de43dbad82e7407ea7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Change-Id: I1d8061302fbb8494b5ae31e20a644745fe969f10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Windows file dialogs are always modal (inheriting IModalWindow).
As the QtQuick dialog plugin has a widget-based fallback now,
there is no need to use native dialogs for the non-modal case.
Task-number: QTBUG-30513
Change-Id: I8b62af86fde34e8c0cf5e917d2e62260e16c82fb
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Without this, it is not possible to do vsync drawing on NVidia
GeForce 210 on Windows 7.
Change-Id: I6064826eaa55266344393f50cdf5d17113350255
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The only way to make this possible is to disable the
atomic-rename-from-temp-file behavior. This is not done by default,
but only if the application allows this to happen.
https://bugs.kde.org/show_bug.cgi?id=312415
Change-Id: I71ce54ae1f7f50ab5e8379f04c0ede74ebe3136d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
See https://www.khronos.org/bugzilla/show_bug.cgi?id=449 for upstream
bug in gl.spec which incorrectly marks glTexImage3D as deprecated.
Change-Id: Ib307a5315dd37b8b18389df54b1c93e6a43c61dd
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
406c8ef6e6 introduced deriving the private SQL driver classes from
QSqlDriverPrivate. However, the drivers continued to keep their own
pointer to the private class, even though QObject provides the same
pointer. Worse yet, the private class is allocated too late and not
even passed to QSqlDriver. The result is that QSqlDriver allocates
a separate instance of QSqlDriverPrivate. This is likely to cause
all kinds of chaos.
The private class needs to be allocated in time pass it to QSqlDriver
which passes it on to QObject.
This commit covers the the base class and drivers:
ibase
mysql
odbc
psql
sqlite
tds
Fixes for the remaining drivers will follow.
Change-Id: Id8e7ec4205b0ca6cd00bd022c9cd24f137089245
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
The former represents the physical device orientation, the latter the
UI orientation. We need to explicitly cast between them, as they are
different enums, but with compatible values for the subset we use.
Change-Id: I2926068802f35680cb6de5ced6dcf286014fdb2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
qcocoanativeinterface.mm:196:5: warning:
instance method '-qt_setDockMenu:' not found
(return type defaults to 'id') [-Wobjc-method-access]
[NSApp QT_MANGLE_NAMESPACE(qt_setDockMenu): menu];
Change-Id: I80838d0098e7f172d9b8124f04e91dba64764318
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Having static QFont instance leads to a resources leaking, since QFontCache
is unable to clean-up font engines when the application exits.
Relates to QTBUG-25434
Change-Id: I71d91094de27c07ab2434c415e4c28b6acab3646
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This change amends my earlier change to make
the function reference relevant to the example
being discussed.
Task-number: QTBUG-28204
Change-Id: I841a561ba117f83a96b8b4a3661cea2a7a3e47da
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
When a menu item is merged then we do not want to release it as it will
cause a problem with the Application menu. Therefore we just hide it
instead.
Change-Id: Ia9f7acfe063001111769841c9a360cac369f7ed7
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This file is used by QtCreator to decide if the java files
need to be updated.
Change-Id: Ib4875c32a071dd768f89950582c81ccdd420feca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This patch will follow up on e27ca37 (add more state to
QT::ApplicationState), and add a new event class
QApplicationStateChangeEvent with type Qt::ApplicationStateChange.
Change-Id: Idee724f181f1fbb2321ddad7e0df00c88b3488b1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Some new ctor initializers were added that use
curly braces. qdoc's dumb C++ parser can't handle
curly braces in the ctor area; it thinks they are
the body of the function. In this update, the
Q_QDOC macro is used to isolate these problems
so qdoc doesn't have to deal with them.
Task-number: QTBUG-30254
Change-Id: Ie318e4ac58861f4ebd8a7b9f004d2677f850436e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Task-number: QTBUG-30134
Restore the lines in qcoreapplication.cpp removed by commit
950b35cf97 to ensure QThreadData and
QAdoptedThread object of main thread is destroyed at application exit.
We don't set QCoreApplicationPriavte::theMainThread to 0 as before since
it will be set to zero in QThreadData::~QThreadData()
Change-Id: I8ee56aff5a933ce1d812b07fb00a29ed0839ab6e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix the documented function signature to match the declared one.
Task-number: QTBUG-30398
Change-Id: I0d4894e2597f70e29a3edd4ceda91a4dddb9941e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
evdevtouch moved to platform support, so the location in the plugin is now wrong
(as was the file name)
Change-Id: I976f5d7ee68f5da5ed1f61773b3d5da683e12c6f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
O3 leads to gcc bailing out with OOM on e.g. MinGW with gcc
4.7.3 onwards.
Task-number: QTBUG-29099
Change-Id: I3ce49794fa4857e756d2994454d4144cfb44ce58
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
By moving it to QSqlDriverPrivate we make it easier to check what
database is actually connected which is particularly useful for the
autotests.
Change-Id: I54d1c2c998919c1d54efb1b6ac9303070ece54aa
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The Linux futex interface uses relative timeouts anyway, so this avoids
a double round-trip through clock_gettime: once in Qt code to calculate
absolute from relative and once in libc for reversing.
Glibc does not offer such a function because its pthread_cond objects
use a kernel interface that works on absolute times.
Change-Id: I8fbcd3f73d4364a16716b0eea17e8f5f9ab5cd05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Even if the monotonic clock is available, Android's Bionic lacks the
pthread_condattr_setclock function, so we can't tell it to use the
monotonic clock.
Task-number: QTBUG-30450
Change-Id: I4f53708b1e834ff5d9462b3bf778b96c22662a04
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
this is a qt specific option and really should not be hard-coded.
also, the implementation used undocumented api that is internal to the
bootstrapped process, which made it impossible to de-bootstrap it.
Change-Id: If706960671744e64a9a7c366437977a800a6058e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Since there already is a one-to-one relationship
between QObject and QAccessibleInterface it makes
little sense to create and destroy the interfaces
on each call to queryAccessibleInterface.
Add a cache and keep created interfaces around for
the lifetime of the corresponding QObject.
This changes the memory management rules: accessible
interfaces must no longer be deleted. If you get an
QAccessibleIntrface pointer that pointer will stay
valid as long as the corresponding QObject is not
deleted.
This also re-enables accessibility for Mac.
We limit the range of the IDs so that they are
useable for Windows directly.
That means we can get rid of the event cache there.
This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee
Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The Qt psql driver has its own implementation of fieldSerial() it uses
when it invokes positionalToNamedBinding() to generate a query using
its native naming style. Now that QPSQLResultPrivate is derived from
QSqlResultPrivate this can be implemented more conventionally using
a virtual function instead of pointers to static functions.
Note that this change preserves the current behavior of
executedQuery() which will continue to return the query with
positional syntax that is presented to virtual prepare() by
QSqlResult::savePrepare(). Since the driver does not have the
NamedPlaceholders feature, QSqlResult::savePrepare() will not use
positionaltoNamedBinding() to set executedQuery. Although
QPSQLResult::prepare() calls positionaltoNamedBinding(),
it does not put the result into executedQuery.
Change-Id: I7740f386cbfec9eadd9e4d6a7df3e590294655a5
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Follow the usual pattern that a subclass's private class inherits
its base classes's private class. This will allow the private class
to use virtual functions.
Change-Id: Iafdf1cb5db672d973ad1f60bdd7e37b9072fbb1b
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The "private driver" is already known, so don't keep an extra reference
to it.
Change-Id: I34ec4108694bfbc3da3107f79598ae50a699911c
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
As indicated in the discussion of the bug report, this
does not address the real problem but only reduces the
frequency it occurs.
Task-number: QTBUG-26453
Change-Id: I20ac3f41f52effb674bee6924ccdfd2f641576ef
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since 34a3b63dc7 (Qt 5.0), moc expands
macros to their defined values. This broke the example of tagging a
method: in Qt 4, it never expanded anything, so the tag was always
visible and extracted. Now it's necessary to avoid defining it to empty
when moc is run.
Change-Id: I89967f7f993cf8e14119b086f4dd5573b348646d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Changelog: http://pcre.org/changelog.txt
Amongst other things, the Unicode tables were upgraded to 6.2.0
and case folding support was added, which also fixes a QString
autotest (marked as XFAIL).
Qt still requires 8.30, not 8.32.
Change-Id: I4056c1dc1d949d33443bb8ca280de4c8c363ac74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
According to EnumFontFamExProc docs:
> The ENUMLOGFONTEX structure includes the localized name
> of the script (character set).
lfCharSet ENUMLOGFONT's member must be used instead of comparing
these names to non-localized ones.
Also, when the font supports more than a single charset,
EnumFontFamExProc callback is called for it once per charset; thus,
we shouldn't "unsupport" writing systems in a subsequent call.
Task-number: QTBUG-30448
Change-Id: I58fcf32958490cf5a3e873db8335e71a39a9c518
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Previously it was only mentioned in properties.qdoc
Task-number: QTBUG-18802
Change-Id: Iab23128c1567974154cdcce7412b2e1468bb846a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most important changes:
* SFNT cmap 13 table format support;
* fixed glitches when rasterizing stretched TTF (xsize!=ysize);
* various fixes in Type1, CFF, and PCF drivers
Change-Id: Ib9e2210ffbd0daa2fdbf518ea87f4be502de6b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
For Han Unicode script, the language couldn't be determined algorithmically,
the only way is guessing based on the user's locale.
The is a regression introduced in 9b0fab6b62
Change-Id: I84645885a825fdfb6c268edaf10185bf5e447eb5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Say hello to Interlingua and Mongolian once again.
Change-Id: I735fbc5793f34620be1f6932a251224b9ded02e3
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The problem seems to be that Fusion assumed that tickmarckoffset was
a fixed size, which probably changed when we moved the inheritance
from Windows to CommonStyle. I also had to modify the paint order
Task-number: QTBUG-30294
Change-Id: Ie7320c39fd572d39b641b6bd5a9db05f494f6b74
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
As Thomas Senyk found out, the compose input context
plugin had a redundant include for the X11 keysym header file.
Change-Id: Iad603b545803867d02d915acffe27991bb0b7ee4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Also, removed an "magic color" form the style implementation.
Change-Id: Iefd3ddc0d9d651d2b87f20eb1f9990a214b651df
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The application delegate code from Qt 4 implements
a non-working qt_setDockMenu. Correct the signature
of the applicationDockMenu method.
Change-Id: I6f531a78f91e0550b0e66cc4f2fa072006a030f4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This change makes the function reference more
relevant to the example being discussed.
Task-number: QTBUG-28204
Change-Id: I50bea45f1e11d7e1eef4bc6726ebb329151fbc3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
So far, type-name strings for class template instantiations were constructed
in QMetaTypeId::qt_metatype_id() by concatenating various bits and pieces
into a QVarLengthArray<char>, presumably to avoid the dynamic memory
allocation for small strings.
Yet, when passing the result to qRegisterNormalisedMetaType, which takes
a QByteArray, the QVarLengthArray was copied from, not by
QByteArray::fromRawData(), but by QByteArray(const char*,int), which
unconditionally results in a dynamic memory allocation after all.
What's worse: the characters are copied twice: First into the QVarLengthArray,
and then into the QByteArray.
Remove the first of these copies by using QByteArray+reserve() to copy
directly into the final QByteArray.
Change-Id: Id915798a318fe97279a7cc0aca176544f99c7e86
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Check for the existence of a "@2x" file when adding
an image to QIcon. For example, adding "foo.png" will
also add "foo@2x.png" if that file exists.
Change-Id: If32a3446cf56ca0828de17f6a361091e4c874f26
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QTreeViewPrivate has a private function hasVisibleChildren that
returns if an index has visual children. This can (and should)
check the ItemNeverHasChildren flag.
That will likely be an performance improvement and it will ensure
consistent behavior in error-situations. (The flag will then always
overrule even if the model is inconsistent)
Change-Id: Ied37daf56c39daccea1cb4f5cc555d5cdbc7d971
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.
Account for this when calculating layout sizes by
dividing by devicePixelRatio() to go from device pixels
to device-independent pixels.
Change-Id: I977a86789f9097ebc3c3704ae76e9706f2cb79d8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.
Account for this when calculating layout sizes dividing
by devicePixelRatio() to go from device pixels to
device-independent pixels.
Change-Id: I8aa3d2ee947635ce2a49fff9e0029c9f55ae6c09
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
491dcbfac8 accidentally removed the y-axis inversion
for the widget case. Move it back to the common
code path.
Change-Id: Ie6bbe6f442ca342347af77071da3a743b5655159
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Change-Id: If2ad1af096787e3e1dc424c096566f382ba7a3b5
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
When using different resolution screens, one can arrange them around
the primary screen. However, the vertical offset has to take into account
the fact that NSScreen origin is bottom-left, whereas QScreen origin is
top-left. This usualy impacts the geometry's y coordinate, and can result
in popups showing in the wrong screen.
Task-number: QTBUG-30348
Change-Id: I159e6be2b590bd2d9a31f3f36c3785afcc62123e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Used by features in CMake 2.8.11.
This matches the features in FindQt4 in that version of CMake,
namely that the IMPORTED targets contain the appropriate
INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS
and that the qtmain.lib static library is automatically linked to
on Windows by executables. Additionally, the
INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately
if Qt requires users to use position independent code.
Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Standarize the qdoc namespace to match all the others configurations.
Change-Id: I364d41f20084b77ab3805e72c870147c05da1d42
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
When Qt::AA_UseHighDPIImages is set images and pixmaps
may be of the high-dpi type.
Account for this when calculating layout sizes by
clamping the size or dividing by devicePixelRatio()
to go from device pixels to device-independent pixels.
Change-Id: I7b7f4c36ebd83d72ecdf6fbe0ae20e20ed6540bb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Scale non-widget paint devices as well.
Change-Id: Ic68fb166058e9b162f8baeab81196ee254f30b2e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Since qCpuHasFeature() checks the static qCompilerCpuFeatures variable
and that variable's value might change depending on the compiler flags,
it's best to ensure that the function is not subject to link-time
merging. That would be bad if it happened when qCpuHasFeature() was used
from a file with higher CPU compiler settings than the default, as it
would incorrectly conclude that certain features are always available.
Change-Id: I8bacde056fb89869ec1d306a163742e72522315e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Bring back the ref-counted enable on enter/leave
workaround we had in Qt 4: If any widget in a
window sets WA_AcceptTouchEvents then that window
will start processing touch events.
Enabling touch events has implications for delivery
of other events, for example by causing scrolling
event lag.
Change-Id: I307488937f417612eff624bf9892b82a7f69c1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Make top-level windows generate enter/leave events
for sub-windows. Keep track of the current "under mouse"
window in mouseMoved and send EnterLeave events when
it changes.
mouseEntered/mouseExited handles enters and leaves
from the top-level window.
Add tests/manual/cocoa/nativewidgets.
Task-number: QTBUG-27550
Task-number: QTBUG-29751
Change-Id: If4b9f9e0f39d9fb05fdab45a100ffdcf107965ad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
We're treating fontDef.pixelSize as a box height everywhere but in
harfbuzzFont initialization code the logic was opposite.
Change-Id: I4eecf7861a6084c7f2dbe1df85a71f2e251da845
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Call qt_safe_open in the constructor
to avoid opening the pps files several times.
Change-Id: I1bf79284850353a47ee1fc17797cd667536e17b1
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Always use "if defined" instead of "ifdef". The same is valid for
"ifndef" macros
Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
It's Windows only, and it defaults to true.
Change-Id: I82badbcae0fdba589b57a7dfe627b99ec6cc92c5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When all the Q_WS_X11 were removed, we also removed the special
case for symbol fonts in QFontDatabase for FontConfig. This
was checkSymbolFont() in Qt 4, and this patch copies the
code and adapts it to Qt 5.
Task-number: QTBUG-30044
Change-Id: I346f208052013eae9de3c33c210bf5db1d2aef87
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
...by updating HB_Face::isSymbolFont value to make HB know that the font is a symbol font.
U+00AD is a Unicode soft hyphen character, which shouldn't be threated
like a default ignorable (invisible) when 0x00AD occurred in a symbol font.
Change-Id: Idd4760aded644f7f11a1a8d3c03c348abc69a3e4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This will likely fix some odd cmake related tests in the CI.
This reverts commit 316d8ececa.
Conflicts:
mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
src/corelib/Qt5CoreConfigExtras.cmake.in
Change-Id: Ib7714746f96bf12061d92242a42296d200c56c00
Reviewed-by: David Faure (KDE) <faure@kde.org>
qdoc was not including QML signals in the documentation
for a QML type, when the signals were inherited from a
QML type that had been marked abstract. This is now fixed.
Additionally, the QML type qualifier is not shown in the
header for the documentation for a member of a QML type.
The type qualifier was redundant information, and it was
incorrect for members inherited from abstract base types.
Task-number: QTBUG-30111
Change-Id: I73aef40f69a15bca6948bf36596b83800d248b1f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
This reverts commit 7b655eef48.
QDeclarativeView is back in QDeclarative.
Task-number: QTBUG-25196
Change-Id: Ibe40e790c98b5129bbd844924f71cf3ca0202b5f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
this matches the platform-specific configure default.
as a "side effect", this fixes the in-builddir execution of webkit
examples, as the non-installed qmake now agrees with QLibraryInfo about
the location of QWebProcess.exe.
Task-number: QTBUG-30322
Change-Id: Id28f2c246e4bfda6d5f4d719a66a16f24bb7cdb7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
A call to SetProcessDPIAware() is required in some cases.
Task-number: QTBUG-30063
Change-Id: Iba0203d76c8e7068bf9fd4581770c1aca76a4708
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
If CMD modificator is active [nsevent characters] is used now to get
keyCode. In this case for example English "X" is returned instead of
Russian "Ч" even if Russian input source is selected.
Task-number: QTBUG-30306
Change-Id: I93cd292633e68327df0c580ed74fe8ad1c9ed27d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This was not done in Qt 4 to play well with the QGesture
implementation, and may need to be revisited if/when we
bring back QGesture for Qt 5.
Change-Id: I4f5f6c8a67387039e838d1ef42ecc70c455ed8a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QGraphicsView uses QMouseEvent::globalPos(), so we need to set
it when synthesizing mouse events in QApplication.
Change-Id: I8341e09fdd41400c5c5e1d0ee17c7323efdafaeb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
It gives a good suggestion on what to do and even shows us how to do
it.
doc.cpp:2681:34: error: adding 'int' to a string does not append to the string [-Werror,-Wstring-plus-int]
result += " " + (column % tabSize);
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
doc.cpp:2681:34: note: use array indexing to silence this warning
result += " " + (column % tabSize);
^
& [ ]
Change-Id: Idd2157ab04cd2a3e37a1336bb5e8926ddc14823a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
... otherwise we would not start reading from the beginning when the
device was reset.
Change-Id: Ida196eb40790fba56ff2eed782fd93a3015222f9
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Stop processing for Qt::Desktop windows (which caused
RegisterTouchWindow() to fail with access denied) and set a
flag to cleanly unregister.
Change-Id: I3d10c93ec92536d3ab1c0503f088c40b0c08a01f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
The handling of StyleChange de-maximizes the child window temporarily,
which was emitting subWindowActivated.
This would crash lokalize, because deactivating a window means deleting
the widgets associated with it, and style-change handling is done in
QApplication by looping over QApplication::allWidgets, which would then
contain dangling pointers.
Full valgrind log at https://bugs.kde.org/show_bug.cgi?id=271494#c7
Change-Id: Ifb24032cde2cd470dcae7cd553ec5ab45a919dd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The default implementation (in the super class) passes the event
to the next responder. This seems to be one valid way to handle
the Qt::WindowTransparentForInput flag. So if a non-alien widget
for which a native NSView is created has the flag
WA_TransparentForMouseEvents, that means the window will have
Qt::WindowTransparentForInput, and the NSView which is created
on its behalf will pass on each event so that other NSViews have
a chance to handle it. (It will also try to reject becoming
first responder, but that doesn't seem to be enough for the following
events to be passed on.) This is a followup to
I979be9f72f7d225d7b960fc5db4c3956d2749982 which purported to
obey the WindowTransparentForInput flag, but actually doesn't.
Change-Id: Ia72a3573c2e3cbfa7ede70bee41ac36df6924598
Task-number: QTBUG-28816
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
... otherwise we would not read from the beginning when trying to
read again. The device is reset when we try to resend a request
(e.g. remote host closed etc.).
Change-Id: I21d3647dd0e00ae8bc2507f08166234f21f88861
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
... because e.g. QHttpMultiPartIODevice does not implement seek at all
(QTBUG-30295), which would make resetting such a device fail.
Change-Id: I0a9c0f21047baa72146690bfdf638cdffab0e25f
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
setDockMenu is not documented an may disappear.
Closest documented replacement seems to be
[NSApplicationDelegate applicationDockMenu:]. It can't
be used as a direct replacement since it's a "virtual"
getter that the application delegate implements.
Change-Id: Id161196018057b75cbe7d6f6d2610c0932345c5f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
[NSSavePanel directory] is deprecated.
Change-Id: I3515b565a25028dc5b7c966481707e001e44a077
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
hasMask is a function on QNSView, m_contentView can
be any NSView subclass.
Change-Id: I88b5acbb8aad9aa4664e0f71f37add9dfa64f1b7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
use the same conditional around the #include as the actual code below
uses, otherwise we risk mismatches.
Change-Id: I8ca32c0178b1970928626a927948b06d4c6d31b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Sometimes we get an invalid interface.
In that case the event should just return 0.
This avoids some potential crashes.
Change-Id: I9f166b5d5547dbe7f22c4756502aee811b0b80a6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
A widget window can be expected to show up faster, but on a busy CI
machine, OpenGL windows can take longer than 1 second.
Change-Id: I572cc86bf4d8beebcc565db8d6f2ff78e55c2ac0
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
This happens for example when running several tests.
Widgets in destructor should be treated as invalid
since their window pointer and other properties are
no longer valid.
When deleting a window containing only a table view
there would be a table model reset update comming from
the window being destroyed.
Change-Id: Ia387c814333ce373fe132b189fc180787e36cdd5
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
When QTemporaryFile attempts to create a new file in
createFileFromTemplate, it fails if the filename exists and is a
directory. Windows returns error code 5 (ERROR_ACCESS_DENIED) in this
case - rather than ERROR_FILE_EXISTS - which is not handled.
This patch handles ERROR_ACCESS_DENIED in addition to the already
handled ERROR_FILE_EXISTS, meaning that QTemporaryFile will continue
to look for unique names when a directory with the same name exists.
Task-number: QTBUG-30058
Change-Id: I42339887d7f5483e3dc6a03a9da15111c350da8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
When accessing the parent, we cannot be sure
that the parent interfaces are all valid.
Invalid parents can happen during destruction.
Another cause is unusual hierarchies, the
QAbstractItemView::columnDelegate test triggers
a situation where this used to crash.
In addition to the actual problem, add
checks for every parent() call.
Change-Id: I70b2bf7bc3c02b0f33e22b81023fd24519adeba9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
QIcon::pixmap() can now return pixmaps that are larger
than the requested size, This is a behavior change
that may require updating existing application code,
and is enabled by setting Qt::AA_UseHighDPIIamges.
Add new pixmap() and actualSize() overloads that take
a window pointer. For 100% correctness you want to
target pixmap generation to a specific window, in
case the system has a mix of normal and high-dpi
displays. (The non-window versions uses QGuiApplication::
devicePixelRatio(), which returns the ratio for the
"best" display on the system.)
actualSize now returns the size in device-independent
pixels - not the pixmap pixel size. This matches
its intended use case which is layout calculations.
Change-Id: I2eefc4ed4aa48b036a7019446694e56213070efa
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The value of priority was read without the mutex locked, from within
the thread.
Had to extract a QThreadPrivate::setPriority method so that it can be called
with the mutex already locked. So if the main thread calls setPriority
while the thread is starting, it will be either be before or after the
"re-set priority" code at thread startup, but at least not in the middle of it.
Change-Id: I7a054f68623f61482c749274da66f3b2dcd8bcee
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
These members are in private classe, so we can safely remove them.
qpathclipper.cpp:762:9: error: private field 'm_point' is not used [-Werror,-Wunused-private-field]
qsimpledrag_p.h💯20: error: private field 'm_cursor_drop_action' is not used
etc.
Change-Id: I35ed486eb959c49bb971700500a66411308ee7bc
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
qwizard.cpp:510:14: error: private field 'wizard' is not used [-Werror,-Wunused-private-field]
qwizard.cpp:511:21: error: private field 'wizardPrivate' is not used [-Werror,-Wunused-private-field]
Field "wizard" was really unused, in all platforms, so simply remove
it. The field "wizardPrivate" is used when the Windows Vista style is
enabled.
Change-Id: I1ce254f484b613655bff7f6c3ee8e04479960d7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Apple Clang 4.2 has a new warning, letting you know when a private
member isn't used by any member function (and, I guess, if the class
has no friends):
private field 'd' is not used [-Werror,-Wunused-private-field]
Qt has a few of those for future expansion. It's not an error for us.
Change-Id: Id2edb1159589572f97a07f93181c9c96c5dd983c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Google Japanese Input Beta keeps track of the cursor position, and
bails out if the cursor is not where it thinks it should be. We
have to tell the IM every time we move the cursor, not only when
we are composing.
Change-Id: I9cdb28f81c76e76d3b0125d08bf0595616ca443f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
... so SSL traffic can be decrypted with e.g. tcpdump / Wireshark.
For this to work, the define needs to be uncommented and QtNetwork
recompiled. This will create a file in /tmp/qt-ssl-keys which can
be fed into Wireshark.
A recent version of Wireshark is needed for this to work.
Change-Id: I4e41fd2e6122260cd96d443b1360edc71b08b5fd
Reviewed-by: Richard J. Moore <rich@kde.org>
The setFullScreen() function was never called from anywhere, so
it was just removed. The update() loop for top level widgets has
been replaced by a loop sending expose events to top level
windows.
Task-number: QTBUG-29313
Change-Id: Ic31a05ad3a0693f1d3f61457cee9d78f6b334b4d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The merge of dev->stable branch somehow lost these bits of:
Make QCoreApplication::startingUp() return false when appropriate.
Which was Change-Id: Ie511522d35b5658c20be43dd112eae18c205277f
Change-Id: I2991b10e2774bf5a59fa37734d4a9fd39d51b472
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
The plugin should try each class name from the meta object
in succession instead of giving up right away and just using
QWidget.
This improves the handling of the itemviews and makes many sub-classes
of QWidget outside of Qt work.
Change-Id: Id81017c648fe229c3eb85d6d9ae6696d5f16a1ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This is inconsistent (e.g. the glib event dispatcher doesn't do this) and
unnecessary (already done by QThreadPrivate::finish before deleting the
event dispatcher, and by the QCoreApplication destructor).
Change-Id: Ib98147953a5e71ec87aab0ec7ef5063bb7d80134
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The installation of the java files does not depend on Qt,
so it can be built before the rest of Qt, which means we need
to remove the default dependency in qmake, otherwise we can
get an error message:
Project ERROR: Unknown module(s) in QT: gui core
Change-Id: Ibb968acf6ec06c91ccfd5002e08c93c96a209934
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-old title created broken links in Assistant.
-conforms to Qt 5 naming scheme.
Change-Id: Iaf619c1264edc1f9d2fd24f7031fe6c07efd2c1d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This matches the Unix behavior, and ensures atomicity (as required by QSaveFile)
Change-Id: I54ec98bcd7a0714ca968cad627a5e4d684fd7af6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The number of iterations was not respected for XML output, unlike for
plain text output. With this fix, benchmarks report the same result
for plain text and XML formatted output.
Compare the change to qplaintextlogger.cpp:274.
Change-Id: Ieb3e5812e18d93c36847bef0417f779efd300f86
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Molkentin <daniel@molkentin.de>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
The subpage listing all the members of a QML type,
including the inherited members, was trying to use
an old format that works ok for C++ classes but is
not optimal for QML types.
The redesigned format for QML types still lists all
the members but it lists the members for each base
type in a separate list.
The members for a QML type that has been marked as
abstract are listed with the members of the type
that inherits the abstract type.
This fix does not fix QTBUG-30111, which will be
fixed in a separate commit. This means that some
links on the subpage generated by this change
will be links to a page that doesn't actually
contain any documentation for the linked member.
But it will eventually.
Task-number: QTBUG-30114
Change-Id: I8ae4227d1eaecdbc24a4ac9b8119f0ced2cdee92
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
postEvent() accesses it with the postEventList mutex locked, but
processEvent() was checking it without any mutex locked.
Change-Id: I31bbb50f7a1c337067b8e3de16ee7cd11400b517
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's read and written by different threads, so this was a race.
Change-Id: Ieffaa169eb67f40dc935291b3994f9ff1c7e05f0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I87e0b2e11670ea71da8e4d2f718dc97dd32dd57d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Re-use the QCocoaWindow implementation.
This gives a small performance boost since NSWindow
can skip drawing the background if it knows that the
content view will fill with opaque pixels.
Change-Id: I4a9a14135d890e9132dd1cb0af5a1c1a769d7e2f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This was accidentally removed as part of the merge from
dev.
Change-Id: I102ff0d67a136b0dbe467d83edccf02880536d7f
Reviewed-by: Liang Qi <liang.qi@digia.com>
Use persistent data to specify the alternative location
of Qt libraries instead of command line arguments, so that the
application can be run from the launcher and not just from
Qt Creator.
Task-number: QTCREATORBUG-8643
Change-Id: I72df2905f3f35a3b924edd47d3a5387e674c97ac
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Preparing the addition of toNSMenu() functions to QtMacExtras which
will expose the native handle of a QMenu or QMenuBar.
Task-number: QTBUG-28869
Change-Id: Ib07712f5da0758addbbf8a84d6881297420e7ac8
Reviewed-by: Harri Porten <porten@froglogic.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
When switching from Xlib to xcb platform plugin it was agreed that
XIM is deprecated. Users should be using QT_IM_MODULE to load input context
plugin for a more advance input method framework support.
The proposed solution is to parse the compose file directly from Qt. This
approach removes the overhead of communication protocols used in Xlib and/or IBUS.
TableGenerator class follows [1].
The compose file is searched for in the following order:
1) If the environment variable $XCOMPOSEFILE is set,
its value is used as the name of the Compose file.
2) If the user’s home directory has a file named
.XCompose, it is used as the Compose file.
3) The system provided compose file is used by mapping the
locale to a compose file from the list in
/usr/share/X11/locale/compose.dir.
Regarding step 3 - TableGenerator searches in hard-coded locations for
system-provided compose files. Here I have introcuded a new environment
variable QTCOMPOSE which can be used to prepend an extra location
to be searched.
[1] http://www.x.org/archive/X11R7.7/doc/man/man5/Compose.5.xhtml
Task-number: QTBUG-28183
Change-Id: I76dcfd454f3acc23db98192a3673c1ab2af4425f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
If a popup is transient for another window, the other window should
not be resizable while the popup is open. (Resizing didn't close the
popup, either.) The popup is emulated with an NSPanel rather than
being a native popup, so we don't get this behavior for free.
Task-number: QTBUG-30266
Change-Id: I49d04a095b428d169fe36ae1768c889578c3c054
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
The purpose of PE_Frame is to draw the frame, not the background. The
old code tried to check whether a custom base brush was set, and
otherwise let the theme draw the background. That didn't work together
with CSS background images. This change removes the background drawing
from PE_Frame, and let's PE_Widget to draw the background using the
base brush that defaults to a color fetched from the theme.
Task-number: QTBUG-24783
Change-Id: Iaddfcbd613122a9aed39e77ba05a26f94995f7d2
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Check for QAccessible::StaticText role in addition to EditableText, to
get correct frame for non-editable text widgets, such as QTextBrowser.
Task-number: QTBUG-24783
Change-Id: I2c3e4f4fa06c8122485b1bc6c1da04c7565c7223
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
In reset() if SqlExecDirect returns SQL_NO_DATA the column metadata
is ignored.
Change-Id: I0501fa47c42754bba42b3531da59e66c696eac53
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The QODBCResult::exec() returns false when query is an delete
with no data do delete caused by SQLExecute function returning
SQL_NO_DATA, but the false return means error on execution.
Task-number: QTBUG-10569
Change-Id: I6c7ebadcf62ab404b60c7bcccdab6a10bf16a923
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Change-Id: I957d662d677766732f324e48a6bc42f23f1a444c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: If454627be464e388cb8f529a6041d3ec804f22ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
this is cleaner than having it parse qmake project files.
the only remaining built-in version extraction is the fallback to
qglobal.h needed for bootstrapping.
as a "side effect", this fixes the build of modules with mismatched
versions centralized in .qmake.conf, as this was simply not handled so
far.
the -mkspecsdir syncqt option goes away, as there is no use case for it
any more.
Task-number: QTBUG-29838
Change-Id: I6912a38f0e93a26bc267a9e3d738506fd3ad431b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
There is some code duplication between QMacStyle anf the Cocoa QPA
plugin regarding painting and bridging with Cocoa.
Task-number: QTBUG-29725
Change-Id: I347407a9bca47b6fccd77fb924688bd35135d96b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
(cherry picked from commit 5f948eb62d)
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Added new environment parameters QT_QPA_EVDEV_KEYBOARD_PARAMETERS,
QT_QPA_EVDEV_MOUSE_PARAMETERS and QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS to the
evdevkeyboard, evdevmouse and evdevtouch input plugins. In order to get
evdevkeyboard support for keyboard layout, explicit device file and more.
Change-Id: I0d9139cd0d4b682ab2df7c16ebd16d4d9c0c0ab0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Added code to check to see if the menu item already exists in the
application menu before adding it.
Change-Id: Ie0a5eab3c61d5a3413a834d2e57bab40660f6802
Task-number: QTBUG-27202
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
1. when there were some engines with ref > 1 in the cache, prior to calling
QFontDatabase::{add,remove}ApplicationFont()/removeAllApplicationFonts()
(QFontCache::clear() has never decreased engine's cache_count);
2. when the QFontEngineData's engine is not in cache i.e. the Box or Test font engine
(~QFontEngineData() didn't free engines it keeps).
Instead of using the font engine's (external) "cache_count" counter,
QFontCache now references a given font engine every time it is inserted to
the cache and dereferences exactly that number of times in clear().
Change-Id: I87677ebd24c1f4a81a53526f2e726e596b043c61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
... when the compiler do not support variadic template
Change-Id: Iec84cad8ece2fc28b0c224872fdd90d30ae60fc9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When variadic templates and decltype are supported, detect the best
overload of operator() to call.
Currently, the code takes the type of the operator(), which requires that
the functor only has one, and that it has no template parameter.
This feature is required if we want to connect to c++1y generic lambda
(N3418)
Change-Id: Ifa957da6955ea39ab804b58f320da9f98ff47d63
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Else, the operator,(T, ApplyReturnType<void>) is sometimes chosen if a
pointer is passed, and that is breaking some decltype expressions.
(such as the one in ComputeFunctorArgumentCount in the next patch)
Change-Id: Ic203bbb1a8f5abbebb3b11786454807aa20be5fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add window minimization capability on the plugin.
Change-Id: I4539d29b8ebbef935213edde634f0a85b6a21766
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
As of now, we'll have everything related to the additional formats handling
just in a single place. Make specialData private to prevent accessing it
from outside. This helped in tracking-down several related issues:
- in format(const QScriptItem *), the resolvedFormatIndices can not be empty
at that point, so the code path is dead;
- in resolveAdditionalFormats(), testing if formats has not been indexed yet
is not needed since they are indexed just in the setter;
- in useRawFont mode, hasFormats() didn't check if QTextEngine really
has some formats, which potentially leads to formatting artifacts.
Change-Id: Id4b912888fd5a1fa83f01007170134b6386e2879
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Change-Id: Ic93054d8fc68497fb0bcc2c5491924b9c57b78ad
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Padding was correctly added between glyphs but it was missing at the
texture edges.
Change-Id: I6d5e1206194f6aecefcfc45ead22d54c1207de4f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
qdoc was using the method signature (beginning
with the return type) to sort methods for listing
in the HTML output. Now qdoc sorts on the method
name, which makes the list easier to read.
Task-number: QTBUG-29708
Change-Id: If3785ccd5849df53b01043c2dada0b6bf3c00614
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead of first finding it and then testing that we can find it.
Change-Id: I1a1090693520b1d6adadef93839f25d277947e76
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>