Implement swap interval support for EGL, GLX and WGL.
The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to
QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications'
setting of the swap interval.
Task-number: QTBUG-31939
Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
need to leave some items out like media folder access, as this is not
available by default and also requires certain capabilities to use
those.
Furthermore updated the tests for sandboxing as well as skip cmd.exe
related tests as that does not exist on WinRT.
Change-Id: I992b1e195b79615bea0be4f84f56cfb8f0d902bf
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
FILE_FULL_DIR_INFO failed under certain circumstances on WinRT and
provides far more information than required. Hence prefer the basic
version in every case and standard for files with size description.
Change-Id: I63f1365f83cdd5d69f81278411f822dbd361fa92
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Currently network is only required to gather the host info for one
test case. That does not justify to disable all other tests, which can
provide useful information on the state when doing a port. Hence
disable that testcase if no network is available.
Change-Id: I202ef49b3e07ae69ec85ee0432ae0a771a90e816
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Enums are movable even if they have not been tagged as such, and
therefore can safely make use of the internal storage.
Change-Id: I3bec8556bfeb4a07cb30d918f8d1dd2565d6d94a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
While exception handling methods are not available on WinRT, the debug
mode ones are. This way we can suppress error dialogs from popping up
like on desktop windows.
Change-Id: Id6e9666af9274d373e7d46e3f9e44892a2bd0dbc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fixes several things
* setOption(options) has the wrong name (singular)
* setOption(options) doesn't set the current options to the argument, but
ORs the current options with the argument and sets the result
* testOption(options) has the wrong name
The old methods get deprecated, and new methods and overloads get
introduced here. Old code behavior is thereby preserved.
Change-Id: I51bba49f22810c80e6b4980892600d616503af6b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Updated dnslookup example to take an optional nameserver argument
for doing DNS lookup against a specific nameserver.
Task-number: QTBUG-30166
Change-Id: I9f46f9f766b56f770d2c8372e3bfad5c71023c73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
otherwise we are risking a lock by freeing resources from other
threads when calling CoUnitialized()
Change-Id: I1fe09d7d3b1674a00b44ababfc90da79580278b3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The actual feature comes from a merge from the stable branch.
Change-Id: Id067fb2b26cb3c6b78c7705b77bd741e3bd8f090
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Specify the root directory to be the package root. Only plugins
inside the root can be opened (actually also only files). Furthermore
current defaults to the package root now, which in most cases is
identical to previous behavior.
When attempting to load a plugin the path can either be specified in
host format "C:/..." or as plugin absolute "/platforms/...". Check for
both, with preference of latter case, like when qt.conf is used with
/ being used as plugin path.
Change-Id: I7e3da293362488b62a3357c4882ebf5e048dcf95
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
...when the buffer's size is smaller than the value size.
Change-Id: Id345982c9fc4ceed6505d0c192680c47c554fcb4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Winmd is not used, so there is no reason to embed it.
Change-Id: I0820256aecd9c3c71b0b0c8afa53941b03f97363
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
WinRT doesn't use the Windows Timezone backend, so don't build the
Windows test.
Change-Id: I32620546de3ad1f19402cc1359f8038200c915ec
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This should be using qputenv; putenv is deprecated on MSVC.
Change-Id: I7c27cf5f7955624fa3553b7a34ab11c6fae462b8
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Visual Studio debuggers send an argument to specify the debugger port.
This argument needs to be skipped while parsing and not to be interpreted
as an option or test function.
Change-Id: I24efb52fbd668a7bc3388c876f5ea0d950de1d5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QByteArray split does create one item even if the string is empty.
Hence check if the launch arguments string needs to be parsed at all.
Change-Id: I0a355212aaa7254fe0f417c61a59c30223311915
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The current synchronization mechanism was racy: decrementing waitingThreads
and then hoping that the wakeOne will wake a thread before its expiry
timeout happens. In other words, on timeout, a just-assigned task would
never run. And then no other task would run, if maxThreadCount is reached.
Fixed by using a queue of waiting threads (rather than just a count), and by
moving the wait condition into the thread itself, so we know precisely
which one we're waking up, and we can remove it from the set of waiting threads
before waking it up, and therefore it can determine on wakeup whether it
has work to do (caller removed it from the queue) or it expired (it's still
in the queue). This is reliable, whereas the return value from QWaitCondition::wait
isn't reliable, when the main thread has already decided that this thread
has work to do.
Task-number: QTBUG-3786
Change-Id: I1eac5d6c309daed7f483ac7a8074297bfda6ee32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This change changes the point where signals are unblocked again in
QDockAreaLayoutInfo::updateTabBar() to include the final tabBar->count()
call. This should not be a problem, as count() is a const function and
thus shouldn't emit any signals.
Change-Id: I6f3dc5696a9c31db51fbe4cdee4b9d83ddeaf61f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This change changes the point where signals are unblocked again in
QAbstractSpinBoxPrivate::updateEdit() to include the final update()
call. This should not be a problem, as update() merely posts an
event and shouldn't emit any signals.
Change-Id: I4b2ae109f057792b573ad6ea168ca77c18c773d0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
I don't think I ever worked on a project of non-trivial
size that didn't at some point add a QSignalBlocker.
This commit adds code, tests and documentation. Later
commits will convert naked blockSignals() calls to use
QSignalBlocker.
The implementation is purely inline to avoid the heavy
overhead of cross-dll function calls for this miniscule
task. This should not be a problem because QSignalBlocker
only uses public API and a pattern that we anyway need
to keep working until Qt 6, at least, so even changing
the implementation later will be no problem as the old
implementation lurking in non-recompiled code will be
acceptable, too.
This implementation is an evolution from KDTools'
KDSignalBlocker, with the following changes:
- Implements unblock() and reblock()
- Uses the return value of blockSignals() instead of a
separate signalsBlocked() call.
Change-Id: I1933dfd72a0f5190324be377cfca3c54cf3d6828
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Specifically, note what paths can be empty and which ones can't (modulo
system mis-configuration, like an empty $HOME var) and describe what
implications there are for application-specific paths and for global
(user) paths.
Change-Id: If6c11aab466ba50f3a9685dce52dd51b86426f27
Reviewed-by: David Faure <david.faure@kdab.com>
[ChangeLog][QtWidgets][QAbstractSpinBox] QTBUG-5142 - This will
allow a group (thousand) separator to be shown in QSpinBox
and QDoubleSpinBox widgets.
Task-number: QTBUG-5142
Change-Id: I2e23f5f83c93bb092a2dbd784e06d17d40d42909
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
It was sometimes impossible to select the desired font due to the code
completely ignoring the FC_WIDTH attribute and poor mapping of the
FC_WEIGHT attribute. The result was that it was easy to have a font file
that was inaccessible by Qt since it shared attributes with another
font file.
The FC_WIDTH attribute is now fetched and used unchanged as the font's
stretch value other than ensuring it is within the allowed range.
For FC_WEIGHT, the code no longer matches the value with the closest
QFont::Weight enum but instead does a piecewise linear mapping so
that Qt enum values match Font Config ones to the extent possible.
Also removed bogus call to fetch the width that was doing nothing with it.
Change-Id: Id39715f14a617c1d0e00ecf5a7d391cab99adc03
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Move the test for QAbstractPrintDialog from widgets into printsupport
Change-Id: Ia7595fa650a7ad565df3090207500ed06564e842
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Avoid need to modify qnx.pro in src/plugins/platforms/qnx to
build with imf support. By default detects if necessary headers
and libraries are available. Can also be explicitly requested or
disabled with -imf and -no-imf options.
Change-Id: I3f9780fc189a33e4c93fb4f950111121f8e947c3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Added input method support for the BB10 variant of Qt to the extent
possible using standard Qt APIs. This adds support for text predictions
and entry of languages such as Chinese.
Change in interface to QQnxAbstractVirtualKeyboard was made because it
is felt the new one is slightly nicer. It doesn't appear safe to
assume the focus object has a particular property and in fact in my tests
the code failed to work.
In some cases the code uses variable and function naming at odds with
normal Qt coding standards. This has been done for functions called
and data provided by the BB10 input system as for those of us who
need to maintain such things, it makes their meaning considerably
clearer.
While qqnxinputcontext_imf.cpp was used as an initial base for
development one can consider the new version as largely new code. I
don't believe the original version was ever complete and in any event
would not compile.
Change-Id: I09470801ffa237cee67da40c0b3d02ed5c77531e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Required for QQuickText & friends to implement image resource handling
in a clean way - to get rid of QQuickTextDocumentWithImageResources and
eventually make QQuickTextEdit's document interchangeable.
Change-Id: I97314a6c3e2d5726539d5722795a472631388cb0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>