Commit Graph

18 Commits

Author SHA1 Message Date
Friedemann Kleint 86183499a7 Photoviewer: Fix warnings flood
Accept https and check for the match of the regexp, fixing:

rc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null
qrc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null
qrc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null
qrc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null
qrc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null
qrc:/PhotoViewerCore/script/script.mjs:61: TypeError: Cannot read property '1' of null

Fixes: QTBUG-75255
Change-Id: I3c447830874d504213276b8064abcf3cef1f72ec
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-04-23 07:23:14 +00:00
Kai Koehne cc1a7a75ec Make examples self-contained
Remove shared main entry function and shared resources (that were not
used anyway), and simplify the entry point:
* Get rid of special handling of QT_QUICK_CORE_PROFILE,
  QT_QUICK_MULTISAMPLE environment variables.
* Remove QQmlFileSelector, which is not used in the examples.
* Do set QtCoreAppication::organizationName to 'QtExamples', so that the
  settings are separate from QtProject. This follows recent changes in
  Qt WebEngine examples.

Change-Id: I01851b3434901fefc2738136a2f1795d682a3233
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-24 11:00:51 +00:00
Venugopal Shivashankar 229e4efc07 Doc: Fix links to the Qt Quick Controls 1 docs
This change is inline with the updated link targets in the
Qt Quick Controls 1 docs.

Task-number: QTBUG-70333
Change-Id: I4ab6f6729d450337570ff89d330aa431b4b0bd1b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-10-26 20:45:54 +00:00
Simon Hausmann 1c9da7439d Port photoviewer example to use a ES module for the script code
... instead of the proprietary .pragma library syntax.

Change-Id: Ic5add04d6446a3c221eb3be6ec5a2240f0f80691
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-08-23 11:27:57 +00:00
Simon Hausmann 25b032a522 Clean up resource handling in photoviewer example
Use the modern RESOURCES syntax in the .pro file to replace the XML
file on disk.

Change-Id: I8dbfbe55242c93178e2bfcd2a1ad8f4d63a510bb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-08-23 11:27:53 +00:00
Simon Hausmann e03fe19320 Clean up resource handling in tweetsearch examples
Use the modern RESOURCES syntax in the .pro file to replace the XML
file on disk.

Change-Id: I3ea61d8eddb7e72cc49e8466ce23d0b08033d1bc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-08-23 09:11:36 +00:00
Simon Hausmann 8183fb5b57 Simplify tweetsearch demo XHR handling
We can use the more modern onload handler instead of onreadystatechange.

Change-Id: I02017426d150e306c1ee1b8681923e8b51ff4539
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-08-22 19:18:46 +00:00
Simon Hausmann 31cdb19876 Minor cleanup in tweetsearch demo
Get rid of unused isLoading property

Change-Id: Ic12535d1de9d35038444304562c494ed038e86f0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-08-22 19:18:40 +00:00
Simon Hausmann e20c97b373 Port TweetSearch demo to use ES modules
Replace the non-standard .pragma library style with the standard ES
modules and export statements for functions used from the outside.

Change-Id: Idd6bd0a5316edb690337b1b750c93060207d797b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-08-22 19:18:28 +00:00
Frederik Gladhorn bf8e5b17c1 Move shared example folder to examples/demos/shared
The root examples directory should not contains shared folders. In the
past multimedia was the only module installing things there, now the
qtdoc module started doing the same. Let's clean up both.

Fixes: QTBUG-69784
Change-Id: Id9f98711e1dff3f610bafddc2a8bebbb764e1504
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-08-20 15:00:50 +00:00
Simon Hausmann fc581c2572 Fix static build of photoviewer without QtQuick Controls 1
Change-Id: If0c630b35da71d461a03cb5fe1593fda998f0765
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-08-08 14:13:19 +00:00
Kai Koehne 1a82dd567f photoviewer: Use QLocale::uiLanguages() for finding translations
Now that we ship en translations, we can use the
QTranslator::load(QLocale, ...) overload to correctly find translated
files.

See 785b12a4d126 for the corresponding change in qtdeclarative/5.11.

Task-number: QTBUG-69196
Change-Id: Ic7f7a2c70763f0c7200782d6e46644f2b3f7f3ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-28 19:45:29 +00:00
Kai Koehne 6126fcfbf4 photoviewer: Add en translation dummy
We endorse using QTranslator::install(const QLocale&...), because
it tries loading translations from all QLocale::uiLanguages() instead
of the commonly used QLocale::system().name() setup.

Anyhow, the first method requires an English translation - otherwise
a second favorite language might be used.

Pave the way to making the switch by adding (empty) English translations
to our examples. EXTRA_TRANSLATIONS, in contrast to TRANSLATIONS, makes
sure that lupdate is not executed for this file.

Task-number: QTBUG-69196
Change-Id: Ie5e64c3499cc38fe5db4ab7dee68f0616be353cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-28 19:45:24 +00:00
Kai Koehne 2f06030e80 photoviewer: Fix translations
It doesn't make any sense to put .ts files into resources,
because QTranslator can only parse compiled .qm files.
Therefore the application does not load any translations
at all. This error was introduced in 70ce5f4d3e, when
the example was imported from qtdeclarative.

Anyhow, the previous version of the example in qtdeclarative
required the user to run lrelease manually, which is ugly
and made the example unfit for automatic testing.

Instead, use the new capabilities of qmake to compile
and embed translation files automatically.

Change-Id: Ic02171bfc9994ece3da658b69f0de0a27cb39cc5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-28 19:45:21 +00:00
Kai Koehne eade8d9153 photoviewer: Update .ts files
See 33a9fb9f4b57 for the corresponding change in qtdeclarative/5.11.

Change-Id: If7efac7f1aade858fa5fe92a3bc6d8aee7426407
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-26 07:58:09 +00:00
Venugopal Shivashankar 70ce5f4d3e Move demos to qtdoc repository
These demos use several modules and moving them allows to use for
example Qt Quick Controls 2 in them.

The shared directory should be removed and the examples made
self-contained.

Change-Id: I5dc667d22388651894d7d145b65752bc5c5cf6cf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-07-09 12:43:59 +00:00
Frederik Gladhorn 230db034cf Build demo examples directory
The directory will host more demos in the future so it is
wise to enable CI to build it and report issues, if any.

Change-Id: I97fbe8fc7589ec2c18e1dcb32c02a40332f9453b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-29 09:46:23 +00:00
Nico Vertriest d6686a578d Doc: Move coffeemachine examples to examples/demos
-Also add license file for TitilliumWeb-Regular.ttf
-Add qt_qttribution.json and LICENSE.txt

Task-number: QTBUG-68357
Change-Id: I705a28ed9f113e7ad3cca1b93eb162cc223d9d2d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-07 11:07:19 +00:00