File: window-license-agreement.cpp

package info (click to toggle)
obs-studio 22.0.3%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 23,052 kB
  • sloc: ansic: 134,708; cpp: 49,169; objc: 1,036; makefile: 829; sh: 410; python: 360
file content (23 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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("/usr/share/common-licenses/GPL-2");

	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));
}