Commit Graph

126 Commits

Author SHA1 Message Date
Mitch Curtis 16436239cd Merge qtquickcontrols2 into qtdeclarative
Task-number: QTBUG-95173
Change-Id: I2cf31e30127e8cc2f10304cabf4ff7f5050633b8
2021-07-28 11:21:25 +02:00
Mitch Curtis 93bd34b78f Add QtCore module
[ChangeLog][QtQmlCore] Added QtCore QML module. Currently this only
contains the StandardPaths singleton, but in the future could expose
lots of useful types from Qt Core to QML.

Fixes: QTBUG-92806
Change-Id: Ib99e2c5512ee04d6af1322f985fc9da965cf13a4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-04-21 14:37:10 +02:00
Mitch Curtis b50f9b67b7 Add CMakeLists.txt.user to .gitignore
Change-Id: Ieef0f9e5a8899211eaf7a67060a1e3ed785f9359
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-16 14:29:55 +02:00
Mitch Curtis d30636bc70 Ignore CMakeLists.txt.user files
Pick-to: 6.0
Change-Id: I25112b2b2ba1316e0535547a01ce3a64e1c59f73
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-11 14:23:11 +01:00
Mitch Curtis 9219e86aa5 Rename "Default" style to "Basic"
[ChangeLog][Styles] The Default style was renamed to Basic to account
for the introduction of the platform styles (macOS, Windows), which
will be used by default (where possible) when no style is specified.

Fixes: QTBUG-85984
Task-number: QTBUG-68814
Task-number: QTBUG-86403
Change-Id: I22b3199c8662e4ee5d55a1be1a51c9856ac62376
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-09-24 13:48:49 +02:00
Lars Knoll 30559095ed Ignore some cmake generated files
Change-Id: Ieefe8bd422e22ccc848529bdeaa32fec535d4fc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-04-02 08:41:08 +02:00
Mitch Curtis 006f8b666f Add .qmake.stash to .gitignore
Change-Id: I9465c71e870332c275ac7d2476096b348af33b99
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-03 08:46:51 +00:00
Mitch Curtis 73914e00db Add *.pro.user.* to .gitignore
To ignore files like foo.pro.user.4.8-pre1

Change-Id: I465b36eda8a3a57854c25802d003d86ca7356f86
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-06 07:40:58 +00:00
Mitch Curtis 84b47be6c7 Add *.pro.user.* to .gitignore
To ignore likes like foo.pro.user.4.8-pre1

Change-Id: If00bc540da49a06aa2be8ec38bc900996c6837c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-01-28 12:28:14 +00:00
J-P Nurmi fe7d1b895d Compile QML files ahead of time in resources
After qtbase commits defe266 and 9c42959, we can use 'builtin_resources'
and 'install_qml_files' configs to get qml_module.prf to do all that for
us without having to write custom qrc/copy/install rules. This allows us
to unconditionally enable the Qt Quick Compiler for the resources. The
rest, i.e. optionally leaving out the QML files, will be handled via the
Qt deployment tools.

Task-number: QTBUG-67501
Change-Id: I18f2122ff4945496921b7183c365497c37dfe3a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-04-10 10:32:07 +00:00
Thiago Macieira c9398266d8 Move the QML_COMPILE_HASH macro definition from the command-line
If it's in the command-line, it is added to the precompiled header,
which won't be regenerated if the macro changed. Instead, let's create a
header that can be #included only in the file it needs to.

Since qmldevtools compiles the file that has this new #include, we need
to ensure it was created before the module is compiled.

Change-Id: I940917d6763842499b18fffd1513b9c64cd98387
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-21 21:30:10 +00:00
J-P Nurmi 1fcec5bf1e Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	examples/quickcontrols2/quickcontrols2.pro
	src/imports/controls/ComboBox.qml
	src/quicktemplates2/qquickabstractbutton.cpp
	src/quicktemplates2/qquickabstractbutton_p.h
	src/quicktemplates2/qquickapplicationwindow_p.h
	src/quicktemplates2/qquickcombobox.cpp
	src/quicktemplates2/qquickcontainer.cpp
	src/quicktemplates2/qquickcontrol.cpp
	src/quicktemplates2/qquickcontrol_p.h
	src/quicktemplates2/qquickcontrol_p_p.h
	src/quicktemplates2/qquicklabel_p.h
	src/quicktemplates2/qquicklabel_p_p.h
	src/quicktemplates2/qquickslider_p.h
	src/quicktemplates2/qquickspinbox.cpp
	src/quicktemplates2/qquicktextarea_p.h
	src/quicktemplates2/qquicktextarea_p_p.h
	src/quicktemplates2/qquicktextfield_p.h
	src/quicktemplates2/qquicktextfield_p_p.h
	tests/auto/auto.pro
	tests/auto/controls/data/tst_combobox.qml

Change-Id: I34cdd5a9794e34e0f38f70353f2a2d04dfc11074
2017-12-15 11:44:26 +01:00
J-P Nurmi 458eb65f73 Buttons: defer the execution of the delegates
In practice, deferring the execution of the delegates (until
accessed) means that the default delegate item does not get created
at all, when a custom control replaces it at construction time.

    Button {
        background: Rectangle { ... }
    }

Before, such custom Button would never be faster than the original
one, because the default delegate was first created and then thrown
away at construction time. Originally, this was not considered a huge
problem, because the plan was to keep the default delegates so light-
weight that it wouldn't matter. However, then came the fancy styles
with shadows and effects and thus, heavier default delegates. There's
also a growing demand for more features, and the default delegates
are slowly getting heavier...

Now, after this patch, if you replace a heavy default delegate with
a light and simple custom delegate, the result is a much faster
control. For example, replacing Material style Button's background,
which has a shadow effect, with a plain Rectangle gives a ~10x boost,
because the default background with its heavy shadow effect is not
executed at all.

At the same time, deferring the execution of the default delegates
avoids troubles with asynchronous incubation, because we don't need
to destroy an object in the middle of the incubation process.

Task-number: QTBUG-50992
Change-Id: I2274bff99b9ff126d3748278d58d859222910c98
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-12-11 12:09:57 +00:00
J-P Nurmi feab71f7e3 Update .gitignore
Change-Id: I696b405843f9eda79ec586cb99953469cb7f3c86
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-11-06 15:01:40 +00:00
J-P Nurmi 7e85c09d25 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.gitignore
	tests/auto/auto.pro
	tests/auto/qquickmenu/tst_qquickmenu.cpp
	tests/auto/qquickpopup/tst_qquickpopup.cpp

Change-Id: I7e5a7b39d890796fd63a7b24ae19765ab41fecda
2017-09-27 20:46:48 +02:00
J-P Nurmi 576a97774e Rename tst_menu to tst_QQuickMenu
Change-Id: I1c7e1a2b337e9d16bc6c9b098db08f29f1b9d1e6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-27 13:42:30 +00:00
J-P Nurmi 125c08cad1 Rename tst_applicationwindow to tst_QQuickApplicationWindow
Change-Id: If9fc2bb41cf251af71479b25656240e0d3c238d8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-27 13:42:28 +00:00
J-P Nurmi c5e60dbf00 Rename tst_popup to tst_QQuickPopup
Change-Id: I98f7081e94672a4454c33841934158ae82e9388f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-27 13:42:25 +00:00
J-P Nurmi 96aec78737 Rename tst_Drawer to tst_QQuickDrawer
Change-Id: I186b3ed95eda5178f861bc501be481c971641767
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-09-27 13:42:22 +00:00
J-P Nurmi ccc05b9385 Update .gitignore
Change-Id: Ifc195a5b9ca69223afe35b9ac332238e0c163e3d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-09-21 13:34:01 +00:00
J-P Nurmi 846a908b73 Add Imagine style
The Imagine style is based on image assets. The style comes with a
default set of images, but the images can be easily changed by
providing a directory with images using a predefined naming convention.

[ChangeLog][Controls] Added the Imagine style, which is based on
image assets that can be provided using a predefined naming convention.

Task-number: QTPM-517
Change-Id: I550d7dac9a9686d60bec15655ac92dea9f36149c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-07-31 14:01:58 +00:00
J-P Nurmi 66faa149db Introduce MenuBar
MenuBar is an ordinary Item. It can be located basically anywhere, but
the idea is to introduce a new ApplicationWindow::menuBar property in a
follow-up commit. Currently the example snippets are using the header
property.

[ChangeLog][Controls][MenuBar] Introduced a MenuBar control.

Task-number: QTBUG-60350
Change-Id: Ie66dc457a3d8edbe8362fab2a591dc49442c95e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-07-26 14:11:39 +00:00
J-P Nurmi 38be5b605a Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
	src/imports/controls/doc/src/qtquickcontrols2-styles.qdoc
	src/quicktemplates2/qquickapplicationwindow.cpp
	src/quicktemplates2/qquickmenu.cpp
	src/quicktemplates2/qquickmenu_p.h
	src/quicktemplates2/qquickpopup.cpp
	tests/auto/auto.pro

Change-Id: I856a022d38abd84763127539f46ef032ddc53c3d
2017-06-08 09:11:39 +02:00
J-P Nurmi 9b201572e5 Fix font inheritance for popups
1) First of all, Popup's QObject-parent depends on the way the Popup
is declared in QML, or what is passed as a parent to createObject()
when creating dynamic instances. For example:

 - Popup becomes a QObject child of of the contentItem:

    ApplicationWindow {
        Popup { }
    }

- Popup becomes a QObject child of the window:

    ApplicationWindow {
        Item {
            Popup { }
        }
    }

- Popup becomes a QObject child of the specified parent:

    ApplicationWindow {
        Component {
            id: component
            Popup { }
        }
        Component.onComplete: component.createObject(overlay)
    }

Since QQuickWindow and QQuickView did not set the QObject-parent
of their contentItem and rootObject, respectively, we had troubles
finding popup instances, because window->findChildren<QQuickPopup>()
and window->contentItem()->findChildren<QQuickPopup>() would produce
inconsistent results. This has been fixed in qtdeclarative commit
af6655885, so now we can use window->findChildren() reliably.

2) Popups inherit font from the associated window, not the parent item.
It was wrong to call resolveFont() in setParentItem(), because the
parent item might not change even though the associated window does.
The piece of code was moved to setWindow() instead.

3) QQuickPopupItemPrivate::resolveFont() did not propagate the
default font at all when the font was resolved before being associated
to a window.

4) After the above fixes had been applied, to ensure that popups always
inherit fonts and propagate them down to children as appropriate, we
got a new test failure in tst_controls::Popup::test_font() indicating
that there were extra font change notifiers triggered at creation time.
This was fixed by associating "top-level" popups with the window as
soon as they are appended to ApplicationWindow's default property,
instead of waiting until the popup is complete and then doing a lookup
in the parent hierarchy.

Task-number: QTBUG-61114
Change-Id: I6185c76d50835cb7a06b03db0a3ac9ddad64bdd3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-06-07 10:51:39 +00:00
J-P Nurmi f57f2d9e45 Say hello to the Fusion style
[ChangeLog][Controls] Introduced a Fusion style that offers
a platform agnostic desktop-oriented look'n'feel.

Change-Id: Id1c1baf10f4b3a79e89bcc72f6d170ed0b2cc8b0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-30 15:13:21 +00:00
J-P Nurmi 68aea0a423 Add support for propagating palettes
Change-Id: Icd965d8a79f022f4375e2134621cbc3897014015
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-05-26 08:52:05 +00:00
J-P Nurmi b7a95c2fd1 Add tst_qquickiconlabel to auto.pro
Change-Id: I7577d826eff0ba819ad711d402083c736b29d847
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-04-11 12:55:03 +00:00
J-P Nurmi 2784902b9b Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/imports/templates/qtquicktemplates2plugin.cpp

Change-Id: I4a07d331163a85a0fb98a5f58f3970863f8da0fc
2017-04-06 22:13:27 +02:00
J-P Nurmi 0704f76d47 Rename tst_scrollbar to tst_cursor
This test was added in 88a62b3 that fixed the scrollbar cursor. It was
not possible to test in QML, so a separate C++ test was added. It was
noticed that most interactive controls have the exact same issue, so we
want to utilize the same test for testing the cursors of all relevant
controls.

Change-Id: I7c307de9f72760b0993007246beb3357a1b5ec2b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-04-05 07:34:16 +00:00
Liang Qi c3cc73e308 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/imports/controls/RangeSlider.qml

Change-Id: I0b930583135f044cb690217c026e6a120b73fcb7
2017-03-30 13:46:40 +02:00
J-P Nurmi 61aa5620d7 Update .gitignore
Change-Id: I4c09c932e75ead95cf009f28a2dcfe24659000a8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-28 14:34:58 +00:00
Shrikant Dhumal 7d0a2a1e55 Add Wearable demo
Change-Id: I3e287b85517c04803964c068e32bf8b6bcae5cb6
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-13 07:29:41 +00:00
J-P Nurmi 68d7935e83 Make styles configurable features
./configure
    [...]
    Qt Quick Controls 2:
      Styles ................................. Default Material Universal

Supports both syntaxes:

 -(no-)style-[material|universal]
 -(no-)feature-quickcontrols2-[material|universal]

Change-Id: I011cc38e5752d2c718376ca7493940271920b3e1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-02-06 11:32:21 +00:00
J-P Nurmi edf92fed90 Add "hover support" configure feature
./configure -no-feature-quicktemplates2-hover
    [...]
    Qt Quick Templates 2:
      Hover support .......................... no

Change-Id: I0509a1a9ac3ffe2cbfe4f2016ce0345708860b84
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2017-02-06 11:32:17 +00:00
J-P Nurmi 463e462455 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	examples/quickcontrols2/quickcontrols2.pro

Change-Id: If2f5e40487ba6515ba322f92380573727bdd6bc0
2017-01-05 16:48:06 +01:00
Thomas Hartmann 4f7ec6143a Flat Style example
This example shows how to integrate custom styled
components with tooling. The example uses states in the styling items,
so they can be easily edited and checked in the designer.

Change-Id: Ie665bb3938cdb1b135dbbd4163e1b901e61a6be0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-01-05 14:17:35 +00:00
J-P Nurmi 2071c1b059 Add "Swipe to Remove" example
Change-Id: Ibab960ddd073ddcdfbf2b6e4492882662c7021b5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-12-20 12:53:21 +00:00
J-P Nurmi 15fab6e8f8 Side Panel example
Task-number: QTBUG-53169
Change-Id: I1d84d2fc9cbfce0fa71703f469bb6d5030e41d67
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-12-01 16:14:00 +00:00
J-P Nurmi 4ef7af98e6 Update .gitignore
Change-Id: Ib6ebd0d076309f2d22368223bb323547aed33f3a
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-11-17 16:04:24 +00:00
J-P Nurmi a3b706531b Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-disabled.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-progressbar-normal.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-checked.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-disabled.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-focused.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-radiobutton-normal.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-disabled.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-first-handle-focused.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-normal.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle-focused.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-rangeslider-second-handle.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml
	src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-tabbar-explicit.qml
	src/quicktemplates2/qquickmenu.cpp
	tests/auto/controls/data/tst_buttongroup.qml
	tests/auto/controls/data/tst_swipedelegate.qml

Change-Id: Ib6042a0ad716f557927e7412d17ea8957d06c015
2016-10-07 17:24:19 +02:00
Mitch Curtis 2f66e9c239 Add screenshots manual test for taking screenshots of snippets
This can be used to take screenshots of items loaded from snippets,
without the window frame being included as would be the case if
using e.g. qmlscene.

Change-Id: I376148a66a26be846c102e768ffade204cea448b
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-10-04 08:06:31 +00:00
J-P Nurmi a6ca9472de Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/quicktemplates2/qquicktextarea_p_p.h
	src/quicktemplates2/qquicktextfield_p_p.h

Change-Id: Ie7b4a114ad27a4cad337c91e8ebcf696b0e845d7
2016-09-14 12:09:39 +02:00
J-P Nurmi b34942f02e Update .gitignore
Change-Id: Ibdad75be0d08c7e737af3a2ba6c096b3a9a2186f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-09-13 06:50:03 +00:00
J-P Nurmi 61ed2a96c7 Update .gitignore
Change-Id: Ie23caad334346a87703655fd83c447447bbfbce0
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-09-02 19:04:58 +00:00
J-P Nurmi 55a56fdaf5 Update .gitignore
Change-Id: Ic9b8866cb353a14bbcc9005ef7a419fe1629dc34
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-24 19:26:03 +00:00
Liang Qi 79349119c6 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
2016-08-19 21:22:10 +02:00
Simon Hausmann 852e60e67b Ignore generated QML/JS code cache files
Change-Id: Ic6fd156a1f9088c35d217a6f450610ac4b7d3284
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-15 07:59:53 +00:00
Simon Hausmann b1eeb7cdde Update .gitignore
Added the target wrappers shell scripts generated by commit
282f15feaae4c525602d537ab65cb61987eb5f7f from qtbase to the list of ignored
files. Similarly the config.log is also not desirable for version tracking.

Change-Id: I5cf832ea706f2109d2935cc6a086ece0979cc588
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-15 07:58:22 +00:00
J-P Nurmi bf4761232e Restore version 2.0 for the .impl imports
It's a bit of extra hassle, but the type registration can be done so
that we keep the old version available to avoid deliberately breaking
apps that have had to import .impl to gain access to the internal
goodies. For example, someone may have made a copy of one of the
controls as our documentation suggests. :)

Change-Id: I5308d7e74ecebf69da7fe9c6912380f72c3c9a2b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-08-10 07:44:02 +00:00
J-P Nurmi 39d6ede823 Add .qmlc (QML cache) files to .gitignore
Change-Id: Ie451be17e785dc8551304dcfb0b2c8552023bdba
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-08-09 15:29:56 +00:00