This is not needed. The DnD initiated scrolling is done by
installing an eventFilter which forwards all MouseMove events
to the QGuiApplicationPrivate::processDrag which creates and forwards
all the necessary QDrag* events. QAbstractScrollArea has its own logic
in the timerEvent() to make the view scroll when the pointer is standing
still on the edge and the drag process is still ongoing.
With the current implementation, widgets (during the DnD) were receiving
DragMove events even when the pointer was standing still outside auto scroll
areas.
Task-number: QTBUG-28171
Change-Id: I355d88f3eab0ad39f916f84d66f5d0af7c0ff93e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
We removed all Q_WS_WIN code when going to Qt 5. One of the things
removed was the condition that we do painter path text rendering
for transformed, non-ttf fonts, since the GDI engine does not support
transforming those. This has now been reintroduced and adapted to the
QPA way of doing things, by checking for it in the font engine subclass.
Then there was the problem that QStaticText only supports cases
where the font engine can transform the glyphs. Thus we need to fall
back to regular text drawing in drawStaticText() for unsupported cases,
and we need to skip the optimized path in the raster engine (which
goes to drawStaticTextItem)
Task-number: QTBUG-30932
Change-Id: I17ba7355ee127811b0e77bb3a9b9db092e99893b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The new enum value was introduced in f3612f39ff
Change-Id: I9ab5d8fba459408246e9a6f40c5c086af5abbf82
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
PostScript support was removed back in 2011:
34f712e79e
- The QPSPrint* classes are gone
- The QPrinter::OutputFormat enum only has NativeFormat and PdfFormat
constants
- QPaintEngine::PostScript is unused now
Change-Id: I27d595b92341f41e14bd1e4fd860eac6826d7890
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Set SCREEN_PROPERTY_SENSITIVITY to SCREEN_SENSITIVITY_NO_FOCUS of the
screen window when the Qt::WindowDoesNotAcceptFocus window flag is set.
Change-Id: Iac0764a84186c382dcd3f4bdd31dd24ac15df768
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
PostScript support was removed back in 2011, but not documented then:
34f712e79e
Change-Id: Ie818bf5f733422db910efadd57efa0ddabcc5175
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Several modules, including DBus, MySQL, and OpenSSL have
configure options of the form <MODULE>_PATH, which is used
on Windows (where pkg-config is not present) to specify the
locations of third-party libraries. These switches had been
implemented by adding extra variables which were referenced
in .pro files, to add the appropriate compiler and linker
switches. This is undesirable because it means there are
two independent paths for adding the switches to the build,
which can get out of sync with each other, and indeed this
had happened for some of the DBus tools.
To remedy the situation, all three of the switches were
reworked so that they added values directly to the principal
variables that are used in the project files. This reduces
maintenance, by ensuring that the pkg-config and non-pkg-config
paths appear the same to the rest of the build system.
Change-Id: Iae342f1d14b79fbcfef9fe38aadc803ad3141799
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
You are not supposed to call NSOpenGLContext -setView: for a view that
has not yet called drawRect. We we attempted to do this, we would get
the invalid drawable error, leading to QGLWidgets just drawing garbage.
Task-number: QTBUG-28175
Change-Id: I47aef07b4676f2db8591f98fc1661f6f447bdef9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Added the same information for QFontMetricsF::elidedText.
Task-number: QTBUG-30865
Change-Id: I57791de21f5721d7a505c3d13f450e5ec6cd2730
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QDoc adds document nodes as files into the .qhp, including nodes with
image subtype. This will generate a lot of unnecessary warnings for
missing '<image>.png.html' files from qhelpgenerator when running
'make docs'.
This change makes qdoc skip the above step for image nodes to remove
the warnings. The images are still always added to .qch in a separate
step.
Change-Id: Ib07fc8a3ce65f5d4dd700daf00f5f6a36f74a696
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Numpad is unnecessarily long.
Change-Id: I19a6ce129e26a4f6f8344f514317214c48abde6e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
The implementation that GCC came with from 4.4 to 4.6 used external
locks for most platforms, other than x86. It's unsuitable to be called
"atomic" at all. More importantly, it's not behaviour-compatible with
Qt's own QBasicAtomic classes.
Change-Id: I92a0beab58504e6bd7cd236d358fef905c69821c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
You can't write:
connect(proc, &QProcess::finished, [](){});
because of the overload.
Change-Id: I651cc56ee15481392590dc44942d8e814fad75f6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If a transient scrollbar was hidden during the fade out animation,
it got stuck visible after being shown again. A regression introduced
by f52177829a.
Task-number: QTBUG-31060
Change-Id: I1cda16c6afa4370cce4702d3b4fdaee9f44f9ab9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
All occurrences of `#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)` have
been replaced with `#if defined(Q_OS_MACX)`.
Change-Id: I5055d9bd1845136beb8ed1c79a8f0f2c0897751a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The equivalent was done earlier for qmake, and this will enable
developers writing OS X-specific code to use #ifdef Q_OS_MACX as
opposed to overly verbose #if defined(Q_OS_MAC) && !defined(Q_OS_IOS).
The sole usage of Q_OS_MACX within qtbase has been changed to the
now appropriate value and documentation has been updated.
Change-Id: I2c59eea02e94b691b705170b2f96a97940fdc756
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Compact an object in regular intervals when inserting
data into it, to avoid the object becoming huge.
Compact an object/array before inserting into another
array or object.
Check that the document doesn't get so big it's overflowing
the internal data structures.
Task-number: QTBUG-29288
Change-Id: Id39d80dac1e7d5a11f40819f41b4b336bce16947
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix connection to pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.
The current code only use the QMetaObject of the type coming from the
function type to look up the signal id. But if the signal was casted
to a pointer to member function of a derived type, then we also need to
look in the base classes
Change-Id: Ib98fc38f63942946acb34d9f83c100991d58e4e5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit 79e729e111, which
partially fixed QTBUG-30122 and will need to be reopened.
On the Creator side, we think using the Qt::ToolTip flag is a bit unsafe
since tooltips are supposed to have very limited interactivity. We would
like to propose to use a similar pattern as in QComboBox instead.
Task-number: QTBUG-30702
Change-Id: I245b7d8b16ac870564ea44f24f481ebfec8ca9a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
moc currently silently ignores them, but I have a version which display
a warning.
Change-Id: I9a239cb7e99d40a57a013fb66357c4a6426d6e8b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
During qHash refactorings, this line was changed as qt_hash didn't have
an overload taking a QStringRef. This causes a performance regression
w.r.t. the same code in Qt 4.
Task-number: QTBUG-30821
Change-Id: I17b27a54a73cb9061c20f1bd7f79d0c405050edd
Reviewed-by: hjk <hjk121@nokiamail.com>
qdoc's faux C++ parser did not recognize class declarations
of the form:
class Name1::Name2 {
...
};
...where class Name2 is nested in class Name1. Now it does,
but this fix doesn't handle deeper nestings. doc needs a
proper C++ parser.
Task-number: QTBUG-28664
Change-Id: I5adf88cc1b2ce03f5565250734416bf9592914b5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The brief text for a documented thing is now output as an
attribute of that thing in the module's index file, and it
is reconstituted in the thing's tree node, when qdoc reads
the module's index file later. Only the verbatim text of
the brief is saved in the index file, i.e. no links or
other markup.
The effect is that brief texts can be used in other modules.
Task-number: QTBUG-31021
Change-Id: I932a0c85259b6d1901138f0c0959ddb9815b7db5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
There is no longer any difference in install directories between demos
and examples (QT_INSTALL_DEMOS is obsolete and points to the same dir
as QT_INSTALL_EXAMPLES for compatibility). This change removes any
special handling of demos' paths used in manifest xml, enabling the
demos to be visible in Creator welcome mode as well.
Change-Id: I5afdf578a42d001fab05979d3ea1102fd52b51da
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
In Qt 5, I managed to break the guarantee that a deserialised local
datetime is the same time of day (potentially different UTC time),
regardless of which timezone it was serialised in. This happened after
I fixed QTBUG-4057 with If650e7960dca7b6ab44b8233410a6369c41df73a,
which serialised datetimes as UTC.
This patch reverts QDateTime serialisation to pre-Qt 5 behaviour to
restore the guarantee and consequently re-opens QTBUG-4057.
Change-Id: Iea877f7ed886f530b928067789b53534e89fe8cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Necessary to make QWindow::fromWinId() work on Mac.
Change-Id: I0dc3a1b0d63cff61d484693aee711dc54fea6b2f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The warning causes a test failure since it occurs with XCB.
Introduced by enabling frame strut events for all widgets
by f2fcf75381 .
Task-number: QTBUG-30530
Task-number: QTBUG-29012
Change-Id: I025b55f5198a270072b33cae033221709db256aa
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
If tabFocusFirst is not cleared or set to another valid item,
there will be crash later if the removed item is deleted after
removal.
Task-number: QTBUG-30923
Change-Id: Iba9a6ce9334c52f8e552b0accda95ebb5fcfcdb1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The custom printf formatter Qt ships supports e.g. %lld, which is part
of gnu_printf, but not ms_printf. This fixes a lot of MinGW warnings.
Change-Id: Iff600f20ac23ecb88c4b569d2e668f5d4af6ef27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
qWarning now depends on QT_MESSAGE_PATTERN, depending on that variable.
It will show things like the moc process id or the Parser::error
function name. We don't want that.
Change-Id: I5b35401200f0f7de2442aa77d700a82402081489
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The current implementation kept a list of TouchPoints that
was reused when sending active touces to QPA. This list was
never cleaned up, so if you pressed three fingers, and released
one, we would still continue to sendt three touches to QPA.
Especially, since this list was not cleaned up when receiving
a touch cancel, mouse events sometimes stopped working when trigging
a system gesture (like a four finger swipe). This can be seen by
using the fingerpaint example.
Since we cannot rely on TouchPoints having IDs that corresponds to
their index in the touch point list, it ends up being
simpler (and results in less code) to rewrite the implementation to use
a hash table of UITouch to TouchPoints instead.
Change-Id: I5b32f57a8d72a0b8759a64ac7cdfa6700109d2b3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
QWidgetWindow will always redirect mouse events to the active popup
(if any). The same logic is not implemented for touch events, which
means that touch events are always delivered to the widget under the
finger.
It is therefore possible to interact with widgets that are modally
shaddowed by the popup. It is also not possible to close popups
without touching them directly.
This patch will ignore touch events when a popup is active, and
as such, force a synthesised mouse event to be sent instead.
Implementing proper touch support also for popups is out of scope for
widgets.
Change-Id: I023c09c3e1fd4e5495df990c11419c69ecafb8f9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The current documentation is not terribly clear on this topic, and there's a
couple of posts on various forums where people want to do this. In fact, the old
wording suggested (at least to me) that it is OK to explicitly override a
disabled state, which is apparently not true.
Change-Id: I10c54e0089e9ba5d16958aea62df27feafdf7b3d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The underlying rename() of the operating system simply does
nothing when renaming 'foo' to 'Foo' in a case insensitive file
system. Work around by moving in 2 steps.
Change-Id: Ibc73724bfca402a5ce7fcf2a83e8fea32ff71093
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It makes more sense to keep this workaround header together with the other
libxkbcommon files for a better access point since it's used by several *.pro
files.
Change-Id: I63d4eb58f6e7f3852834e41c4b6e058a2c962233
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
To have a properly working key input in the xcb plugin in the case when
xcb-xkb library is not available we can update the xkb_state struct with the
keyboard state information available in the X11 core events.
The current modifier state is reported to clients in a number of core
protocol events and can be determined using the QueryPointer request.
This is how it is done in Weston, Wayland's reference implementation.
Note: In case the X server doesn't have a xkb support on it (which is very
unlikely), then xkbcommon will only pick up the user's primary layout.
The X server with the xkb support stuffs unused bits (13 and 14) of 'state' in the
core events with the effective keyboard group, which we can use to determine layout
changes.
Change-Id: I9f1ef635109870e7412ef1157ca592f3c8f9271c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This is required for a modifier+key shortcut support.
Also fixes old Qt bug when keymap group changes were not handled
properly for shortcut functionality.
Task-number: QTBUG-26902
Task-number: QTBUG-4845
Change-Id: I04d2c2ad7049df7420999816154605848fa670e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
libxkbcommon is a keymap compiler [1] which utilizes xkb
keyboard configuration database [2].
xkbcommon simplifies keyboard state handling by providing xkb_state
object which holds the current state of all modifiers, groups, LEDs,
etc, relating to the provided keymap.
Detecting modifier mapping should become simpler once it gets supported
in libxkbcommon. Also with xinput2 we could get rid of the XkbStateNotify
events, because xinput2 key press/release already include all the mod/group
info.
[1] http://xkbcommon.org/
[2] http://www.freedesktop.org/wiki/Software/XKeyboardConfig
This patch:
- Removes a dependency to -lxcb-keysyms
- Removes a dependency to XLib call - XLookupString
- Enables required functionality to fix QTBUG-27681
Task-number: QTBUG-27680
Change-Id: I10e10f873821ee02f6df72238e215a541150f38f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
1) -qt-xcb
a) Use xkb from the 3rd party libs. As it is done for the other xcb
dependencies when qt configure with -qt-xcb.
2) -system-xcb (default)
a) If xkb found then use xkb from the system. (Currenly xkb is not
enabled by default when configuring libxcb library).
b) If xkb can't be found on the system then keyboard state will be
updated from X11 core events.
Change-Id: I7c3dbce6daa2cec52067cd5af80f19040233a0db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This library is required by the XCB platform plugin. As we depend on
very recent version of this library and it might not be available
in base repositories of distributions, users can use -qt-xkbcommom
switch to build Qt with the bundled version.
Change-Id: I0ed2a5cc2f1df98b0e7cc926cabfa69818674e08
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Similar to what change a298216bb4 does for update(QRect) we clip
the update region against the widget's rect and return if it's empty.
Otherwise we risk ending up with update rects that are larger than
INT_MAX due to multiple update rects being merged.
Task-number: QTBUG-30876
Change-Id: Idf695b1fdca50449a1e5ddf37500653de290590c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Set up for downloading from the qt-project.org servers instead
of KDE servers.
Change-Id: I6f9e69f91ea956165300d75109e1683d0b1aa5f0
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
We have to use the 4.4.3 compiler toolchain for producing binaries
for ARMv5 on Android, since the 4.7 toolchain has a regression for
this architecture. The regression has been fixed, but the fix has
not been released yet, so until it has, we need to use the 4.4.3.
However, the 4.4.3 toolchain has a different bug, which breaks
compilation in qtimageformats with a message about redefinition of
uint. This works around that bug for Android builds. When the
patched compiler has been released, we can revert this.
Task-number: QTBUG-30921
Change-Id: I620c186c6e932413a4de1dd331fbf4b9401f2e72
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Change-Id: I98145fb3149dd8f7aba60d305da98c148aa9c705
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
If a process dies before all output is read into the internal buffer
of QProcess, we might lose data. Therefore we must drain the output
pipes like we already do in the synchronous wait functions.
Task-number: QTBUG-30843
Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
If \wrapper appears in a \class comment or a
\qmltype comment, qdoc will not print warnings
when it finds public members of the class or the
QML type that are not documented.
The \wrapper command is added to several
opengl classes. This reduces the number of
qdoc warnings by several thousands.
Task-number: QTBUG-30755
Change-Id: Iba1eebc1590ccf54100e40fe91423240c1b3d09d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
QApplicationPrivate::translateTouchToMouse always sets
buttons() to Qt::LeftButton for synthesised events. This is wrong
for a mouse release, since 'button' should in that case be
Qt::LeftButton, and 'buttons' should be Qt::NoButton (since no buttons
are actually being pressed).
This caused problems for QGraphicsView, which refuses to
release any mouse grab set on a QGraphicsItem if at least one
button is being pressed (which was always true).
This resulted in broken drag behavior on touch platforms.
Change-Id: Iefe63cd753f9f8bb04278fd04a4d728e3deda25e
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
When QGraphicsView has sceneInteractionAllowed == false (e.g
when dragMode == QGraphicsView::ScrollHandDrag), all touch
events are accepted. This is wrong, and will stop mouse synthesising
from happening on touch platforms. This in turn will make
ScrollHandDrag not work (since no mouse events will come through).
This patch will call QEvent::ignore() if the touch event isn't send
to the scene, which will cause a mouse event to be synthesised.
Note that according to http://doc.qt.digia.com/qq/qq11-events.html
the correct approach would probably be to just return 'false', rather
than calling QEvent::ignore(). But this logic is not followed
consistently elsewhere (e.g in QApplication::notify), so I choose
to follow what the code actually expects for this bugfix.
Change-Id: Ida777647134c41661bab156d7b164ebd882a6bb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
One reason is when we are using XInput 2.2, because touch devices
will then generate touch events only. For the other X11 scenarios,
X11 does its own mouse emulation.
QPlatformIntegration::styleHint() wasn't overridden yet. The remaining
hints are TODO for now.
Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
It's possible to override event() to receive the QCloseEvent and
do event->ignore() to prevent the window from closing.
Task-number: QTBUG-31019
Change-Id: I9abed47fca02a002b78727f98d678a824854adfc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-"qt-sql" removed in qtdoc
-no longer needed because "Data Storage" and Qt SQL pages already serve
as the main introduction to SQL support in Qt
Change-Id: I7384ae04ab4c09ecc9d76668e4e7f836095066c1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
defaultFramebufferObject() may be called from anywhere, at any point,
not just makeCurrent(). One example is the glyph-cache, which uses it
to re-bind the default FBO after generating the texture cache.
If the default FBO had already been created, but the render-buffer was
out of sync with the window size, we would end up in the resize code
without the correct context current, and without the render-buffer's
owning FBO bound. This caused "Failed to make complete framebuffer
object 8cd7" warnings at runtime.
We now make the context current and bind the FBO, even though it might
already be bound and the context current from makeCurrent(), or when
initially creating the FBO. For the future we should move the whole
resize logic out of defaultFramebufferObject() and call it from
makeCurrent(), or possibly [EAGLView layoutSubviews]. That's a
higher impact change though, which we reserve for the 'dev' branch.
Change-Id: I50ea949c12a02ad1af6ec9fdc3215d5da85b324f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT,
so for OpenGL ES2 we use a custom program that emulates repeat by taking
the fractional part of the texture coordinates.
This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT
with a NPOT texture is an error in some implementations, so we have to
guard the call to updateTextureFilter() in updateBrushTexture() with
a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead.
This fixes missing/black backgrounds in the diagramscene example on iOS.
Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Even though the intentions of this warning were good, the warning
was a bit harsh. In addition, in certain circumstances
(like the autotest demonstrates) we could end up calling object()
on an interface where the object was in the destructor. This
could happen because: *after* we got the destroyed() signal, the
widget would still notify the accessibility framework of a FocusOut
event.
Since the code even called object() from isValid(), we could not even
(as a defensive measure to circumvent this issue) check the isValid()
of an interface without getting this warning (duh).
So - for isValid(), the warning is not needed at
all, since the caller will of course check the result of isValid() and
act accordingly.
As for the result of object(), it should always be a pointer, but it
might point to a partially destroyed object. To detect this, you simply
check isValid() first:
if (iface->isValid())
doStuff(iface->object());
Change-Id: I206307fe618806133d8c6bc338c412d0009d7181
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Take into account the possibility that the target platform plugin does not
support platform services.
Change-Id: I48e7fac2e1230a9a7d450414044d23ed26b334be
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
At the moment if d->m_data == systemData() it calls
systemLocale()->query but forgets about the standalone part
so you get the wrong data
This patch introduces the new enums so that backends can implement
properly the standaloneMonthName feature properly. At the moment the Windows
and Mac ones still return the monthName, the Unix and Blackberry ones return
the data we store in months_data
Change-Id: Idc5a50b04ab1f914f16c7385be1dca2e027feae3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For bundling Qt, we need two things:
1. We need to build a regular .jar file out of the Java files,
so that they can be built into the app package. Dexing the
classes first (i.e. compiling the JVM bytecode to Dalvik
bytecode) is required for loading the .jar file at run-time,
but cannot be used for building it into the app, so we need
two different paths.
2. We need to specify which extra files have to be bundled for
each module (this is primarily for plugins and imports). This
is because there is no static dependency on these files, so
it cannot be detected during deployment.
Task-number: QTBUG-30751
Change-Id: I733603ee5d1c64bd7c5b9357eb5d993b9d0298f7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Add the enablers so that Qt Creator (or another
deployment tool) can add a specification in the app's
meta data of which libraries are bundled and the
Java code required to extract plugins and imports into
the required directory structure inside the app's
data directory.
This is intended to be an alternative to using Ministro
for deployment, and the mechanism of extracting
libraries on first startup is a work-around for the
requirement in Qt of having this directory structure.
For Qt 5.2, the approach should be changed to load
plugins directly from the app's lib directory and
the other files in imports will be bundled as qrcs
in the native plugins.
Task-number: QTBUG-30751
Change-Id: Ibdb3a672548b4802f9bf3ecd05fc194426ac30e7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
KeccakF-1600-opt32.c:497:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
harfbuzz-thai.c:264:49: error: comparison is always false due to limited range of data type [-Werror=type-limits]
These warnings are caused by "char" defaulting to unsigned on ARM. In
particular, the second warning was introduced by commit
785e95ef0a, which is not upstream...
qbenchmarkvalgrind.cpp:224:5: error: variable ‘_qzz_res’ set but not used [-Werror=unused-but-set-variable]
This one was fixed for x86-64 in 7b54571ec2 but not
for the other platforms.
KeccakF-1600-opt32.c:250:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
This one is wasn't caught before because it applies only to big-endian
code.
Change-Id: Ice33b639e55d95140cbf912bb81b6f508ed3744a
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
51ee309a79 introduced this check, but it
was supposed to be >= (it's available in 4.8.1, not after 4.8.1)
Change-Id: Id993b128de5c3500684833aea8ef556b31aac5f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The check in [QIOSOrientationListener orientationChanged] ensured we
never reported the two unsupported orientations through QPA, but we
were reporting back the orientation through QIOSScreen::orientation()
as well, and that didn't have a guard for -1. This resulted in crashes
in client code that assumed the range of QScreen::orientation() was
defined by the enum, such as the paintedwindow example.
The listener now ignores the two unsupported orientations, which leaves
us at the previous orientation. For the conversion function, we still
have to support all UIDeviceOrientations, so we fall back to portrait
for the two unsupported orientations. In the future we should consider
caching the previous value explicitly, or fall back to the interface
orientation.
Change-Id: Ic19d0ce86b4ddea250ea927d5e8664396b2b68fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Internally iOS double-buffers its rendering using copy instead of flipping,
so we reported that our context was single-buffered so that clients could
take advantage of the unchanged buffer. This failed when clients (such as
Qt itself) then assumed that calling swapBufferes() was not needed.
We now properly report that we're double-buffered, and we'll have to find
another way to report the way double-buffering works if that's still an
optimization we'd like to provide to clients.
Change-Id: Id2e4faa68ed3b837ad01d6f22b2927fc9c9769c2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Since 39a052c664, QAccessible::State is no
logner an enum that moc understand.
moc currently silently ignores it the Q_ENUMS
Change-Id: Iecc30ad57055fc9ccaa33e9e9c400d96997d0902
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
QSharedDataPointer does not actually need a class derived from
QSharedData. All it needs is a member called "ref".
Change-Id: I2f7fe4cc143478ef7ef64681eada16e2d4c2e63a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
It's not used anywhere, so we don't need to cache the locale data
index. We already have the pointer to the QLocaleData anyway.
This saves us a few roundtrips calculating the index from the data
pointer only to get the data pointer again.
Change-Id: I6905d20a382ddcb9fb04cc886a17499b467f905a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Direct benefit is that the code between the two QLocale constructors
taking language, country and (maybe) scripts is merged.
This will also allow us to cache the QLocale::c() result.
Change-Id: Ia46c5a37764dc287bfcd3a52a022ac413c53a582
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
We have to call DetachCurrentThread() for each time we call
AttachCurrentThread(). Fortunately we have this convenience
class that we prepared earlier.
Task-number: QTBUG-30847
Change-Id: I5ffb94b336d3787a3bae197bab22b91770d58848
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The back button would be non-responsive for 5 seconds after
hiding the software keyboard. This is a minimal change that
does not look into why we need to have a 5 second delay in
the first place.
Task-number: QTBUG-30752
Change-Id: Ied514b77650cea7accc37a03efef2ce861090f65
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Most of the logic was still following the 10.6 UI guidelines, and had
not yet been upgraded to the 10.7 new button look. We tried to keep
10.6 compatibility were possible, and improve 'small' and 'mini' Aqua
sizes support.
Change-Id: I64139f24cccd095e9349b27a987395210b55c586
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The Config class is further modified to make
use of the current directory information it
stores with each configuration variable.
Task-number: QTBUG-30725
Change-Id: I34c845e6c05d7868266324f1d54e56f94d709f95
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The Config class is modified to build a single
multimap containing a record for each variable
found in each .qdocconf file. Each reacord
contains not only the name and value of the
variable, but also its location in the qdocconf
file it was read from and the path to that file.
This single multimap replaces 3 maps in the
Config class.
Task-number: QTBUG-30725
Change-Id: I049a69790f943b24c014a24b55b2b39725a1b56f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
When the control is read only. This is documented but not implemented.
Add functions to zoomIn and zoomOut.
Task-number: QTBUG-30845
Change-Id: I692b5f8cc5791498d34d35ea3dafa18b6e5d3e65
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
One can zoom in/out text inside a QTextEdit when the widget is
read-only or when using the zoomIn/zoomOut functions.
Zooming inside a HTML document only works if the font-style is not set
to a fixed size inside the document though. Adding this information
to the documentation.
Change-Id: I66a62da53827e1ce3241ba16b91e86926b97c297
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
The majority format is "<Qt Module> C++ Classes" (see
http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html)
Also, fix a broken link (Qt Network C++ Classes)
"<Qt Module> C++ API" is perhaps the more correct format, but that's
part of a much bigger cleanup: QTBUG-30556
Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The first call to resize() was a left-over from before we had retina-support.
Change-Id: I637e8d40f443f81fe7cfc367650bb28b917da2bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
After 475d1ed4f6a21686828fbd018542b469a8b2dbcd in qtdeclarative,
orientation changes on Android were broken, because the resize
event no longer implicitly causes an expose event. So we need
to post both when doing the resize.
Task-number: QTBUG-30909
Change-Id: I87c8c38e14d96a03b3409ef6439c3ac6ef432005
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The mips/uclibc features.h of the toolchain used by a former key
account of PSO is defining both __USE_XOPEN2K and __USE_BSD this
will lead to POSIX_MADV_* and MADV_* being defined while only the
symbols for madvise are present. Change the order to make it link.
Change-Id: If324b978d72ad2b37b8cd624562e81503c9465d4
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
As described in the QTBUG-30872, there may be a race condition involving
3 threads fighting for a mutex. I am surprised it was not caught
before despite all the Q_ASSERT and the stress test in tst_qmutex.
We do not need to call store(0) because the unlocking thread will
eventually remove the BigNumber flag. And perhaps it even did it
already, and another thread has incremented waiters (hence the Q_ASSERT
is wrong)
Here is a paste of part of the description from the bug report:
---
many threads, one of them is ready to release mutex, while at least two other trying to acquire it
d->waiters is 0
Thread 1 release mutex in unlockInternal:
if (d->waiters.fetchAndAddRelease(-QMutexPrivate::BigNumber) == 0)
d->waiters is now -QMutexPrivate::BigNumber
Thread 2 try to acquire mutex in lockInternal:
old_waiters = d->waiters.load();
if (old_waiters == -QMutexPrivate::BigNumber) {
if (d_ptr.testAndSetAcquire(d, dummyLocked())) {
It acquire 'about to release mutex' by changing d to dummyLocked
Thread 1 continue release procedure:
d->derefWaiters(0);
d->waiters is now back to 0
Thread 3 try to acquire mutex in lockInternal:
while (!d->waiters.testAndSetRelaxed(old_waiters, old_waiters + 1));
d->waiters is now 1
Thread 2 continue its dummy lock:
d->waiters.store(0);
d->waiters is force to 0
Thread 3 continue wait procedure
but it realize that mutex was already unlocked so decrease back waiters
if (d != d_ptr.loadAcquire()) {
if (old_waiters != QMutexPrivate::BigNumber) {
d->waiters.deref();
d->waiters became negative value of -1
Neither thread need internal data so it is released back to pool
The waiters counter in released internal structure is still -1
---
Change-Id: I1b22555db764482775db6e64a8c9ffa9e1ab0cf6
Task-number: QTBUG-30872
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QKeySequence failed to find a match in the shortcut table when QKeyEvent
contained Qt::GroupSwitchModifier modifier. It's not a part of the shortcut,
it simply shifts character group in a keyboard mapping table.
Task-number: QTBUG-26302
Change-Id: Id91cd4999777f7085068e9dba5cb22b40653e23d
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
We can simply clip the update rect against the widget's rect and return
if it's empty. Otherwise we risk ending up with update rects that are
larger than INT_MAX due to multiple update rects being merged.
Task-number: QTBUG-30876
Change-Id: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This was added just so that moc could pick up the enums and so that
we could use the enums in Q_PROPERTY declarations, which was needed for
accessibility in QML. It turns out that Q_GADGET is enough for us.
This is a strictly a binary compatible change.
However, QAccessible was marked internal in 5.0, so we are free to
change it. In addition, this class is static and cannot be instantiated.
Change-Id: I27e2e97c5f4b45c38678264c6b593a4383db8d3e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Setting mouseGrabEnabled means that the window should continue
to receive mouse events even when the mouse is not over the
application. This is not an issue on iOS, but the warning is
still annoying.
Change-Id: I0dd7c3828bcb1a51a4eae534aca1da5bfa258f03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
The current implementation would never hit the Qt::Tool case, since
a tool is also a Qt::Popup. This patch fixes that by making the
logic more explicit.
Change-Id: I0e6898081a18289e1007c8a168b374740915b3ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This makes it possible to listen for events on xcb_window_t which are
not platformwindows inside the xcb plugin
Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Basically you don't want to grab the X server while your debugging.
Also added an environment variable which lets you force to not grab
the X server
Change-Id: Iba03f11c8f486ce71c55fac7716bffcb7cc8cb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
QNSWindowDelegate was not handling windowShouldClose, which is how you
can tell Cocoa that your window should not close if the close button is
pressed. This change moves the close handling from windowWillClose to
windowShouldClose, and adds an optional "accepted" pointer to
QWindowSystemInterface::handleCloseEvent so that QNSWindowDelegate can
return a true/false value for whether the window should actually close
Task-number: QTBUG-28965
Change-Id: I67c6296ad42cbeeb71413e05411467d4e558adb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Use CamelCase for module name(s) used in in .qdocconf - this is
required as qdoc will generate visible output (tags in example
manifest files) based on these names.
Change-Id: Ie246e740203ee0b996fea5dee612bf7f61638991
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Use a slightly better regular expression for splitting module names
into tags used for example manifest files.
This will correctly split words with consecutive capital letters
(e.g. QtDBus)
Change-Id: I1320e08a1fbd44f718b82a1fcfea19eabca035fc
Reviewed-by: Martin Smith <martin.smith@digia.com>
Instead, add QCocoaWindow::setEmbeddedInForeignView which can be called
via QPlatformNativeInterface::NativeResourceForIntegrationFunction
Task-number: QTBUG-30805
Change-Id: I05861e80ca664ddb430216388cf0fec573a4d32b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Apply 0293aff5c44202e5c62e229b74d8bd0bf9206185
from Qt 4.
Without this, calls to deleteLater() may create delete
later events with a loopLevel of 1. Those events will
not be processed until QApplication::exec() returns.
Add a QScopedLoopLevelCounter that increases the loopLevel
for the duration of the activated() call.
Task-number: QTBUG-30660
Change-Id: I7ab3bb3a53243691b8f7f64e025150e5cc7da2c8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Since we use native Cocoa menus, we cannot rely on the
normal shortcut handling. Shortcuts can be overridden by
the currently focused object in Qt.
In order to make that possible we need to send a
QShortcutOverride event before accepting any key event.
For menus the key event goes from the NSApp directly to
the menu, so the shortcutOverride would not work.
This is mostly an adaptation of the Qt 4 code.
Task-number: QTBUG-30695
Change-Id: Icb4979309d2d6f9606eb9c8abc4130dc79926593
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
On Windows 8 it would end up changing the look of the QLineEdit when the
mouse hovered over it even though it was not enabled. None of the
Windows platforms show the lineedit changing when hovered over if it is
disabled so we can skip the whole thing.
Task-number: QTBUG-29224
Change-Id: Ib9495bf395477f114e91b744e1b1209c9e11f336
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
The hotspot was not taken from the QCursor so if one was set then it
was reset to 0x0.
Change-Id: Ie81f1c2ac15a16f10436738367e612c44dc42d38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Don't try anything after the original syncing, particularly after
changing the menu item's text. Also, don't try anything if the menu
item cannot be linked up to a menubar (see QTBUG-30756). This latter
point requires extra syncing after adding a menu in the menubar.
Finally, to be able to find the menubar, we need to clean the code for
moc's eyes.
Task-number: QTBUG-30756
Task-number: QTBUG-30812
Change-Id: I88fad663f1c35d03a0cb167d1723d16f590918c0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
QCocoaMenu is child of either a QCocoaMenuBar, a QCocoaMenuItem as a
submenu, or nothing as a standalone menu. QCocoaMenuItem is child of
its containing QCocoaMenu.
The parent is set during insertion and cleared during removal.
QMenu needs to be updated to avoid double deletion and leaking its
own platform menu.
Change-Id: Iadf60d8062d7466fa616f84f3761fe322fc9aa2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Instead, set the currently selected filter's suffix as
default suffix of the dialog unless another default suffix
has been set.
This emulates the behavior of Qt 4 behavior which would set
the selected name filter's suffix as default suffix in
QFileDialog::getSaveFileName().
Task-number: QTBUG-30748
Change-Id: I111cd6190ddab8775a0fa72b94b3c728dd411c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Previously, accessibleTree->child(0) would return an interface for the
header even if it was hidden.
Also, the assertion was wrong since the index would be 0 if both row
and column were 0. The assertion was actually found while using the
project explorer of Qt Creator (2.7)
Change-Id: I9f3cc2c13b6887569d10c4e062a64552f898231a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.
This provoked a couple of existing issues in the qwidget test.
setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.
The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.
resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.
Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This change restores a proper function of the "(?)" button in the window
decorations which is used as a clue for the user to check what a particular
widget is supposed to do. The change is only implemented for QtWidgets because
the underlying QWhatsThis is inherently widget-specific -- which is why it sends
an event to QGuiApplication, but only processes it in the QtWidget-specific
QApplication.
Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch.
Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
We create our QIOSViewController in didFinishLaunchingWithOptions,
and schedule a timer to run the user's main. If the device is
placed in landscape orientation at startup, we will receive a
willRotateToInterfaceOrientation message before the timer is
triggered to run the user's main, which means we do not yet
have a QApplication.
To fix this crash we exit early, but we might have to store the
new orientation for later, and make sure the initial QScreen is
then created with the correct orientation.
Change-Id: I0cc02f0d36b992d190736e98858dc7d002d595b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Find effective screen by searching the virtual sibling that
contains the center as does QDesktopWidget::screenNumber().
Task-number: QTBUG-30724
Change-Id: I8441ab4f3e5ee8169613a82f150d1a4f1777b662
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Not trying to load the lib saves 30 - 50ms upon an apps' 1st host
lookup.
Task-number: QTBUG-30809
Change-Id: Id893cec09ff57494776625700c93f7efe96fcc6b
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Since change 3bb9024952 the documentation is invalid.
Task-number: QTBUG-29680
Change-Id: I7d5fcb6bc490aa5cba83439d33f798459640c42d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Creating a second QFactoryLoader for the same plugins seems to trigger
an unload of the plugins loaded by the first factory loader. The
QIconEngine created by the SVG icon plugin thus gets an invalid virtual
table pointer, which causes a crash when attempting to call any virtual
function in the QIconEngine (pixmap(), the virtual destructor, etc).
Reusing a single QFactoryLoader instead fixes the crash.
Task-number: QTBUG-30496
Change-Id: I80c5fa8b52ab9b0db68499f8c37fad14a1ac4f3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Failure to initialize the variable can cause spurious non-zero
values.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx
"..value can either be a SQLULEN value or a null-terminated character
string. If the value is a SQLULEN value, some drivers may only write the
lower 32-bit or 16-bit of a buffer and leave the higher-order
bit unchanged. Therefore, applications should use a buffer of SQLULEN
and initialize the value to 0 before calling this function. Also, the
BufferLength and StringLengthPtr arguments are not used."
Follow-up to 1509316a37
Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.
Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.
Add a unit test that is enabled for those platforms that use the generic
system proxy.
Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This functionality was in Qt4's qapplication_x11.cpp and was missing
from the XCB QPA plugin. Ported the code from xlib to xcb.
This code was actually tested (with plasma), unlike the Qt-4.8 code which
skipped every other character...
for (uint i = 0; i < 20 && i + sent <= length; i++)
xevent.xclient.data.b[i] = message[i + sent++];
Provide a QPA native-function for accessing the startup id, for cases where
an application doesn't show a window, but starts another app instead, or asks
a running app to show the window on its behalf.
Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a
Reviewed-by: David Faure (KDE) <faure@kde.org>
Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth)
outputs a stream of error messages, starting with:
QWidget::paintEngine: QWidget::paintEngine: Should no longer be called
Better output clearly the reason why we end up in that method: painting
on a null image, due to the unsupported image format.
Maybe this should even be a qFatal...
Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The pointer returned by unicode() was deleted right afterwards.
Change-Id: I7cef72386d02c7be42e71134f616926506d37ea6
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.
This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.
The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.
Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>