New upstream version 0.16.2+dfsg1
This commit is contained in:
parent
67704ac59c
commit
6efda2859e
377 changed files with 7938 additions and 696 deletions
25
UI/window-license-agreement.cpp
Normal file
25
UI/window-license-agreement.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#include <string>
|
||||
#include <util/util.hpp>
|
||||
#include <util/platform.h>
|
||||
#include <platform.hpp>
|
||||
#include "window-license-agreement.hpp"
|
||||
#include "qt-wrappers.hpp"
|
||||
|
||||
using namespace std;
|
||||
|
||||
OBSLicenseAgreement::OBSLicenseAgreement(QWidget *parent)
|
||||
: QDialog (parent),
|
||||
ui (new Ui::OBSLicenseAgreement)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
string path;
|
||||
if (!GetDataFilePath("license/gplv2.txt", path))
|
||||
throw "Could not find license file";
|
||||
|
||||
BPtr<char> licenseText = os_quick_read_utf8_file(path.c_str());
|
||||
if (!licenseText || !*licenseText || strlen(licenseText) < 1000)
|
||||
throw "Invalid license file data";
|
||||
|
||||
ui->license->setPlainText(QT_UTF8(licenseText));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue