Each stroke is a polygon (quadrilateral) connecting the previous
tablet event point to the current one. Previously we used the same
width for both ends of the stroke, so rapid changes in pressure caused
steps in the stroke width. Now it is tapered from one end to the other.
Change-Id: I909a2e85334a1a6e20fd28ee4babf6825da36612
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
They're deprecated since C++11 and removed in C++17.
Change-Id: Ia2acd9312707bfee96838743645a04ae1780e5dd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
With disabled gui module qmake in the directory examples/gui and
examples/widgets failes with:
Project ERROR: Could not find feature opengl.
Fix this by protecting 'qtConfig(opengl)' by 'qtHaveModule(gui)' as
already done in examples/examples.pro.
Task-number: QTBUG-60488
Change-Id: Ia842124e818e8c81d41d2b8e3b8905bf1dee58ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QBackingStore should be able to handle a non-created QWindow just fine.
Change-Id: I42299aa0e985422e1fe4279c1385b9979d267a47
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The documentation of QSyntaxHighlighter still uses the deprecated
QRegExp class. This patch updates the code samples as well as cleanup
some typos.
Change-Id: I87b525fddb560b7c5bb38f96d9aaceadb594f76c
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
- when appending to another string
- when just comparing
- when just calling toInt()
Change-Id: I6960784569b83bfd3e3640a8c04f2f909c293449
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
After applying the correction matrix the front face is CW, not CCW.
The examples work either way but fix them up to avoid reader confusion.
Change-Id: I491e6dc17c21897a59f36d32061e937f2b6c4c9d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
If the respective modules aren't available we cannot build the tests
and examples. We drop the qtConfig(opengl) requirement for the opengl
examples as
a, we would need to make the QtGui configuration available for that to
work, and
b, we should not add too much detail to the tests and examples build
configurations. Checking each test and example for every feature it
uses would be too much.
Task-number: QTBUG-57255
Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
A convenience subclass of QWindow that provides a Vulkan-capable
window with a double-buffered FIFO swapchain.
While advanced use cases are better served by a custom QWindow
subclass, many applications can benefit from having a convenient
helper that makes getting started easier.
Add also three examples of increasing complexity, and a variant that
shows embeddeding into widgets via QWindowContainer.
[ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of
QWindow.
Task-number: QTBUG-55981
Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Does not make much sense now that we can connect to lambda functions
[ChangeLog][QtCore][QSignalMapper] QSignalMapper is now marked
as deprecated.
Change-Id: I89135f23fdf16b42142a125eb7c9a86084c90bfc
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
This patch fixes the example that contained problems showing up
with mesa/nouveau drivers.
Change-Id: Ic90f6028e394138781f00bcc00c145c56134f441
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
Update the treemodelcompleter example to use the new QRegularExpression
class in place of the deprecated QRegExp.
Change-Id: I9fa91ca6e847603de37019e4ca86fc69a51a3772
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The example creates a view on the heap but doesn't delete it on
application end. This patch uses a QScopedPointer to fix that.
Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
We should not check for platforms, but rather for features. Also, if
dbus is available it doesn't automatically mean that QProcess is.
Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
For examples and documentation, use new BSD license text that
includes the commercial licenses.
Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
...in order to support sRGB framebuffers.
Add a --srgb option to the qopenglwidget example to allow testing.
[ChangeLog][QtWidgets][QOpenGLWidget] Added support for specifying
custom internal texture formats in QOpenGLWidget in order to make it
possible to have the widget backed by an sRGB-capable framebuffer.
Task-number: QTBUG-50987
Change-Id: I112e2f0ab0b1478c69e601031aa0bafaa87fa847
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Using std::atan2 gets the right answer directly from dy and dx,
without having to fix up quadrant as we needed to with acos (albeit we
have to negate dy in some cases, to match prior sense of angles). In
the process, it avoids explicit division, which would be an error when
the line's length is zero.
Change-Id: Ia2923159d38834e08e6f15cbff6766ed419fa804
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This adds the tabletTracking property in the same way that mouseTracking already
existed: there is a WA_TabletTracking attribute, and a TabletTrackingChange event
to notify when it changes. So for widget applications it's an opt-in feature.
QtQuick applications don't yet make use of tablet events, but when they do
in the future, we don't yet have a mechanism to turn the move events off;
it remains to be seen whether that will be necessary.
[ChangeLog][QtWidget] QWidget now has a tabletTracking property, analogous
to mouseTracking, which will enable TabletMove events while the stylus is
hovering, even if no button is pressed. This allows applications to show
feedback based on the other tablet event properties such as rotation and tilt.
Task-number: QTBUG-26116
Change-Id: Ie96e8acad882b167e967796cdd17f1ad747a2771
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
don't attempt to hand-craft a library export any more. instead, use the
configure system's built-in mechanism, and refer to it via QMAKE_USE.
this also allows us to rely on transitive dependencies in the autotest.
as a side effect, this makes the openssl-linked feature imply the
openssl one.
Change-Id: I5dd209b63bc8fbbc62852f6ffc472d4452ea2e68
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- Use Qt 5 connect syntax.
- Streamline code, remove unused members.
- Add a context menu for copying and opening the URLs.
- Add const to XML code.
- In the XML code, show the use of QStringLiteral in static inline
functions to create strings versus QLatin1String in comparison
overloads to avoid allocating strings from const char * literals.
Change-Id: Ib5e62ca188e271ffe01996dff3c9ea8e0b60739a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Update the flightinfo example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: I2395b37170565e922500e675210c400e90ae0f73
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the legacy grabber example to use the new QRegularExpression
class in place of the deprecated QRegExp.
Change-Id: I1d1871b7e82cdb214fdd8ad55a606d5e7682fab1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the arthur code sample to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Ic7efd4466b4c0fa50170b80ebb22fcb3624399ce
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the codecs example to use the new QRegularExpression class in
place of the deprecated QRegExp.
Change-Id: Ibd60b7256071f8166c4bf38e6a40935494c3cf3f
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the settingseditor example to use the new QRegularExpression
class in place of the deprecated QRegExp.
Change-Id: I07e34bf916bdde161c4253fca70b853061cd589b
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the stylesheet example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: I7061b8fd462ff012cb67bfdade656b3bfe442dd8
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Previously, when clearing the pattern by clicking the clear
button, the result match list would display a list of empty
matches since apparently an empty pattern matches as many
times as the subject is long. This is confusing when using the
tool.
Restructure RegularExpressionDialog::refresh() so that it bails
out if the pattern is empty or invalid.
Change-Id: I8119a75db50cead3f64394016e3390a9bf7d0bf7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Update the classwizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: I125664549e249c4156f8c664fac7648f1c41f9d5
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the licensewizard example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Ib6e0ee9ec802e83540b1c37846b99378395fe0ec
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
The example has already been ported to QRegularExpression however part
of the documentation still referred to the QRegExp class. This patch
updates the documentation to match the new version of the code.
Change-Id: Id433d0b28deae0c4f702c0c54d2704174f8c7689
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the addressbook tutorial to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Ibea9252ab8fe1d12e6fc862fa70229ca6efe0804
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Update the network-chat example to use the new QRegularExpression class
in place of the deprecated QRegExp.
Change-Id: Idcd3dc5b3e9b520b2eeef9565d50195cc8dffd06
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
We have to enable qt_safe_ftok with either sharedmemory or
systemsemaphore. In order to make the resulting QT_CONFIG work with the
bootstrap library we switch the features off for bootstrapping. Some
tests and examples have to be excluded when sharedmemory is not
available.
Change-Id: I3fc3926d160202b378be2293fba40201a4bf50c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the code was broken since 5.0, as it still hardcoded the version number
4 for the plugin basenames.
wince is not supported any more, so there is no point in trying to
restore the code to function.
at a later point, we'll make QTPLUGIN universal enough to cover both
static and dynamic deployment.
Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
We can use QOverload since Qt 5.7 (it depends on Q_COMPILER_VARIADIC_TEMPLATES
which is required since Qt 5.7).
Use it in the examples to show the best practice.
qOverload currently can't be used because it requires c++14.
Change-Id: I94a3c0db9d551fe169fa3d19c07ec0b329d5946c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This removes an unnecessary dependency on QProcess, which allows
the example to work on platforms where process support is not
available (such as iOS and tvOS).
Change-Id: I5d75fe8373b5f8c3744ab8fb3b1fd1b37eea35f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change qtConfig(opengl(es2)?) to qtConfig(opengl) as that covers
the case without any regular expression.
Change-Id: I935e3150f87e195e8bd3d0e55b4ed43572b131cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Update URLs in jennifer.xbel and remove frank.xbel, which
has too many outdated URLs
Change-Id: I8cbc1e3988f45230f849e68202780c76cf4353d9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
xcode variable expansion should be done exactly when xcode is used.
Change-Id: Icea8cb7bf9a51811052789bd66354b1b165127d6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
this is a vestige from an earlier version of the watchos introduction.
amends 57378a108.
Change-Id: I7d15149b94d12d84e041079b563175bd4e385d50
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
A separate flag is no longer needed now that simulator and device builds
are not exclusive any more (*) - both 'simulator' and 'device' being set
at the same time is a sufficient indication (uikit/default_pre.prf sets
this up according to the simulator_and_device feature and the
QMAKE_MAC_SDK variable).
(*) xcodebuild mode actually still uses exclusive builds, but this is
activated locally in uikit/default_post.prf, and uikit/xcodebuild.prf
implements the actual build passes manually anyway, so this change does
not affect it.
Change-Id: Idf173a7bfeb984498d3a49ed6b8d1a16da6c2089
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.
This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.
To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.
Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the opengl feature is defined in the gui module.
Change-Id: Ibf63395729540092ca82ee4ffc4e2ff4971c2a29
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Protection against short reads was already half implemented,
blockSize was being sent by the server but never used by the client.
Also, blockSize was bumped to quint32: If you're in a position where
short reads can happen then quint16 is probably not enough to hold the
size of your data. On Linux I could only reproduce short reads for
messages > 500K.
Change-Id: I191a3d781da1d8a119debbdafae641c8340a1da2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
OpenGL ES 3.1 introduces compute shaders. This patch enables them also
in QOpenGLShader/QOpenGLShaderProgram.
A GL/GLES example using QOpenGLShaderProgram for compute shaders is also
included.
Change-Id: I3951a302d7c2b096548f829b9b4578b5a525c453
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
5971b88e is not needed in new configure.
This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.
Conflicts:
mkspecs/features/default_pre.prf
mkspecs/features/mac/toolchain.prf
mkspecs/features/toolchain.prf
src/dbus/qdbusconnection.cpp
src/plugins/sqldrivers/mysql/qsql_mysql.cpp
src/sql/drivers/mysql/qsql_mysql.cpp
src/widgets/widgets/qmenubar.cpp
src/widgets/widgets/qmenubar_p.h
tools/configure/configureapp.cpp
tools/configure/environment.cpp
tools/configure/environment.h
Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
... to the new qmake based configuration system.
This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).
qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.
Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Move the different parts of configure.json/.pri into the libraries where
they belong.
Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Modern platforms such as macOS and Windows support large fancy icons
in the system balloon notification. We just need to pass the icon into
platform plugin.
[ChangeLog][QtWidgets][QSystemTrayIcon] Support custom icons in showMessage()
Task-number: QTBUG-49283
Change-Id: Iaeca36fe1bf350eae34d105549010ecbedf9c0a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This example uses QProcess which is not available on UIKit platforms.
Change-Id: I126d20369ccf307579a60956de7769e92e17548a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.
Update the instructions on mac-specific Q_OS_* macro usage.
Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.
Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This is only when the attached MIME data contains text, and we
fall back to rendering that text into a pixmap. It requires
getting the device pixel ratio from the source which, for now,
may be a QWidget or a QWindow. Other cases may exist, but that
would bring more dependencies than desired.
Similarly, it fixes the draggabletext example. Other examples
would require either to get updated pixmaps or change substantially
in order to support HiDPI (e.g., the fridgemagnets example).
Change-Id: I66198214233e3e06c87505744e2aaa9691fe1bb6
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
At least with the eglfs platform plugin, the QBackingStore constructor
results in a null pointer access if done before creation.
Change-Id: I2e78e70700fa48499a35c55797e1b962b6e6285a
Reviewed-by: Rebecca Worledge <rebecca.worledge@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
- Simplify the code, remove unused members
- Fix the translations of plurals to use %n
- Add tooltip displaying full paths in list
- Add context menu allowing to copy the name and open
- Display the correct slashes on Windows
- Connect the returnPressed() signals of the line edits
- Make the search recursive
- Do not search binary files by checking the mime type
Change-Id: I3663799c88931db1f58c03ea35211e7ab03737ec
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
- Port to Qt 5 connection syntax.
- Remove unneeded member variables.
- Adapt to screen size.
- Add a tab widget with a hex dump view to the preview dialog.
- Handle conversion errors in preview dialog,
add status label displaying errors and warnings about failures
and invalid characters encountered.
- Fix translated messages.
Change-Id: I916100c903e73d0d2326523753ed7398b1c34df0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
- Introduce a common header file for client and server;
- Update license headers;
- Fix minor issues.
Change-Id: I3fc42fd5ba32141c702fc6679a27bf0b6a16fd26
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- Use Qt 5 connection syntax.
- Introduce helper function to calculate the square size, remove
the existing 24 pixel limitation since that makes it impossible
to render 20pt fonts.
- Add filter chooser for font filters.
- Add menu and info dialog showing DPI and default fonts.
- Streamline code
Change-Id: I0cd4d0475b5a7ed3c475de7a413abebbe688dfe2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Conflicts:
configure
5.7 now supports clang on android; but dev re-worked configure
src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line. Applied the rename to both
for consistency.
tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.
.qmake.conf
Ignored 5.7's change to MODULE_VERSION.
configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.
Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
Show QMimeType::genericIconName() to description pane.
Change-Id: I698d07084b6396469686057ea53e2f497fdbe287
Reviewed-by: David Faure <david.faure@kdab.com>
Examples should show idiomatic Qt, and QSignalBlocker is idiomatic
since it's inception in Qt 5.3. Just updating the examples was
forgotten.
This commit makes good for that.
Fix coding-style issues as a drive-by.
Change-Id: If138e87ea2ab7a444599734113f7cc6df11fb42d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
Conflicts:
qmake/library/qmakeevaluator.cpp
One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line. Trivial resolution.
Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
The (example) code used a real to hold 360 / 7, which is of course 51,
discarding the 3/7 that was most likely meant to be kept. Noticed by
Coverity (CID 22364). Use 360.0 instead of 360 to get more accurate
results.
Change-Id: Ifdfbb932589d8ea728710e8b656af651c9f8a7d2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Move those to the equivalent {to,set,from}SecsSinceEpoch(), except for
the cases that did QDateTime::currentDateTime{,Utc}().toTime_t. Those
are best implemented with QDateTime::currentSecsSinceEpoch().
Change-Id: Ib57b52598e2f452985e9fffd145a366c92cfda20
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(QT_VERSION % 0xffff00) is useless for now, as QT_VERSION < 0x1000000
(for now). The author of this code probably meant to use bitwise-AND.
But even that is unnecessary as the right shift discards the lower 8
bits anyway.
Change-Id: Ie585843cfb684bc3b6e3fffd145d533b05288dfc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... instead of creating a QDateTime object.
Change-Id: Ib57b52598e2f452985e9fffd145a36911de4fa9a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The signal was connected to the wrong slot.
Regressed in 2fe56e37ed.
Change-Id: I33135fc79c3585dfbe0f6ebc04f819e919ed9ed7
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Examples should demonstrate best practice, and we can use the keyword
directly nowadays.
Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
DownloadLocation is not writable on some platforms (iOS) in Qt 5.6,
and qt-project.org HTTPS does not work anymore.
Change-Id: I78bfbee1472cd39cd05ec7f846d1195d4fbb1b2c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This enables people to toy around with the option and check
what impact it has.
Change-Id: I8b49c31211cc48721b3326eea48b4e74967b1a92
Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
while they are not built, their sources should be installed as long we
don't delete them completely.
Change-Id: I5e628e96cc9715520cb6e5aadb2cae61d1d03a4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
it was not built at all (and didn't build with qt in a namespace), and
consequently was not installed as well.
Change-Id: I24d8ac4dd5d70927c262ad6336e5ee32a0fd003a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
as in other examples which come with plugins, use an additional
hierarchy level which contains the app and plugin subdirs.
Change-Id: I2487755967aa3474c337c8c8af10be49627b63d0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.
Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
It's urgent to fix the issue that on Android, it became impossible
to interact with any widget or MouseArea which handles only mouse
events but not tablet events, using the stylus, because stylus events
are sent only as QTabletEvents. Before 5.6 (change
01d78ba86a) they were sent as
touch events, and mouse events were synthesized from those. Whereas
on other platforms, every QTabletEvent is followed by a synthesized
QMouseEvent.
This fix proceeds in the direction that event synthesis should be done
in cross-platform code so that platform plugins don't have to repeat it,
following the same pattern as for touch->mouse synthesis. Just as
in that case, the application can disable it, and the platform plugin
can also report that it's unnecessary for Qt to do the synthesis
because the platform already does.
So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the
tablet->mouse synthesis from all platform plugins, because the plugin
does not know whether the tablet event was accepted or not, so it does
not have enough information to decide whether to synthesize a mouse
event. Synthesis has been unconditional until now, which contradicts
what the documentation says: the mouse event should be sent only if
the tablet event is NOT accepted. We can now gradually make this
promise come true.
[ChangeLog][QtCore][Tablet support] A synthetic mouse event will
no longer be sent after every QTabletEvent, only after those which are
not accepted (as documented).
Task-number: QTBUG-47007
Task-number: QTBUG-51618
Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Remove Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.
Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
There is access to session manager functions which are not present when
building with -no-sm.
Change-Id: I1c92b4a70f7adb56816877930fb9f55b04ff8940
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Replace QMimeType::inherits() by a check using the list of parents
since only the direct children are needed to build the tree.
Change-Id: I041f21c4b94c8a250f7402a6f550f987c64f8fe8
Reviewed-by: David Faure <david.faure@kdab.com>
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library,
examples and tests.
Task-number: QTBUG-51673
Change-Id: I3706336395620522ceda414d7437295d9ec64f16
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one
Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Add an example showing the types in QMimeDatabase in
a QTreeView with detailed information on click.
The example has menu options to detect a file type
and search by name.
Change-Id: If6f1a6661edd100a54460a49562a8a8667245ddb
Reviewed-by: David Faure <david.faure@kdab.com>
QUrl::setScheme() parses and canonicalises the scheme, so that
scheme() always returns a lower-case string anyway; no need to
.toLower() it.
Change-Id: Ied00814b63f159386a42552dcf06346ee56f9f97
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
That feature is a poor man's session management for applications
that do not implement any specific session management features.
It badly interferes with proper session management support, so
applications must be able to disable it.
This enables fixing applications with
QGuiApplication::quitOnLastWindowClosed() true - the default -
dying too early, before they are enumerated for the list of
applications to restart on session restore, thus preventing them
from being restored. See
https://bugs.kde.org/show_bug.cgi?id=354724
[ChangeLog][QtGui] Qt asking to close windows on session exit as
a fallback session management mechanism has been made optional.
Disabling it fixes session management for applications that
implement full session management. See
QGuiApplication::isFallbackSessionManagementEnabled().
Task-number: QTBUG-49667
Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
It does not work as expected since the QLineEdits do not expand.
Amends b880b7e1ac.
Change-Id: I0b3b3822cca7fc6442a7155eecd46bd3d134d069
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
- Introduce Qt 5 signal-slot connection syntax.
- Merge MainWindow::createMenus()/createActions()
into MainWindow::createMenus(), removing the need
to store the actions as member variables.
Use QMenu::addAction() for brevity.
- For actions in QActionGroups, carry the Valuator enum
in QAction::data so that the slot to handle the selection
does not need to compare the QAction pointer itself.
- Use a non-modal QColorDialog, so that the user
can change colors more easily while drawing.
- Choose saner shortcut keys: control-Q should not
override the default usage for quitting the application,
and using shortcuts for About dialogs is anyway dubious.
- Improve the example documentation.
Change-Id: I57aaf5f5b885c13a953482dbcc41275dd3d6bff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
From Qt 5.7 -> examples are lisenced under BSD license, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new BSD header instead of LGPL21 one
(in those files which will be under BSD)
Change-Id: I3ad61caaf07802eb9da7d29eca3fe49d8a51b6a8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This adds a way to resume reading from a stream after a ReadPastEnd error.
This is done by introducing a stream read transaction mechanism that keeps
read data in an internal buffer and rolls it back on failure.
[ChangeLog][QtCore] Added QDataStream startTransaction(),
commitTransaction(), rollbackTransaction(), abortTransaction()
functions to support read transactions.
Task-number: QTBUG-44418
Change-Id: Ibf946e1939a5573c4182fea7e26608947218c2d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Insert a group box depending on style hints.
Change-Id: I1b49dc31d5bd32c92d88f95be0683d5223329c11
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Use the new API QStyleHints::showIsMaximized().
Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
- Remove Qt::WindowContextHelpButtonHint.
- Make the server label interactive (enable copy).
- Introduce new connection syntax.
- Remove unneeded member variables.
- Use constructor initialization where appropriate.
- Adapt the layout to fullscreen platforms by wrapping it
into a QGroupBox.
Change-Id: I6e397ad082f22ba1e99fc5a17440b2be1f9584f6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>