This commit fixes a potential compile error where pixelformat.h would
not compile if X.h from x11proto was included first, since X.h #define's
GrayScale as an integer constant.
Task-number: QTBUG-40087
Change-Id: I7208a204259c6d3a13b5d0cbc98a76bb54b8b494
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Example pages' \brief do not form a complete sentence. The example
pages have proper introductions and descriptions, unlike API pages
which do use the brief information to summarize.
Change-Id: I11f1362cd05e3cf90ae8e1c3a07d2584737fd89c
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Let the QJNI classes manage the jni environment and cache the jni
handles. This lets us lazily cache the jni handle until we actually
need them.
Change-Id: Iced91e7cab19bdcab8581e94c6f2dd766fed47ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Remove the use of QtAndroid::AttachedJNIEnv and lazily cache
the openURL() methodID on first use.
Change-Id: I601d13bc7d644d7cb2f78655ad40c7d9566cf3cb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Replaces the raw jni calls with our own jni wrappers. This allows us
to make use of the centralized cache, avoid global data storage and
use a more optimized way to attach to the jni environment.
This change also removes the JNI_OnLoad() function since it's not
used. If we need to add a JNI_OnLoad() function later, we should find a
more suited place for it.
Change-Id: Id84ead10c27d03d19c160304b1f9853b381a103c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
We really do not need to do string parsing there.
Change-Id: Ie2277d9ff0d0445285b7108023941af111d9baca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This revert commit de1d5815c1 which
wrongly fixed a typo. There is no typo because we use startsWith
with that constant.
Also added a test because the %{time} support was added in commit
93563952d0 but the test was missing
Change-Id: Ic96e6f21f989ca3a2905ec6c89b93d2627b77b40
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Blunder -- two threads may step into this method together,
both see not studied, and both study (with one leaking its study data).
This reverts commit 5fbd787cf9a72621d66604a4898f06ea4365226e.
Change-Id: Ia746925abcad1e43adf4f6f1d495b018de022b07
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Broke tst_QMenu::statusTip by closing the menu while it should not. (and therefore, a QTimer::singleShot that fires while following test are running is making the test fail)
This reverts commit 50c04d6318.
Change-Id: Ib4ef8190f945b915fe268745cc64d471994c5e2d
Reviewed-by: Richard J. Moore <rich@kde.org>
ICC miscompiles this:
struct Inner { int i; constexpr Inner(int i) : i(i) {}};
struct Outer { Inner i; };
const Outer x = { -1 };
(Inner = QBasicAtomicInt; Outer = QtPrivate::RefCount, then again for
QListData::Data)
We expect x to be placed in read-only memory and require no load-time
constructor. ICC unfortunately does not do that. By adding a constexpr
constructor to Outer, it starts behaving like we expect it to, but falls
apart again if you do "const Outer x[]" (the QArrayData statics).
The solution is to probably make the varaibles constexpr too, but that's
a job for the development branch.
Intel issue Id: 6000056211
Intel bug: DPD200534796
Change-Id: Ie9fb5428106486254b7329403890754f300d58c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The tool is enum TabletDevice reported in QTabletEvent::device().
Each type of tool for each type of tablet has an ID which needs to
be mapped to this enum.
The meaning of the AbsWheel valuator depends on the tool type:
an airbrush sends tangentialPressure in the range -1..+1,
whereas an Art Pen (RotationStylus) sends rotation in degrees.
Because the evdev driver sends valuator changes individually, we
have to store the current value in each TabletData::ValuatorClassInfo
to ensure that each QTabletEvent has complete state information.
[ChangeLog][Platform Specific Changes][X11 / XCB] QTabletEvents
and proximity events correctly identify the tool in use; the
meaning of certain valuators depends on the tool; and the valuators'
current values are not lost between events
Task-number: QTBUG-39666
Task-number: QTBUG-39573
Task-number: QTBUG-39570
Change-Id: I6be242ee57e2ad0848060e04f20c0dd08954a734
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Replacement for the the generic bearer plugin.
Compared to the generic bearer engine, this plugin provides a more
detailed overview of the network configurations on Android.
Added features are:
- Correct bearer type, also for mobile connections.
- Connection state (e.g., roaming).
- Data statistics (On devices that supports it).
- Polling is not required.
Change-Id: I728cb91e04a66343648c0add6be2a003caca0f1f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This patch aims to implement the session management available on OS X.
Currently applicationShouldTerminate is just a go through that closes
everything and ends the application. The new implementation calls
first appCommitData and cancels the termination properly if required.
This means that if a user wishes to logout, Qt applications can now
cancel that like e.g. answering to Safari asking whether it is ok to
close because of a number of opened tab/window.
Task-number: QTBUG-33034
Change-Id: Icedc8590a1c0934d9bc87d3a43d6702a9903bfb8
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
- Remove "Platform" from class name for consistency
- Use ComPtr and HRESULT checking where missing
- Use UICommand ID class to reduce callback complexity
- Use dialog completed callback to fix failed repeated dialog opening
These changes have been tested with the QtQuick.Dialogs message dialog
example, and all features appear to be working. Note that the WinRT
dialog supports a maximum of three buttons, though, and a warning is
printed if this number is exceeded.
Similarly to Android, the native hooks can be now be disabled by
using qputenv("QT_USE_WINRT_NATIVE_DIALOGS", "0").
Task-number: QTBUG-38115
Task-number: QTBUG-39868
Change-Id: I9943c7c11bd640790db68219cefdca1a680e96ec
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Use the colors returned by WinRT's UISettings class to construct the
system palette.
Change-Id: Id0d99c7b2e3df209de0755ee72a0d2bda67fda8c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
- Drop "Platform" from class name for consistency
- Move styleHint() into theme class for better code reuse
- Use ComPtr and result checking
- Remove obsolete WinRT ifdefs
Change-Id: Id26bd75739a9665f61ee2e70eb3fb36747b75410
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
-Add style for checkable QGroupBox
-Add style for checkable QItemView
-Fix QSpinboxes contents size and position
-Fix QTreeView and QTableView headers size and position
-Fix Slider thumb position incorrect if minimum is not zero
Task-number: QTBUG-38717
Task-number: QTBUG-38325
Task-number: QTBUG-37965
Change-Id: I737f8d6f2d1c25d16aca0ce5de6b81884839409d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
I've also updated the qfont test so it passes on Android now. Note that
there are no suitable cursive/fantasy fonts on Android, so the regular
default "Roboto" (or "Droid Sans" on older devices) will be picked here
instead.
[ChangeLog][Android] Fixed font selection to prefer "Droid Serif" when
Serif style hint is set on QFont.
Change-Id: I294eebcc4d79410e435bdddce552acc6044753b2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
At the moment, it's possible to have 2 properties with the same name,
which doesn't make much sense. Notify the user about that so she can
react on it.
Change-Id: I4865b71730921b79ce9dd8abb0cc760b3f1dbfd8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Now enabled for all devices equipped with a GPU from the Mali-4xx
series or Adreno 2xx series.
Task-number: QTBUG-40131
Change-Id: I2923c07033ef768aceec6f5590dbb6f26aa67087
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This causes a closeEvent to be sent for all calls to close.
As a side effect destroy now handles more of the state in
QGuiApplication.
[ChangeLog][QtGui][QWindow] QWindow::close() sends a QCloseEvent
which must be accepted before destroy() will be called. destroy()
is the function to close the window without confirmation.
Task-number: QTBUG-40093
Change-Id: I1ce09da4940fc29fae8decf40548a42e3bec6eca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
-added "QML Type" for QML types
-reworded basic type pages by adding "QML Basic Type" at the end
-streamlined variables in QDoc related to the HTML and page titles.
These two changes were implemented in 5.3 branch, but got lost during
the merge into dev:
1243940f838e5e9d7987
This commit restores the changes while ammending similar fixes
Change-Id: I996b18f020b392aceeb40da7797838aca4a0626f
Reviewed-by: Martin Smith <martin.smith@digia.com>
We already support this for eglfs but for a desktop Qt configured with
-opengl es2 we need to expose it through xcb as well.
Change-Id: I36d0e255d8c86cc1cec56015f33470f61d7df466
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
When the platform plugin gives us specific fallbacks for a
specific script, we need to respect this, and load the correct
font family regardless of which writing systems it supports.
This is especially important since the common script is adapted
to match surrounding, proper scripts, so characters such as
digits next to e.g. Hebrew text will be marked as Hebrew. On
stock Android, there is a single Hebrew font, and this would
previously be put in all fallback slots for Hebrew regardless of
what fallback fonts were dictated by the platform plugin. Since
this font does not support the digits, they would show up as boxes.
[ChangeLog][Android] Fixed common characters like digits and
punctuation showing as boxes when positioned next to non-latin
scripts.
Task-number: QTBUG-39377
Change-Id: I1555e208a8ddc587c0bbdbfff1600cafdd9442e9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Allow the user to disable the quoting of QString, QByteArray,
QStringLiteral by passing a "noquote()" stream modifier.
This requires another flag to be added to QDebug::Stream. To
keep BC we're using the QMessageLogContext::version field
to differentiate between QDebug streams created by earlier
versions.
Task-number: QTBUG-37146
Change-Id: I9b215eabfcfd754af16ea87f3ef928d698e37d77
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This property is used to automatically hide tab bar if it has only one
tab.
Originally-by: Denis Kovalskiy <denimnumber1@gmail.com>
Change-Id: I6967f760010fa55bad6a5986c29abe7ccf625cf8
Reviewed-by: David Faure <david.faure@kdab.com>
This is useful to detect confusions between local paths and URLs.
Change-Id: I1aa72ae10186984812691c8a1a4e843db3c85246
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Q_WS_WIN is never defined, and the qt_win_get_* functions don't exist
anymore. The QPA plugin takes care of doing the Windows-specific handling
for the file dialog.
Change-Id: Icdf9aed7da3db8ed2bd71d60f821869340ec1041
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
To prevent profiling and debugging tools from generating misleading
"errors", call glGetString only for ES and GL < 3.0.
Task-number: QTBUG-35173
Change-Id: I4fe3b048fff4cda948152e2ceeb1347f2b0e4ca5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Do not try to be clever, this format works always.
Using RGBX8888 for windows without alpha buffer was a bad idea because
it broke renderToTexture widgets (QQuickWidget, QOpenGLWidget) which
failed to properly draw the transparent rect with this format.
Change-Id: I295d2f8c17490b59cc5e6b9d81035360da28ab3d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This will simplify future maintenance of qdoc, adding options being
much easier with QCommandLineParser.
As always, this revealed a number of undocumented options:
-log-progress, debug, -autolink-errors.
Compared generated docs with and without the patch, looked fine,
except that order differs (the qt_qhash_seed thing doesn't work)
Based on initial patch by Laszlo Papp.
Change-Id: I3c851135f2fd573d622d2ed456a11cee34e06054
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Improve the existing docu for Qt::ToolButtonFollowStyle in QToolButton
and show the same text in all other widgets that have toolButtonStyle property
(QToolBar and QMainWindow).
Change-Id: I26ff0ed332f8bd10b542a4111c6ae48a963d5667
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
With "QExplicitlySharedDataPointer::QExplicitlySharedDataPointer( const
QExplicitlySharedDataPointer<X> & other)" implicitly doing an
static_cast<T *>(...) on other.data(), this could lead to dangerous use
of this copy constructor.
Example code:
QExplicitlySharedDataPointer<Base> base(new Base);
QExplicitlySharedDataPointer<Derived> derived(base); // that works!
This patchs disables the use of the static_cast, and adds a new define called
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST to re-enable
that code path.
Note, that the other way-around (assigning 'derived' to 'base') still
works as intended.
Other side note: QtXmlPatterns is relying heavily on the hidden
static_cast "feature". The other default Qt modules compile fine with
the static_cast removed.
[ChangeLog][Important Behavior Changes] QExplicitelySharedDataPointer's
copy constructor which performs a static_cast from "X *" to "T *"
(when constructing a QExplicitlySharedDataPointer<T> from
a QExplicitlySharedDataPointer<X>) doesn't perform a static_cast
from "X *" to "T *" any more. Instead, an implicit cast is now
performed. This change will break compilation of code that
relied on the downcast (i.e. cast towards a more derived type) of the
templated type when copy costructing a QExplicitelySharedDataPointer
object. Please refer to the class documentation for more information
about this issue and a workaround to keep old code compiling.
Change-Id: Id32aba6cda4e6d44728d7bc3a5c0c7a20f19adc6
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the "As of Qt 5.4" to avoid misunderstandings.
Also add the note for the classes that miss it.
Change-Id: Id7f437954bb3ec12c0fc944c18e58e6e977863f1
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
A lot of code in QHash is doing casting to QHashNode while the pointer
may be of type QHashDummyNode. This is a lot of undefined behavior.
Remove QHashDummyNode and specialize QHashNode for QHashDummyValue instead.
QHashDummyValue is the only type for which QTypeInfo::isDummy is true.
Q_DUMMY and QTypeInfo::isDummy are internal API, so is QHashDummyNode, so
we can remove them.
Task-number: QTBUG-40029
Change-Id: I60c2ff0933075b9202bde89a9992746052f75133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Introduce an enumeration for the rows/columns and
use std::find() to find the matching colors.
Change-Id: If8b7f76d48beab470f6cac0bfdeaf56058237e94
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>