This fixes the build breakage caused by Change I50b33d05 when attempting
to compile on Linux with session management enabled but libSM and/or
libICE not present.
Change-Id: I127f32e7041deb2ff968eae8458fee7d4e95d7a5
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: aavit <eirik.aavitsland@digia.com>
When warnings are treated as errors, no Android code will
compile, since one of the platform headers in the NDK triggers
the literal-suffix warning. So we need to mark this as no-error.
Change-Id: Icabf1c2f2d32f76ee157d04e62a28f83abeed8f1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If you specify ANDROID_API_VERSION to override the default
API versions used for building the jar files, this should
take precedence even when the .pro files specify a different
default API version (like QtAccessibility does when it sets
the default to android-16.) Otherwise it's impossible to
override these defaults.
Change-Id: Idef98aaf3b51490bd7ced8c53770ee2f5680b1db
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
The jniconvenience api is replaces with private API's in core and
public API's in the qtandroidextras module.
Change-Id: Iaf4b4343f8022197e7ec3fdde2406eb3c881208d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This change makes use of the private QJNI api that now exists in QtCore.
Change-Id: Id03664942d6c6cbfec028a3b52729057153a8466
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Merge most parts of the qlogger framework from
git://gitorious.org/qtplayground/qlogger.git
The categorized logging feature is a replacement for qDebug, qWarning and
friends. With logging statements in an app/library, a developer can
turn on the statements they care about and turn off the ones they don't.
Most work for this was done by Wolfgang Beck and Lincoln Ramsay.
Task-number: QTBUG-25694
Change-Id: Ib0cdfbbf3694f86ad9ec553b2ea36f09a477cded
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some apps may not support printing only a particular page range, but
with CUPS we can do "server-side print range", ie. we can select the
page range for the application.
If CUPS is available, the Page Range widget is now displayed if app
advertises no such capability and page range is selected on the server
instead.
[ChangeLog][QtPrintSupport][QPrintDialog] Added CUPS server-side print
range support for apps that can't support print range option themselves
Change-Id: Ia7784065ba5a8b53bb05ae46e982c718ef672fa5
Reviewed-by: John Layt <jlayt@kde.org>
Move some of the static helper and private functions to better
organize the code. No code actually changed.
Change-Id: I6d5dd6bcb9fc5af56d2dbe9e53bc9f0a000c4fa4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add new method to return if the current time is Daylight Time.
[ChangeLog][QtCore][QDateTime] Added new method isDaylightTime() to
return if the datetime is in Daylight Time or not.
Change-Id: Icb93fd5dd0b2f7d83d2d4643eeb12922c1137e3e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change the datetime serialisation from using QDateTimePrivate::Spec to
using Qt::TimeSpec. Only public classes and enums are now used to
serialise, making the format safer..
Clean up the code to make each version clearer, this duplicates some
code but is easier to read and support.
Change-Id: I3d8fc05f50f8e8acb9edbb992e5ce06063654b8e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When Daylight Time transtion goes from Standard Time to Daylight Time
there is a "missing" hour, i.e. at 2am CET the clock goes forward to
3am. Currently QDateTime ignores this gap and considers the time to be
valid and able to be manipulated. This change respects the transition,
so any time set in the missing hour is considered invalid, and any date
maths returns valid results.
The validity in the current time zone needs to be checked every time
isValid() is called in case the system time zone has changed since the
last time it was checked. This is done by calling mktime to check the
returned result matches the expected result. This could be very
inefficient, but the returned offset value is cached each time so
mktime is not required to be called again within each method call,
effectively meaning mktime is called the same number of times by
each method. Note that this means any new methods added must be
careful to ensure either isValid() or refreshLocalTime() is called
first by any method needing to use the UTC value.
[ChangeLog][QtCore][QDateTime] The Standard Time to Daylight Time
transition for Qt::LocalTime is now handled correctly. Any date set
in the "missing" hour is now considered invalid. All date math results
that fall into the missing hour will be automatically adjusted to a
valid time in the following hour.
Change-Id: Ia652c8511b45df15f4917acf12403ec01a7f08e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change from storing the date and time as QDate and QTime to a serialised
msecs format. This format is a direct translation of the QDate and
QTime values, it is not the actual msecs since the Unix epoch. This
msecs format ensures we are always able to recreate the original QDate
and QTime values, but should still simplify the code and improve
performance.
Because we no longer store the explicit date and time we need to store
their isNull()/isValid() status separately.
The changes in storage results in the same memory footprint as before.
Note that this change does not optimize the code nor set out to fix the
known bugs, it only seeks to maintain the current behavior, although
some bugs are fixed implicitly. More bug fixes and optimizations will
follow.
[ChangeLog][Important Behavior Changes] The supported date range in
QDateTime has been reduced to about +/- 292 million years, the range
supported by the number of msecs since the Unix epoch of 1 Jan 1970
as stored in a qint64, and as able to be used in the
setMSecsSinceEpoch() and toMSecsSinceEpoch() methods.
Change-Id: I98804d8781909555d3313a3a7080eb8e70cb46ad
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ib4bdabcfa4e9b76156d7188da82fe2173b4b997e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This avoids the assertion in iaccessible2.cpp(510)
Change-Id: I1a4c007ffcbcda70f0e37ef3cf55a303683b58c1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
I didn't dig deeper to check where the additional reference came from,
but tracing confirmed that the QSharedDataPointer<QLocalePrivate>::detach()
call is gone with this change.
Background:
QString::vsprintf is used in the logging framework, and as such shouldn't
waste any memory. It's currently anyway unusable from, say, signal handlers,
but this is low-hanging fruit that shaves off one of the dozen or so
memory allocations involved in a simple qFatal() call.
Change-Id: I19fa2148f669dfc7b5f276221151e25a4348cbfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
A _WINRT_ macro is added for Windows Runtime and a few codepaths are
changed with it.
Change-Id: I99ca5636d03c39b0a05b7f75f13522d012fdec07
Done-with: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Avoid unsupported Win32 API while providing alternative codepaths for
in-package library loading.
Change-Id: Iaad059d6c94d0347cbaa8d9b9240806afcb29561
Done-with: Andrew Knight
Done-with: Kamil Trzcinski
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
As Windows Runtime does not really support the use
of spawning processes QT_NO_PROCESS is defined for
winrt builds and the corresponding sources are
excluded from build.
Change-Id: I79263417c985b23678c55ac44a5591a9a69d3c13
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change-Id: I1c9d6904eecd499ca8c2b744e8ac60696f40c20f
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
WinRT supports in-memory file mapping via CreateFileMappingFromApp. This
is unimplemented on Windows Phone.
Change-Id: Ic5692e501cd2fe9e1337829bdeb933fccc804abe
Done-with: Andrew Knight
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
As CreateSemaphore and WaitForSingleObject are
not supported on WinRT their supported alternatives
are used.
Change-Id: I1aa20076e286ed8ae28ba332bbed41ff8ce0feff
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Various global changes, primarily preprocessor flow, to support the
WinRT platform.
Change-Id: I3fa9cf91d5fb24019362e88fcf205e31b4f810b5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
To be set to false by eglfs and similar platforms where no real window
management is provided.
When this capability is not set, some of the changes done for
QTBUG-26903 will be disabled, allowing dialogs to show up at their
QDialog-chosen place on platforms where no WM is present and so
windows are never repositioned by the system.
Change-Id: If1dac3cd11f2a856913a51277431fe3ec644b719
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
The glyph returned by loadGlpyh() must be freed manually when caching
is not enabled (that is, QT_USE_FT_CACHE is not set).
This change and https://codereview.qt-project.org/#change,65672
together should stop QGLWidget::renderText() from leaking memory
extensively.
Task-number: QTBUG-32792
Change-Id: Iff7e1591a1ea994a97b6a56bc16c64bf544e6713
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Allow widget apps with popups and multiple top-level widgets to
function on the eglfs platform. GL and Quick2 apps are not affected.
Instead of trying to create a native window and EGL surface for each
window, do it only for the window that is created first. This first
window is forced to fullscreen as usual. Later windows however are
treated differently: These will not have a native window, surface or
context, and keep their normal size. All the textures belonging to the
raster windows are then rendered in one step, using a stacking order
maintained based on visibility changes and window activation.
Note that this will only help apps that create a main window first and
have everything else inside that window or on top of it as menus,
dialogs, popups, etc.
Change-Id: Ia435458ba81bf3c35cc8f61bcb2d2a50cf17f0e3
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
The plugin failed to handle releases with protocol type A with some
drivers. There is no requirement to emit ABS_MT_TOUCH_MAJOR or
BTN_TOUCH to indicate a release. If the point is gone from the report,
it is a release as well.
Change-Id: I9527fbfb200fde3b160148e076357a29bf610427
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
...and other platforms that do not support WA_NativeWindow.
Task-number: QTBUG-33523
Change-Id: I4ab043e8b3c3369aec41b44275fb3099d90e55b4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This reverts commit 04325bdd26.
This change breaks qtdeclarative on Mac.
Change-Id: I77b121cc6b283cf7498e93e4b914d2fb68808ab6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The test has been failing on all platforms. Usually it just times out,
but it also have behavied flaky, failing with different error codes
when executed twice in a row.
Task-number: QTBUG-29403
Change-Id: Ic06638f0ffd23131b4c1aa4136f715195727e959
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Such touchscreens emit no MT events, only ABS_X and ABS_Y.
Change-Id: I7db3d2fbb948eadb23c659e45bbbc5017f1a4f9d
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This means the *Iterables and corresponding const_iterators need
to be exported.
Change-Id: Ic93283616bda96e0d7752b0e881bf0230a5c2146
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This is a prerequisite for baseline support in Qt Quick Layouts
Change-Id: I1f032106cd1e7248a7688b6b9ca59f062a596d49
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
This allows the application developer to restructure the application,
including moving the central widget some place else.
Change-Id: Idca2f74c190500db24404e020b0eb400e41aad10
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
It is not full paths being used, so switching to comma does not require
different environment variables per platform nor does it appear to be
platform dependent.
Change-Id: I219517d740fa7385e923a9e09cb7e241378f85ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
When interfacing with Java API's on Android we need to write code using
the Java Native Interface (JNI). Writing JNI code requires a lot of
boilerplate code to be written. This patch contains API's to minimize the
amount of work needed to write JNI code.
QJNIEnvironmentPrivate:
On creation QJNIEnvironmentPrivate will attach the current running
thread to the Java VM, and expose the java environment.
QJNIObjectPrivate:
Wrapps around a Java class enabling the user to access the class from C++.
Change-Id: Ib633437ae36ff513d934292e9eeefcdd5b757d29
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
JNI_OnLoad is called for each library during the start-up of a Qt
application on Android. When the JNI_OnLoad is called we can get a
handle to the Java VM and necessary classes which enables us to access
Java API's in QtCore.
Change-Id: I64c1f1106cc0d5ab5a7bc9b22c752c09162fe813
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Prevents a crash in case the user did not open
the properties dialog, in which case
QUnixPrintWidgetPrivate::propertiesDialog is null.
Change-Id: I43c8c6ab90053757835bbf41d6167204d42efcef
Reviewed-by: John Layt <jlayt@kde.org>
On systems with CUPS support users can now choose how many pages from
a document are to be printed on paper. This can vary from 1 page per
document to 16 pages per document.
The page preview changes upon the users selection.
Also included in the patch is an option to choose the flow for text.
Users
can now print documents in the "Right to Left" order or "Bottom to Top",
including many other options.
[ChangeLog][QtPrintSupport][QPrintDialog] Added support for setting CUPS
Pages Per Sheet and Pages Per Sheet Layout options
Change-Id: I4e60a4523c6e06d4c15fe9ee9590248fa7ae2038
Reviewed-by: John Layt <jlayt@kde.org>
We currently always generate our own Authorization header, which
overrides any Authorization headers set the by user application.
Change-Id: I3b11c8dd0bc708e795ff697262a383ce28cae2f3
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
There is no point in having QAccessible2, so merge it with the normal
QAccessible. The header will be removed in a subsequent commit as it is
still needed by declarative at this point in time.
Change-Id: I1fc47d484d482f25387eba827bc5a373536b7a8b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>