diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png new file mode 100644 index 00000000000..6b16d813978 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png new file mode 100644 index 00000000000..0549a847587 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png new file mode 100644 index 00000000000..8876f95ae6e Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/ambient-sound-24@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png new file mode 100644 index 00000000000..71371f97a35 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png new file mode 100644 index 00000000000..86b80e95ab5 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png new file mode 100644 index 00000000000..4ad2a9011b2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/animated-image-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png b/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png new file mode 100644 index 00000000000..ff2bbbd140f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/animatedsprite-loading.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png new file mode 100644 index 00000000000..da40bc69a2b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png new file mode 100644 index 00000000000..b3ebdf745b7 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png new file mode 100644 index 00000000000..476df8640fc Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-engine-24@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png new file mode 100644 index 00000000000..ecc583b859a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png new file mode 100644 index 00000000000..ee181f57cc8 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png new file mode 100644 index 00000000000..2588277e531 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-listener-24@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png new file mode 100644 index 00000000000..6ae703de646 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png new file mode 100644 index 00000000000..f2133ca7167 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png new file mode 100644 index 00000000000..9336b81b6e8 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-output-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png new file mode 100644 index 00000000000..98f245d6240 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png new file mode 100644 index 00000000000..294d1574ae6 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png new file mode 100644 index 00000000000..bef7f80e3ec Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/audio-room-24@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png new file mode 100644 index 00000000000..5418a0f55ad Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png new file mode 100644 index 00000000000..17f7ed0688a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png new file mode 100644 index 00000000000..fb4fb339103 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/border-image-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png new file mode 100644 index 00000000000..666d1ed93f7 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png new file mode 100644 index 00000000000..5aa57d7f488 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png new file mode 100644 index 00000000000..bb2278ff899 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/busyindicator-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png new file mode 100644 index 00000000000..c44909f6dde Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png new file mode 100644 index 00000000000..5c921deb136 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png new file mode 100644 index 00000000000..f90a1ba7dce Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/button-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png new file mode 100644 index 00000000000..ee669b3a888 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png new file mode 100644 index 00000000000..8d89eab8413 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png new file mode 100644 index 00000000000..51c5601de02 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/checkbox-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png new file mode 100644 index 00000000000..8d963e2bab5 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png new file mode 100644 index 00000000000..0cd116d13cd Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png new file mode 100644 index 00000000000..3247384285d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/column-positioner-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png new file mode 100644 index 00000000000..2d31b17c65f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png new file mode 100644 index 00000000000..15fc3505ba2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png new file mode 100644 index 00000000000..5f82390596b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/combobox-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png new file mode 100644 index 00000000000..9c7df42bc70 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png new file mode 100644 index 00000000000..99941541c6f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png new file mode 100644 index 00000000000..f66349a63b2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/component-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png new file mode 100644 index 00000000000..fd9e4e8ff3f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png new file mode 100644 index 00000000000..31c765483e2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png new file mode 100644 index 00000000000..22604d24925 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/control-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png new file mode 100644 index 00000000000..564226e949b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/default-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png new file mode 100644 index 00000000000..a3b6c7f6f24 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/default3d.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png new file mode 100644 index 00000000000..de8906a724d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/default3d16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png new file mode 100644 index 00000000000..7ca04a01eaa Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/default3d@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png new file mode 100644 index 00000000000..5a55bd9f77a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png new file mode 100644 index 00000000000..cd21394e465 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png new file mode 100644 index 00000000000..7beee2fab0e Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/delaybutton-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png new file mode 100644 index 00000000000..b3b63e35235 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png new file mode 100644 index 00000000000..8d8c7c09b05 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png new file mode 100644 index 00000000000..22547a16b83 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/dial-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png new file mode 100644 index 00000000000..278690f07f2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png new file mode 100644 index 00000000000..a286efb0324 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png new file mode 100644 index 00000000000..47abb7f9e3a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/drop-area-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png new file mode 100644 index 00000000000..d9027813d05 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png new file mode 100644 index 00000000000..a8a0bf65a46 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png new file mode 100644 index 00000000000..a2f7bf93d37 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/extended-view3d-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png new file mode 100644 index 00000000000..bdc22539596 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png new file mode 100644 index 00000000000..d7ab9de8a7d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png new file mode 100644 index 00000000000..b28b0fa4d9b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flickable-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png new file mode 100644 index 00000000000..1f5f6966c04 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png new file mode 100644 index 00000000000..cf252f08b8c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flipable-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png new file mode 100644 index 00000000000..67be7b474d6 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png new file mode 100644 index 00000000000..f8fa80970eb Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png new file mode 100644 index 00000000000..fc3deff8499 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/flow-positioner-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png new file mode 100644 index 00000000000..0dff9a075d1 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png new file mode 100644 index 00000000000..50c6f75cd81 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png new file mode 100644 index 00000000000..b3ffdea6ebb Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/focusscope-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png new file mode 100644 index 00000000000..32abc8bf1e6 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png new file mode 100644 index 00000000000..e5b65ad53bb Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png new file mode 100644 index 00000000000..8b876f38ec8 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/frame-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png new file mode 100644 index 00000000000..47b34f9d14b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png new file mode 100644 index 00000000000..10d0b69a7bc Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png new file mode 100644 index 00000000000..4374b60e7a6 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/grid-positioner-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png new file mode 100644 index 00000000000..7457fbd7e19 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png new file mode 100644 index 00000000000..038a02ed86b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png new file mode 100644 index 00000000000..af233a0df3c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/gridview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png new file mode 100644 index 00000000000..5542ecf8bf7 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png new file mode 100644 index 00000000000..9cf4324819f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png new file mode 100644 index 00000000000..80dab3c716a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/groupbox-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png new file mode 100644 index 00000000000..318ce0874a5 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png new file mode 100644 index 00000000000..3aa46b61062 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png new file mode 100644 index 00000000000..cc849189756 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/image-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png new file mode 100644 index 00000000000..af81cdfdb17 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png new file mode 100644 index 00000000000..46d3ec1dbc1 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png new file mode 100644 index 00000000000..f05aa57c2f5 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/item-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png new file mode 100644 index 00000000000..822cf3e7b8b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png new file mode 100644 index 00000000000..b3ed007a0e3 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png new file mode 100644 index 00000000000..cb81308ff8d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/itemdelegate-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png new file mode 100644 index 00000000000..6e1c9f912a2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/keyframe-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png new file mode 100644 index 00000000000..788bef078ce Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png new file mode 100644 index 00000000000..b68d3845685 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png new file mode 100644 index 00000000000..7001413d3b0 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/label-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png new file mode 100644 index 00000000000..5a2f3c203b4 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png new file mode 100644 index 00000000000..2657bf21814 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png new file mode 100644 index 00000000000..b1d3fb67d27 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/listview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png new file mode 100644 index 00000000000..29082eacf16 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png new file mode 100644 index 00000000000..4a2b093259e Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png new file mode 100644 index 00000000000..750b13bd02d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/loader-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png new file mode 100644 index 00000000000..515287a8462 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png new file mode 100644 index 00000000000..1b31ddc8260 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png new file mode 100644 index 00000000000..86ae5914aca Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/media-player-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png new file mode 100644 index 00000000000..fe316caf8d8 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png new file mode 100644 index 00000000000..bc8725fb5ff Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png new file mode 100644 index 00000000000..04a25e13db3 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/mouse-area-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png new file mode 100644 index 00000000000..b5ac87e8991 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png new file mode 100644 index 00000000000..bc6810b6053 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png new file mode 100644 index 00000000000..23db032f4ab Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/page-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png new file mode 100644 index 00000000000..edb6b377bbd Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png new file mode 100644 index 00000000000..0fb8967564c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png new file mode 100644 index 00000000000..7be0ee813ba Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pageindicator-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png new file mode 100644 index 00000000000..62ebe487ffe Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png new file mode 100644 index 00000000000..2b8048441c3 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png new file mode 100644 index 00000000000..55bb116a699 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pane-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png new file mode 100644 index 00000000000..8dc82b8196a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png new file mode 100644 index 00000000000..a6a61f61b21 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png new file mode 100644 index 00000000000..d654a8e7e62 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/pathview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png new file mode 100644 index 00000000000..a023f73c30f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png new file mode 100644 index 00000000000..6fede21d8c2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png new file mode 100644 index 00000000000..00694003356 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/progressbar-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png new file mode 100644 index 00000000000..d38170e22f7 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png new file mode 100644 index 00000000000..07b46a8ab08 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png new file mode 100644 index 00000000000..4bbddda4b25 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/radiobutton-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png new file mode 100644 index 00000000000..1c4c7b29487 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png new file mode 100644 index 00000000000..3be4624ddd4 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png new file mode 100644 index 00000000000..aee69b3302f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rangeslider-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png new file mode 100644 index 00000000000..3997195f72c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png new file mode 100644 index 00000000000..72893106ae9 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png new file mode 100644 index 00000000000..150fa50ea2f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/rect-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png new file mode 100644 index 00000000000..efe3ca80b46 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png new file mode 100644 index 00000000000..775a57a38c3 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png new file mode 100644 index 00000000000..bb541b67112 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/repeater-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png new file mode 100644 index 00000000000..d4b470dc25b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png new file mode 100644 index 00000000000..f6f3666639e Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png new file mode 100644 index 00000000000..4553e165e75 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/roundbutton-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png new file mode 100644 index 00000000000..1c5be822459 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png new file mode 100644 index 00000000000..a7e654c9183 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png new file mode 100644 index 00000000000..48c99f8c0e0 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/row-positioner-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png new file mode 100644 index 00000000000..5ef73ff19f5 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png new file mode 100644 index 00000000000..f8ca7a36853 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png new file mode 100644 index 00000000000..0eb7f9665ec Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/scrollview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png new file mode 100644 index 00000000000..bd0a9729bea Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png new file mode 100644 index 00000000000..a08622df89c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png new file mode 100644 index 00000000000..93842e4cdde Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/slider-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png new file mode 100644 index 00000000000..676fe134042 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png new file mode 100644 index 00000000000..29f7f14db30 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png new file mode 100644 index 00000000000..a518cada63b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spatial-audio-24@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png new file mode 100644 index 00000000000..37277c5e43c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png new file mode 100644 index 00000000000..f88711dd25f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png new file mode 100644 index 00000000000..b62a3bad512 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/spinbox-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png new file mode 100644 index 00000000000..a6ced34925b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png new file mode 100644 index 00000000000..0f19d0efa3e Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png new file mode 100644 index 00000000000..9b5ef9517bd Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/stackview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png new file mode 100644 index 00000000000..031cb27c367 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png new file mode 100644 index 00000000000..446c4696900 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png new file mode 100644 index 00000000000..0ccb978c469 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/swipeview-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png new file mode 100644 index 00000000000..e0181592860 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png new file mode 100644 index 00000000000..9abd2756592 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png new file mode 100644 index 00000000000..787f54ca41f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/switch-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png new file mode 100644 index 00000000000..068ebeef0f1 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png new file mode 100644 index 00000000000..b96ed468cbe Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png new file mode 100644 index 00000000000..3b7cb6d5da2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-edit-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png new file mode 100644 index 00000000000..29a81f5d6c9 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png new file mode 100644 index 00000000000..ee7cc512cb0 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png new file mode 100644 index 00000000000..1df8f765de4 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png new file mode 100644 index 00000000000..c743c220744 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png new file mode 100644 index 00000000000..3ceef6d0371 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png new file mode 100644 index 00000000000..666644d2d30 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/text-input-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png new file mode 100644 index 00000000000..f1b2dc0f84d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png new file mode 100644 index 00000000000..4afc1fbab56 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png new file mode 100644 index 00000000000..c32ecc71a9a Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textarea-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png new file mode 100644 index 00000000000..ba5537acefe Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png new file mode 100644 index 00000000000..c4a62a6582b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png new file mode 100644 index 00000000000..e05fd41b9a4 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/textfield-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png new file mode 100644 index 00000000000..d4ecf00031f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png new file mode 100644 index 00000000000..31b8fed6668 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/timeline-animation-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png new file mode 100644 index 00000000000..c675d5a7072 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/timer-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png new file mode 100644 index 00000000000..bd9419aaa0c Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png new file mode 100644 index 00000000000..ff2d487cc95 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/timer-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png new file mode 100644 index 00000000000..5cb5b2e1af1 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png new file mode 100644 index 00000000000..569373afa13 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png new file mode 100644 index 00000000000..fd9e6ceebcc Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbar-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png new file mode 100644 index 00000000000..3298f695190 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png new file mode 100644 index 00000000000..9ab7861c25f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png new file mode 100644 index 00000000000..e5958cded3f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolbutton-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png new file mode 100644 index 00000000000..5e99f06f2ef Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png new file mode 100644 index 00000000000..68f22c5df1b Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png new file mode 100644 index 00000000000..549c11c67cf Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/toolseparator-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png new file mode 100644 index 00000000000..98eb8232a26 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png new file mode 100644 index 00000000000..ff5f95cf327 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png new file mode 100644 index 00000000000..236abf0cfe2 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/tumbler-icon@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png new file mode 100644 index 00000000000..caf9c16a61d Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png new file mode 100644 index 00000000000..df1b84e5c99 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png new file mode 100644 index 00000000000..4b9f31faf39 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png new file mode 100644 index 00000000000..f00afc52e97 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-16px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png new file mode 100644 index 00000000000..fd3c89c0817 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png new file mode 100644 index 00000000000..0f651a1013f Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/video-output-24px@2x.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png new file mode 100644 index 00000000000..22904f2f8b9 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png new file mode 100644 index 00000000000..ac7be01bb71 Binary files /dev/null and b/share/qtcreator/qmldesigner/itemLibrary/images/webview-icon16.png differ diff --git a/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo b/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo new file mode 100644 index 00000000000..2e3616aa4b5 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/multimedia.metainfo @@ -0,0 +1,84 @@ +MetaInfo { + Type { + name: "QtMultimedia.MediaPlayer" + icon: "images/media-player-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Media Player" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/media-player-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.AudioOutput" + icon: "images/audio-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/audio-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.VideoOutput" + icon: "images/video-output-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video Output" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/video-output-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + } + } + + Type { + name: "QtMultimedia.Video" + icon: "images/video-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeContainer: false + } + + ItemLibraryEntry { + name: "Video" + category: "f.Qt Quick - Multimedia" + libraryIcon: "images/video-24px.png" + version: "6.0" + requiredImport: "QtMultimedia" + + Property { name: "width"; type: "int"; value: 200; } + Property { name: "height"; type: "int"; value: 200; } + } + } +} diff --git a/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo b/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo new file mode 100644 index 00000000000..4bef02ddd39 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/qml.metainfo @@ -0,0 +1,53 @@ +MetaInfo { + + Type { + name: "QML.Component" + icon: "images/component-icon16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Component" + category: "e.Qt Quick - Instancers" + libraryIcon: "images/component-icon.png" + version: "1.0" + + QmlSource { source: "source/component.qml" } + toolTip: qsTr("Allows you to define components inline, within a QML document.") + } + + ItemLibraryEntry { + name: "Component 3D" + category: "Instancers" + libraryIcon: "images/component-icon.png" + version: "1.0" + requiredImport: "QtQuick3D" + + QmlSource { source: "source/component3d.qml" } + toolTip: qsTr("Allows you to define 3D components inline, within a QML document.") + } + } + +Type { + name: "QtQml.Base.Timer" + icon: "images/timer-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Timer" + category: "d.Qt Quick - Animation" + libraryIcon: "images/timer-24px.png" + version: "2.0" + toolTip: qsTr(" Triggers an action at a given time.") + } +} +} diff --git a/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo b/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo new file mode 100644 index 00000000000..cd4165957d6 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/qtquickcontrols2.metainfo @@ -0,0 +1,575 @@ +MetaInfo { + Type { + name: "QtQuick.Controls.Basic.BusyIndicator" + icon: "images/busyindicator-icon16.png" + + ItemLibraryEntry { + name: "Busy Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/busyindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates activity while, for example, content is being loaded.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Button" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/button-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with text.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.CheckBox" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A checkbox with a text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Box\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.CheckDelegate" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as checkboxes.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ComboBox" + icon: "images/combobox-icon16.png" + + ItemLibraryEntry { + name: "Combo Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/combobox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An editable drop-down list.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Control" + icon: "images/control-icon16.png" + + ItemLibraryEntry { + name: "Control" + category: "Qt Quick - Controls 2" + libraryIcon: "images/control-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An abstract base type for UI controls.") + } + } + + Type { + name: "QtQuick.Controls.Basic.DelayButton" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Delay Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/delaybutton-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with a delay preventing accidental presses.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Delay Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Dial" + icon: "images/dial-icon16.png" + + ItemLibraryEntry { + name: "Dial" + category: "Qt Quick - Controls 2" + libraryIcon: "images/dial-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + + toolTip: qsTr("A circular dial that is rotated to set a value.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Frame" + icon: "images/frame-icon16.png" + + ItemLibraryEntry { + name: "Frame" + category: "Qt Quick - Controls 2" + libraryIcon: "images/frame-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An untitled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.GroupBox" + icon: "images/groupbox-icon16.png" + + ItemLibraryEntry { + name: "Group Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/groupbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A titled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + Property { name: "title"; type: "binding"; value: "qsTr(\"Group Box\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ItemDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Item Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents a standard view item. It can be used as a delegate in various views and controls, such as ListView and ComboBox.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Item Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Label" + icon: "images/label-icon16.png" + + ItemLibraryEntry { + name: "Label" + category: "Qt Quick - Controls 2" + libraryIcon: "images/label-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Label\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Page" + icon: "images/page-icon16.png" + + ItemLibraryEntry { + name: "Page" + category: "Qt Quick - Controls 2" + libraryIcon: "images/page-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A page with header and footer.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.PageIndicator" + icon: "images/pageindicator-icon16.png" + + ItemLibraryEntry { + name: "Page Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pageindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates the currently active page.") + + Property { name: "count"; type: "int"; value: 3 } + } + } + + Type { + name: "QtQuick.Controls.Basic.Pane" + icon: "images/pane-icon16.png" + + ItemLibraryEntry { + name: "Pane" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pane-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a background matching the application style and theme.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.ProgressBar" + icon: "images/progressbar-icon16.png" + + ItemLibraryEntry { + name: "Progress Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/progressbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar indicating the progress of an operation.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.Basic.RadioButton" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An option button that you can toggle on or off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.RadioDelegate" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as radio buttons.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.RangeSlider" + icon: "images/rangeslider-icon16.png" + + ItemLibraryEntry { + name: "Range Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/rangeslider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar with adjustable start and end points.") + + Property { name: "first.value"; type: "real"; value: 0.25 } + Property { name: "second.value"; type: "real"; value: 0.75 } + } + } + + Type { + name: "QtQuick.Controls.Basic.RoundButton" + icon: "images/roundbutton-icon16.png" + + ItemLibraryEntry { + name: "Round Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/roundbutton-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A round button with text.") + + Property { name: "text"; type: "string"; value: "+" } + } + } + + Type { + name: "QtQuick.Controls.Basic.Slider" + icon: "images/slider-icon16.png" + + ItemLibraryEntry { + name: "Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/slider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An adjustable slider.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.Basic.SpinBox" + icon: "images/spinbox-icon16.png" + + ItemLibraryEntry { + name: "Spin Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/spinbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A box with an adjustable number.") + } + } + + Type { + name: "QtQuick.Controls.Basic.ScrollView" + icon: "images/scrollview-icon16.png" + + ItemLibraryEntry { + name: "Scroll View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/scrollview-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A scrollable area.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.StackView" + icon: "images/stackview-icon16.png" + + ItemLibraryEntry { + name: "Stack View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/stackview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a stack-based navigation for a set of pages.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwipeDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Swipe Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as items that you can swipe to expose more options.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwipeView" + icon: "images/swipeview-icon16.png" + + ItemLibraryEntry { + name: "Swipe View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/swipeview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a view where you can navigate pages by swiping.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Basic.Switch" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button that you can toggle on and off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.SwitchDelegate" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as toggle switches.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TabBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tab Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A tab-based navigation model.") + + Property { name: "width"; type: "int"; value: 240 } + } + } + + Type { + name: "QtQuick.Controls.Basic.TabButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tab Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tab bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tab Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TextArea" + icon: "images/textarea-icon16.png" + + ItemLibraryEntry { + name: "Text Area" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textarea-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A multi-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Area\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.TextField" + icon: "images/textfield-icon16.png" + + ItemLibraryEntry { + name: "Text Field" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textfield-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A single-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Field\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tool Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A row that can hold actions and buttons.") + + Property { name: "width"; type: "int"; value: 360 } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tool Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tool bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Basic.ToolSeparator" + icon: "images/toolseparator-icon16.png" + + ItemLibraryEntry { + name: "Tool Separator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolseparator-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A line to separate sections in a tool bar.") + } + } + + Type { + name: "QtQuick.Controls.Basic.Tumbler" + icon: "images/tumbler-icon16.png" + + ItemLibraryEntry { + name: "Tumbler" + category: "Qt Quick - Controls 2" + libraryIcon: "images/tumbler-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A spinnable wheel of selectable items.") + + Property { name: "model"; type: "int"; value: "10" } + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/quick.metainfo b/share/qtcreator/qmldesigner/itemLibrary/quick.metainfo similarity index 51% rename from share/qtcreator/qmldesigner/propertyEditorQmlSources/quick.metainfo rename to share/qtcreator/qmldesigner/itemLibrary/quick.metainfo index f390f72260d..98e5684bdc7 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/quick.metainfo +++ b/share/qtcreator/qmldesigner/itemLibrary/quick.metainfo @@ -2,7 +2,7 @@ MetaInfo { Type { name: "QtQuick.Item" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleNonDefaultProperties: "layer.effect" @@ -11,7 +11,7 @@ MetaInfo { ItemLibraryEntry { name: "Item" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -22,12 +22,12 @@ MetaInfo { Type { name: "QtQuick.Rectangle" - icon: ":/qtquickplugin/images/rect-icon16.png" + icon: "images/rect-icon16.png" ItemLibraryEntry { name: "Rectangle" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/rect-icon.png" + libraryIcon: "images/rect-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -39,12 +39,12 @@ MetaInfo { Type { name: "QtQuick.Text" - icon: ":/qtquickplugin/images/text-icon16.png" + icon: "images/text-icon16.png" ItemLibraryEntry { name: "Text" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-icon.png" + libraryIcon: "images/text-icon.png" version: "2.0" Property { name: "font.pixelSize"; type: "int"; value: 12; } @@ -55,12 +55,12 @@ MetaInfo { Type { name: "QtQuick.TextEdit" - icon: ":/qtquickplugin/images/text-edit-icon16.png" + icon: "images/text-edit-icon16.png" ItemLibraryEntry { name: "Text Edit" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-edit-icon.png" + libraryIcon: "images/text-edit-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 80; } @@ -73,12 +73,12 @@ MetaInfo { Type { name: "QtQuick.TextInput" - icon: ":/qtquickplugin/images/text-input-icon16.png" + icon: "images/text-input-icon16.png" ItemLibraryEntry { name: "Text Input" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/text-input-icon.png" + libraryIcon: "images/text-input-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 80; } @@ -91,12 +91,12 @@ MetaInfo { Type { name: "QtQuick.MouseArea" - icon: ":/qtquickplugin/images/mouse-area-icon16.png" + icon: "images/mouse-area-icon16.png" ItemLibraryEntry { name: "Mouse Area" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/mouse-area-icon.png" + libraryIcon: "images/mouse-area-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } @@ -107,17 +107,17 @@ MetaInfo { Type { name: "QtQuick.Image" - icon: ":/qtquickplugin/images/image-icon16.png" + icon: "images/image-icon16.png" ItemLibraryEntry { name: "Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/image-icon.png" + libraryIcon: "images/image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } Property { name: "fillMode"; type: "enum"; value: "Image.PreserveAspectFit"; } toolTip: qsTr("Displays an image.") } @@ -125,29 +125,29 @@ MetaInfo { Type { name: "QtQuick.AnimatedImage" - icon: ":/qtquickplugin/images/animated-image-icon16.png" + icon: "images/animated-image-icon16.png" ItemLibraryEntry { name: "Animated Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/animated-image-icon.png" + libraryIcon: "images/animated-image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } toolTip: qsTr("Animates a series of images.") } } Type { name: "QtQuick.AnimatedSprite" - icon: ":/qtquickplugin/images/animated-image-icon16.png" + icon: "images/animated-image-icon16.png" ItemLibraryEntry { name: "Animated Sprite" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/animated-image-icon.png" + libraryIcon: "images/animated-image-icon.png" version: "2.0" Property { name: "frameWidth"; type: "int"; value: 64; } @@ -155,36 +155,36 @@ MetaInfo { Property { name: "frameCount"; type: "int"; value: 4; } Property { name: "frameDuration"; type: "int"; value: 500; } Property { name: "source"; type: "QUrl"; value:"animatedsprite-loading.png"; } - ExtraFile { source: ":/qtquickplugin/images/animatedsprite-loading.png" } + ExtraFile { source: "images/animatedsprite-loading.png" } toolTip: qsTr("Draws a sprite animation.") } } Type { name: "QtQuick.BorderImage" - icon: ":/qtquickplugin/images/border-image-icon16.png" + icon: "images/border-image-icon16.png" ItemLibraryEntry { name: "Border Image" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/border-image-icon.png" + libraryIcon: "images/border-image-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } Property { name: "height"; type: "int"; value: 100; } - Property { name: "source"; type: "QUrl"; value:"qrc:/qtquickplugin/images/template_image.png"; } + Property { name: "source"; type: "QUrl"; value:"qrcimages/template_image.png"; } toolTip: qsTr("A responsive border based on an image.") } } Type { name: "QtQuick.Flickable" - icon: ":/qtquickplugin/images/flickable-icon16.png" + icon: "images/flickable-icon16.png" ItemLibraryEntry { name: "Flickable" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/flickable-icon.png" + libraryIcon: "images/flickable-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 300; } @@ -195,57 +195,57 @@ MetaInfo { Type { name: "QtQuick.GridView" - icon: ":/qtquickplugin/images/gridview-icon16.png" + icon: "images/gridview-icon16.png" ItemLibraryEntry { name: "Grid View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/gridview-icon.png" + libraryIcon: "images/gridview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/gridviewv2.qml" } + QmlSource { source: "source/gridviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets in a grid.") } } Type { name: "QtQuick.ListView" - icon: ":/qtquickplugin/images/listview-icon16.png" + icon: "images/listview-icon16.png" ItemLibraryEntry { name: "List View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/listview-icon.png" + libraryIcon: "images/listview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/listviewv2.qml" } + QmlSource { source: "source/listviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets in a list.") } } Type { name: "QtQuick.PathView" - icon: ":/qtquickplugin/images/pathview-icon16.png" + icon: "images/pathview-icon16.png" ItemLibraryEntry { name: "Path View" category: "b.Qt Quick - Views" - libraryIcon: ":/qtquickplugin/images/pathview-icon.png" + libraryIcon: "images/pathview-icon.png" version: "2.0" - QmlSource { source: ":/qtquickplugin/source/pathviewv2.qml" } + QmlSource { source: "source/pathviewv2.qml" } toolTip: qsTr("Organizes dynamic data sets along a path.") } } Type { name: "QtQuick.FocusScope" - icon: ":/qtquickplugin/images/focusscope-icon16.png" + icon: "images/focusscope-icon16.png" ItemLibraryEntry { name: "Focus Scope" category: "a.Qt Quick - Basic" - libraryIcon: ":/qtquickplugin/images/focusscope-icon.png" + libraryIcon: "images/focusscope-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 100; } @@ -256,12 +256,12 @@ MetaInfo { Type { name: "QtQuick.Column" - icon: ":/qtquickplugin/images/column-positioner-icon-16px.png" + icon: "images/column-positioner-icon-16px.png" ItemLibraryEntry { name: "Column" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/column-positioner-icon.png" + libraryIcon: "images/column-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } @@ -273,12 +273,12 @@ MetaInfo { Type { name: "QtQuick.Row" - icon: ":/qtquickplugin/images/row-positioner-icon-16px.png" + icon: "images/row-positioner-icon-16px.png" ItemLibraryEntry { name: "Row" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/row-positioner-icon.png" + libraryIcon: "images/row-positioner-icon.png" version: "2.0" toolTip: qsTr("Organizes items in a row.") @@ -289,12 +289,12 @@ MetaInfo { Type { name: "QtQuick.Grid" - icon: ":/qtquickplugin/images/grid-positioner-icon-16px.png" + icon: "images/grid-positioner-icon-16px.png" ItemLibraryEntry { name: "Grid" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/grid-positioner-icon.png" + libraryIcon: "images/grid-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 400; } @@ -305,12 +305,12 @@ MetaInfo { Type { name: "QtQuick.Flow" - icon: ":/qtquickplugin/images/flow-positioner-icon-16px.png" + icon: "images/flow-positioner-icon-16px.png" ItemLibraryEntry { name: "Flow" category: "c.Qt Quick - Positioner" - libraryIcon: ":/qtquickplugin/images/flow-positioner-icon.png" + libraryIcon: "images/flow-positioner-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 400; } @@ -321,7 +321,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.Timeline" - icon: ":/qtquickplugin/images/timeline-16px.png" + icon: "images/timeline-16px.png" Hints { visibleNonDefaultProperties: "animations" @@ -337,7 +337,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.TimelineAnimation" - icon: ":/qtquickplugin/images/timeline-animation-16px.png" + icon: "images/timeline-animation-16px.png" Hints { visibleInLibrary: false @@ -352,7 +352,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.Keyframe" - icon: ":/qtquickplugin/images/keyframe-16px.png" + icon: "images/keyframe-16px.png" ItemLibraryEntry { name: "Keyframe" @@ -364,7 +364,7 @@ MetaInfo { Type { name: "QtQuick.Timeline.KeyframeGroup" - icon: ":/qtquickplugin/images/keyframe-16px.png" + icon: "images/keyframe-16px.png" ItemLibraryEntry { name: "KeyframeGroup" @@ -376,7 +376,7 @@ MetaInfo { Type { name: "QtQuick.PropertyAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -388,7 +388,7 @@ MetaInfo { ItemLibraryEntry { name: "Property Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Animates changes in property values.") } @@ -396,7 +396,7 @@ MetaInfo { Type { name: "QtQuick.PauseAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -408,7 +408,7 @@ MetaInfo { ItemLibraryEntry { name: "Pause Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Provides a pause between animations.") } @@ -416,7 +416,7 @@ MetaInfo { Type { name: "QtQuick.SequentialAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -427,7 +427,7 @@ MetaInfo { ItemLibraryEntry { name: "Sequential Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs animations one after the other.") } @@ -435,7 +435,7 @@ MetaInfo { Type { name: "QtQuick.ParallelAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -446,7 +446,7 @@ MetaInfo { ItemLibraryEntry { name: "Parallel Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs animations together at the same time.") } @@ -454,7 +454,7 @@ MetaInfo { Type { name: "QtQuick.PropertyAction" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -466,7 +466,7 @@ MetaInfo { ItemLibraryEntry { name: "Property Action" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Provides an immediate property change during animations.") } @@ -474,7 +474,7 @@ MetaInfo { Type { name: "QtQuick.ScriptAction" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -486,7 +486,7 @@ MetaInfo { ItemLibraryEntry { name: "Script Action" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Runs a script during animation.") } @@ -494,7 +494,7 @@ MetaInfo { Type { name: "QtQuick.ColorAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -506,7 +506,7 @@ MetaInfo { ItemLibraryEntry { name: "Color Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" toolTip: qsTr("Animates the color of an item.") } @@ -514,7 +514,7 @@ MetaInfo { Type { name: "QtQuick.NumberAnimation" - icon: ":/qtquickplugin/images/item-icon16.png" + icon: "images/item-icon16.png" Hints { visibleInNavigator: true @@ -526,7 +526,7 @@ MetaInfo { ItemLibraryEntry { name: "Number Animation" category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/item-icon.png" + libraryIcon: "images/item-icon.png" version: "2.0" Property { name: "to"; type: "int"; value: 0; } Property { name: "from"; type: "int"; value: 0; } @@ -534,75 +534,14 @@ MetaInfo { } } - Type { - name: "QtQml.Timer" - icon: ":/qtquickplugin/images/timer-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Timer" - category: "d.Qt Quick - Animation" - libraryIcon: ":/qtquickplugin/images/timer-24px.png" - version: "2.0" - toolTip: qsTr(" Triggers an action at a given time.") - } - } - - Type { - name: "QML.Component" - icon: ":/qtquickplugin/images/component-icon16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - } - - ItemLibraryEntry { - name: "Component" - category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/component-icon.png" - version: "1.0" - - QmlSource { source: ":/qtquickplugin/source/component.qml" } - toolTip: qsTr("Allows you to define components inline, within a QML document.") - } - } - - Type { - name: "QML.Component" - icon: ":/qtquickplugin/images/component-icon16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - } - - ItemLibraryEntry { - name: "Component 3D" - category: "Instancers" - libraryIcon: ":/qtquickplugin/images/component-icon.png" - version: "1.0" - requiredImport: "QtQuick3D" - - QmlSource { source: ":/qtquickplugin/source/component3d.qml" } - toolTip: qsTr("Allows you to define 3D components inline, within a QML document.") - } - } - Type { name: "QtQuick.Loader" - icon: ":/qtquickplugin/images/loader-icon16.png" + icon: "images/loader-icon16.png" ItemLibraryEntry { name: "Loader" category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/loader-icon.png" + libraryIcon: "images/loader-icon.png" version: "2.0" Property { name: "width"; type: "int"; value: 200; } Property { name: "height"; type: "int"; value: 200; } @@ -612,7 +551,7 @@ MetaInfo { Type { name: "QtQuick.Repeater" - icon: ":/qtquickplugin/images/repeater-icon16.png" + icon: "images/repeater-icon16.png" Hints { canBeDroppedInFormEditor: false @@ -622,216 +561,9 @@ MetaInfo { ItemLibraryEntry { name: "Repeater" category: "e.Qt Quick - Instancers" - libraryIcon: ":/qtquickplugin/images/repeater-icon.png" + libraryIcon: "images/repeater-icon.png" version: "2.0" toolTip: qsTr("Creates a number of copies of the same item.") } } - - Type { - name: "QtMultimedia.MediaPlayer" - icon: ":/qtquickplugin/images/media-player-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Media Player" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/media-player-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.AudioOutput" - icon: ":/qtquickplugin/images/audio-output-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Audio Output" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/audio-output-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.VideoOutput" - icon: ":/qtquickplugin/images/video-output-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Video Output" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/video-output-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - } - } - - Type { - name: "QtMultimedia.Video" - icon: ":/qtquickplugin/images/video-16px.png" - - Hints { - visibleInNavigator: true - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: true - canBeContainer: false - } - - ItemLibraryEntry { - name: "Video" - category: "f.Qt Quick - Multimedia" - libraryIcon: ":/qtquickplugin/images/video-24px.png" - version: "6.0" - requiredImport: "QtMultimedia" - - Property { name: "width"; type: "int"; value: 200; } - Property { name: "height"; type: "int"; value: 200; } - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AmbientSound" - icon: ":/qtquickplugin/images/ambient-sound-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Ambient Sound" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/ambient-sound-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("An ambient background sound.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioEngine" - icon: ":/qtquickplugin/images/audio-engine-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - canBeContainer: false - } - - ItemLibraryEntry { - name: "Audio Engine" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-engine-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Manages sound objects inside a 3D scene.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioListener" - icon: ":/qtquickplugin/images/audio-listener-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Audio Listener" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-listener-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Sets the position and orientation of listening.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.AudioRoom" - icon: ":/qtquickplugin/images/audio-room-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Audio Room" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/audio-room-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("Sets up a room for the spatial audio engine.") - } - } - - Type { - name: "QtQuick3D.SpatialAudio.SpatialSound" - icon: ":/qtquickplugin/images/spatial-audio-16.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: true - } - - ItemLibraryEntry { - name: "Spatial Sound" - category: "Spatial Audio" - libraryIcon: ":/qtquickplugin/images/spatial-audio-24.png" - version: "6.0" - requiredImport: "QtQuick3D.SpatialAudio" - toolTip: qsTr("A sound object in 3D space.") - } - } - - Type { - name: "QtQuick3D.BakedLightmap" - icon: ":/ItemLibrary/images/item-default-icon.png" - - Hints { - canBeDroppedInNavigator: true - canBeDroppedInFormEditor: false - canBeDroppedInView3D: false - } - - ItemLibraryEntry { - name: "Baked Lightmap" - category: "Components" - libraryIcon: ":/ItemLibrary/images/item-default-icon.png" - version: "6.5" - requiredImport: "QtQuick3D" - toolTip: qsTr("An object to specify details about baked lightmap of a model.") - - Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; } - } - } } diff --git a/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo b/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo new file mode 100644 index 00000000000..8f006139660 --- /dev/null +++ b/share/qtcreator/qmldesigner/itemLibrary/quick3d.metainfo @@ -0,0 +1,125 @@ +MetaInfo { + Type { + name: "QtQuick3D.SpatialAudio.AmbientSound" + icon: "images/ambient-sound-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Ambient Sound" + category: "Spatial Audio" + libraryIcon: "images/ambient-sound-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("An ambient background sound.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioEngine" + icon: "images/audio-engine-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Audio Engine" + category: "Spatial Audio" + libraryIcon: "images/audio-engine-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Manages sound objects inside a 3D scene.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioListener" + icon: "images/audio-listener-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Audio Listener" + category: "Spatial Audio" + libraryIcon: "images/audio-listener-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Sets the position and orientation of listening.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.AudioRoom" + icon: "images/audio-room-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Audio Room" + category: "Spatial Audio" + libraryIcon: "images/audio-room-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("Sets up a room for the spatial audio engine.") + } + } + + Type { + name: "QtQuick3D.SpatialAudio.SpatialSound" + icon: "images/spatial-audio-16.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Spatial Sound" + category: "Spatial Audio" + libraryIcon: "images/spatial-audio-24.png" + version: "6.0" + requiredImport: "QtQuick3D.SpatialAudio" + toolTip: qsTr("A sound object in 3D space.") + } + } + + Type { + name: "QtQuick3D.BakedLightmap" + icon: ":/ItemLibrary/images/item-default-icon.png" + + Hints { + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Baked Lightmap" + category: "Components" + libraryIcon: ":/ItemLibrary/images/item-default-icon.png" + version: "6.5" + requiredImport: "QtQuick3D" + toolTip: qsTr("An object to specify details about baked lightmap of a model.") + + Property { name: "loadPrefix"; type: "string"; value: "lightmaps"; } + } + } +} diff --git a/src/libs/languageutils/componentversion.cpp b/src/libs/languageutils/componentversion.cpp index 6c599e300bc..f041740d3b2 100644 --- a/src/libs/languageutils/componentversion.cpp +++ b/src/libs/languageutils/componentversion.cpp @@ -10,27 +10,17 @@ namespace LanguageUtils { -const int ComponentVersion::NoVersion = -1; -const int ComponentVersion::MaxVersion = std::numeric_limits::max(); +// QTC_TEMP -ComponentVersion::ComponentVersion() - : _major(NoVersion), _minor(NoVersion) +ComponentVersion::ComponentVersion(QStringView versionString) + : _major(NoVersion) + , _minor(NoVersion) { -} - -ComponentVersion::ComponentVersion(int major, int minor) - : _major(major), _minor(minor) -{ -} - -ComponentVersion::ComponentVersion(const QString &versionString) - : _major(NoVersion), _minor(NoVersion) -{ - int dotIdx = versionString.indexOf(QLatin1Char('.')); + auto dotIdx = versionString.indexOf(QLatin1Char('.')); if (dotIdx == -1) return; bool ok = false; - int maybeMajor = versionString.left(dotIdx).toInt(&ok); + auto maybeMajor = versionString.left(dotIdx).toInt(&ok); if (!ok) return; int maybeMinor = versionString.mid(dotIdx + 1).toInt(&ok); @@ -40,15 +30,6 @@ ComponentVersion::ComponentVersion(const QString &versionString) _minor = maybeMinor; } -ComponentVersion::~ComponentVersion() -{ -} - -bool ComponentVersion::isValid() const -{ - return _major >= 0 && _minor >= 0; -} - QString ComponentVersion::toString() const { QByteArray temp; @@ -65,36 +46,4 @@ void ComponentVersion::addToHash(QCryptographicHash &hash) const hash.addData(reinterpret_cast(&_minor), sizeof(_minor)); } -bool operator<(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return lhs.majorVersion() < rhs.majorVersion() - || (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() < rhs.minorVersion()); -} - -bool operator<=(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return lhs.majorVersion() < rhs.majorVersion() - || (lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() <= rhs.minorVersion()); -} - -bool operator>(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return rhs < lhs; -} - -bool operator>=(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return rhs <= lhs; -} - -bool operator==(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() == rhs.minorVersion(); -} - -bool operator!=(const ComponentVersion &lhs, const ComponentVersion &rhs) -{ - return !(lhs == rhs); -} - } // namespace LanguageUtils diff --git a/src/libs/languageutils/componentversion.h b/src/libs/languageutils/componentversion.h index 4b39e8402a1..0ba332103ac 100644 --- a/src/libs/languageutils/componentversion.h +++ b/src/libs/languageutils/componentversion.h @@ -9,6 +9,8 @@ QT_BEGIN_NAMESPACE class QCryptographicHash; QT_END_NAMESPACE +#include + namespace LanguageUtils { class LANGUAGEUTILS_EXPORT ComponentVersion @@ -17,25 +19,56 @@ class LANGUAGEUTILS_EXPORT ComponentVersion int _minor; public: - static const int NoVersion; - static const int MaxVersion; + static const int NoVersion = -1; + static const int MaxVersion = -1; - ComponentVersion(); - ComponentVersion(int major, int minor); - explicit ComponentVersion(const QString &versionString); - ~ComponentVersion(); + ComponentVersion() + : _major(NoVersion) + , _minor(NoVersion) + {} + + ComponentVersion(int major, int minor) + : _major(major) + , _minor(minor) + {} + + explicit ComponentVersion(QStringView versionString); + ~ComponentVersion() = default; int majorVersion() const { return _major; } int minorVersion() const { return _minor; } - friend bool LANGUAGEUTILS_EXPORT operator<(const ComponentVersion &lhs, const ComponentVersion &rhs); - friend bool LANGUAGEUTILS_EXPORT operator<=(const ComponentVersion &lhs, const ComponentVersion &rhs); - friend bool LANGUAGEUTILS_EXPORT operator>(const ComponentVersion &lhs, const ComponentVersion &rhs); - friend bool LANGUAGEUTILS_EXPORT operator>=(const ComponentVersion &lhs, const ComponentVersion &rhs); - friend bool LANGUAGEUTILS_EXPORT operator==(const ComponentVersion &lhs, const ComponentVersion &rhs); - friend bool LANGUAGEUTILS_EXPORT operator!=(const ComponentVersion &lhs, const ComponentVersion &rhs); + friend bool operator<(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return std::tie(lhs._major, lhs._minor) < std::tie(rhs._major, rhs._minor); + } - bool isValid() const; + friend bool operator<=(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return std::tie(lhs._major, lhs._minor) <= std::tie(rhs._major, rhs._minor); + } + + friend bool operator>(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return rhs < lhs; + } + + friend bool operator>=(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return rhs <= lhs; + } + + friend bool operator==(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return lhs.majorVersion() == rhs.majorVersion() && lhs.minorVersion() == rhs.minorVersion(); + } + + friend bool operator!=(const ComponentVersion &lhs, const ComponentVersion &rhs) + { + return !(lhs == rhs); + } + + bool isValid() const { return _major >= 0 && _minor >= 0; } QString toString() const; void addToHash(QCryptographicHash &hash) const; }; diff --git a/src/libs/sqlite/sqlitevalue.h b/src/libs/sqlite/sqlitevalue.h index ec4120139ab..725682494bd 100644 --- a/src/libs/sqlite/sqlitevalue.h +++ b/src/libs/sqlite/sqlitevalue.h @@ -34,7 +34,7 @@ public: explicit ValueBase(NullValue) {} explicit ValueBase(VariantType &&value) - : value(value) + : value(std::move(value)) {} explicit ValueBase(const char *value) @@ -44,6 +44,7 @@ public: explicit ValueBase(long long value) : value(value) {} + explicit ValueBase(int value) : value(static_cast(value)) {} @@ -61,11 +62,6 @@ public: {} - explicit ValueBase(StringType &&value) - : value(std::move(value)) - - {} - explicit ValueBase(BlobView value) : value(value) @@ -230,14 +226,42 @@ public: class ValueView : public ValueBase { public: + ValueView() = default; + + explicit ValueView(NullValue) {} + explicit ValueView(ValueBase &&base) : ValueBase(std::move(base)) {} + explicit ValueView(Utils::SmallStringView value) + : ValueBase(value) + {} + + explicit ValueView(BlobView value) + : ValueBase(value) + {} + + explicit ValueView(long long value) + : ValueBase(value) + {} + + explicit ValueView(int value) + : ValueBase(static_cast(value)) + {} + + explicit ValueView(uint value) + : ValueBase(static_cast(value)) + {} + + explicit ValueView(double value) + : ValueBase(value) + {} + template static ValueView create(Type &&value_) { - return ValueView{ValueBase{value_}}; + return ValueView(std::forward(value_)); } }; diff --git a/src/libs/utils/smallstring.h b/src/libs/utils/smallstring.h index a8869b4ccf8..52dd10602ce 100644 --- a/src/libs/utils/smallstring.h +++ b/src/libs/utils/smallstring.h @@ -356,6 +356,14 @@ public: return false; } + bool startsWith(QStringView subStringToSearch) const noexcept + { + if (size() >= Utils::usize(subStringToSearch)) + return subStringToSearch == QLatin1StringView{data(), subStringToSearch.size()}; + + return false; + } + bool startsWith(char characterToSearch) const noexcept { return data()[0] == characterToSearch; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp index 50bb01a5bbb..3bff2105209 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.cpp @@ -296,15 +296,16 @@ void ItemLibraryModel::setSearchText(const QString &searchText) Import ItemLibraryModel::entryToImport(const ItemLibraryEntry &entry) { +#ifndef QDS_USE_PROJECTSTORAGE if (entry.majorVersion() == -1 && entry.minorVersion() == -1) return Import::createFileImport(entry.requiredImport()); - +#endif return Import::createLibraryImport(entry.requiredImport(), QString::number(entry.majorVersion()) + QLatin1Char('.') + QString::number(entry.minorVersion())); } -void ItemLibraryModel::update([[maybe_unused]] ItemLibraryInfo *itemLibraryInfo, Model *model) +void ItemLibraryModel::update(Model *model) { if (!model) return; diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h index 212ddf8e040..b04ea492d2a 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarymodel.h @@ -37,7 +37,7 @@ public: QString searchText() const; ItemLibraryImport *importByUrl(const QString &importName) const; - void update(ItemLibraryInfo *itemLibraryInfo, Model *model); + void update(Model *model); void updateUsedImports(const Imports &usedImports); QMimeData *getMimeData(const ItemLibraryEntry &itemLibraryEntry); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 587489bc8ca..ffefc431782 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -333,9 +333,7 @@ void ItemLibraryWidget::updateModel() m_compressionTimer.stop(); } -#ifndef QDS_USE_PROJECTSTORAGE - m_itemLibraryModel->update(m_itemLibraryInfo.data(), m_model.data()); -#endif + m_itemLibraryModel->update(m_model.data()); if (m_itemLibraryModel->rowCount() == 0 && !m_updateRetry) { m_updateRetry = true; // Only retry once to avoid endless loops diff --git a/src/plugins/qmldesigner/designercore/include/projectstorageids.h b/src/plugins/qmldesigner/designercore/include/projectstorageids.h index 90c174e04e0..0b157e55e77 100644 --- a/src/plugins/qmldesigner/designercore/include/projectstorageids.h +++ b/src/plugins/qmldesigner/designercore/include/projectstorageids.h @@ -51,6 +51,8 @@ using SourceContextIds = std::vector; using SourceId = Sqlite::BasicId; using SourceIds = std::vector; +template +using SmallSourceIds = QVarLengthArray; using ModuleId = Sqlite::BasicId; using ModuleIds = std::vector; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h index ad606bcb90c..70d5e92b256 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorage.h @@ -484,6 +484,34 @@ public: return typeHints; } + SmallSourceIds<4> typeAnnotationSourceIds(SourceId directoryId) const override + { + using NanotraceHR::keyValue; + NanotraceHR::Tracer tracer{"get type annotaion source ids"_t, + projectStorageCategory(), + keyValue("source id", directoryId)}; + + auto sourceIds = selectTypeAnnotationSourceIdsStatement + .template valuesWithTransaction>(directoryId); + + tracer.end(keyValue("source ids", sourceIds)); + + return sourceIds; + } + + SmallSourceIds<64> typeAnnotationDirectorySourceIds() const override + { + using NanotraceHR::keyValue; + NanotraceHR::Tracer tracer{"get type annotaion source ids"_t, projectStorageCategory()}; + + auto sourceIds = selectTypeAnnotationDirectorySourceIdsStatement + .template valuesWithTransaction>(); + + tracer.end(keyValue("source ids", sourceIds)); + + return sourceIds; + } + Storage::Info::ItemLibraryEntries itemLibraryEntries(TypeId typeId) const override { using NanotraceHR::keyValue; @@ -518,6 +546,40 @@ public: return entries; } + Storage::Info::ItemLibraryEntries itemLibraryEntries(ImportId importId) const + { + using NanotraceHR::keyValue; + NanotraceHR::Tracer tracer{"get item library entries by import id"_t, + projectStorageCategory(), + keyValue("import id", importId)}; + + using Storage::Info::ItemLibraryProperties; + Storage::Info::ItemLibraryEntries entries; + + auto callback = [&](TypeId typeId_, + Utils::SmallStringView name, + Utils::SmallStringView iconPath, + Utils::SmallStringView category, + Utils::SmallStringView import, + Utils::SmallStringView toolTip, + Utils::SmallStringView properties, + Utils::SmallStringView extraFilePaths, + Utils::SmallStringView templatePath) { + auto &last = entries.emplace_back( + typeId_, name, iconPath, category, import, toolTip, templatePath); + if (properties.size()) + selectItemLibraryPropertiesStatement.readTo(last.properties, properties); + if (extraFilePaths.size()) + selectItemLibraryExtraFilePathsStatement.readTo(last.extraFilePaths, extraFilePaths); + }; + + selectItemLibraryEntriesByTypeIdStatement.readCallbackWithTransaction(callback, importId); + + tracer.end(keyValue("item library entries", entries)); + + return entries; + } + Storage::Info::ItemLibraryEntries itemLibraryEntries(SourceId sourceId) const override { using NanotraceHR::keyValue; @@ -1479,6 +1541,28 @@ private: annotation.typeId = fetchTypeIdByModuleIdAndExportedName(annotation.moduleId, annotation.typeName); } + + for (auto &annotation : typeAnnotations) { + if (!annotation.typeId) + qWarning() << moduleName(annotation.moduleId).toQString() + << annotation.typeName.toQString(); + } + + typeAnnotations.erase(std::remove_if(typeAnnotations.begin(), + typeAnnotations.end(), + [](const auto &annotation) { + return !annotation.typeId; + }), + typeAnnotations.end()); + } + + template + static Sqlite::ValueView createEmptyAsNull(const Value &value) + { + if (value.size()) + return Sqlite::ValueView::create(value); + + return Sqlite::ValueView{}; } void synchronizeTypeAnnotations(Storage::Synchronization::TypeAnnotations &typeAnnotations, @@ -1512,9 +1596,10 @@ private: insertTypeAnnotationStatement.write(annotation.typeId, annotation.sourceId, + annotation.directorySourceId, annotation.iconPath, - annotation.itemLibraryJson, - annotation.hintsJson); + createEmptyAsNull(annotation.itemLibraryJson), + createEmptyAsNull(annotation.hintsJson)); }; auto update = [&](const TypeAnnotationView &annotationFromDatabase, @@ -1533,8 +1618,8 @@ private: updateTypeAnnotationStatement.write(annotation.typeId, annotation.iconPath, - annotation.itemLibraryJson, - annotation.hintsJson); + createEmptyAsNull(annotation.itemLibraryJson), + createEmptyAsNull(annotation.hintsJson)); return Sqlite::UpdateChange::Update; } @@ -4285,11 +4370,15 @@ private: Sqlite::StrictColumnType::Integer, {Sqlite::PrimaryKey{}}); auto &sourceIdColumn = table.addColumn("sourceId", Sqlite::StrictColumnType::Integer); + auto &directorySourceIdColumn = table.addColumn("directorySourceId", + Sqlite::StrictColumnType::Integer); + table.addColumn("iconPath", Sqlite::StrictColumnType::Text); table.addColumn("itemLibrary", Sqlite::StrictColumnType::Text); table.addColumn("hints", Sqlite::StrictColumnType::Text); table.addUniqueIndex({sourceIdColumn, typeIdColumn}); + table.addIndex({directorySourceIdColumn}); table.initialize(database); } @@ -4926,9 +5015,10 @@ public: "SELECT typeId, iconPath, itemLibrary, hints FROM typeAnnotations WHERE " "sourceId IN carray(?1) ORDER BY typeId", database}; - WriteStatement<5> insertTypeAnnotationStatement{ - "INSERT INTO typeAnnotations(typeId, sourceId, iconPath, itemLibrary, hints) VALUES(?1, " - "?2, ?3, ?4, ?5)", + WriteStatement<6> insertTypeAnnotationStatement{ + "INSERT INTO " + " typeAnnotations(typeId, sourceId, directorySourceId, iconPath, itemLibrary, hints) " + "VALUES(?1, ?2, ?3, ?4, ?5, ?6)", database}; WriteStatement<4> updateTypeAnnotationStatement{ "UPDATE typeAnnotations SET iconPath=?2, itemLibrary=?3, hints=?4 WHERE typeId=?1", database}; @@ -4939,28 +5029,35 @@ public: mutable ReadStatement<2, 1> selectTypeHintsStatement{ "SELECT hints.key, hints.value " "FROM typeAnnotations, json_each(typeAnnotations.hints) AS hints " - "WHERE typeId=?1", + "WHERE typeId=?1 AND hints IS NOT NULL", database}; + mutable ReadStatement<1, 1> selectTypeAnnotationSourceIdsStatement{ + "SELECT sourceId FROM typeAnnotations WHERE directorySourceId=?1 ORDER BY sourceId", database}; + mutable ReadStatement<1, 0> selectTypeAnnotationDirectorySourceIdsStatement{ + "SELECT DISTINCT directorySourceId FROM typeAnnotations ORDER BY directorySourceId", database}; mutable ReadStatement<9> selectItemLibraryEntriesStatement{ "SELECT typeId, i.value->>'$.name', i.value->>'$.iconPath', i.value->>'$.category', " " i.value->>'$.import', i.value->>'$.toolTip', i.value->>'$.properties', " " i.value->>'$.extraFilePaths', i.value->>'$.templatePath' " - "FROM typeAnnotations, json_each(typeAnnotations.itemLibrary) AS i", + "FROM typeAnnotations AS ta , json_each(ta.itemLibrary) AS i " + "WHERE ta.itemLibrary IS NOT NULL", database}; mutable ReadStatement<9, 1> selectItemLibraryEntriesByTypeIdStatement{ "SELECT typeId, i.value->>'$.name', i.value->>'$.iconPath', i.value->>'$.category', " " i.value->>'$.import', i.value->>'$.toolTip', i.value->>'$.properties', " " i.value->>'$.extraFilePaths', i.value->>'$.templatePath' " - "FROM typeAnnotations, json_each(typeAnnotations.itemLibrary) AS i " - "WHERE typeId=?1", + "FROM typeAnnotations AS ta, json_each(ta.itemLibrary) AS i " + "WHERE typeId=?1 AND ta.itemLibrary IS NOT NULL", database}; mutable ReadStatement<9, 1> selectItemLibraryEntriesBySourceIdStatement{ - "SELECT typeId, i.value->>'$.name', i.value->>'$.iconPath', i.value->>'$.category', " + "SELECT typeId, i.value->>'$.name', i.value->>'$.iconPath', " + "i.value->>'$.category', " " i.value->>'$.import', i.value->>'$.toolTip', i.value->>'$.properties', " " i.value->>'$.extraFilePaths', i.value->>'$.templatePath' " "FROM typeAnnotations, json_each(typeAnnotations.itemLibrary) AS i " "WHERE typeId IN (SELECT DISTINCT typeId " - " FROM documentImports AS di JOIN exportedTypeNames USING(moduleId) " + " FROM documentImports AS di JOIN exportedTypeNames " + " USING(moduleId) " " WHERE di.sourceId=?)", database}; mutable ReadStatement<3, 1> selectItemLibraryPropertiesStatement{ diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageinterface.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageinterface.h index a67b6296083..20d988f7aab 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageinterface.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageinterface.h @@ -57,6 +57,8 @@ public: = 0; virtual PropertyDeclarationId defaultPropertyDeclarationId(TypeId typeId) const = 0; virtual std::optional type(TypeId typeId) const = 0; + virtual SmallSourceIds<4> typeAnnotationSourceIds(SourceId directoryId) const = 0; + virtual SmallSourceIds<64> typeAnnotationDirectorySourceIds() const = 0; virtual Utils::PathString typeIconPath(TypeId typeId) const = 0; virtual Storage::Info::TypeHints typeHints(TypeId typeId) const = 0; virtual Storage::Info::ItemLibraryEntries itemLibraryEntries(TypeId typeId) const = 0; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h index 5f80505da3d..8d810d94bd2 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstoragetypes.h @@ -1202,10 +1202,13 @@ using ProjectDatas = std::vector; class TypeAnnotation { public: - TypeAnnotation(SourceId sourceId) + TypeAnnotation(SourceId sourceId, SourceId directorySourceId) : sourceId{sourceId} + , directorySourceId{directorySourceId} {} + TypeAnnotation(SourceId sourceId, + SourceId directorySourceId, Utils::SmallStringView typeName, ModuleId moduleId, Utils::SmallStringView iconPath, @@ -1219,6 +1222,7 @@ public: , sourceId{sourceId} , moduleId{moduleId} , traits{traits} + , directorySourceId{directorySourceId} {} template @@ -1247,6 +1251,7 @@ public: SourceId sourceId; ModuleId moduleId; TypeTraits traits; + SourceId directorySourceId; }; using TypeAnnotations = std::vector; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp index 6948117db69..761d6371efe 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.cpp @@ -11,6 +11,7 @@ #include "qmltypesparserinterface.h" #include "sourcepath.h" #include "sourcepathcache.h" +#include "typeannotationreader.h" #include @@ -246,7 +247,8 @@ std::vector createIdPaths(ProjectStorageUpdater::WatchedSourceIdsIds wa void ProjectStorageUpdater::update(QStringList directories, QStringList qmlTypesPaths, - const QString &propertyEditorResourcesPath) + const QString &propertyEditorResourcesPath, + const QStringList &typeAnnotationPaths) { NanotraceHR::Tracer tracer{"update"_t, category(), @@ -260,6 +262,7 @@ void ProjectStorageUpdater::update(QStringList directories, updateDirectories(directories, package, notUpdatedSourceIds, watchedSourceIds); updateQmlTypes(qmlTypesPaths, package, notUpdatedSourceIds, watchedSourceIds); updatePropertyEditorPaths(propertyEditorResourcesPath, package, notUpdatedSourceIds); + updateTypeAnnotations(typeAnnotationPaths, package, notUpdatedSourceIds); package.updatedSourceIds = filterNotUpdatedSourceIds(std::move(package.updatedSourceIds), std::move(notUpdatedSourceIds.sourceIds)); @@ -511,12 +514,134 @@ void ProjectStorageUpdater::updatePropertyEditorPaths( } } -void ProjectStorageUpdater::updateTypeAnnotations( - const QString & /*propertyEditorResourcesPath*/, - Storage::Synchronization::SynchronizationPackage & /*package*/, - NotUpdatedSourceIds & /*notUpdatedSourceIds*/) +namespace { + +template +SmallSourceIds<16> mergedSourceIds(const SourceIds1 &sourceIds1, const SourceIds2 &sourceIds2) { - // const auto typeAnnotations = dir.entryInfoList({"*.metainfo"}, QDir::Files); + SmallSourceIds<16> mergedSourceIds; + + std::set_union(sourceIds1.begin(), + sourceIds1.end(), + sourceIds2.begin(), + sourceIds2.end(), + std::back_inserter(mergedSourceIds)); + + return mergedSourceIds; +} +} // namespace + +void ProjectStorageUpdater::updateTypeAnnotations(const QStringList &directoryPaths, + Storage::Synchronization::SynchronizationPackage &package, + NotUpdatedSourceIds ¬UpdatedSourceIds) +{ + NanotraceHR::Tracer tracer("update type annotations"_t, category()); + + std::map> updatedSourceIdsDictonary; + + for (SourceId directoryId : m_projectStorage.typeAnnotationDirectorySourceIds()) + updatedSourceIdsDictonary[directoryId] = {}; + + for (const auto &directoryPath : directoryPaths) + updateTypeAnnotations(directoryPath, package, notUpdatedSourceIds, updatedSourceIdsDictonary); + + updateTypeAnnotationDirectories(package, notUpdatedSourceIds, updatedSourceIdsDictonary); +} + +void ProjectStorageUpdater::updateTypeAnnotations( + const QString &rootDirectoryPath, + Storage::Synchronization::SynchronizationPackage &package, + NotUpdatedSourceIds ¬UpdatedSourceIds, + std::map> &updatedSourceIdsDictonary) +{ + NanotraceHR::Tracer tracer("update type annotation directory"_t, + category(), + keyValue("path", rootDirectoryPath)); + + if (rootDirectoryPath.isEmpty()) + return; + + QDirIterator directoryIterator{rootDirectoryPath, + {"*.metainfo"}, + QDir::NoDotAndDotDot | QDir::Files, + QDirIterator::Subdirectories}; + + while (directoryIterator.hasNext()) { + auto fileInfo = directoryIterator.nextFileInfo(); + auto filePath = fileInfo.filePath(); + SourceId sourceId = m_pathCache.sourceId(SourcePath{filePath}); + + auto directoryPath = fileInfo.canonicalPath(); + + SourceId directorySourceId = m_pathCache.sourceId(SourcePath{directoryPath + "/."}); + + auto state = fileState(sourceId, package, notUpdatedSourceIds); + if (state == FileState::Changed) + updateTypeAnnotation(directoryPath, fileInfo.filePath(), sourceId, directorySourceId, package); + + if (state != FileState::NotChanged) + updatedSourceIdsDictonary[directorySourceId].push_back(sourceId); + } +} + +void ProjectStorageUpdater::updateTypeAnnotationDirectories( + Storage::Synchronization::SynchronizationPackage &package, + NotUpdatedSourceIds ¬UpdatedSourceIds, + std::map> &updatedSourceIdsDictonary) +{ + for (auto &[directorySourceId, updatedSourceIds] : updatedSourceIdsDictonary) { + auto directoryState = fileState(directorySourceId, package, notUpdatedSourceIds); + + if (directoryState != FileState::NotChanged) { + auto existingTypeAnnotationSourceIds = m_projectStorage.typeAnnotationSourceIds( + directorySourceId); + + std::sort(updatedSourceIds.begin(), updatedSourceIds.end()); + + auto changedSourceIds = mergedSourceIds(existingTypeAnnotationSourceIds, updatedSourceIds); + package.updatedTypeAnnotationSourceIds.insert(package.updatedTypeAnnotationSourceIds.end(), + changedSourceIds.begin(), + changedSourceIds.end()); + } else { + package.updatedTypeAnnotationSourceIds.insert(package.updatedTypeAnnotationSourceIds.end(), + updatedSourceIds.begin(), + updatedSourceIds.end()); + } + } +} + +namespace { +QString contentFromFile(const QString &path) +{ + QFile file{path}; + if (file.open(QIODevice::ReadOnly)) + return QString::fromUtf8(file.readAll()); + + return {}; +} +} // namespace + +void ProjectStorageUpdater::updateTypeAnnotation(const QString &directoryPath, + const QString &filePath, + SourceId sourceId, + SourceId directorySourceId, + Storage::Synchronization::SynchronizationPackage &package) +{ + NanotraceHR::Tracer tracer{"update type annotation path"_t, + category(), + keyValue("path", filePath), + keyValue("directory path", directoryPath)}; + + Storage::TypeAnnotationReader reader{m_projectStorage}; + + auto annotations = reader.parseTypeAnnotation(contentFromFile(filePath), + directoryPath, + sourceId, + directorySourceId); + auto &typeAnnotations = package.typeAnnotations; + package.typeAnnotations.insert(typeAnnotations.end(), + std::make_move_iterator(annotations.begin()), + std::make_move_iterator(annotations.end())); } void ProjectStorageUpdater::updatePropertyEditorPath( @@ -752,6 +877,7 @@ void ProjectStorageUpdater::parseProjectDatas(const Storage::Synchronization::Pr watchedSourceIds.qmlSourceIds.push_back(projectData.sourceId); parseQmlComponent(projectData.sourceId, package, notUpdatedSourceIds); + break; } } } diff --git a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h index c7794035659..e21531deea0 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/projectstorageupdater.h @@ -11,12 +11,15 @@ #include "projectstoragetypes.h" #include "sourcepath.h" +#include + #include #include #include +#include #include namespace Sqlite { @@ -40,7 +43,7 @@ public: using PathCache = SourcePathCache, NonLockingMutex>; ProjectStorageUpdater(FileSystemInterface &fileSystem, - ProjectStorageInterface &projectStorage, + ProjectStorageType &projectStorage, FileStatusCache &fileStatusCache, PathCache &pathCache, QmlDocumentParserInterface &qmlDocumentParser, @@ -59,7 +62,8 @@ public: void update(QStringList directories, QStringList qmlTypesPaths, - const QString &propertyEditorResourcesPath); + const QString &propertyEditorResourcesPath, + const QStringList &typeAnnotationPaths); void pathsWithIdsChanged(const std::vector &idPaths) override; void pathsChanged(const SourceIds &filePathIds) override; @@ -157,9 +161,21 @@ private: void updatePropertyEditorPaths(const QString &propertyEditorResourcesPath, Storage::Synchronization::SynchronizationPackage &package, NotUpdatedSourceIds ¬UpdatedSourceIds); - void updateTypeAnnotations(const QString &propertyEditorResourcesPath, + void updateTypeAnnotations(const QString &directoryPath, + Storage::Synchronization::SynchronizationPackage &package, + NotUpdatedSourceIds ¬UpdatedSourceIds, + std::map> &updatedSourceIdsDictonary); + void updateTypeAnnotationDirectories(Storage::Synchronization::SynchronizationPackage &package, + NotUpdatedSourceIds ¬UpdatedSourceIds, + std::map> &updatedSourceIdsDictonary); + void updateTypeAnnotations(const QStringList &directoryPath, Storage::Synchronization::SynchronizationPackage &package, NotUpdatedSourceIds ¬UpdatedSourceIds); + void updateTypeAnnotation(const QString &directoryPath, + const QString &filePath, + SourceId sourceId, + SourceId directorySourceId, + Storage::Synchronization::SynchronizationPackage &package); void updatePropertyEditorPath(const QString &path, Storage::Synchronization::SynchronizationPackage &package, SourceId directorySourceId); @@ -209,7 +225,7 @@ private: private: std::vector m_changedIdPaths; FileSystemInterface &m_fileSystem; - ProjectStorageInterface &m_projectStorage; + ProjectStorageType &m_projectStorage; FileStatusCache &m_fileStatusCache; PathCache &m_pathCache; QmlDocumentParserInterface &m_qmlDocumentParser; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.cpp b/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.cpp index b829e9db36d..67a63542bcb 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.cpp +++ b/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.cpp @@ -27,11 +27,11 @@ constexpr auto propertyElementName = "Property"_L1; constexpr auto extraFileElementName = "ExtraFile"_L1; } // namespace -Synchronization::TypeAnnotations TypeAnnotationReader::parseTypeAnnotation(const QString &content, - const QString &directoryPath, - SourceId sourceId) +Synchronization::TypeAnnotations TypeAnnotationReader::parseTypeAnnotation( + const QString &content, const QString &directoryPath, SourceId sourceId, SourceId directorySourceId) { m_sourceId = sourceId; + m_directorySourceId = directorySourceId; m_directoryPath = directoryPath; m_parserState = ParsingDocument; if (!SimpleAbstractStreamReader::readFromSource(content)) { @@ -178,7 +178,7 @@ TypeAnnotationReader::ParserSate TypeAnnotationReader::readDocument(const QStrin TypeAnnotationReader::ParserSate TypeAnnotationReader::readMetaInfoRootElement(const QString &name) { if (name == typeElementName) { - m_typeAnnotations.emplace_back(m_sourceId); + m_typeAnnotations.emplace_back(m_sourceId, m_directorySourceId); m_itemLibraryEntries = json::array(); return ParsingType; } else { @@ -277,7 +277,7 @@ void TypeAnnotationReader::readItemLibraryEntryProperty(QStringView name, const } else if (name == "category"_L1) { m_itemLibraryEntries.back()["category"] = value; } else if (name == "libraryIcon"_L1) { - m_itemLibraryEntries.back()["iconPath"] = value; + m_itemLibraryEntries.back()["iconPath"] = absoluteFilePathForDocument(variant.toString()); } else if (name == "version"_L1) { // setVersion(value.toString()); } else if (name == "requiredImport"_L1) { @@ -427,8 +427,8 @@ void TypeAnnotationReader::setVersion(const QString &versionNumber) int minor = 0; if (!versionNumber.isEmpty()) { - int val; - bool ok; + int val = -1; + bool ok = false; if (versionNumber.contains('.'_L1)) { val = versionNumber.split('.'_L1).constFirst().toInt(&ok); major = ok ? val : major; diff --git a/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.h b/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.h index 9332d5bed94..a320493ee27 100644 --- a/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.h +++ b/src/plugins/qmldesigner/designercore/projectstorage/typeannotationreader.h @@ -49,7 +49,8 @@ public: Synchronization::TypeAnnotations parseTypeAnnotation(const QString &content, const QString &directoryPath, - SourceId sourceId); + SourceId sourceId, + SourceId directorySourceId); QStringList errors(); @@ -124,6 +125,7 @@ private: json m_itemLibraryEntries; Property m_currentProperty; SourceId m_sourceId; + SourceId m_directorySourceId; }; } // namespace QmlDesigner::Storage diff --git a/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp b/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp index c415863e8a5..2aadc45f24a 100644 --- a/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp +++ b/src/plugins/qmldesigner/qmldesignerprojectmanager.cpp @@ -490,6 +490,11 @@ QString propertyEditorResourcesPath() return Core::ICore::resourcePath("qmldesigner/propertyEditorQmlSources").toString(); } +QString qtCreatorItemLibraryPath() +{ + return Core::ICore::resourcePath("qmldesigner/itemLibrary").toString(); +} + } // namespace void QmlDesignerProjectManager::projectAdded(::ProjectExplorer::Project *project) @@ -626,11 +631,13 @@ void QmlDesignerProjectManager::update() if constexpr (isUsingQmlDesignerLite()) { m_projectData->projectStorageData->updater.update(directoriesForLiteDesigner(), qmlTypesForLiteDesigner(), - propertyEditorResourcesPath()); + propertyEditorResourcesPath(), + {qtCreatorItemLibraryPath()}); } else { m_projectData->projectStorageData->updater.update(directories(m_projectData->activeTarget), qmlTypes(m_projectData->activeTarget), - propertyEditorResourcesPath()); + propertyEditorResourcesPath(), + {qtCreatorItemLibraryPath()}); } } diff --git a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo index 3f3cdb7910c..46cb42b60d2 100644 --- a/src/plugins/qmldesigner/qtquickplugin/quick.metainfo +++ b/src/plugins/qmldesigner/qtquickplugin/quick.metainfo @@ -374,7 +374,6 @@ MetaInfo { name: "Keyframe" category: "none" version: "1.0" - requiredImport: "none" } } @@ -386,7 +385,6 @@ MetaInfo { name: "KeyframeGroup" category: "none" version: "1.0" - requiredImport: "none" } } diff --git a/tests/unit/tests/matchers/projectstorage-matcher.h b/tests/unit/tests/matchers/projectstorage-matcher.h index 5ce6512c14e..02861d7eea3 100644 --- a/tests/unit/tests/matchers/projectstorage-matcher.h +++ b/tests/unit/tests/matchers/projectstorage-matcher.h @@ -53,3 +53,24 @@ MATCHER_P3(IsItemLibraryProperty, return property.name == name && property.type == type && property.value == value; } + +template +auto IsTypeAnnotation(QmlDesigner::SourceId sourceId, + QmlDesigner::SourceId directorySourceId, + Utils::SmallStringView typeName, + QmlDesigner::ModuleId moduleId, + IconPathMatcher iconPath, + TypeTraitsMatcher traits, + HintsJsonMatcher hintsJsonMatcher, + ItemLibraryJsonMatcher itemLibraryJsonMatcher) +{ + using QmlDesigner::Storage::Synchronization::TypeAnnotation; + return AllOf(Field("sourceId", &TypeAnnotation::sourceId, sourceId), + Field("sourceId", &TypeAnnotation::directorySourceId, directorySourceId), + Field("typeName", &TypeAnnotation::typeName, typeName), + Field("moduleId", &TypeAnnotation::moduleId, moduleId), + Field("iconPath", &TypeAnnotation::iconPath, iconPath), + Field("traits", &TypeAnnotation::traits, traits), + Field("hintsJson", &TypeAnnotation::hintsJson, hintsJsonMatcher), + Field("itemLibraryJson", &TypeAnnotation::itemLibraryJson, itemLibraryJsonMatcher)); +} diff --git a/tests/unit/tests/matchers/unittest-matchers.h b/tests/unit/tests/matchers/unittest-matchers.h index 7c52d973b88..faa99a48a2f 100644 --- a/tests/unit/tests/matchers/unittest-matchers.h +++ b/tests/unit/tests/matchers/unittest-matchers.h @@ -95,6 +95,64 @@ private: const QString m_suffix; }; +template +class StartsWithMatcher +{ +public: + explicit StartsWithMatcher(const StringType &prefix) + : m_prefix(prefix) + {} + + template + bool MatchAndExplain(CharType *s, testing::MatchResultListener *listener) const + { + return s != NULL && MatchAndExplain(StringType(s), listener); + } + + template + bool MatchAndExplain(const MatcheeStringType &s, testing::MatchResultListener * /* listener */) const + { + return s.startsWith(m_prefix); + } + + void DescribeTo(::std::ostream *os) const { *os << "ends with " << m_prefix; } + + void DescribeNegationTo(::std::ostream *os) const { *os << "doesn't end with " << m_prefix; } + + StartsWithMatcher(const StartsWithMatcher &) = default; + StartsWithMatcher &operator=(const StartsWithMatcher &) = delete; + +private: + const StringType m_prefix; +}; + +class QStringStartsWithMatcher +{ +public: + explicit QStringStartsWithMatcher(const QString &prefix) + : m_prefix(prefix) + {} + + template + bool MatchAndExplain(const MatcheeStringType &s, testing::MatchResultListener * /* listener */) const + { + return s.startsWith(m_prefix); + } + + void DescribeTo(::std::ostream *os) const + { + *os << "ends with " << testing::PrintToString(m_prefix); + } + + void DescribeNegationTo(::std::ostream *os) const + { + *os << "doesn't end with " << testing::PrintToString(m_prefix); + } + +private: + const QString m_prefix; +}; + class IsEmptyMatcher { public: @@ -157,6 +215,16 @@ inline auto EndsWith(const QStringView &suffix) return ::testing::PolymorphicMatcher(Internal::QStringEndsWithMatcher(suffix.toString())); } +inline auto StartsWith(const Utils::SmallStringView &prefix) +{ + return ::testing::PolymorphicMatcher(Internal::StartsWithMatcher(prefix)); +} + +inline auto StartsWith(const QStringView &prefix) +{ + return ::testing::PolymorphicMatcher(Internal::QStringStartsWithMatcher(prefix.toString())); +} + inline auto IsEmpty() { return ::testing::PolymorphicMatcher(Internal::IsEmptyMatcher()); diff --git a/tests/unit/tests/mocks/projectstoragemock.h b/tests/unit/tests/mocks/projectstoragemock.h index b534814c1d3..8aa5979ddbe 100644 --- a/tests/unit/tests/mocks/projectstoragemock.h +++ b/tests/unit/tests/mocks/projectstoragemock.h @@ -195,6 +195,11 @@ public: type, (QmlDesigner::TypeId typeId), (const, override)); + MOCK_METHOD(QmlDesigner::SmallSourceIds<4>, + typeAnnotationSourceIds, + (QmlDesigner::SourceId directoryId), + (const, override)); + MOCK_METHOD(QmlDesigner::SmallSourceIds<64>, typeAnnotationDirectorySourceIds, (), (const, override)); MOCK_METHOD(Utils::PathString, typeIconPath, (QmlDesigner::TypeId typeId), (const, override)); MOCK_METHOD(QmlDesigner::Storage::Info::TypeHints, typeHints, diff --git a/tests/unit/tests/printers/gtest-creator-printing.cpp b/tests/unit/tests/printers/gtest-creator-printing.cpp index 40f9c8db6da..6bc78e99367 100644 --- a/tests/unit/tests/printers/gtest-creator-printing.cpp +++ b/tests/unit/tests/printers/gtest-creator-printing.cpp @@ -795,7 +795,10 @@ std::ostream &operator<<(std::ostream &out, const SynchronizationPackage &packag << ", projectDatas: " << package.projectDatas << ", propertyEditorQmlPaths: " << package.propertyEditorQmlPaths << ", updatedPropertyEditorQmlPathSourceIds: " - << package.updatedPropertyEditorQmlPathSourceIds << ")"; + << package.updatedPropertyEditorQmlPathSourceIds + << ", typeAnnotations: " << package.typeAnnotations + << ", updatedTypeAnnotationSourceIds: " << package.updatedTypeAnnotationSourceIds + << ")"; } std::ostream &operator<<(std::ostream &out, const ProjectData &data) diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick/Controls/designer/qtquickcontrols2.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick/Controls/designer/qtquickcontrols2.metainfo new file mode 100644 index 00000000000..0cd3959cf8a --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick/Controls/designer/qtquickcontrols2.metainfo @@ -0,0 +1,575 @@ +MetaInfo { + Type { + name: "QtQuick.Controls.BusyIndicator" + icon: "images/busyindicator-icon16.png" + + ItemLibraryEntry { + name: "Busy Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/busyindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates activity while, for example, content is being loaded.") + } + } + + Type { + name: "QtQuick.Controls.Button" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/button-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with text.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Button\")" } + } + } + + Type { + name: "QtQuick.Controls.CheckBox" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A checkbox with a text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Box\")" } + } + } + + Type { + name: "QtQuick.Controls.CheckDelegate" + icon: "images/checkbox-icon16.png" + + ItemLibraryEntry { + name: "Check Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/checkbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as checkboxes.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Check Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.ComboBox" + icon: "images/combobox-icon16.png" + + ItemLibraryEntry { + name: "Combo Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/combobox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An editable drop-down list.") + } + } + + Type { + name: "QtQuick.Controls.Control" + icon: "images/control-icon16.png" + + ItemLibraryEntry { + name: "Control" + category: "Qt Quick - Controls 2" + libraryIcon: "images/control-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An abstract base type for UI controls.") + } + } + + Type { + name: "QtQuick.Controls.DelayButton" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Delay Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/delaybutton-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button with a delay preventing accidental presses.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Delay Button\")" } + } + } + + Type { + name: "QtQuick.Controls.Dial" + icon: "images/dial-icon16.png" + + ItemLibraryEntry { + name: "Dial" + category: "Qt Quick - Controls 2" + libraryIcon: "images/dial-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + + toolTip: qsTr("A circular dial that is rotated to set a value.") + } + } + + Type { + name: "QtQuick.Controls.Frame" + icon: "images/frame-icon16.png" + + ItemLibraryEntry { + name: "Frame" + category: "Qt Quick - Controls 2" + libraryIcon: "images/frame-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An untitled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.GroupBox" + icon: "images/groupbox-icon16.png" + + ItemLibraryEntry { + name: "Group Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/groupbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A titled container for a group of controls.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + Property { name: "title"; type: "binding"; value: "qsTr(\"Group Box\")" } + } + } + + Type { + name: "QtQuick.Controls.ItemDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Item Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents a standard view item. It can be used as a delegate in various views and controls, such as ListView and ComboBox.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Item Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.Label" + icon: "images/label-icon16.png" + + ItemLibraryEntry { + name: "Label" + category: "Qt Quick - Controls 2" + libraryIcon: "images/label-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A text label.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Label\")" } + } + } + + Type { + name: "QtQuick.Controls.Page" + icon: "images/page-icon16.png" + + ItemLibraryEntry { + name: "Page" + category: "Qt Quick - Controls 2" + libraryIcon: "images/page-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A page with header and footer.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.PageIndicator" + icon: "images/pageindicator-icon16.png" + + ItemLibraryEntry { + name: "Page Indicator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pageindicator-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Indicates the currently active page.") + + Property { name: "count"; type: "int"; value: 3 } + } + } + + Type { + name: "QtQuick.Controls.Pane" + icon: "images/pane-icon16.png" + + ItemLibraryEntry { + name: "Pane" + category: "Qt Quick - Controls 2" + libraryIcon: "images/pane-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a background matching the application style and theme.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.ProgressBar" + icon: "images/progressbar-icon16.png" + + ItemLibraryEntry { + name: "Progress Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/progressbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar indicating the progress of an operation.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.RadioButton" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An option button that you can toggle on or off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Button\")" } + } + } + + Type { + name: "QtQuick.Controls.RadioDelegate" + icon: "images/radiobutton-icon16.png" + + ItemLibraryEntry { + name: "Radio Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/radiobutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as radio buttons.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Radio Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.RangeSlider" + icon: "images/rangeslider-icon16.png" + + ItemLibraryEntry { + name: "Range Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/rangeslider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A bar with adjustable start and end points.") + + Property { name: "first.value"; type: "real"; value: 0.25 } + Property { name: "second.value"; type: "real"; value: 0.75 } + } + } + + Type { + name: "QtQuick.Controls.RoundButton" + icon: "images/roundbutton-icon16.png" + + ItemLibraryEntry { + name: "Round Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/roundbutton-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A round button with text.") + + Property { name: "text"; type: "string"; value: "+" } + } + } + + Type { + name: "QtQuick.Controls.Slider" + icon: "images/slider-icon16.png" + + ItemLibraryEntry { + name: "Slider" + category: "Qt Quick - Controls 2" + libraryIcon: "images/slider-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("An adjustable slider.") + + Property { name: "value"; type: "real"; value: 0.5 } + } + } + + Type { + name: "QtQuick.Controls.SpinBox" + icon: "images/spinbox-icon16.png" + + ItemLibraryEntry { + name: "Spin Box" + category: "Qt Quick - Controls 2" + libraryIcon: "images/spinbox-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A box with an adjustable number.") + } + } + + Type { + name: "QtQuick.Controls.ScrollView" + icon: "images/scrollview-icon16.png" + + ItemLibraryEntry { + name: "Scroll View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/scrollview-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A scrollable area.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.StackView" + icon: "images/stackview-icon16.png" + + ItemLibraryEntry { + name: "Stack View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/stackview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a stack-based navigation for a set of pages.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.SwipeDelegate" + icon: "images/itemdelegate-icon16.png" + + ItemLibraryEntry { + name: "Swipe Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/itemdelegate-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as items that you can swipe to expose more options.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.SwipeView" + icon: "images/swipeview-icon16.png" + + ItemLibraryEntry { + name: "Swipe View" + category: "Qt Quick - Controls 2" + libraryIcon: "images/swipeview-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Provides a view where you can navigate pages by swiping.") + + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } + } + } + + Type { + name: "QtQuick.Controls.Switch" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button that you can toggle on and off.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" } + } + } + + Type { + name: "QtQuick.Controls.SwitchDelegate" + icon: "images/switch-icon16.png" + + ItemLibraryEntry { + name: "Switch Delegate" + category: "Qt Quick - Controls 2" + libraryIcon: "images/switch-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("Presents items from a model as toggle switches.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" } + } + } + + Type { + name: "QtQuick.Controls.TabBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tab Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A tab-based navigation model.") + + Property { name: "width"; type: "int"; value: 240 } + } + } + + Type { + name: "QtQuick.Controls.TabButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tab Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tab bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tab Button\")" } + } + } + + Type { + name: "QtQuick.Controls.TextArea" + icon: "images/textarea-icon16.png" + + ItemLibraryEntry { + name: "Text Area" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textarea-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A multi-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Area\")" } + } + } + + Type { + name: "QtQuick.Controls.TextField" + icon: "images/textfield-icon16.png" + + ItemLibraryEntry { + name: "Text Field" + category: "Qt Quick - Controls 2" + libraryIcon: "images/textfield-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A single-line text box.") + + Property { name: "placeholderText"; type: "binding"; value: "qsTr(\"Text Field\")" } + } + } + + Type { + name: "QtQuick.Controls.ToolBar" + icon: "images/toolbar-icon16.png" + + ItemLibraryEntry { + name: "Tool Bar" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbar-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A row that can hold actions and buttons.") + + Property { name: "width"; type: "int"; value: 360 } + } + } + + Type { + name: "QtQuick.Controls.ToolButton" + icon: "images/toolbutton-icon16.png" + + ItemLibraryEntry { + name: "Tool Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A button suitable for a tool bar.") + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" } + } + } + + Type { + name: "QtQuick.Controls.ToolSeparator" + icon: "images/toolseparator-icon16.png" + + ItemLibraryEntry { + name: "Tool Separator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolseparator-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A line to separate sections in a tool bar.") + } + } + + Type { + name: "QtQuick.Controls.Tumbler" + icon: "images/tumbler-icon16.png" + + ItemLibraryEntry { + name: "Tumbler" + category: "Qt Quick - Controls 2" + libraryIcon: "images/tumbler-icon.png" + version: "2.0" + requiredImport: "QtQuick.Controls" + toolTip: qsTr("A spinnable wheel of selectable items.") + + Property { name: "model"; type: "int"; value: "10" } + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/AssetUtils/designer/assetutils.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/AssetUtils/designer/assetutils.metainfo new file mode 100644 index 00000000000..47abeea7a36 --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/AssetUtils/designer/assetutils.metainfo @@ -0,0 +1,21 @@ +MetaInfo { + Type { + name: "QtQuick3D.AssetUtils.RuntimeLoader" + icon: "images/runtimeloader16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Runtime Loader" + category: "AssetUtils" + libraryIcon: "images/runtimeloader.png" + version: "6.2" + requiredImport: "QtQuick3D.AssetUtils" + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Effects/designer/effectlib.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Effects/designer/effectlib.metainfo new file mode 100644 index 00000000000..7ad3357894c --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Effects/designer/effectlib.metainfo @@ -0,0 +1,401 @@ +MetaInfo { + Type { + name: "QtQuick3D.Effects.AdditiveColorGradient" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Additive Color Gradient" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Blur" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Blur" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.BrushStrokes" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Brush Strokes" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.ChromaticAberration" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Chromatic Aberration" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.ColorMaster" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Color Master" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.DepthOfFieldHQBlur" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Depth of Field HQ Blur" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Desaturate" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Desaturate" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.DistortionRipple" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Distortion Ripple" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.DistortionSphere" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Distortion Sphere" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.DistortionSpiral" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Distortion Spiral" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.EdgeDetect" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Edge Detect" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Emboss" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Emboss" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Flip" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Flip" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Fxaa" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Fxaa" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.GaussianBlur" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Gaussian Blur" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.HDRBloomTonemap" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "HDR Bloom Tonemap" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.MotionBlur" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Motion Blur" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Scatter" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Scatter" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.SCurveTonemap" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "SCurve Tonemap" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.TiltShift" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Tilt Shift" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } + Type { + name: "QtQuick3D.Effects.Vignette" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Vignette" + category: "Qt Quick 3D Effects" + libraryIcon: "images/effect.png" + version: "1.0" + requiredImport: "QtQuick3D.Effects" + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Helpers/designer/helpers.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Helpers/designer/helpers.metainfo new file mode 100644 index 00000000000..83492e2c811 --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Helpers/designer/helpers.metainfo @@ -0,0 +1,261 @@ +MetaInfo { + Type { + name: "QtQuick3D.Helpers.LookAtNode" + icon: "images/lookatnode16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Look-at Node" + category: "Helpers" + libraryIcon: "images/lookatnode.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.AxisHelper" + icon: "images/axishelper16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Axis Helper" + category: "Helpers" + libraryIcon: "images/axishelper.png" + version: "6.0" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.DebugView" + icon: "images/debugview16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Debug View" + category: "Helpers" + libraryIcon: "images/debugview.png" + version: "6.0" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.GridGeometry" + icon: "images/gridgeometry16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Grid Geometry" + category: "Helpers" + libraryIcon: "images/gridgeometry.png" + version: "6.0" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.HeightFieldGeometry" + icon: "images/heightfieldgeometry16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Height Field Geometry" + category: "Helpers" + libraryIcon: "images/heightfieldgeometry.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.InstanceModel" + icon: "images/instancemodel16.png" + + Hints { + visibleInNavigator: false + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Instance Model" + category: "Helpers" + libraryIcon: "images/instancemodel.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.InstanceRepeater" + icon: "images/instancerepeater16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Instance Repeater" + category: "Helpers" + libraryIcon: "images/instancerepeater.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.WasdController" + icon: "images/wasdcontroller16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Wasd Controller" + category: "Helpers" + libraryIcon: "images/wasdcontroller.png" + version: "6.0" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.InfiniteGrid" + icon: "images/infinitegrid16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Infinite Grid" + category: "Helpers" + libraryIcon: "images/infinitegrid.png" + version: "6.5" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.OrbitCameraController" + icon: "images/orbitcameracontroller16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: true + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Orbit Camera Controller" + category: "Helpers" + libraryIcon: "images/orbitcameracontroller.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.ProceduralSkyTextureData" + icon: "images/proceduralskytexturedata16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Procedural Sky Texture Data" + category: "Helpers" + libraryIcon: "images/proceduralskytexturedata.png" + version: "6.4" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.ExtendedSceneEnvironment" + icon: "images/extendedsceneenvironment16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Extended Scene Environment" + category: "Helpers" + libraryIcon: "images/extendedsceneenvironment.png" + version: "6.5" + requiredImport: "QtQuick3D.Helpers" + } + } + + Type { + name: "QtQuick3D.Helpers.LodManager" + icon: "images/lodmanager16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Lod Manager" + category: "Helpers" + libraryIcon: "images/lodmanager.png" + version: "6.5" + requiredImport: "QtQuick3D.Helpers" + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/ParticleEffects/designer/particleeffects.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/ParticleEffects/designer/particleeffects.metainfo new file mode 100644 index 00000000000..d9bc305b4ae --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/ParticleEffects/designer/particleeffects.metainfo @@ -0,0 +1,246 @@ +MetaInfo { + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Clouds" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_clouds.qml" } + ExtraFile { source: "images/smoke_sprite2.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Dust" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_dust.qml" } + ExtraFile { source: "images/sphere.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Exhaust" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_exhaust.qml" } + ExtraFile { source: "images/smoke2.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Fire" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_fire.qml" } + ExtraFile { source: "images/smoke_sprite.png" } + ExtraFile { source: "images/sphere.png" } + ExtraFile { source: "images/color_table.png" } + ExtraFile { source: "images/color_table2.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Heavy Rain" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_heavyrain.qml" } + ExtraFile { source: "images/rain.png" } + ExtraFile { source: "images/sphere.png" } + ExtraFile { source: "images/ripple.png" } + ExtraFile { source: "images/splash7.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Heavy Rain - Tire Spray" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_heavyrain_tirespray.qml" } + ExtraFile { source: "images/smoke2.png" } + } + } + + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Light Rain" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_lightrain.qml" } + ExtraFile { source: "images/rain.png" } + ExtraFile { source: "images/splash7.png" } + } + } + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Light Rain - Tire Spray" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_lightrain_tirespray.qml" } + ExtraFile { source: "images/smoke2.png" } + } + } + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Rain Mist" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_rainmist.qml" } + ExtraFile { source: "images/smoke2.png" } + } + } + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Snow" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_snow.qml" } + ExtraFile { source: "images/snowflake.png" } + } + } + Type { + name: "QtQuick3D.Particle3D.ParticleSystem3D" + icon: "images/dummy16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Steam" + category: "Qt Quick 3D Particle Effects" + libraryIcon: "images/dummy.png" + version: "6.2" + requiredImport: "QtQuick3D.ParticleEffects" + QmlSource { source: "./source/particleeffect_steam.qml" } + ExtraFile { source: "images/smoke2.png" } + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Particles3D/designer/particles3d.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Particles3D/designer/particles3d.metainfo new file mode 100644 index 00000000000..d2a2999c50a --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Particles3D/designer/particles3d.metainfo @@ -0,0 +1,562 @@ +MetaInfo { + Type { + name: "QtQuick3D.Particles3D.Attractor3D" + icon: "images/attractor-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Attractor" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/attractor-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.DynamicBurst3D" + icon: "images/emit-burst-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Dynamic Burst" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/emit-burst-24px.png" + version: "6.3" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.EmitBurst3D" + icon: "images/emit-burst-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Emit Burst" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/emit-burst-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleEmitter3D" + icon: "images/emitter-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Emitter" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/emitter-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.Gravity3D" + icon: "images/gravity-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Gravity" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/gravity-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ModelBlendParticle3D" + icon: "images/model-blend-particle-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Model Blend Particle" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/model-blend-particle-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ModelParticle3D" + icon: "images/model-particle-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Model Particle" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/model-particle-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleCustomShape3D" + icon: "images/particle-custom-shape-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Custom Shape" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/particle-custom-shape-24px.png" + version: "6.3" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleModelShape3D" + icon: "images/model-shape-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Model Shape" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/model-shape-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.PointRotator3D" + icon: "images/point-rotator-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Point Rotator" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/point-rotator-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleShape3D" + icon: "images/particle-shape-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Particle Shape" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/particle-shape-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.SpriteParticle3D" + icon: "images/sprite-particle-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Sprite Particle" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/sprite-particle-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.SpriteSequence3D" + icon: "images/sprite-sequence-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Sprite Sequence" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/sprite-sequence-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Particle System" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.TargetDirection3D" + icon: "images/target-direction-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Target Direction" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/target-direction-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.TrailEmitter3D" + icon: "images/trail-emitter-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Trail Emitter" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/trail-emitter-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.VectorDirection3D" + icon: "images/vector-direction-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Vector Direction" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/vector-direction-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.Wander3D" + icon: "images/wander-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Wander" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/wander-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Animated Sprite" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_animatedsprite_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Attractor System" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_attractor_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Burst" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_burst_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Model Blend" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_modelblend_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Model Shape" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_modelshape_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Particle Trail" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_particletrail_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Sprite" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_sprite_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.ParticleSystem3D" + icon: "images/particle-system-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Wander" + category: "Qt Quick 3D Particle System Templates" + libraryIcon: "images/particle-system-24px.png" + version: "6.2" + requiredImport: "QtQuick3D.Particles3D" + QmlSource { source: "./source/particlesystem_wander_template.qml" } + } + } + Type { + name: "QtQuick3D.Particles3D.LineParticle3D" + icon: "images/line-particle-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Line Particle" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/line-particle-24px.png" + version: "6.4" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.Repeller3D" + icon: "images/repeller-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Repeller" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/repeller-24px.png" + version: "6.4" + requiredImport: "QtQuick3D.Particles3D" + } + } + Type { + name: "QtQuick3D.Particles3D.ScaleAffector3D" + icon: "images/scale-affector-16px.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Scale Affector" + category: "Qt Quick 3D Particles 3D" + libraryIcon: "images/scale-affector-24px.png" + version: "6.4" + requiredImport: "QtQuick3D.Particles3D" + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Physics/designer/physics.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Physics/designer/physics.metainfo new file mode 100644 index 00000000000..874e209dc52 --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/Physics/designer/physics.metainfo @@ -0,0 +1,261 @@ +MetaInfo { + Type { + name: "QtQuick3D.Physics.PhysicsWorld" + icon: "images/physicsworld16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Physics World" + category: "Components" + libraryIcon: "images/physicsworld.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.TriggerBody" + icon: "images/triggerbody16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Trigger Body" + category: "Collision Bodies" + libraryIcon: "images/triggerbody.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.StaticRigidBody" + icon: "images/staticrigidbody16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Static Rigid Body" + category: "Collision Bodies" + libraryIcon: "images/staticrigidbody.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.DynamicRigidBody" + icon: "images/dynamicrigidbody16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Dynamic Rigid Body" + category: "Collision Bodies" + libraryIcon: "images/dynamicrigidbody.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.PhysicsMaterial" + icon: "images/physicsmaterial16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Physics Material" + category: "Components" + libraryIcon: "images/physicsmaterial.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.BoxShape" + icon: "images/boxshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Box Shape" + category: "Collision Shapes" + libraryIcon: "images/boxshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.CapsuleShape" + icon: "images/capsuleshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Capsule Shape" + category: "Collision Shapes" + libraryIcon: "images/capsuleshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.ConvexMeshShape" + icon: "images/convexmeshshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Convex Mesh Shape" + category: "Collision Shapes" + libraryIcon: "images/convexmeshshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.HeightFieldShape" + icon: "images/heightfieldshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Height Field Shape" + category: "Collision Shapes" + libraryIcon: "images/heightfieldshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.PlaneShape" + icon: "images/planeshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Plane Shape" + category: "Collision Shapes" + libraryIcon: "images/planeshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.SphereShape" + icon: "images/sphereshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Sphere Shape" + category: "Collision Shapes" + libraryIcon: "images/sphereshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.TriangleMeshShape" + icon: "images/trianglemeshshape16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Triangle Mesh Shape" + category: "Collision Shapes" + libraryIcon: "images/trianglemeshshape.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } + + Type { + name: "QtQuick3D.Physics.CharacterController" + icon: "images/charactercontroller16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Character Controller" + category: "Collision Bodies" + libraryIcon: "images/charactercontroller.png" + version: "6.5" + requiredImport: "QtQuick3D.Physics" + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/designer/quick3d.metainfo b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/designer/quick3d.metainfo new file mode 100644 index 00000000000..852f9081295 --- /dev/null +++ b/tests/unit/tests/unittests/projectstorage/data/qml/QtQuick3D/designer/quick3d.metainfo @@ -0,0 +1,861 @@ +MetaInfo { + Type { + name: "QtQuick3D.PerspectiveCamera" + icon: "images/camera16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Perspective Camera" + category: "Cameras" + libraryIcon: "images/camera.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "z"; type: "int"; value: 500; } + toolTip: qsTr("A camera that uses perspective projection.") + } + } + Type { + name: "QtQuick3D.OrthographicCamera" + icon: "images/camera16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Orthographic Camera" + category: "Cameras" + libraryIcon: "images/camera.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "z"; type: "int"; value: 500; } + toolTip: qsTr("A parallel projection Camera, in which an object's perceived scale is unaffected by its distance from the Camera.") + } + } + Type { + name: "QtQuick3D.FrustumCamera" + icon: "images/camera16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Frustum Camera" + category: "Cameras" + libraryIcon: "images/camera.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "z"; type: "int"; value: 500; } + toolTip: qsTr("A perspective camera with a custom frustum.") + } + } + Type { + name: "QtQuick3D.CustomCamera" + icon: "images/camera16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Custom Camera" + category: "Cameras" + libraryIcon: "images/camera.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "z"; type: "int"; value: 500; } + toolTip: qsTr("A camera with a custom projection matrix.") + } + } + Type { + name: "QtQuick3D.CustomMaterial" + icon: "images/custommaterial16.png" + + Hints { + visibleInNavigator: false + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Custom Material" + category: "Materials" + libraryIcon: "images/custommaterial.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "fragmentShader"; type: "QUrl"; value: "custom_material_default_shader.frag"; } + ExtraFile { source: "source/custom_material_default_shader.frag" } + toolTip: qsTr("A material with customizable vertex and fragment shaders.") + } + } + Type { + name: "QtQuick3D.DefaultMaterial" + icon: "images/material16.png" + + Hints { + visibleInNavigator: false + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Default Material" + category: "Materials" + libraryIcon: "images/material.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "diffuseColor"; type: "color"; value: "#4aee45"; } + toolTip: qsTr("A material with a specular/glossiness properties.") + } + } + Type { + name: "QtQuick3D.PrincipledMaterial" + icon: "images/material16.png" + + Hints { + visibleInNavigator: false + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Principled Material" + category: "Materials" + libraryIcon: "images/material.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "baseColor"; type: "color"; value: "#4aee45"; } + toolTip: qsTr("A material with a PBR metal/roughness properties.") + } + } + Type { + name: "QtQuick3D.SpecularGlossyMaterial" + icon: "images/material16.png" + + Hints { + visibleInNavigator: false + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Specular Glossy" + category: "Materials" + libraryIcon: "images/material.png" + version: "6.4" + requiredImport: "QtQuick3D" + Property { name: "albedoColor"; type: "color"; value: "#4aee45"; } + Property { name: "specularColor"; type: "color"; value: "#000000"; } + toolTip: qsTr("A material with a PBR specular/glossiness properties.") + } + } + Type { + name: "QtQuick3D.Texture" + icon: "images/texture16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Texture" + category: "Textures" + libraryIcon: "images/texture.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Defines a texture for 3D objects.") + } + } + Type { + name: "QtQuick3D.CubeMapTexture" + icon: "images/cubemaptexture16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeContainer: false + } + + ItemLibraryEntry { + name: "Cube Map Texture" + category: "Textures" + libraryIcon: "images/cubemaptexture.png" + version: "6.4" + requiredImport: "QtQuick3D" + toolTip: qsTr("Defines a cube map texture for 3D objects.") + } + } + Type { + name: "QtQuick3D.DirectionalLight" + icon: "images/lightdirectional16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Directional Light" + category: "Lights" + libraryIcon: "images/lightdirectional.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A light similar to sunlight. It emits light in one direction from an infinitely far away source.") + } + } + Type { + name: "QtQuick3D.PointLight" + icon: "images/lightpoint16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Point Light" + category: "Lights" + libraryIcon: "images/lightpoint.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A light similar to a light bulb. It emits light equally in all directions from a central source.") + } + } + Type { + name: "QtQuick3D.SpotLight" + icon: "images/lightspot16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Spotlight" + category: "Lights" + libraryIcon: "images/lightspot.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A spotlight emits light in one direction in a cone shape.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Model" + category: "Components" + libraryIcon: "images/group.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Allows you to load 3D mesh data.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Cube" + category: "Primitives" + libraryIcon: "images/cube.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "source"; type: "QUrl"; value: "#Cube"; } + toolTip: qsTr("A cube model.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Sphere" + category: "Primitives" + libraryIcon: "images/sphere.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "source"; type: "QUrl"; value: "#Sphere"; } + toolTip: qsTr("A sphere model.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Cylinder" + category: "Primitives" + libraryIcon: "images/cylinder.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "source"; type: "QUrl"; value: "#Cylinder"; } + toolTip: qsTr("A cylinder model.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Plane" + category: "Primitives" + libraryIcon: "images/plane.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "source"; type: "QUrl"; value: "#Rectangle"; } + toolTip: qsTr("A plane model.") + } + } + Type { + name: "QtQuick3D.Model" + icon: "images/model16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + visibleNonDefaultProperties: "materials" + } + + ItemLibraryEntry { + name: "Cone" + category: "Primitives" + libraryIcon: "images/cone.png" + version: "6.0" + requiredImport: "QtQuick3D" + Property { name: "source"; type: "QUrl"; value: "#Cone"; } + toolTip: qsTr("A cone model.") + } + } + Type { + name: "QtQuick3D.Node" + icon: "images/group16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Group" + category: "Components" + libraryIcon: "images/group.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A container to keep several QtQuick3D components or scenes together.") + } + } + Type { + name: "QtQuick3D.SceneEnvironment" + icon: "images/scene16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Scene Environment" + category: "Components" + libraryIcon: "images/scene.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Configures the render settings for a scene.") + } + } + Type { + name: "QtQuick3D.View3D" + icon: "images/view3D16.png" + + ItemLibraryEntry { + name: "View3D" + category: "Items" + libraryIcon: "images/view3D.png" + version: "6.0" + requiredImport: "QtQuick3D" + QmlSource { source: "./source/view3D_template.qml" } + toolTip: qsTr("A 2D surface where a 3D scene can be rendered.") + } + } + Type { + name: "QtQuick3D.Shader" + icon: "images/shaderutil16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Shader" + category: "Custom Shader Utils" + libraryIcon: "images/shaderutil.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A container for keeping the vertex or fragment shader codes to be used by post-processing effect.") + } + } + Type { + name: "QtQuick3D.TextureInput" + icon: "images/shaderutil16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Texture Input" + category: "Custom Shader Utils" + libraryIcon: "images/shaderutil.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Specifies a texture that gets exposed to the shader.") + } + } + Type { + name: "QtQuick3D.Pass" + icon: "images/shaderutil16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Pass" + category: "Custom Shader Utils" + libraryIcon: "images/shaderutil.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Holds a set of actions combining a list of executable render commands, an output buffer, and a list of shaders to use for rendering effects.") + } + } + Type { + name: "QtQuick3D.BufferInput" + icon: "images/shadercommand16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Buffer Input" + category: "Custom Shader Utils" + libraryIcon: "images/shadercommand.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A command that gets added to the list of commands in the Pass of an Effect when executed.") + } + } + Type { + name: "QtQuick3D.Buffer" + icon: "images/shaderutil16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Buffer" + category: "Custom Shader Utils" + libraryIcon: "images/shaderutil.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Creates or references a color buffer to be used for a pass of an Effect.") + } + } + Type { + name: "QtQuick3D.SetUniformValue" + icon: "images/shadercommand16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Set Uniform Value" + category: "Custom Shader Utils" + libraryIcon: "images/shadercommand.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A value that would be set when a single pass actions takes place.") + } + } + Type { + name: "QtQuick3D.Effect" + icon: "images/effect16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Effect" + category: "Components" + libraryIcon: "images/effect.png" + version: "6.0" + requiredImport: "QtQuick3D" + QmlSource { source: "./source/effect_template.qml" } + ExtraFile { source: "./source/effect_default_shader.frag" } + toolTip: qsTr("A method to allow the user to implement their post-processing effects on entire View3D.") + } + } + Type { + name: "QtQuick3D.Repeater3D" + icon: "images/repeater3d16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "3D Repeater" + category: "Components" + libraryIcon: "images/repeater3d.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Dynamically creates several copies of the same 3D object.") + } + } + Type { + name: "QtQuick3D.Loader3D" + icon: "images/loader3d16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Loader3D" + category: "Components" + libraryIcon: "images/loader3d.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Allows you to load 3D components dynamically.") + } + } + Type { + name: "QtQuick3D.Skeleton" + icon: "images/skeleton16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Skeleton" + category: "Components" + libraryIcon: "images/skeleton.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Defines a skeletal animation hierarchy.") + } + } + Type { + name: "QtQuick3D.MorphTarget" + icon: "images/morphtarget16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Morph Target" + category: "Components" + libraryIcon: "images/morphtarget.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("Defines the properties of a morph target.") + } + } + Type { + name: "QtQuick3D.InstanceListEntry" + icon: "images/instancelistentry16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Instance List Entry" + category: "Components" + libraryIcon: "images/instancelistentry.png" + version: "6.2" + requiredImport: "QtQuick3D" + toolTip: qsTr("One instance in an Instance List. The instance includes a set of property specifications.") + } + } + Type { + name: "QtQuick3D.InstanceList" + icon: "images/instancelist16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Instance List" + category: "Components" + libraryIcon: "images/instancelist.png" + version: "6.2" + requiredImport: "QtQuick3D" + toolTip: qsTr("Enables 3D model instancing, a lightweight 3D object replication method.") + } + } + Type { + name: "QtQuick3D.FileInstancing" + icon: "images/fileinstancing16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "File Instancing" + category: "Components" + libraryIcon: "images/fileinstancing.png" + version: "6.2" + requiredImport: "QtQuick3D" + toolTip: qsTr("A method that allows reading instance tables from XML or Qt-specific binary files.") + } + } + Type { + name: "QtQuick3D.Joint" + icon: "images/joint16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + } + + ItemLibraryEntry { + name: "Joint" + category: "Components" + libraryIcon: "images/joint.png" + version: "6.0" + requiredImport: "QtQuick3D" + toolTip: qsTr("A transformable node that connects different parts in a skeletal animation.") + } + } + Type { + name: "QtQuick3D.ReflectionProbe" + icon: "images/reflectionProbe16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: true + } + + ItemLibraryEntry { + name: "Reflection Probe" + category: "Components" + libraryIcon: "images/reflectionProbe.png" + version: "6.3" + requiredImport: "QtQuick3D" + toolTip: qsTr("Reflects the current scene to the objects.") + } + } + Type { + name: "QtQuick3D.Fog" + icon: "images/fog16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Fog" + category: "Components" + libraryIcon: "images/fog.png" + version: "6.5" + requiredImport: "QtQuick3D" + } + } + Type { + name: "QtQuick3D.DebugSettings" + icon: "images/debugsettings16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Debug Settings" + category: "Components" + libraryIcon: "images/debugsettings.png" + version: "6.5" + requiredImport: "QtQuick3D" + } + } + + Type { + name: "QtQuick3D.Lightmapper" + icon: "images/lightmapper16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + // Split the name to avoid ellipsis in UI + name: "Light Mapper" + category: "Components" + libraryIcon: "images/lightmapper.png" + version: "6.5" + requiredImport: "QtQuick3D" + } + } + + Type { + name: "QtQuick3D.Skin" + icon: "images/skin16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Skin" + category: "Components" + libraryIcon: "images/skin.png" + version: "6.5" + requiredImport: "QtQuick3D" + } + } + + Type { + name: "QtQuick3D.ResourceLoader" + icon: "images/resourceLoader16.png" + + Hints { + visibleInNavigator: true + canBeDroppedInNavigator: true + canBeDroppedInFormEditor: false + canBeDroppedInView3D: false + } + + ItemLibraryEntry { + name: "Resource Loader" + category: "Components" + libraryIcon: "images/resourceLoader.png" + version: "6.2" + requiredImport: "QtQuick3D" + toolTip: qsTr("Pre-load resources for 3D scene. It makes sure that large resources are available before rendering a frame.") + } + } +} diff --git a/tests/unit/tests/unittests/projectstorage/projectstorage-test.cpp b/tests/unit/tests/unittests/projectstorage/projectstorage-test.cpp index 125e8df3aeb..d16e007cc03 100644 --- a/tests/unit/tests/unittests/projectstorage/projectstorage-test.cpp +++ b/tests/unit/tests/unittests/projectstorage/projectstorage-test.cpp @@ -996,10 +996,10 @@ protected: package.updatedSourceIds = {sourceId1, sourceId2, sourceId3}; - package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "QtObject", sourceId1, sourceIdPath); - package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item", sourceId2, sourceIdPath); - package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item3D", sourceId3, sourceIdPath); - package.updatedPropertyEditorQmlPathSourceIds.emplace_back(sourceIdPath); + package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "QtObject", sourceId1, sourceIdPath6); + package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item", sourceId2, sourceIdPath6); + package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item3D", sourceId3, sourceIdPath6); + package.updatedPropertyEditorQmlPathSourceIds.emplace_back(sourceIdPath6); return package; } @@ -1013,6 +1013,7 @@ protected: traits.visibleInLibrary = FlagIs::True; annotations.emplace_back(sourceId4, + sourceIdPath6, "Object", qmlModuleId, "/path/to/icon.png", @@ -1034,6 +1035,32 @@ protected: "properties":[["color", "color", "#blue"]]}])xy"); annotations.emplace_back(sourceId5, + sourceIdPath6, + "Item", + qtQuickModuleId, + "/path/to/quick.png", + traits, + R"xy({"canBeContainer": "true", "forceClip": "false"})xy", + R"xy([{"name":"Item", + "iconPath":"/path/icon3", + "category":"Advanced Items", + "import":"QtQuick", + "toolTip":"Item is an Object", + "properties":[["x", "double", 1], ["y", "double", 2]]}])xy"); + + return annotations; + } + + auto createExtendedTypeAnnotations() const + { + auto annotations = createTypeAnnotions(); + annotations.pop_back(); + TypeTraits traits{TypeTraitsKind::Reference}; + traits.canBeContainer = FlagIs::True; + traits.visibleInLibrary = FlagIs::True; + + annotations.emplace_back(sourceId5, + sourceIdPath1, "Item", qtQuickModuleId, "/path/to/quick.png", @@ -1109,7 +1136,6 @@ protected: protected: inline static std::unique_ptr static_database; Sqlite::Database &database = *static_database; - //Sqlite::Database database{"/tmp/aaaaa.db", Sqlite::JournalMode::Wal}; inline static std::unique_ptr> static_projectStorage; QmlDesigner::ProjectStorage &storage = *static_projectStorage; QmlDesigner::SourcePathCache> sourcePathCache{ @@ -1120,14 +1146,16 @@ protected: QmlDesigner::SourcePathView path4{"/path4/to"}; QmlDesigner::SourcePathView path5{"/path5/to"}; QmlDesigner::SourcePathView path6{"/path6/to"}; - QmlDesigner::SourcePathView pathPath{"/path6/."}; + QmlDesigner::SourcePathView pathPath1{"/path1/."}; + QmlDesigner::SourcePathView pathPath6{"/path6/."}; SourceId sourceId1{sourcePathCache.sourceId(path1)}; SourceId sourceId2{sourcePathCache.sourceId(path2)}; SourceId sourceId3{sourcePathCache.sourceId(path3)}; SourceId sourceId4{sourcePathCache.sourceId(path4)}; SourceId sourceId5{sourcePathCache.sourceId(path5)}; SourceId sourceId6{sourcePathCache.sourceId(path6)}; - SourceId sourceIdPath{sourcePathCache.sourceId(path6)}; + SourceId sourceIdPath1{sourcePathCache.sourceId(pathPath1)}; + SourceId sourceIdPath6{sourcePathCache.sourceId(pathPath6)}; SourceId qmlProjectSourceId{sourcePathCache.sourceId("/path1/qmldir")}; SourceId qtQuickProjectSourceId{sourcePathCache.sourceId("/path2/qmldir")}; ModuleId qmlModuleId{storage.moduleId("Qml")}; @@ -7276,7 +7304,7 @@ TEST_F(ProjectStorage, synchronize_property_editor_adds_path) auto package{createPropertyEditorPathsSynchronizationPackage()}; package.propertyEditorQmlPaths.pop_back(); storage.synchronize(package); - package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item3D", sourceId3, sourceIdPath); + package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item3D", sourceId3, sourceIdPath6); storage.synchronize(package); @@ -7288,7 +7316,7 @@ TEST_F(ProjectStorage, synchronize_property_editor_adds_path) TEST_F(ProjectStorage, synchronize_property_editor_with_non_existing_type_name) { auto package{createPropertyEditorPathsSynchronizationPackage()}; - package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item4D", sourceId4, sourceIdPath); + package.propertyEditorQmlPaths.emplace_back(qtQuickModuleId, "Item4D", sourceId4, sourceIdPath6); storage.synchronize(package); @@ -7308,6 +7336,21 @@ TEST_F(ProjectStorage, call_remove_type_ids_in_observer_after_synchronization) storage.synchronize(package); } +TEST_F(ProjectStorage, do_not_synchronize_type_annotations_without_type) +{ + SynchronizationPackage package; + package.typeAnnotations = createTypeAnnotions(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + TypeTraits traits{TypeTraitsKind::Reference}; + traits.canBeContainer = FlagIs::True; + traits.visibleInLibrary = FlagIs::True; + + storage.synchronize(package); + + ASSERT_THAT(storage.allItemLibraryEntries(), IsEmpty()); +} + TEST_F(ProjectStorage, synchronize_type_annotation_type_traits) { auto package{createSimpleSynchronizationPackage()}; @@ -7460,6 +7503,18 @@ TEST_F(ProjectStorage, synchronize_removes_type_hints) } TEST_F(ProjectStorage, return_empty_type_hints_if_no_type_hints_exists) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.typeAnnotations[0].hintsJson.clear(); + storage.synchronize(package); + + auto typeHints = storage.typeHints(fetchTypeId(sourceId2, "QObject")); + + ASSERT_THAT(typeHints, IsEmpty()); +} + +TEST_F(ProjectStorage, return_empty_type_hints_if_no_type_annotaion_exists) { auto package{createSimpleSynchronizationPackage()}; storage.synchronize(package); @@ -7534,7 +7589,7 @@ TEST_F(ProjectStorage, synchronize_removes_item_library_entries) ASSERT_THAT(storage.allItemLibraryEntries(), IsEmpty()); } -TEST_F(ProjectStorage, synchronize_udpates_item_library_entries) +TEST_F(ProjectStorage, synchronize_updates_item_library_entries) { auto package{createSimpleSynchronizationPackage()}; package.typeAnnotations = createTypeAnnotions(); @@ -7560,6 +7615,59 @@ TEST_F(ProjectStorage, synchronize_udpates_item_library_entries) IsEmpty()))); } +TEST_F(ProjectStorage, synchronize_updates_item_library_entries_with_empty_entries) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + package.typeAnnotations[0].itemLibraryJson.clear(); + + storage.synchronize(package); + + ASSERT_THAT(storage.itemLibraryEntries(fetchTypeId(sourceId2, "QObject")), IsEmpty()); +} + +TEST_F(ProjectStorage, synchronize_type_annotation_directory_source_id) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + + storage.synchronize(package); + + ASSERT_THAT(storage.typeAnnotationSourceIds(sourceIdPath6), + UnorderedElementsAre(sourceId4, sourceId5)); +} + +TEST_F(ProjectStorage, get_type_annotation_source_ids) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + + auto sourceIds = storage.typeAnnotationSourceIds(sourceIdPath6); + + ASSERT_THAT(sourceIds, UnorderedElementsAre(sourceId4, sourceId5)); +} + +TEST_F(ProjectStorage, get_type_annotation_directory_source_ids) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createExtendedTypeAnnotations(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + + auto sourceIds = storage.typeAnnotationDirectorySourceIds(); + + ASSERT_THAT(sourceIds, ElementsAre(sourceIdPath1, sourceIdPath6)); +} + TEST_F(ProjectStorage, get_all_item_library_entries) { auto package{createSimpleSynchronizationPackage()}; @@ -7605,6 +7713,31 @@ TEST_F(ProjectStorage, get_all_item_library_entries) IsEmpty()))); } +TEST_F(ProjectStorage, get_all_item_library_entries_handles_no_entries) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.typeAnnotations[0].itemLibraryJson.clear(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + + auto entries = storage.allItemLibraryEntries(); + + ASSERT_THAT(entries, + UnorderedElementsAre( + IsItemLibraryEntry(fetchTypeId(sourceId1, "QQuickItem"), + "Item", + "/path/icon3", + "Advanced Items", + "QtQuick", + "Item is an Object", + "", + UnorderedElementsAre(IsItemLibraryProperty("x", "double", 1), + IsItemLibraryProperty("y", "double", 2)), + IsEmpty()))); +} + TEST_F(ProjectStorage, get_item_library_entries_by_type_id) { auto package{createSimpleSynchronizationPackage()}; @@ -7654,6 +7787,21 @@ TEST_F(ProjectStorage, get_no_item_library_entries_if_type_id_is_invalid) ASSERT_THAT(entries, IsEmpty()); } +TEST_F(ProjectStorage, get_no_item_library_entries_by_type_id_for_no_entries) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.typeAnnotations[0].itemLibraryJson.clear(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + auto typeId = fetchTypeId(sourceId2, "QObject"); + + auto entries = storage.itemLibraryEntries(typeId); + + ASSERT_THAT(entries, IsEmpty()); +} + TEST_F(ProjectStorage, get_item_library_entries_by_source_id) { auto package{createSimpleSynchronizationPackage()}; @@ -7689,6 +7837,20 @@ TEST_F(ProjectStorage, get_item_library_entries_by_source_id) IsEmpty()))); } +TEST_F(ProjectStorage, get_no_item_library_entries_by_source_id_for_no_entries) +{ + auto package{createSimpleSynchronizationPackage()}; + package.typeAnnotations = createTypeAnnotions(); + package.typeAnnotations[0].itemLibraryJson.clear(); + package.updatedTypeAnnotationSourceIds = createUpdatedTypeAnnotionSourceIds( + package.typeAnnotations); + storage.synchronize(package); + + auto entries = storage.itemLibraryEntries(sourceId2); + + ASSERT_THAT(entries, IsEmpty()); +} + TEST_F(ProjectStorage, return_type_ids_for_module_id) { auto package{createBuiltinSynchronizationPackage()}; diff --git a/tests/unit/tests/unittests/projectstorage/projectstorageupdater-test.cpp b/tests/unit/tests/unittests/projectstorage/projectstorageupdater-test.cpp index a28c5e4935d..a0ca9012629 100644 --- a/tests/unit/tests/unittests/projectstorage/projectstorageupdater-test.cpp +++ b/tests/unit/tests/unittests/projectstorage/projectstorageupdater-test.cpp @@ -9,6 +9,8 @@ #include "../mocks/qmldocumentparsermock.h" #include "../mocks/qmltypesparsermock.h" +#include + #include #include #include @@ -120,7 +122,8 @@ MATCHER(PackageIsEmpty, std::string(negation ? "isn't empty" : "is empty")) && package.moduleDependencies.empty() && package.updatedModuleDependencySourceIds.empty() && package.moduleExportedImports.empty() && package.updatedModuleIds.empty() && package.propertyEditorQmlPaths.empty() - && package.updatedPropertyEditorQmlPathSourceIds.empty(); + && package.updatedPropertyEditorQmlPathSourceIds.empty() + && package.typeAnnotations.empty() && package.updatedTypeAnnotationSourceIds.empty(); } template @@ -168,7 +171,8 @@ public: secondSourceId, thirdSourceId, qmltypes1SourceId, - qmltypes2SourceId}); + qmltypes2SourceId, + itemLibraryPathSourceId}); setFilesAdded({qmldir1SourceId, qmldir2SourceId, qmldir3SourceId}); @@ -298,6 +302,8 @@ public: EXPECT_CALL(fileSystemMock, contentAsQString(Eq(path))).WillRepeatedly(Return(content)); } + auto moduleId(Utils::SmallStringView name) const { return storage.moduleId(name); } + protected: NiceMock fileSystemMock; NiceMock projectStorageMock; @@ -328,6 +334,13 @@ protected: SourceId qmlDocumentSourceId1 = sourcePathCache.sourceId("/path/First.qml"); SourceId qmlDocumentSourceId2 = sourcePathCache.sourceId("/path/First2.qml"); SourceId qmlDocumentSourceId3 = sourcePathCache.sourceId("/path/Second.qml"); + const QString itemLibraryPath = QDir::cleanPath( + UNITTEST_DIR "/../../../../share/qtcreator/qmldesigner/itemLibrary/"); + const QString qmlImportsPath = QDir::cleanPath(UNITTEST_DIR "/projectstorage/data/qml"); + SourceId itemLibraryPathSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/."}); + SourceId qmlImportsPathSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{qmlImportsPath + "/."}); ModuleId qmlModuleId{storage.moduleId("Qml")}; ModuleId qmlCppNativeModuleId{storage.moduleId("Qml-cppnative")}; ModuleId exampleModuleId{storage.moduleId("Example")}; @@ -410,7 +423,7 @@ TEST_F(ProjectStorageUpdater, get_content_for_qml_dir_paths_if_file_status_is_di EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/one/qmldir")))); EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/two/qmldir")))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, request_file_status_from_file_system) @@ -419,7 +432,7 @@ TEST_F(ProjectStorageUpdater, request_file_status_from_file_system) EXPECT_CALL(fileSystemMock, fileStatus(Eq(directoryPathSourceId))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, get_content_for_qml_types) @@ -431,7 +444,7 @@ TEST_F(ProjectStorageUpdater, get_content_for_qml_types) EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/example.qmltypes")))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, get_content_for_qml_types_if_project_storage_file_status_is_invalid) @@ -444,7 +457,7 @@ TEST_F(ProjectStorageUpdater, get_content_for_qml_types_if_project_storage_file_ EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/example.qmltypes")))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, parse_qml_types) @@ -463,7 +476,7 @@ TEST_F(ProjectStorageUpdater, parse_qml_types) EXPECT_CALL(qmlTypesParserMock, parse(qmltypes2, _, _, Field(&ProjectData::moduleId, exampleCppNativeModuleId))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_is_empty_for_no_change) @@ -472,7 +485,7 @@ TEST_F(ProjectStorageUpdater, synchronize_is_empty_for_no_change) EXPECT_CALL(projectStorageMock, synchronize(PackageIsEmpty())); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_types) @@ -507,7 +520,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_types) Field(&SynchronizationPackage::updatedProjectSourceIds, UnorderedElementsAre(directoryPathSourceId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_types_throws_if_qmltpes_does_not_exists) @@ -515,7 +528,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_types_throws_if_qmltpes_does_not_e Storage::Import import{qmlModuleId, Storage::Version{2, 3}, qmltypesPathSourceId}; setFilesDontExists({qmltypesPathSourceId}); - ASSERT_THROW(updater.update(directories, {}, {}), QmlDesigner::CannotParseQmlTypesFile); + ASSERT_THROW(updater.update(directories, {}, {}, {}), QmlDesigner::CannotParseQmlTypesFile); } TEST_F(ProjectStorageUpdater, synchronize_qml_types_are_empty_if_file_does_not_changed) @@ -528,7 +541,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_types_are_empty_if_file_does_not_c EXPECT_CALL(projectStorageMock, synchronize(PackageIsEmpty())); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, get_content_for_qml_documents) @@ -549,7 +562,7 @@ TEST_F(ProjectStorageUpdater, get_content_for_qml_documents) EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/OldSecond.qml")))); EXPECT_CALL(fileSystemMock, contentAsQString(Eq(QString("/path/Second.qml")))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, parse_qml_documents) @@ -570,7 +583,7 @@ TEST_F(ProjectStorageUpdater, parse_qml_documents) EXPECT_CALL(qmlDocumentParserMock, parse(qmlDocument2, _, _, _)); EXPECT_CALL(qmlDocumentParserMock, parse(qmlDocument3, _, _, _)); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, parse_qml_documents_with_non_existing_qml_document_throws) @@ -579,7 +592,7 @@ TEST_F(ProjectStorageUpdater, parse_qml_documents_with_non_existing_qml_document NonexitingType 1.0 NonexitingType.qml)"}; setContent(u"/path/qmldir", qmldir); - ASSERT_THROW(updater.update(directories, {}, {}), QmlDesigner::CannotParseQmlDocumentFile); + ASSERT_THROW(updater.update(directories, {}, {}, {}), QmlDesigner::CannotParseQmlDocumentFile); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents) @@ -652,7 +665,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_add_only_qml_document_in_directory) @@ -708,7 +721,7 @@ TEST_F(ProjectStorageUpdater, synchronize_add_only_qml_document_in_directory) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_removes_qml_document) @@ -771,7 +784,7 @@ TEST_F(ProjectStorageUpdater, synchronize_removes_qml_document) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_removes_qml_document_in_qmldir_only) @@ -826,7 +839,7 @@ TEST_F(ProjectStorageUpdater, synchronize_removes_qml_document_in_qmldir_only) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_add_qml_document_to_qmldir) @@ -884,7 +897,7 @@ TEST_F(ProjectStorageUpdater, synchronize_add_qml_document_to_qmldir) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_remove_qml_document_from_qmldir) @@ -939,7 +952,7 @@ TEST_F(ProjectStorageUpdater, synchronize_remove_qml_document_from_qmldir) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_dont_update_if_up_to_date) @@ -1009,7 +1022,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_dont_update_if_up_to_dat ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_not_changed) @@ -1060,7 +1073,7 @@ TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_not_changed) qmlDocumentSourceId2)), Field(&SynchronizationPackage::projectDatas, IsEmpty())))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_not_changed_and_some_updated_files) @@ -1095,7 +1108,7 @@ TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_not_changed_and_some UnorderedElementsAre(qmltypesPathSourceId, qmlDocumentSourceId1)), Field(&SynchronizationPackage::projectDatas, IsEmpty())))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_not_changed_and_some_removed_files) @@ -1110,7 +1123,7 @@ TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_not_changed_and_some_rem setFilesDontChanged({qmlDirPathSourceId, qmltypes2PathSourceId, qmlDocumentSourceId2}); setFilesRemoved({qmltypesPathSourceId, qmlDocumentSourceId1}); - ASSERT_THROW(updater.update(directories, {}, {}), QmlDesigner::CannotParseQmlTypesFile); + ASSERT_THROW(updater.update(directories, {}, {}, {}), QmlDesigner::CannotParseQmlTypesFile); } TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_changed_and_some_removed_files) @@ -1162,7 +1175,7 @@ TEST_F(ProjectStorageUpdater, synchroniz_if_qmldir_file_has_changed_and_some_rem exampleCppNativeModuleId, FileType::QmlTypes)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_qml_types_files_is_empty) @@ -1177,7 +1190,7 @@ TEST_F(ProjectStorageUpdater, update_qml_types_files_is_empty) Field(&SynchronizationPackage::projectDatas, IsEmpty()), Field(&SynchronizationPackage::updatedProjectSourceIds, IsEmpty())))); - updater.update({}, {}, {}); + updater.update({}, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_qml_types_files) @@ -1205,7 +1218,7 @@ TEST_F(ProjectStorageUpdater, update_qml_types_files) Field(&SynchronizationPackage::updatedProjectSourceIds, UnorderedElementsAre(qmltypesPathSourceId, qmltypes2PathSourceId))))); - updater.update({}, {"/path/example.qmltypes", "/path/example2.qmltypes"}, {}); + updater.update({}, {"/path/example.qmltypes", "/path/example2.qmltypes"}, {}, {}); } TEST_F(ProjectStorageUpdater, dont_update_qml_types_files_if_unchanged) @@ -1230,7 +1243,7 @@ TEST_F(ProjectStorageUpdater, dont_update_qml_types_files_if_unchanged) Field(&SynchronizationPackage::updatedProjectSourceIds, UnorderedElementsAre(qmltypesPathSourceId))))); - updater.update({}, {"/path/example.qmltypes", "/path/example2.qmltypes"}, {}); + updater.update({}, {"/path/example.qmltypes", "/path/example2.qmltypes"}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_with_different_version_but_same_type_name_and_file_name) @@ -1273,7 +1286,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_with_different_version_b ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_with_different_type_name_but_same_version_and_file_name) @@ -1314,7 +1327,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_with_different_type_name ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, dont_synchronize_selectors) @@ -1332,7 +1345,7 @@ TEST_F(ProjectStorageUpdater, dont_synchronize_selectors) Contains(Field(&Storage::Synchronization::Type::exportedTypes, Contains(IsExportedType(exampleModuleId, "FirstType", 1, 0)))))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies) @@ -1357,7 +1370,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies) Field(&SynchronizationPackage::updatedModuleDependencySourceIds, UnorderedElementsAre(qmltypesPathSourceId, qmltypes2PathSourceId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies_with_double_entries) @@ -1383,7 +1396,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies_with_double_entrie Field(&SynchronizationPackage::updatedModuleDependencySourceIds, UnorderedElementsAre(qmltypesPathSourceId, qmltypes2PathSourceId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies_with_colliding_imports) @@ -1409,7 +1422,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_dependencies_with_colliding_imp Field(&SynchronizationPackage::updatedModuleDependencySourceIds, UnorderedElementsAre(qmltypesPathSourceId, qmltypes2PathSourceId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_with_no_dependencies) @@ -1426,7 +1439,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_with_no_dependencies) Field(&SynchronizationPackage::updatedModuleDependencySourceIds, UnorderedElementsAre(qmltypesPathSourceId, qmltypes2PathSourceId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_imports) @@ -1468,7 +1481,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_imports) Field(&SynchronizationPackage::updatedModuleIds, ElementsAre(exampleModuleId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_with_no_imports) @@ -1482,7 +1495,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_with_no_imports) Field(&SynchronizationPackage::updatedModuleIds, ElementsAre(exampleModuleId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_imports_with_double_entries) @@ -1525,7 +1538,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_imports_with_double_entries) Field(&SynchronizationPackage::updatedModuleIds, ElementsAre(exampleModuleId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qmldir_optional_imports) @@ -1567,7 +1580,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qmldir_optional_imports) Field(&SynchronizationPackage::updatedModuleIds, ElementsAre(exampleModuleId))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_directories) @@ -1577,7 +1590,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_directories) QmlDesigner::SourceType::Directory, {path1SourceId, path2SourceId, path3SourceId}}))); - updater.update(directories3, {}, {}); + updater.update(directories3, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_directory_does_not_exists) @@ -1589,7 +1602,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_directory_does_not_exists) QmlDesigner::SourceType::Directory, {path1SourceId, path3SourceId}}))); - updater.update(directories3, {}, {}); + updater.update(directories3, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_directory_does_not_changed) @@ -1601,7 +1614,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_directory_does_not_changed) QmlDesigner::SourceType::Directory, {path1SourceId, path2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_directory_removed) @@ -1612,7 +1625,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_directory_removed) updateIdPaths(Contains( IdPaths{projectPartId, QmlDesigner::SourceType::Directory, {path2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmldirs) @@ -1622,7 +1635,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmldirs) QmlDesigner::SourceType::QmlDir, {qmldir1SourceId, qmldir2SourceId, qmldir3SourceId}}))); - updater.update(directories3, {}, {}); + updater.update(directories3, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_does_not_exists) @@ -1634,7 +1647,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_does_not_exists) QmlDesigner::SourceType::QmlDir, {qmldir1SourceId, qmldir3SourceId}}))); - updater.update(directories3, {}, {}); + updater.update(directories3, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_does_not_changed) @@ -1646,7 +1659,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_does_not_changed) QmlDesigner::SourceType::QmlDir, {qmldir1SourceId, qmldir2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_removed) @@ -1657,7 +1670,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmldir_removed) updateIdPaths(Contains( IdPaths{projectPartId, QmlDesigner::SourceType::QmlDir, {qmldir2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qml_files) @@ -1674,7 +1687,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qml_files) QmlDesigner::SourceType::Qml, {firstSourceId, secondSourceId, thirdSourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_only_qml_files_dont_changed) @@ -1692,7 +1705,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_only_qml_files_dont_changed) QmlDesigner::SourceType::Qml, {firstSourceId, secondSourceId, thirdSourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_only_qml_files_changed) @@ -1710,7 +1723,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_only_qml_files_changed) QmlDesigner::SourceType::Qml, {firstSourceId, secondSourceId, thirdSourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qml_files_and_directories_dont_changed) @@ -1733,7 +1746,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qml_files_and_directories_dont QmlDesigner::SourceType::Qml, {firstSourceId, secondSourceId, thirdSourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmltypes_files_in_qmldir) @@ -1752,7 +1765,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmltypes_files_in_qmldir) QmlDesigner::SourceType::QmlTypes, {qmltypes1SourceId, qmltypes2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_only_qmltypes_files_in_qmldir_dont_changed) @@ -1770,7 +1783,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_only_qmltypes_files_in_qmldir_ QmlDesigner::SourceType::QmlTypes, {qmltypes1SourceId, qmltypes2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_only_qmltypes_files_changed) @@ -1787,7 +1800,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_only_qmltypes_files_changed) QmlDesigner::SourceType::QmlTypes, {qmltypes1SourceId, qmltypes2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_qmltypes_files_and_directories_dont_changed) @@ -1808,7 +1821,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_qmltypes_files_and_directories QmlDesigner::SourceType::QmlTypes, {qmltypes1SourceId, qmltypes2SourceId}}))); - updater.update(directories2, {}, {}); + updater.update(directories2, {}, {}, {}); } TEST_F(ProjectStorageUpdater, update_path_watcher_builtin_qmltypes_files) @@ -1823,7 +1836,7 @@ TEST_F(ProjectStorageUpdater, update_path_watcher_builtin_qmltypes_files) QmlDesigner::SourceType::QmlTypes, {qmltypes1SourceId, qmltypes2SourceId}}))); - updater.update({}, {builtinQmltyplesPath1, builtinQmltyplesPath2}, {}); + updater.update({}, {builtinQmltyplesPath1, builtinQmltyplesPath2}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir) @@ -1890,7 +1903,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir) ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_throws_if_qml_document_does_not_exists) @@ -1898,7 +1911,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_throws_if setFilesDontExists({qmlDirPathSourceId, qmlDocumentSourceId1}); setFilesAdded({directoryPathSourceId}); - ASSERT_THROW(updater.update(directories, {}, {}), QmlDesigner::CannotParseQmlDocumentFile); + ASSERT_THROW(updater.update(directories, {}, {}, {}), QmlDesigner::CannotParseQmlDocumentFile); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_throws_if_directory_does_not_exists) @@ -1928,7 +1941,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_throws_if UnorderedElementsAre(directoryPathSourceId)), Field(&SynchronizationPackage::projectDatas, IsEmpty())))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_add_qml_document) @@ -1977,7 +1990,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_add_qml_d ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_removes_qml_document) @@ -2016,7 +2029,7 @@ TEST_F(ProjectStorageUpdater, synchronize_qml_documents_without_qmldir_removes_q ModuleId{}, FileType::QmlDocument)))))); - updater.update(directories, {}, {}); + updater.update(directories, {}, {}, {}); } TEST_F(ProjectStorageUpdater, watcher_updates_directories) @@ -3475,7 +3488,7 @@ TEST_F(ProjectStorageUpdater, update_property_editor_panes) Field(&SynchronizationPackage::updatedPropertyEditorQmlPathSourceIds, ElementsAre(directoryId))))); - updater.update({}, {}, propertyEditorQmlPath); + updater.update({}, {}, propertyEditorQmlPath, {}); } TEST_F(ProjectStorageUpdater, update_property_editor_specifics) @@ -3500,12 +3513,12 @@ TEST_F(ProjectStorageUpdater, update_property_editor_specifics) Field(&SynchronizationPackage::updatedPropertyEditorQmlPathSourceIds, ElementsAre(directoryId))))); - updater.update({}, {}, propertyEditorQmlPath); + updater.update({}, {}, propertyEditorQmlPath, {}); } TEST_F(ProjectStorageUpdater, update_property_editor_panes_is_empty_if_directory_has_not_changed) { - updater.update({}, {}, propertyEditorQmlPath); + updater.update({}, {}, propertyEditorQmlPath, {}); ON_CALL(fileSystemMock, fileStatus(_)).WillByDefault([](SourceId sourceId) { return FileStatus{sourceId, 1, 21}; }); @@ -3515,7 +3528,135 @@ TEST_F(ProjectStorageUpdater, update_property_editor_panes_is_empty_if_directory EXPECT_CALL(projectStorageMock, synchronize(PackageIsEmpty())); - updater.update({}, {}, propertyEditorQmlPath); + updater.update({}, {}, propertyEditorQmlPath, {}); +} + +TEST_F(ProjectStorageUpdater, update_type_annotations) +{ + auto itemSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/quick.metainfo"}); + auto buttonSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/qtquickcontrols2.metainfo"}); + setFilesChanged({itemLibraryPathSourceId, itemSourceId, buttonSourceId}); + auto qtQuickModuleId = moduleId("QtQuick"); + auto qtQuickControlsModuleId = moduleId("QtQuick.Controls.Basic"); + QmlDesigner::Storage::TypeTraits itemTraits; + itemTraits.canBeContainer = QmlDesigner::FlagIs::True; + + EXPECT_CALL(projectStorageMock, + synchronize(AllOf(Field(&SynchronizationPackage::typeAnnotations, + IsSupersetOf({IsTypeAnnotation(itemSourceId, + itemLibraryPathSourceId, + "Item", + qtQuickModuleId, + StartsWith(itemLibraryPath), + _, + _, + _), + IsTypeAnnotation(buttonSourceId, + itemLibraryPathSourceId, + "Button", + qtQuickControlsModuleId, + StartsWith(itemLibraryPath), + _, + _, + _)})), + Field(&SynchronizationPackage::updatedTypeAnnotationSourceIds, + IsSupersetOf({itemSourceId, buttonSourceId}))))); + + updater.update({}, {}, {}, {itemLibraryPath}); +} + +TEST_F(ProjectStorageUpdater, update_changed_type_annotation) +{ + auto itemSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/quick.metainfo"}); + auto buttonSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/qtquickcontrols2.metainfo"}); + setFilesDontChanged({itemLibraryPathSourceId}); + setFilesChanged({itemSourceId, buttonSourceId}); + auto qtQuickModuleId = moduleId("QtQuick"); + auto qtQuickControlsModuleId = moduleId("QtQuick.Controls.Basic"); + QmlDesigner::Storage::TypeTraits itemTraits; + itemTraits.canBeContainer = QmlDesigner::FlagIs::True; + + EXPECT_CALL(projectStorageMock, + synchronize(AllOf(Field(&SynchronizationPackage::typeAnnotations, + IsSupersetOf({IsTypeAnnotation(itemSourceId, + itemLibraryPathSourceId, + "Item", + qtQuickModuleId, + StartsWith(itemLibraryPath), + _, + _, + _), + IsTypeAnnotation(buttonSourceId, + itemLibraryPathSourceId, + "Button", + qtQuickControlsModuleId, + StartsWith(itemLibraryPath), + _, + _, + _)})), + Field(&SynchronizationPackage::updatedTypeAnnotationSourceIds, + IsSupersetOf({itemSourceId, buttonSourceId}))))); + + updater.update({}, {}, {}, {itemLibraryPath}); +} + +TEST_F(ProjectStorageUpdater, update_type_annotations_removed_meta_info_file) +{ + ON_CALL(fileSystemMock, fileStatus(_)).WillByDefault([](SourceId sourceId) { + return FileStatus{sourceId, 1, 21}; + }); + ON_CALL(projectStorageMock, fetchFileStatus(_)).WillByDefault([](SourceId sourceId) { + return FileStatus{sourceId, 1, 21}; + }); + auto itemSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/quick.metainfo"}); + auto buttonSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/qtquickcontrols2.metainfo"}); + ON_CALL(projectStorageMock, typeAnnotationDirectorySourceIds()) + .WillByDefault(Return(QmlDesigner::SmallSourceIds<64>{itemLibraryPathSourceId})); + ON_CALL(projectStorageMock, typeAnnotationSourceIds(itemLibraryPathSourceId)) + .WillByDefault(Return(QmlDesigner::SmallSourceIds<4>{itemSourceId, buttonSourceId})); + setFilesChanged({itemLibraryPathSourceId}); + setFilesDontChanged({itemSourceId, buttonSourceId}); + + EXPECT_CALL(projectStorageMock, + synchronize(AllOf(Field(&SynchronizationPackage::typeAnnotations, IsEmpty()), + Field(&SynchronizationPackage::updatedTypeAnnotationSourceIds, + IsSupersetOf({itemSourceId, buttonSourceId}))))); + + updater.update({}, {}, {}, {itemLibraryPath}); +} + +TEST_F(ProjectStorageUpdater, update_type_annotations_removed_directory) +{ + ON_CALL(fileSystemMock, fileStatus(_)).WillByDefault([](SourceId sourceId) { + return FileStatus{sourceId, 1, 21}; + }); + ON_CALL(projectStorageMock, fetchFileStatus(_)).WillByDefault([](SourceId sourceId) { + return FileStatus{sourceId, 1, 21}; + }); + auto itemSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/quick.metainfo"}); + auto buttonSourceId = sourcePathCache.sourceId( + QmlDesigner::SourcePath{itemLibraryPath + "/qtquickcontrols2.metainfo"}); + ON_CALL(projectStorageMock, typeAnnotationDirectorySourceIds()) + .WillByDefault(Return(QmlDesigner::SmallSourceIds<64>{ + itemLibraryPathSourceId, + })); + ON_CALL(projectStorageMock, typeAnnotationSourceIds(itemLibraryPathSourceId)) + .WillByDefault(Return(QmlDesigner::SmallSourceIds<4>{itemSourceId, buttonSourceId})); + setFilesDontExists({itemLibraryPathSourceId, buttonSourceId, itemSourceId}); + + EXPECT_CALL(projectStorageMock, + synchronize(AllOf(Field(&SynchronizationPackage::typeAnnotations, IsEmpty()), + Field(&SynchronizationPackage::updatedTypeAnnotationSourceIds, + IsSupersetOf({buttonSourceId, itemSourceId}))))); + + updater.update({}, {}, {}, {itemLibraryPath}); } } // namespace diff --git a/tests/unit/tests/unittests/projectstorage/typeannotationreader-test.cpp b/tests/unit/tests/unittests/projectstorage/typeannotationreader-test.cpp index ed5c1a0778b..b90a4adf1be 100644 --- a/tests/unit/tests/unittests/projectstorage/typeannotationreader-test.cpp +++ b/tests/unit/tests/unittests/projectstorage/typeannotationreader-test.cpp @@ -3,6 +3,7 @@ #include "../utils/googletest.h" +#include #include #include @@ -11,24 +12,6 @@ namespace { -template -auto IsTypeAnnotation(QmlDesigner::SourceId sourceId, - Utils::SmallStringView typeName, - QmlDesigner::ModuleId moduleId, - Utils::SmallStringView iconPath, - QmlDesigner::Storage::TypeTraits traits, - HintsJsonMatcher hintsJsonMatcher, - ItemLibraryJsonMatcher itemLibraryJsonMatcher) -{ - using QmlDesigner::Storage::Synchronization::TypeAnnotation; - return AllOf(Field("sourceId", &TypeAnnotation::sourceId, sourceId), - Field("typeName", &TypeAnnotation::typeName, typeName), - Field("moduleId", &TypeAnnotation::moduleId, moduleId), - Field("iconPath", &TypeAnnotation::iconPath, iconPath), - Field("traits", &TypeAnnotation::traits, traits), - Field("hintsJson", &TypeAnnotation::hintsJson, hintsJsonMatcher), - Field("itemLibraryJson", &TypeAnnotation::itemLibraryJson, itemLibraryJsonMatcher)); -} class TypeAnnotationReader : public testing::Test { @@ -56,6 +39,7 @@ protected: QmlDesigner::ProjectStorage &storage = *static_projectStorage; QmlDesigner::Storage::TypeAnnotationReader reader{storage}; QmlDesigner::SourceId sourceId = QmlDesigner::SourceId::create(33); + QmlDesigner::SourceId directorySourceId = QmlDesigner::SourceId::create(77); }; TEST_F(TypeAnnotationReader, parse_type) @@ -73,10 +57,11 @@ TEST_F(TypeAnnotationReader, parse_type) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, UnorderedElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -84,6 +69,7 @@ TEST_F(TypeAnnotationReader, parse_type) IsEmpty(), IsEmpty()), IsTypeAnnotation(sourceId, + directorySourceId, "Item", moduleId("QtQuick"), "/path/images/item-icon16.png", @@ -109,10 +95,11 @@ TEST_F(TypeAnnotationReader, parse_true_canBeContainer) QmlDesigner::Storage::TypeTraits traits; traits.canBeContainer = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -138,10 +125,11 @@ TEST_F(TypeAnnotationReader, parse_true_forceClip) QmlDesigner::Storage::TypeTraits traits; traits.forceClip = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -167,10 +155,11 @@ TEST_F(TypeAnnotationReader, parse_true_doesLayoutChildren) QmlDesigner::Storage::TypeTraits traits; traits.doesLayoutChildren = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -196,10 +185,11 @@ TEST_F(TypeAnnotationReader, parse_true_canBeDroppedInFormEditor) QmlDesigner::Storage::TypeTraits traits; traits.canBeDroppedInFormEditor = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -225,10 +215,11 @@ TEST_F(TypeAnnotationReader, parse_true_canBeDroppedInNavigator) QmlDesigner::Storage::TypeTraits traits; traits.canBeDroppedInNavigator = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -254,10 +245,11 @@ TEST_F(TypeAnnotationReader, parse_true_canBeDroppedInView3D) QmlDesigner::Storage::TypeTraits traits; traits.canBeDroppedInView3D = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -283,10 +275,11 @@ TEST_F(TypeAnnotationReader, parse_true_isMovable) QmlDesigner::Storage::TypeTraits traits; traits.isMovable = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -312,10 +305,11 @@ TEST_F(TypeAnnotationReader, parse_true_isResizable) QmlDesigner::Storage::TypeTraits traits; traits.isResizable = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -341,10 +335,11 @@ TEST_F(TypeAnnotationReader, parse_true_hasFormEditorItem) QmlDesigner::Storage::TypeTraits traits; traits.hasFormEditorItem = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -370,10 +365,11 @@ TEST_F(TypeAnnotationReader, parse_true_isStackedContainer) QmlDesigner::Storage::TypeTraits traits; traits.isStackedContainer = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -399,10 +395,11 @@ TEST_F(TypeAnnotationReader, parse_true_takesOverRenderingOfChildren) QmlDesigner::Storage::TypeTraits traits; traits.takesOverRenderingOfChildren = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -428,10 +425,11 @@ TEST_F(TypeAnnotationReader, parse_true_visibleInNavigator) QmlDesigner::Storage::TypeTraits traits; traits.visibleInNavigator = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -457,10 +455,11 @@ TEST_F(TypeAnnotationReader, parse_true_visibleInLibrary) QmlDesigner::Storage::TypeTraits traits; traits.visibleInLibrary = FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -485,10 +484,11 @@ TEST_F(TypeAnnotationReader, parse_false) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -526,10 +526,11 @@ TEST_F(TypeAnnotationReader, parse_complex_expression) QmlDesigner::Storage::TypeTraits itemTraits; itemTraits.canBeContainer = QmlDesigner::FlagIs::True; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, UnorderedElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -538,6 +539,7 @@ TEST_F(TypeAnnotationReader, parse_complex_expression) "visibleNonDefaultProperties":"layer.effect"})xy"), IsEmpty()), IsTypeAnnotation(sourceId, + directorySourceId, "Item", moduleId("QtQuick"), "/path/images/item-icon16.png", @@ -573,10 +575,11 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -584,12 +587,12 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry) IsEmpty(), StrippedStringEq(R"xy([ {"category":"Qt Quick - Controls 2", - "iconPath":"images/frame-icon.png", + "iconPath":"/path/images/frame-icon.png", "import":"QtQuick.Controls", "name":"Frame", "toolTip":"qsTr(\"An untitled container for a group of controls.\")"}, {"category":"Qt Quick - Controls 2", - "iconPath":"images/frame-icon.png", + "iconPath":"/path/images/frame-icon.png", "import":"QtQuick.Controls", "name":"Large Frame", "toolTip":"qsTr(\"An large container for a group of controls.\")"}] @@ -629,10 +632,11 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_with_properties) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), "/path/images/frame-icon16.png", @@ -640,13 +644,13 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_with_properties) IsEmpty(), StrippedStringEq(R"xy([ {"category":"Qt Quick - Controls 2", - "iconPath":"images/frame-icon.png", + "iconPath":"/path/images/frame-icon.png", "import":"QtQuick.Controls", "name":"Frame", "properties":[["width","int",200.0],["height","int",100.0]], "toolTip":"qsTr(\"An untitled container for a group of controls.\")"}, {"category":"Qt Quick - Controls 2", - "iconPath":"images/frame-icon.png", + "iconPath":"/path/images/frame-icon.png", "import":"QtQuick.Controls", "name":"Large Frame", "properties":[["width","int",2000.0],["height","int",1000.0]], @@ -679,13 +683,14 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_template_path) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), - {}, + Utils::SmallStringView{}, traits, IsEmpty(), StrippedStringEq(R"xy([ @@ -693,9 +698,10 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_template_path) "templatePath":"/path/templates/frame.qml"}] )xy")), IsTypeAnnotation(sourceId, + directorySourceId, "Item", moduleId("QtQuick"), - {}, + Utils::SmallStringView{}, traits, IsEmpty(), StrippedStringEq(R"xy([ @@ -730,13 +736,14 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_extra_file_paths) })xy"}; QmlDesigner::Storage::TypeTraits traits; - auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId); + auto annotations = reader.parseTypeAnnotation(content, "/path", sourceId, directorySourceId); ASSERT_THAT(annotations, ElementsAre(IsTypeAnnotation(sourceId, + directorySourceId, "Frame", moduleId("QtQuick.Controls"), - {}, + Utils::SmallStringView{}, traits, IsEmpty(), StrippedStringEq(R"xy([ @@ -744,9 +751,10 @@ TEST_F(TypeAnnotationReader, parse_item_library_entry_extra_file_paths) "name":"Frame"}] )xy")), IsTypeAnnotation(sourceId, + directorySourceId, "Item", moduleId("QtQuick"), - {}, + Utils::SmallStringView{}, traits, IsEmpty(), StrippedStringEq(R"xy([ diff --git a/tests/unit/tests/unittests/utils/smallstring-test.cpp b/tests/unit/tests/unittests/utils/smallstring-test.cpp index 3594c838c96..71090f8760a 100644 --- a/tests/unit/tests/unittests/utils/smallstring-test.cpp +++ b/tests/unit/tests/unittests/utils/smallstring-test.cpp @@ -1326,6 +1326,19 @@ TEST(SmallString, starts_with_string_view) ASSERT_FALSE(text.startsWith('@')); } +TEST(SmallString, starts_with_qstringview) +{ + using namespace Qt::StringLiterals; + SmallString text("$column"); + + ASSERT_FALSE(text.startsWith(u"$columnxxx"_s)); + ASSERT_TRUE(text.startsWith(u"$column"_s)); + ASSERT_TRUE(text.startsWith(u"$col"_s)); + ASSERT_FALSE(text.startsWith(u"col"_s)); + ASSERT_TRUE(text.startsWith(u"$"_s)); + ASSERT_FALSE(text.startsWith(u"@"_s)); +} + TEST(SmallString, ends_with) { SmallString text("/my/path");