summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-16 14:57:44 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-11-16 14:57:44 +0100
commitef177a48f2c6c41549ef9d11a985ab2661942638 (patch)
treed6bc5aa8cbde95d9e9857ead4b509e8b04b524b9 /examples
parent396ca081d7b0d9dab7de14ebaec7943c3f857a24 (diff)
parente5bc5a6dbdd915e0b19cfc43e7af17e43c1a7878 (diff)
Merge branch '5.12' into dev
Conflicts: src/core/compositor/compositor.cpp src/core/compositor/compositor.h Change-Id: I8a4d73d728d93d95e499849f8778cc88dda2105e
Diffstat (limited to 'examples')
-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
-rw-r--r--examples/webenginewidgets/contentmanipulation/main.cpp1
-rw-r--r--examples/webenginewidgets/cookiebrowser/main.cpp1
-rw-r--r--examples/webenginewidgets/html2pdf/html2pdf.cpp1
-rw-r--r--examples/webenginewidgets/maps/main.cpp1
-rw-r--r--examples/webenginewidgets/markdowneditor/main.cpp1
-rw-r--r--examples/webenginewidgets/minimal/doc/src/minimal.qdoc10
-rw-r--r--examples/webenginewidgets/minimal/main.cpp1
-rw-r--r--examples/webenginewidgets/simplebrowser/main.cpp1
-rw-r--r--examples/webenginewidgets/spellchecker/main.cpp1
-rw-r--r--examples/webenginewidgets/stylesheetbrowser/main.cpp5
-rw-r--r--examples/webenginewidgets/videoplayer/main.cpp1
-rw-r--r--examples/webenginewidgets/webui/main.cpp1
17 files changed, 32 insertions, 9 deletions
diff --git a/examples/webengine/customdialogs/main.cpp b/examples/webengine/customdialogs/main.cpp
index dea664c5..35f39211 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 e021a81d..8d12afc7 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 21a15d19..9db6ea6a 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 63725d3e..18ba7b3e 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 284f75a7..6e6d6980 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();
diff --git a/examples/webenginewidgets/contentmanipulation/main.cpp b/examples/webenginewidgets/contentmanipulation/main.cpp
index e816079d..417b8718 100644
--- a/examples/webenginewidgets/contentmanipulation/main.cpp
+++ b/examples/webenginewidgets/contentmanipulation/main.cpp
@@ -54,6 +54,7 @@
int main(int argc, char * argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
diff --git a/examples/webenginewidgets/cookiebrowser/main.cpp b/examples/webenginewidgets/cookiebrowser/main.cpp
index 0ae5433b..2a7fe636 100644
--- a/examples/webenginewidgets/cookiebrowser/main.cpp
+++ b/examples/webenginewidgets/cookiebrowser/main.cpp
@@ -54,6 +54,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
MainWindow window(QUrl("http://qt.io"));
diff --git a/examples/webenginewidgets/html2pdf/html2pdf.cpp b/examples/webenginewidgets/html2pdf/html2pdf.cpp
index 5e293261..e9fc6953 100644
--- a/examples/webenginewidgets/html2pdf/html2pdf.cpp
+++ b/examples/webenginewidgets/html2pdf/html2pdf.cpp
@@ -119,6 +119,7 @@ void Html2PdfConverter::pdfPrintingFinished(const QString &filePath, bool succes
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setApplicationName("html2pdf");
QCoreApplication::setApplicationVersion(QT_VERSION_STR);
diff --git a/examples/webenginewidgets/maps/main.cpp b/examples/webenginewidgets/maps/main.cpp
index cad9c7ea..cfcfa06d 100644
--- a/examples/webenginewidgets/maps/main.cpp
+++ b/examples/webenginewidgets/maps/main.cpp
@@ -53,6 +53,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
diff --git a/examples/webenginewidgets/markdowneditor/main.cpp b/examples/webenginewidgets/markdowneditor/main.cpp
index de2dee60..b7a7905b 100644
--- a/examples/webenginewidgets/markdowneditor/main.cpp
+++ b/examples/webenginewidgets/markdowneditor/main.cpp
@@ -56,6 +56,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
diff --git a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
index 05ec9ee7..477ff521 100644
--- a/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
+++ b/examples/webenginewidgets/minimal/doc/src/minimal.qdoc
@@ -42,8 +42,14 @@
\section1 The Code
- In the \c main function we first set the Qt::AA_EnableHighDpiScaling.
- This lets the web view automatically scale on high-dpi displays.
+ 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{QWebEngineProfile::cachePath} and
+ \l{QWebEngineProfile::persistentStoragePath}).
+
+ We also set the Qt::AA_EnableHighDpiScaling attribute. This lets the web
+ view automatically scale on high-dpi displays.
Next, we instantiate a QApplication and a QWebEngineView. The URL
to load is taken from the command-line in \c commandLineUrlArgument and
diff --git a/examples/webenginewidgets/minimal/main.cpp b/examples/webenginewidgets/minimal/main.cpp
index f58e4d54..b31382ad 100644
--- a/examples/webenginewidgets/minimal/main.cpp
+++ b/examples/webenginewidgets/minimal/main.cpp
@@ -63,6 +63,7 @@ QUrl commandLineUrlArgument()
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
diff --git a/examples/webenginewidgets/simplebrowser/main.cpp b/examples/webenginewidgets/simplebrowser/main.cpp
index 5a8a0e65..7b77a4bd 100644
--- a/examples/webenginewidgets/simplebrowser/main.cpp
+++ b/examples/webenginewidgets/simplebrowser/main.cpp
@@ -67,6 +67,7 @@ QUrl commandLineUrlArgument()
int main(int argc, char **argv)
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
diff --git a/examples/webenginewidgets/spellchecker/main.cpp b/examples/webenginewidgets/spellchecker/main.cpp
index 90602f85..c2951fe0 100644
--- a/examples/webenginewidgets/spellchecker/main.cpp
+++ b/examples/webenginewidgets/spellchecker/main.cpp
@@ -53,6 +53,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QApplication app(argc, argv);
WebView view;
diff --git a/examples/webenginewidgets/stylesheetbrowser/main.cpp b/examples/webenginewidgets/stylesheetbrowser/main.cpp
index 54fce0ce..833ea6bb 100644
--- a/examples/webenginewidgets/stylesheetbrowser/main.cpp
+++ b/examples/webenginewidgets/stylesheetbrowser/main.cpp
@@ -55,12 +55,9 @@
int main(int argc, char *argv[])
{
- QCoreApplication::setOrganizationName("The Qt Company");
- QCoreApplication::setOrganizationDomain("www.qt.io");
- QCoreApplication::setApplicationName("StyleSheet Browser");
-
qRegisterMetaTypeStreamOperators<StyleSheet>("StyleSheet");
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
MainWindow w(QUrl("http://qt.io"));
diff --git a/examples/webenginewidgets/videoplayer/main.cpp b/examples/webenginewidgets/videoplayer/main.cpp
index cad9c7ea..cfcfa06d 100644
--- a/examples/webenginewidgets/videoplayer/main.cpp
+++ b/examples/webenginewidgets/videoplayer/main.cpp
@@ -53,6 +53,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
diff --git a/examples/webenginewidgets/webui/main.cpp b/examples/webenginewidgets/webui/main.cpp
index 3e9f61fe..0f6a3e87 100644
--- a/examples/webenginewidgets/webui/main.cpp
+++ b/examples/webenginewidgets/webui/main.cpp
@@ -57,6 +57,7 @@
int main(int argc, char *argv[])
{
+ QCoreApplication::setOrganizationName("QtExamples");
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
WebUiHandler::registerUrlScheme();