Commit Graph

131 Commits

Author SHA1 Message Date
Mitch Curtis 182bb9d04d Adjust to QUnifiedTimer slow mode changes
a318e331f1387eb3c9d13be96c28619453a35571 in qtbase.

Task-number: QTBUG-137919
Change-Id: I98e3871053bbb04b83aa114844f07293501d95d6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2025-06-27 19:27:12 +08:00
Marc Mutz 534241f723 Port to new Q_UNREACHABLE_RETURN()
This is a semantic patch using ClangTidyTransformator to convert
sequences of Q_UNREACHABLE() + return into Q_UNREACHABLE_RETURN(),
newly added to qtbase.

    const std::string unr = "unr", val = "val", ret = "ret";
    auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(",
                                    ifBound(val, cat(node(val)), cat("")),
                                    ")");
    auto ignoringSwitchCases = [](auto stmt) {
        return anyOf(stmt, switchCase(subStmt(stmt)));
    };

    makeRule(stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)),
                  nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))),
             {changeTo(node(unr), cat(makeUnreachableReturn,
                                      ";")), // TODO: why is the ; lost w/o this?
              changeTo(node(ret), cat(""))},
             cat("use ", makeUnreachableReturn));

a.k.a qt-use-unreachable-return.

subStmt() and nextStmt() are non-standard matchers.

There was one false positive, suppressed it with NOLINTNEXTLINE.

It's not really a false positiive, it's just that Clang sees the world
in one way and if conditonal compilation (#if) differs for other
compilers, Clang doesn't know better. This is an artifact of matching
two consecutive statements.

Change-Id: I3855b2dc8523db1ea860f72ad9818738162495c6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-20 23:59:33 +02:00
Marc Mutz c2d490a238 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I601bf70f020f511019ed28731ba53b14b765dbf0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-10-07 23:38:56 +02:00
Marc Mutz 958cd3ee10 Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:

  auto QtContainerClass = anyOf(
      expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o),
      expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o));
  makeRule(cxxMemberCallExpr(on(QtContainerClass),
                             callee(cxxMethodDecl(hasAnyName({"count", "length"),
                                                  parameterCountIs(0))))),
           changeTo(cat(access(o, cat("size"), "()"))),
           cat("use 'size()' instead of 'count()/length()'"))

a.k.a qt-port-to-std-compatible-api with config Scope: 'Container',
with the extended set of container classes recognized.

Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-10-07 23:38:48 +02:00
Lucie Gérard 0dc4fd240a Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-06-11 08:05:15 +02:00
JiDe Zhang 9dba08d048 Fix the qmlscene command help message
Pick-to: 6.1
Change-Id: Ie957bcc459a91d1c353be664074475545ec67510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-05-18 09:01:27 +00:00
Maximilian Goldstein a9c93e2716 qmlscene: Show deprecation warning
qmlscene will be removed in favor of qml in the future.

[ChangeLog][QML][Important Behavior Changes] qmlscene is deprecated, please use qml instead

Task-number: QTBUG-53557
Task-number: QTBUG-53219
Task-number: QTBUG-65862
Change-Id: Ia295cdf0749ce79f6523dabebd43f0168e81c1f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-12 22:34:16 +00:00
Volker Hilsheimer a15840a8df Fix additional warnings from usage of deprecated APIs
Replace QLibaryInfo::location with QLibraryInfo::path, and remove usage of
Qt::AA_EnableHighDpiScaling, which doesn't have any effect anymore.

Change-Id: I347e8a83e0f4c2b4405f2512e569ad3234f05a98
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-16 12:44:59 +02:00
Tor Arne Vestbø d0eb261836 Remove use of deprecated High-DPI application attributes
Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-09-02 17:17:33 +02:00
Paul Olav Tvete 83fb4f6743 Clean up QT_CONFIG(opengl)
Accelerated graphics is now possible without OpenGL support. With
this change, a Qt build with -no-opengl can still run Qt Quick with
a Vulkan, Metal, or Direct3D backend.

Fixes: QTBUG-84027
Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-17 17:42:01 +02:00
Laszlo Agocs 0d43e21429 QQuickWindow: Remove (set)ClearBeforeRendering
The doc update reveals that this setting has been ignored with the RHI
always, and there is no plans (or ways) to support this.

As the beforeRenderPassRecording() signal documents, connecting to that
signal is effectively an alternative to disabling clearing the color
buffer. (because it allows the application to execute custom GL or other
calls after the clear but before the rest of Qt Quick's rendering)

Therefore, remove the clearBeforeRendering flag from Qt 6.

[ChangeLog][Qt Quick][QQuickWindow] setClearBeforeRendering() and
clearBeforeRendering() are removed.

Change-Id: I6a0a6f56552331923f2e07390e2f33f58c6c31e0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-16 09:39:12 +02:00
Laszlo Agocs 2ebdc9dc76 Remove the now unneeded moc include from qmlscene
Change-Id: Ieb8859c3695aa005a7d66476ac398142bbf22464
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-10 12:51:53 +02:00
Laszlo Agocs abaf9bded3 Remove openGLContextCreated signal
No reason to have this in the API in 6.0, and it's already not emitted
at all in dev (because the direct OpenGL code path is now gone from the
render loops)

Some simple GL string printing has been removed from qml/qmlscene. This
opt-in feature has not been useful in practice anyway since QSG_INFO=1
prints the same things.

[ChangeLog][Qt Quick][QQuickWindow] The openGLContextCreated signal has
been removed from QQuickWindow.

Change-Id: Ifb647bbd1e828ebad2b775e8ce5c38723a0cda13
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2020-06-10 12:51:53 +02:00
Qt Forward Merge Bot 3e758800b4 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/imports/qtqml/plugin.cpp
	src/qml/qml/qqml.h
	src/qml/qml/qqmlmetatype.cpp
	src/qml/qml/qqmlmetatype_p.h
	src/qml/qml/qqmltypeloader.cpp
	src/qml/types/qqmlbind.cpp
	src/quick/items/qquickitemsmodule.cpp
	tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp

Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
2020-02-17 10:21:59 +01:00
Thomas Hartmann 3c24395934 Add QML_CORE_PROFILE support to QML tool
If QML_CORE_PROFILE is defined we use the CoreProfile surface format.
This is required for QtQuick3D.

For consistency we also introduce QSG_CORE_PROFILE.
Adding QSG_CORE_PROFILE also to qmlscene.

Change-Id: I4feee91740162cf36fa2668695b74f5a1279bb89
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-06 11:33:01 +01:00
Ulf Hermann 406f15ce0e Quick: Don't qualify OpenGL includes
The headers are moving from QtGui to QtOpenGL. By avoiding the
qualification we can keep them compiling either way. Also, add
opengl-private to make the types available.

Also removed the QGraphicsRotation hack to get access to the projected
rotation function of QMatrix4x4. The function is public now.

Task-number: QTBUG-74409
Change-Id: I216e8ca09f8e247f96627b081308e3a57c55c29c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-01-27 13:03:18 +01:00
Laszlo Agocs 341ab77080 Add the graphics api independent scenegraph port
Opt in via environment variables:
QSG_RHI=1 -> enable using QRhi instead of GL
QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default
(the default is d3d11 on Windows, metal on Mac, gl elsewhere)

Or force a given rhi backend via the existing
QQuickWindow::setSceneGraphBackend().

Otherwise the default behavior is the same as before, the rhi code path
is never active by default.

-no-opengl builds are supported in the sense that they work and default
to the software backend. However, the rhi code path cannot currently be
used in such builds, even though QRhi from qtbase is fully functional
with Vulkan, D3D, or Metal even when qtbase was configured with
-no-opengl. This cannot be utilized by Quick atm due to OpenGL usage
being all over the place in the sources corresponding to the default
backend, and those host the rhi code path as well. This will be cleaned up
hopefully in Qt 6, with the removal all direct OpenGL usage.

Other env.vars.:
QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer
(assuming the system is set up for this)
QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect
QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too)
QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index
QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index
QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both
merged/unmerged, convert when needed - with some rhi backends this is
implicit)
QSG_RENDER_LOOP -> to override the render loop as usual. The default
with RHI is threaded for Metal, threaded for Vulkan on Windows, basic
for Vulkan on Linux and Android (to be checked later), while the existing
rules apply for OpenGL.

Not supported when running with QRhi:
  - particles
  - compressed atlases (though this is transparent to the apps)
  - QSGRenderNode
  - QQuickRenderControl
  - QQuickFramebufferObject
  - certain QQuickWindow functionality that depends directly on OpenGL
  - anisotropic filtering for textures
  - native text may lack some gamma correction
  - QSGEngine applicability unclear
  - some QML profiler logs may be incorrect or irrelevant

Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-04 10:44:26 +02:00
Qt Forward Merge Bot e6c6cc8fde Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/imports/imports.pro
	src/qml/qml/qqmlmetatype.cpp

Change-Id: I308436caf55402cb2246cb591c6ac8f83e1febf8
2019-07-01 10:29:06 +02:00
Qt Forward Merge Bot 63398defdb Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I59343fe228ca6b823b61577e5a0907e7381899c2
2019-06-28 13:28:10 +02:00
Ulf Hermann 9834ac5604 qmlscene: Avoid infinite loop
If the root document doesn't contain any executable code, we should
terminate with an error message rather than loop forever.

Change-Id: Ice2ff10ae5dc9d71df2d1c784597393695ab1d98
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-06-26 16:22:30 +02:00
Joni Poikelin 82f126599b qmlscene: Fix setting of the default surface format
Fixes: QTBUG-76603
Change-Id: I2977117dcaf45345c14599e0b38cb4a242ee449b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-06-25 14:00:12 +03:00
Edward Welbourne 6d5a0a55d8 Convert uses of QTime as a timer to QElapsedTimer
Change-Id: Ia34d3980e48d2978c8c77e65b1ee2aa7f71fd985
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-06-12 18:32:50 +02:00
Qt Forward Merge Bot 53bd6b8111 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9ef4be23bfe35aa48d4c65d4159e72c527943845
2019-04-19 01:00:04 +02:00
Qt Forward Merge Bot 1a62cad4a6 Merge remote-tracking branch 'origin/5.12.3' into 5.12
Change-Id: Ie2e6a4af1953cb5d7965b95090d369e7433ceb85
2019-04-17 10:34:17 +02:00
Qt Forward Merge Bot 8bc3329e2c Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/3rdparty/masm/assembler/LinkBuffer.h
	src/qmltest/doc/src/qtquicktest-index.qdoc
	tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp

Change-Id: I7d83ad95cf489dda794dd7a0a33bad3ef3b05609
2019-04-15 09:36:12 +02:00
Thomas Hartmann 936cc8adcc Add support for selectors to qmlscene
This allows to use qmlscene together with file selectors.

Task-number: QDS-589
Change-Id: Icf613c938bfc2c56b33a36ab2da32c3c54b498a2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-04-09 14:29:19 +00:00
Thomas Hartmann 5ead393eba Fix qmlscene command parsing
If "QMLSCENE_CORE_PROFILE" is set the command line
parsing does not work anymore.

Change-Id: I75ffa733562708a412d1ae341b24d1f3bb35c034
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-04-08 09:12:26 +00:00
Qt Forward Merge Bot a6a8832078 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I1dd04210f10895c509b5c637fc5e2dcf66e3bb91
2019-04-02 01:01:03 +02:00
Tim Jenssen 14109aaccc add core profile environment variable
Enables 3druntime scenes at macOS without calling it
with extra process arguments.

Task-number: QDS-553
Change-Id: I04e59f4f9061eb2a567c65406c5a8195b1896836
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-04-01 11:56:52 +00:00
Tomi Korpipaa 0df6977337 Fix surface format bug for macOS
Task-number: QT3DS-3238
Change-Id: Ie3a675ef32251481abaa460bb89bc1c4381573ea
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-03-29 08:53:54 +00:00
Qt Forward Merge Bot dca7fc3e3a Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I9c3d282c11a556e616c5e1ba1b51e88b741327f6
2018-12-23 01:00:12 +01:00
Kai Koehne aad66998c3 qmlscene: Make it explicit that QCA::installTranslator is static
Change-Id: I1b123981a9dae359c27c96d4b7ae276af1c5e90f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-12-14 12:49:46 +00:00
Qt Forward Merge Bot df8784fa1f Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I57e4b762dcccf2f7f6e4b659f6fc8c40465d3322
2018-11-24 01:00:07 +01:00
Kai Koehne 52e4e125b6 qmlscene: Fix potential invalid memory access to QTranslator
Qt assumes that installed QTranslator object should remain valid for the
whole lifetime of Qt, so let's create it on the heap.

Change-Id: Ia99826a933eefd9952efc6556505c7f52920b483
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-11-23 07:41:55 +00:00
Morten Johan Sørvig a7472867f4 Make QtDeclarative work for the no-thread config
Force use of the basic render loop, adapt qqmlthread
and qqmltypeloader to work on a single thread.

Disable components and features that require worker
threads: qmldb_server, worker script, shapes, folderlistmodel,
threaded render loop, software renderer.

Done-with: Lorn Potter <lorn.potter@gmail.com>
Change-Id: I77d965947f684f8b7d19284b5decd893395316cb
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2018-09-05 00:00:09 +00:00
Valentin Fokin 556907404d Fix feature dependencies of qmlscene and qmleasing tools
Add missing guard for header include in qmlscene and skip build of
qmleasing on disabled feature.

This fixes build with -no-feature-action configuration.

Change-Id: I3b0f248e57495bbbd9a0250300f2e3ca82a01a72
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-24 13:45:02 +00:00
Kai Koehne e6f6c4aee6 Use QTranslator::install(QLocale, ...) everywhere
QTranslator::install(QLocale, ...) indirectly uses
QLocale::uiLanguages(), which is the correct way to
ask the system for ui languages.

This was already attempted once in commit 427646b8d7,
but reverted later on in commit 05d8ffb4df, because
it requires shipping .qm files for the native language.
Anyhow, we're shipping empty Qt translations for English
since a while, and also have been fixing our examples
to do so.

[ChangeLog][Important Behavior Changes]
The automatic translation loading in qml, qmlscene
and QQmlApplicationEngine now tries to load translations
for all languages in  QLocale::uiLanguages().
This might require shipping an empty translation for the
source language.

Task-number: QTBUG-7329
Task-number: QTBUG-41977
Task-number: QTBUG-69196
Change-Id: Ifcf45b453ee9d05c018f379cc01e192d1b0a3f56
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-07-18 06:40:36 +00:00
Shawn Rutledge 06e962f263 init variables where they are declared when possible (clang-tidy)
clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init'
 -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix

Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2018-02-26 13:08:30 +00:00
Shawn Rutledge 499ec43937 use nullptr consistently (clang-tidy)
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-26 07:13:18 +00:00
Giuseppe D'Angelo 460925b3f1 Add a way to set the default render type of text-like elements
f3446071da introduced a build-time
way to select the default render type of text-like elements.
This patch adds also a way to select it at runtime, via a setter
on QQuickWindow. (QQuickWindow has been chosen as convenience,
rather than adding another namespace/class to just have this
setter.)

Given that QT_QUICK_DEFAULT_TEXT_RENDER_TYPE was never documented,
I've taken the liberty of changing the accepted values for it
(to match the new enumerator names in QQuickWindow, rather than
the ones in QQuickText/QQuickTextEdit/etc.).

[ChangeLog][QtQuick][QQuickWindow] It is now possible to set the
default render type of text-like elements globally via the
QQuickWindow::setTextRenderType() function. If you were using
the (undocumented) QT_QUICK_DEFAULT_TEXT_RENDER_TYPE macro
when building Qt Quick for the same purpose, note that the
macro value needs now to be set to the "NativeTextRendering"
value, instead of "NativeRendering".

Change-Id: Id4b2dc3ec823971486e445ca4173b8be848fb4e3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-08-23 14:16:51 +00:00
Laszlo Agocs 0e0606a049 qmlscene: add an option to request core profile contexts
Helps for example to launch the qtgraphicaleffects testbed with
a core profile context and thus exercise that path.

Change-Id: Ief436ee5221e59d8a14ad74f27583b68e61eb056
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-07-06 11:12:52 +00:00
Friedemann Kleint 9c1c471e54 qmlscene: Add --apptype argument, allowing to specify the application class
Make it possible to run with QGuiApplication by passing --apptype gui
in a build with widgets enabled (as is already possible with the
"qml" tool).

Change-Id: Ifd371edc8f456c0c2800d6fb7225230f9881dc8c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-12 11:19:30 +00:00
Samuel Gaist 70a5d7bd87 Migrate to QRegularExpression
This patch updates the code base to use QRegularExpression in the place
of the deprecated QRegExp class.

Change-Id: I3231ac9f7902a1cd16cd4ef5f26e6cdc05e2fa4b
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-04-09 22:17:20 +00:00
Samuel Gaist 4b445c487d QRegExp include cleanup
This patch adds missing include statement where the QRegExp class is
used.

Change-Id: I02d2995dd380f1e4db3777ae9759098c0e7757bd
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-03-17 08:00:17 +00:00
Lars Knoll e579076bb3 Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few
mis-spelled macros and invalid usages.

Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-29 10:10:27 +00:00
Friedemann Kleint 05e3cdd8ab Set Qt version on tools
Change-Id: I21d77b2eba7107528fc00db0cf5d87f8347b63be
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-11-09 09:18:44 +00:00
Anton Kudryavtsev 3ef4fac9ff tools: replace 'foreach' with 'range for'
Mark some local variables or parameters as const
to prevent detach()'ing.
Use qAsConst where is not possible mark as const.

Change-Id: I0a777c3bd855abd3bb1ad0907152360cf4a1050e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-08-20 06:52:34 +00:00
Cavit Sina Dogru 4fbfbf7fe8 Qt object: Add exit(int)
This is similar to the Qt.quit() function but also specifies the return
code that the event loop will return.

[ChangeLog][QtQml] Added exit(int retCode) method to the Qt global object.
An application can call Qt.exit to specify a return code of the engine.

Task-number: QTBUG-54360
Change-Id: Iaa319e6dc4d6b99dc3a5c01845e87b936fd2cab0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-08-09 17:16:44 +00:00
Andy Nichols 90d98e1330 Enable building Qt Quick module with QT_NO_OPENGL defined
Currently the Qt Quick module depends on either the OpenGL or OpenGLES
headers being available at build time.  Since we are adding support for
adaptations that do not depend on OpenGL, it should be possible to build
Qt Quick in environments that do not have OpenGL development headers.

This does present many challenges though because in some cases GL types,
and classes that require OpenGL are part of the public APIs.  However
since these classes were never available when QT_NO_OPENGL was defined,
it should be possible to redefine the function signatures under this
scenario, since it's not possible to break binary compatibility if there
never were any binaries to break compatibility with.

One of the bigger changes that was necessary to facilitate this change
is creating interfaces out of QSGContext and QSGRenderContext.  Here the
default behavior was usage of OpenGL directly, even though subclasses
could override all OpenGL usage. Making them interfaces should bring
QSGContext and QSGRenderContext more in line with the other classes
present in the adaptation layer.

Change-Id: Iaa54dc0f6cfd18d2da1d059548abf509bd71f200
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-22 09:51:54 +00:00
Jani Heikkinen 38ec3bd755 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-20 11:46:25 +00:00