summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2017-07-03 17:14:57 +0200
committerKai Koehne <kai.koehne@qt.io>2017-07-13 12:44:18 +0000
commita0f7ba909905ea917f47154cb5b18b8f108e0613 (patch)
treeb72888ae7f0a32bfa20c4678bd919130eca827ae
parent82adf72d1eb3f2ec8e212a55fdcc3151863664c8 (diff)
Properly document third party code in examples
Move files from marked, markdown.css to a 3rdparty directory, and properly document them with a qt_attribution.json file. Finally, reference the (automatically generated) documentation in the respective examples documentation. Task-number: QTBUG-61706 Change-Id: I8fd3f894e6e81647bc4804df784b1e00b83d12d6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc14
-rw-r--r--examples/webengine/recipebrowser/recipebrowser.pro4
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKDOWN-LICENSE.txt16
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKED-LICENSE.txt (renamed from examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md)4
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md12
-rw-r--r--examples/webengine/recipebrowser/resources/pages/assets/3rdparty/qt_attribution.json35
-rw-r--r--examples/webengine/recipebrowser/resources/resources.qrc1
-rw-r--r--examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc15
-rw-r--r--examples/webenginewidgets/markdowneditor/markdowneditor.pro3
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt16
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt (renamed from examples/webenginewidgets/markdowneditor/3RDPARTY.md)4
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css (renamed from examples/webenginewidgets/markdowneditor/resources/markdown.css)0
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.min.js (renamed from examples/webenginewidgets/markdowneditor/resources/marked.min.js)0
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json35
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/default.md2
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/index.html4
-rw-r--r--examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc4
17 files changed, 140 insertions, 29 deletions
diff --git a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
index d33f6bf10..7b8c6d5d0 100644
--- a/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
+++ b/examples/webengine/recipebrowser/doc/src/recipebrowser.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -213,4 +213,16 @@
\quotefromfile webengine/recipebrowser/resources/pages/soup.html
\printuntil </html>
+ \section1 Files and Attributions
+
+ The example bundles the following code with third-party licenses:
+
+ \table
+ \row
+ \li \l{recipebrowser-marked}{Marked}
+ \li MIT License
+ \row
+ \li \l{recipebrowser-markdowncss}{Markdown.css}
+ \li Apache License 2.0
+ \endtable
*/
diff --git a/examples/webengine/recipebrowser/recipebrowser.pro b/examples/webengine/recipebrowser/recipebrowser.pro
index ea6db13fb..c7e4dcaf8 100644
--- a/examples/webengine/recipebrowser/recipebrowser.pro
+++ b/examples/webengine/recipebrowser/recipebrowser.pro
@@ -10,5 +10,9 @@ SOURCES += main.cpp
RESOURCES += resources/resources.qrc
+DISTFILES += \
+ resources/pages/assets/3rdparty/MARKDOWN-LICENSE.txt \
+ resources/pages/assets/3rdparty/MARKED-LICENSE.txt
+
target.path = $$[QT_INSTALL_EXAMPLES]/webengine/recipebrowser
INSTALLS += target
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKDOWN-LICENSE.txt b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKDOWN-LICENSE.txt
new file mode 100644
index 000000000..23c52cc43
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKDOWN-LICENSE.txt
@@ -0,0 +1,16 @@
+Copyright 2011 Kevin Burke unless otherwise noted.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Some content is copyrighted by Twitter, Inc., and also released under an
+Apache License; these sections are noted in the source.
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKED-LICENSE.txt
index 9e91ab302..a7b812ed6 100644
--- a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/3RDPARTY.md
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/MARKED-LICENSE.txt
@@ -1,6 +1,3 @@
-## markd license
-
-```
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -20,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-```
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md
deleted file mode 100644
index 8f9c807aa..000000000
--- a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/default.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## WebEngine Markdown Editor Example
-
-This example uses [QWebEngineView](http://doc.qt.io/qt-5/qwebengineview.html)
-to preview text written using the [Markdown](https://en.wikipedia.org/wiki/Markdown)
-syntax.
-
-### Acknowledgments
-
-The conversion from Markdown to HTML is done with the help of the
-[marked JavaScript library](https://github.com/chjj/marked) by _Christopher Jeffrey_.
-The [style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css)
-was created by _Kevin Burke_.
diff --git a/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/qt_attribution.json b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/qt_attribution.json
new file mode 100644
index 000000000..42947ca0b
--- /dev/null
+++ b/examples/webengine/recipebrowser/resources/pages/assets/3rdparty/qt_attribution.json
@@ -0,0 +1,35 @@
+[
+ {
+ "Id": "recipebrowser-marked",
+ "Name": "Marked (WebEngine RecipeBrowser example)",
+ "QDocModule": "qtwebengine",
+ "QtUsage": "Marked is used in the WebEngine RecipeBrowser example",
+ "QtParts": [ "examples" ],
+ "Files": "marked.min.js",
+ "Description": "A full-featured markdown parser and compiler, written in JavaScript. Built for speed.",
+ "Homepage": "https://github.com/chjj/marked",
+ "Version": "0.3.6",
+ "DownloadLocation": "https://github.com/chjj/marked/blob/v0.3.6/marked.min.js",
+ "Copyright": "Copyright (c) 2011-2014, Christopher Jeffrey",
+ "License": "MIT License",
+ "LicenseId": "MIT",
+ "LicenseFile": "MARKED-LICENSE.txt"
+ },
+ {
+ "Id": "recipebrowser-markdowncss",
+ "Name": "Markdown.css (WebEngine RecipeBrowser example)",
+ "QDocModule": "qtwebengine",
+ "QtUsage": "markdown.css is used in the WebEngine RecipeBrowser example",
+ "QtParts": [ "examples" ],
+ "Files": "markdown.css",
+ "Description": "Markdown.css is better default styling for your Markdown files.",
+ "Homepage": "https://kevinburke.bitbucket.io/markdowncss/",
+ "Version": "188530e4b5d020d7e237fc6b26be13ebf4a8def3",
+ "DownloadLocation": "https://bitbucket.org/kevinburke/markdowncss/src/188530e4b5d020d7e237fc6b26be13ebf4a8def3/markdown.css",
+ "Copyright": "Copyright 2011 Kevin Burke
+ Copyright Twitter Inc.",
+ "License": "Apache License 2.0",
+ "LicenseId": "Apache-2.0",
+ "LicenseFile": "MARKDOWN-LICENSE.txt"
+ }
+]
diff --git a/examples/webengine/recipebrowser/resources/resources.qrc b/examples/webengine/recipebrowser/resources/resources.qrc
index ae5aa2ed3..88919159b 100644
--- a/examples/webengine/recipebrowser/resources/resources.qrc
+++ b/examples/webengine/recipebrowser/resources/resources.qrc
@@ -12,7 +12,6 @@
<file>pages/cupcakes.html</file>
<file>pages/assets/3rdparty/marked.min.js</file>
- <file>pages/assets/3rdparty/default.md</file>
<file>pages/assets/3rdparty/markdown.css</file>
<file>pages/assets/custom.css</file>
<file>pages/assets/custom.js</file>
diff --git a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
index a20dc04c5..b06d4ee84 100644
--- a/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
+++ b/examples/webenginewidgets/markdowneditor/doc/src/markdowneditor.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -166,5 +166,18 @@
Finally, we set up the web channel to access the \c content proxy object
and make sure that \c updateText() is called whenever \c content.text
changes.
+
+ \section1 Files and Attributions
+
+ The example bundles the following code with third-party licenses:
+
+ \table
+ \row
+ \li \l{markdowneditor-marked}{Marked}
+ \li MIT License
+ \row
+ \li \l{markdowneditor-markdowncss}{Markdown.css}
+ \li Apache License 2.0
+ \endtable
*/
diff --git a/examples/webenginewidgets/markdowneditor/markdowneditor.pro b/examples/webenginewidgets/markdowneditor/markdowneditor.pro
index bfd16698a..2f58ae061 100644
--- a/examples/webenginewidgets/markdowneditor/markdowneditor.pro
+++ b/examples/webenginewidgets/markdowneditor/markdowneditor.pro
@@ -21,7 +21,8 @@ FORMS += \
mainwindow.ui
DISTFILES += \
- 3RDPARTY.md
+ resources/3rdparty/MARKDOWN-LICENSE.txt \
+ resources/3rdparty/MARKED-LICENSE.txt
# install
target.path = $$[QT_INSTALL_EXAMPLES]/webenginewidgets/markdowneditor
diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt
new file mode 100644
index 000000000..23c52cc43
--- /dev/null
+++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKDOWN-LICENSE.txt
@@ -0,0 +1,16 @@
+Copyright 2011 Kevin Burke unless otherwise noted.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Some content is copyrighted by Twitter, Inc., and also released under an
+Apache License; these sections are noted in the source.
diff --git a/examples/webenginewidgets/markdowneditor/3RDPARTY.md b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt
index 9e91ab302..a7b812ed6 100644
--- a/examples/webenginewidgets/markdowneditor/3RDPARTY.md
+++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/MARKED-LICENSE.txt
@@ -1,6 +1,3 @@
-## markd license
-
-```
Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/)
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -20,4 +17,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-```
diff --git a/examples/webenginewidgets/markdowneditor/resources/markdown.css b/examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css
index 24fc2ffe2..24fc2ffe2 100644
--- a/examples/webenginewidgets/markdowneditor/resources/markdown.css
+++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/markdown.css
diff --git a/examples/webenginewidgets/markdowneditor/resources/marked.min.js b/examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.min.js
index f3542fff0..f3542fff0 100644
--- a/examples/webenginewidgets/markdowneditor/resources/marked.min.js
+++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/marked.min.js
diff --git a/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json b/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json
new file mode 100644
index 000000000..3400ef27a
--- /dev/null
+++ b/examples/webenginewidgets/markdowneditor/resources/3rdparty/qt_attribution.json
@@ -0,0 +1,35 @@
+[
+ {
+ "Id": "markdowneditor-marked",
+ "Name": "Marked (WebEngine Markdown Editor example)",
+ "QDocModule": "qtwebengine",
+ "QtUsage": "Marked is used in the WebEngine MarkDown Editor example",
+ "QtParts": [ "examples" ],
+ "Files": "marked.min.js",
+ "Description": "A full-featured markdown parser and compiler, written in JavaScript. Built for speed.",
+ "Homepage": "https://github.com/chjj/marked",
+ "Version": "0.3.6",
+ "DownloadLocation": "https://github.com/chjj/marked/blob/v0.3.6/marked.min.js",
+ "Copyright": "Copyright (c) 2011-2014, Christopher Jeffrey",
+ "License": "MIT License",
+ "LicenseId": "MIT",
+ "LicenseFile": "MARKED-LICENSE.txt"
+ },
+ {
+ "Id": "markdowneditor-markdowncss",
+ "Name": "Markdown.css (WebEngine Markdown Editor example)",
+ "QDocModule": "qtwebengine",
+ "QtUsage": "markdown.css is used in the WebEngine MarkDown Editor example",
+ "QtParts": [ "examples" ],
+ "Files": "markdown.css",
+ "Description": "Markdown.css is better default styling for your Markdown files.",
+ "Homepage": "https://kevinburke.bitbucket.io/markdowncss/",
+ "Version": "188530e4b5d020d7e237fc6b26be13ebf4a8def3",
+ "DownloadLocation": "https://bitbucket.org/kevinburke/markdowncss/src/188530e4b5d020d7e237fc6b26be13ebf4a8def3/markdown.css",
+ "Copyright": "Copyright 2011 Kevin Burke
+ Copyright Twitter Inc.",
+ "License": "Apache License 2.0",
+ "LicenseId": "Apache-2.0",
+ "LicenseFile": "MARKDOWN-LICENSE.txt"
+ }
+]
diff --git a/examples/webenginewidgets/markdowneditor/resources/default.md b/examples/webenginewidgets/markdowneditor/resources/default.md
index 8f9c807aa..af835fa4d 100644
--- a/examples/webenginewidgets/markdowneditor/resources/default.md
+++ b/examples/webenginewidgets/markdowneditor/resources/default.md
@@ -8,5 +8,5 @@ syntax.
The conversion from Markdown to HTML is done with the help of the
[marked JavaScript library](https://github.com/chjj/marked) by _Christopher Jeffrey_.
-The [style sheet](http://kevinburke.bitbucket.org/markdowncss/markdown.css)
+The [style sheet](https://kevinburke.bitbucket.io/markdowncss/)
was created by _Kevin Burke_.
diff --git a/examples/webenginewidgets/markdowneditor/resources/index.html b/examples/webenginewidgets/markdowneditor/resources/index.html
index 2f45479ed..8623a0642 100644
--- a/examples/webenginewidgets/markdowneditor/resources/index.html
+++ b/examples/webenginewidgets/markdowneditor/resources/index.html
@@ -2,8 +2,8 @@
<html lang="en">
<meta charset="utf-8">
<head>
- <link rel="stylesheet" type="text/css" href="markdown.css">
- <script src="marked.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="3rdparty/markdown.css">
+ <script src="3rdparty/marked.min.js"></script>
<script src="qwebchannel.js"></script>
</head>
<body>
diff --git a/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc b/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc
index 8b7471a9c..9a6bd3801 100644
--- a/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc
+++ b/examples/webenginewidgets/markdowneditor/resources/markdowneditor.qrc
@@ -2,8 +2,8 @@
<qresource prefix="/">
<file>index.html</file>
<file>qwebchannel.js</file>
- <file>marked.min.js</file>
+ <file>3rdparty/marked.min.js</file>
<file>default.md</file>
- <file>markdown.css</file>
+ <file>3rdparty/markdown.css</file>
</qresource>
</RCC>