ui: Show Sourcetrail license on top in licenses window
* updated versions and license files of some 3rd party libraries
This commit is contained in:
@@ -4,7 +4,7 @@ LLVM Release License
|
|||||||
University of Illinois/NCSA
|
University of Illinois/NCSA
|
||||||
Open Source License
|
Open Source License
|
||||||
|
|
||||||
Copyright (c) 2007-2018 University of Illinois at Urbana-Champaign.
|
Copyright (c) 2007-2019 University of Illinois at Urbana-Champaign.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Developed by:
|
Developed by:
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
GENERAL
|
||||||
|
-------
|
||||||
|
|
||||||
|
Qt is available under a commercial license with various pricing models and packages that meet a variety of needs. Commercial Qt license keeps your code proprietary where only you can control and monetize on your end product’s development, user experience and distribution. You also get great perks like additional functionality, productivity enhancing tools, world-class support and a close strategic relationship with The Qt Company to make sure your product and development goals are met.
|
||||||
|
|
||||||
|
Qt has been created under the belief of open development and providing freedom and choice to developers. To support that, The Qt Company also licenses Qt under open source licenses, where most of the functionality is available under LGPLv3. It should be noted that the tools as well as some add-on components are available only under GPLv3. In order to preserve the true meaning of open development and uphold the spirit of free software, it is imperative that the rules and regulations of open source licenses are followed. If you use Qt under open-source licenses, you need to make sure that you comply with all the licenses of the components you use.
|
||||||
|
|
||||||
|
Qt also contains some 3rd party components that are available under different open-source licenses. Please refer to the documentation for more details on 3rd party licenses used in Qt.
|
||||||
|
|
||||||
|
|
||||||
GPLv3 and LGPLv3
|
GPLv3 and LGPLv3
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|||||||
@@ -17,18 +17,20 @@ endfunction(ReadLicense)
|
|||||||
function(AddLicense softwareName softwareVersion softwareURL licenseFile)
|
function(AddLicense softwareName softwareVersion softwareURL licenseFile)
|
||||||
ReadLicense(${licenseFile} ${softwareName}_license)
|
ReadLicense(${licenseFile} ${softwareName}_license)
|
||||||
set(LICENSES ${LICENSES} PARENT_SCOPE)
|
set(LICENSES ${LICENSES} PARENT_SCOPE)
|
||||||
set(LICENSE_ARRAY "${LICENSE_ARRAY}\n\tThirdPartyLicense(\"${softwareName}\", \"${softwareVersion}\", \"${softwareURL}\", ${softwareName}_license)," PARENT_SCOPE)
|
set(LICENSE_ARRAY "${LICENSE_ARRAY}\n\tLicenseInfo(\"${softwareName}\", \"${softwareVersion}\", \"${softwareURL}\", ${softwareName}_license)," PARENT_SCOPE)
|
||||||
endfunction(AddLicense)
|
endfunction(AddLicense)
|
||||||
|
|
||||||
|
ReadLicense(${CMAKE_SOURCE_DIR}/LICENSE.txt Sourcetrail_license)
|
||||||
|
set(LICENSE_APP "LicenseInfo(\"Sourcetrail\", \"${VERSION_STRING}\", \"https://www.sourcetrail.com\", Sourcetrail_license)")
|
||||||
|
|
||||||
AddLicense("Boost" "1.64" "http://www.boost.org" "${LICENSEFOLDER}/license_boost.txt")
|
AddLicense("Boost" "1.68" "http://www.boost.org" "${LICENSEFOLDER}/license_boost.txt")
|
||||||
AddLicense("catch" "2.5.0" "https://github.com/catchorg/Catch2" "${LICENSEFOLDER}/license_catch.txt")
|
AddLicense("catch" "2.5.0" "https://github.com/catchorg/Catch2" "${LICENSEFOLDER}/license_catch.txt")
|
||||||
AddLicense("Clang" "7.0.0" "http://clang.llvm.org/" "${LICENSEFOLDER}/license_clang.txt")
|
AddLicense("Clang" "8.0.1" "http://clang.llvm.org/" "${LICENSEFOLDER}/license_clang.txt")
|
||||||
AddLicense("CppSQLite" "3.2" "http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite" "${LICENSEFOLDER}/license_cpp_sqlite.txt")
|
AddLicense("CppSQLite" "3.2" "http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite" "${LICENSEFOLDER}/license_cpp_sqlite.txt")
|
||||||
AddLicense("Eclipse" "" "https://github.com/eclipse/eclipse.jdt.core" "${LICENSEFOLDER}/license_eclipse.txt")
|
AddLicense("EclipseJDT" "" "https://github.com/eclipse/eclipse.jdt.core" "${LICENSEFOLDER}/license_eclipse.txt")
|
||||||
AddLicense("Gradle" "4.2" "https://github.com/gradle/gradle" "${LICENSEFOLDER}/license_gradle.txt")
|
AddLicense("Gradle" "4.2" "https://github.com/gradle/gradle" "${LICENSEFOLDER}/license_gradle.txt")
|
||||||
AddLicense("OpenSSL" "" "https://www.openssl.org/" "${LICENSEFOLDER}/license_openssl.txt")
|
AddLicense("OpenSSL" "" "https://www.openssl.org/" "${LICENSEFOLDER}/license_openssl.txt")
|
||||||
AddLicense("Qt" "5.10.1" "http://qt.io" "${LICENSEFOLDER}/license_qt.txt")
|
AddLicense("Qt" "5.12.6" "http://qt.io" "${LICENSEFOLDER}/license_qt.txt")
|
||||||
AddLicense("TinyXML" "2.0" "https://sourceforge.net/projects/tinyxml/" "${LICENSEFOLDER}/license_tinyxml.txt")
|
AddLicense("TinyXML" "2.0" "https://sourceforge.net/projects/tinyxml/" "${LICENSEFOLDER}/license_tinyxml.txt")
|
||||||
|
|
||||||
set(LICENSE_ARRAY "${LICENSE_ARRAY}\n")
|
set(LICENSE_ARRAY "${LICENSE_ARRAY}\n")
|
||||||
|
|||||||
+6
-4
@@ -3,20 +3,20 @@
|
|||||||
|
|
||||||
// This File(licenses.h) is generated with CMake
|
// This File(licenses.h) is generated with CMake
|
||||||
|
|
||||||
struct ThirdPartyLicense {
|
struct LicenseInfo {
|
||||||
const char* name;
|
const char* name;
|
||||||
const char* version;
|
const char* version;
|
||||||
const char* url;
|
const char* url;
|
||||||
const char* license;
|
const char* license;
|
||||||
|
|
||||||
ThirdPartyLicense()
|
LicenseInfo()
|
||||||
: name(0)
|
: name(0)
|
||||||
, version(0)
|
, version(0)
|
||||||
, url(0)
|
, url(0)
|
||||||
, license(0)
|
, license(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ThirdPartyLicense(const char* name, const char* version, const char* url, const char* license)
|
LicenseInfo(const char* name, const char* version, const char* url, const char* license)
|
||||||
: name(name)
|
: name(name)
|
||||||
, version(version)
|
, version(version)
|
||||||
, url(url)
|
, url(url)
|
||||||
@@ -32,7 +32,9 @@ struct ThirdPartyLicense {
|
|||||||
// License Textfiles
|
// License Textfiles
|
||||||
@LICENSES@
|
@LICENSES@
|
||||||
|
|
||||||
static const ThirdPartyLicense licenses3rdParties[] = {
|
static const LicenseInfo licenseApp = @LICENSE_APP@;
|
||||||
|
|
||||||
|
static const LicenseInfo licenses3rdParties[] = {
|
||||||
@LICENSE_ARRAY@
|
@LICENSE_ARRAY@
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -247,8 +247,6 @@ add_files(
|
|||||||
|
|
||||||
qt/window/QtAbout.cpp
|
qt/window/QtAbout.cpp
|
||||||
qt/window/QtAbout.h
|
qt/window/QtAbout.h
|
||||||
qt/window/QtAboutLicense.cpp
|
|
||||||
qt/window/QtAboutLicense.h
|
|
||||||
qt/window/QtBookmarkBrowser.cpp
|
qt/window/QtBookmarkBrowser.cpp
|
||||||
qt/window/QtBookmarkBrowser.h
|
qt/window/QtBookmarkBrowser.h
|
||||||
qt/window/QtBookmarkCreator.cpp
|
qt/window/QtBookmarkCreator.cpp
|
||||||
@@ -265,6 +263,8 @@ add_files(
|
|||||||
qt/window/QtKeyboardShortcuts.h
|
qt/window/QtKeyboardShortcuts.h
|
||||||
qt/window/QtKnownProgressDialog.cpp
|
qt/window/QtKnownProgressDialog.cpp
|
||||||
qt/window/QtKnownProgressDialog.h
|
qt/window/QtKnownProgressDialog.h
|
||||||
|
qt/window/QtLicenseWindow.cpp
|
||||||
|
qt/window/QtLicenseWindow.h
|
||||||
qt/window/QtMainWindow.cpp
|
qt/window/QtMainWindow.cpp
|
||||||
qt/window/QtMainWindow.h
|
qt/window/QtMainWindow.h
|
||||||
qt/window/QtPathListDialog.cpp
|
qt/window/QtPathListDialog.cpp
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
#include "QtAboutLicense.h"
|
|
||||||
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
|
|
||||||
#include "licenses.h"
|
|
||||||
|
|
||||||
QtAboutLicense::QtAboutLicense(QWidget *parent)
|
|
||||||
: QtWindow(false, parent)
|
|
||||||
{
|
|
||||||
setScrollAble(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
QSize QtAboutLicense::sizeHint() const
|
|
||||||
{
|
|
||||||
return QSize(600, 600);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QtAboutLicense::populateWindow(QWidget* widget)
|
|
||||||
{
|
|
||||||
QVBoxLayout* layout = new QVBoxLayout(widget);
|
|
||||||
|
|
||||||
for (ThirdPartyLicense license : licenses3rdParties)
|
|
||||||
{
|
|
||||||
QLabel* licenseName = new QLabel();
|
|
||||||
licenseName->setText(
|
|
||||||
QString::fromLatin1(license.name) +
|
|
||||||
QString::fromLatin1(
|
|
||||||
std::string(license.version).empty() ?
|
|
||||||
"" :
|
|
||||||
(std::string(" (v") + license.version + ")").c_str()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
QFont _font = licenseName->font();
|
|
||||||
_font.setPixelSize(36);
|
|
||||||
_font.setBold(true);
|
|
||||||
licenseName->setFont(_font);
|
|
||||||
layout->addWidget(licenseName);
|
|
||||||
|
|
||||||
QLabel* licenseURL = new QLabel();
|
|
||||||
licenseURL->setText(QString::fromLatin1("<a href=\"%1\">%1</a>")
|
|
||||||
.arg(QString::fromLatin1(license.url)));
|
|
||||||
licenseURL->setOpenExternalLinks(true);
|
|
||||||
layout->addWidget(licenseURL);
|
|
||||||
|
|
||||||
QLabel* licenseText = new QLabel();
|
|
||||||
licenseText->setFixedWidth(450);
|
|
||||||
licenseText->setWordWrap(true);
|
|
||||||
licenseText->setText(QString::fromLatin1(license.license));
|
|
||||||
layout->addWidget(licenseText);
|
|
||||||
|
|
||||||
layout->addSpacing(50);
|
|
||||||
}
|
|
||||||
|
|
||||||
widget->setLayout(layout);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QtAboutLicense::windowReady()
|
|
||||||
{
|
|
||||||
updateTitle("3rd Party Licenses");
|
|
||||||
updateCloseButton("Close");
|
|
||||||
|
|
||||||
setNextVisible(false);
|
|
||||||
setPreviousVisible(false);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
#include "QtLicenseWindow.h"
|
||||||
|
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
#include "licenses.h"
|
||||||
|
|
||||||
|
QtLicenseWindow::QtLicenseWindow(QWidget *parent)
|
||||||
|
: QtWindow(false, parent)
|
||||||
|
{
|
||||||
|
setScrollAble(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize QtLicenseWindow::sizeHint() const
|
||||||
|
{
|
||||||
|
return QSize(650, 600);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtLicenseWindow::populateWindow(QWidget* widget)
|
||||||
|
{
|
||||||
|
QVBoxLayout* layout = new QVBoxLayout(widget);
|
||||||
|
|
||||||
|
QLabel* licenseName = new QLabel();
|
||||||
|
licenseName->setText(
|
||||||
|
QString::fromLatin1(licenseApp.name) +
|
||||||
|
QString::fromLatin1(
|
||||||
|
std::string(licenseApp.version).empty() ?
|
||||||
|
"" :
|
||||||
|
(std::string(" (v") + licenseApp.version + ")").c_str()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
QFont _font = licenseName->font();
|
||||||
|
_font.setPixelSize(36);
|
||||||
|
_font.setBold(true);
|
||||||
|
licenseName->setFont(_font);
|
||||||
|
layout->addWidget(licenseName);
|
||||||
|
|
||||||
|
QLabel* licenseURL = new QLabel();
|
||||||
|
licenseURL->setText(QString::fromLatin1("<a href=\"%1\">%1</a>")
|
||||||
|
.arg(QString::fromLatin1(licenseApp.url)));
|
||||||
|
licenseURL->setOpenExternalLinks(true);
|
||||||
|
layout->addWidget(licenseURL);
|
||||||
|
|
||||||
|
QLabel* licenseText = new QLabel();
|
||||||
|
licenseText->setFixedWidth(550);
|
||||||
|
licenseText->setWordWrap(true);
|
||||||
|
licenseText->setText(QString::fromLatin1(licenseApp.license));
|
||||||
|
layout->addWidget(licenseText);
|
||||||
|
|
||||||
|
layout->addSpacing(30);
|
||||||
|
|
||||||
|
QLabel* header3rdParties = new QLabel(
|
||||||
|
"<b>Copyrights and Licenses for Third Party Software Distributed with Sourcetrail:</b><br />"
|
||||||
|
"Sourcetaril contains code written by the following third parties that have <br />"
|
||||||
|
"additional or alternate copyrights, licenses, and/or restrictions:");
|
||||||
|
layout->addWidget(header3rdParties);
|
||||||
|
|
||||||
|
layout->addSpacing(30);
|
||||||
|
|
||||||
|
for (LicenseInfo license : licenses3rdParties)
|
||||||
|
{
|
||||||
|
QLabel* licenseName = new QLabel();
|
||||||
|
licenseName->setText(
|
||||||
|
QString::fromLatin1(license.name) +
|
||||||
|
QString::fromLatin1(
|
||||||
|
std::string(license.version).empty() ?
|
||||||
|
"" :
|
||||||
|
(std::string(" (v") + license.version + ")").c_str()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
licenseName->setFont(_font);
|
||||||
|
layout->addWidget(licenseName);
|
||||||
|
|
||||||
|
QLabel* licenseURL = new QLabel();
|
||||||
|
licenseURL->setText(QString::fromLatin1("<a href=\"%1\">%1</a>")
|
||||||
|
.arg(QString::fromLatin1(license.url)));
|
||||||
|
licenseURL->setOpenExternalLinks(true);
|
||||||
|
layout->addWidget(licenseURL);
|
||||||
|
|
||||||
|
QLabel* licenseText = new QLabel();
|
||||||
|
licenseText->setFixedWidth(550);
|
||||||
|
licenseText->setWordWrap(true);
|
||||||
|
licenseText->setText(QString::fromLatin1(license.license));
|
||||||
|
layout->addWidget(licenseText);
|
||||||
|
|
||||||
|
layout->addSpacing(30);
|
||||||
|
}
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QtLicenseWindow::windowReady()
|
||||||
|
{
|
||||||
|
updateTitle("License");
|
||||||
|
updateCloseButton("Close");
|
||||||
|
|
||||||
|
setNextVisible(false);
|
||||||
|
setPreviousVisible(false);
|
||||||
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
#ifndef QT_ABOUT_LICENSE_H
|
#ifndef QT_LICENSE_WINDOW_H
|
||||||
#define QT_ABOUT_LICENSE_H
|
#define QT_LICENSE_WINDOW_H
|
||||||
|
|
||||||
#include "QtWindow.h"
|
#include "QtWindow.h"
|
||||||
|
|
||||||
class QtAboutLicense
|
class QtLicenseWindow
|
||||||
: public QtWindow
|
: public QtWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
QtAboutLicense(QWidget* parent = 0);
|
QtLicenseWindow(QWidget* parent = 0);
|
||||||
QSize sizeHint() const override;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -17,4 +17,4 @@ protected:
|
|||||||
virtual void windowReady() override;
|
virtual void windowReady() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QT_ABOUT_LICENSE_H
|
#endif // QT_LICENSE_WINDOW_H
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
#include "QtViewWidgetWrapper.h"
|
#include "QtViewWidgetWrapper.h"
|
||||||
#include "QtProjectWizard.h"
|
#include "QtProjectWizard.h"
|
||||||
#include "QtAbout.h"
|
#include "QtAbout.h"
|
||||||
#include "QtAboutLicense.h"
|
|
||||||
#include "QtKeyboardShortcuts.h"
|
#include "QtKeyboardShortcuts.h"
|
||||||
|
#include "QtLicenseWindow.h"
|
||||||
#include "QtPreferencesWindow.h"
|
#include "QtPreferencesWindow.h"
|
||||||
#include "QtStartScreen.h"
|
#include "QtStartScreen.h"
|
||||||
#include "ApplicationSettings.h"
|
#include "ApplicationSettings.h"
|
||||||
@@ -524,7 +524,7 @@ void QtMainWindow::showBugtracker()
|
|||||||
|
|
||||||
void QtMainWindow::showLicenses()
|
void QtMainWindow::showLicenses()
|
||||||
{
|
{
|
||||||
QtAboutLicense* licenseWindow = createWindow<QtAboutLicense>();
|
QtLicenseWindow* licenseWindow = createWindow<QtLicenseWindow>();
|
||||||
licenseWindow->setup();
|
licenseWindow->setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1017,7 +1017,7 @@ void QtMainWindow::setupHelpMenu()
|
|||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
menu->addAction(tr("3rd Party Licenses"), this, &QtMainWindow::showLicenses);
|
menu->addAction(tr("License"), this, &QtMainWindow::showLicenses);
|
||||||
menu->addAction(tr("&About Sourcetrail"), this, &QtMainWindow::about);
|
menu->addAction(tr("&About Sourcetrail"), this, &QtMainWindow::about);
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|||||||
Reference in New Issue
Block a user