summaryrefslogtreecommitdiffstats
path: root/examples/webengine
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-10-18 11:38:34 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-11-13 16:11:44 +0000
commitcfe53bce924e40c944850fd0418d53c8ba760dc1 (patch)
treeb8b119d19e9dd7a2802bee413ce8a74cace949c8 /examples/webengine
parent68524d22255c0e2a76b47caec3ef01f3d23d955c (diff)
Set organizationName of all examples to QtExamples
Group directories under ~/.cache and ~/.config. Fixes: QTBUG-71669 Change-Id: Ia55aeab8c0e38f58afcbda128f04fd3d85c3df5e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'examples/webengine')
-rw-r--r--examples/webengine/customdialogs/main.cpp1
-rw-r--r--examples/webengine/minimal/doc/src/minimal.qdoc12
-rw-r--r--examples/webengine/minimal/main.cpp1
-rw-r--r--examples/webengine/quicknanobrowser/main.cpp1
-rw-r--r--examples/webengine/recipebrowser/main.cpp1
5 files changed, 13 insertions, 3 deletions
diff --git a/examples/webengine/customdialogs/main.cpp b/examples/webengine/customdialogs/main.cpp
index dea664c59..35f39211d 100644
--- a/examples/webengine/customdialogs/main.cpp
+++ b/examples/webengine/customdialogs/main.cpp
@@ -65,6 +65,7 @@ typedef QGuiApplication Application;
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
Application app(argc, argv);
QtWebEngine::initialize();
diff --git a/examples/webengine/minimal/doc/src/minimal.qdoc b/examples/webengine/minimal/doc/src/minimal.qdoc
index e021a81d1..8d12afc7c 100644
--- a/examples/webengine/minimal/doc/src/minimal.qdoc
+++ b/examples/webengine/minimal/doc/src/minimal.qdoc
@@ -50,9 +50,15 @@
\skipto #include
\printto main
- In the \c main function we first set the Qt::AA_EnableHighDpiScaling
- attribute. This lets the web view automatically scale on high-dpi displays.
- Then we instantiate a QGuiApplication object.
+ In the \c main function we first set the
+ \l{QCoreApplication::organizationName} property. This affects the locations
+ where Qt WebEngine stores persistent and cached data (see also
+ \l{WebEngineProfile::cachePath} and
+ \l{WebEngineProfile::persistentStoragePath}).
+
+ We also set the Qt::AA_EnableHighDpiScaling attribute. This lets the web
+ view automatically scale on high-dpi displays. Then we instantiate a
+ QGuiApplication object.
Next, we call \l{QtWebEngine::initialize}, which makes sure that OpenGL
contexts can be shared between the main process and the dedicated renderer
diff --git a/examples/webengine/minimal/main.cpp b/examples/webengine/minimal/main.cpp
index 21a15d19c..9db6ea6aa 100644
--- a/examples/webengine/minimal/main.cpp
+++ b/examples/webengine/minimal/main.cpp
@@ -54,6 +54,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
diff --git a/examples/webengine/quicknanobrowser/main.cpp b/examples/webengine/quicknanobrowser/main.cpp
index 63725d3e2..18ba7b3e2 100644
--- a/examples/webengine/quicknanobrowser/main.cpp
+++ b/examples/webengine/quicknanobrowser/main.cpp
@@ -78,6 +78,7 @@ static QUrl startupUrl()
int main(int argc, char **argv)
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Application app(argc, argv);
diff --git a/examples/webengine/recipebrowser/main.cpp b/examples/webengine/recipebrowser/main.cpp
index 284f75a72..6e6d69804 100644
--- a/examples/webengine/recipebrowser/main.cpp
+++ b/examples/webengine/recipebrowser/main.cpp
@@ -56,6 +56,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QtWebEngine::initialize();