clang-format: Apply formatting

Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
This commit is contained in:
jp9000
2019-06-22 22:13:45 -07:00
parent 53615ee10f
commit f53df7da64
567 changed files with 34068 additions and 32903 deletions
+20 -19
View File
@@ -9,9 +9,7 @@
using namespace json11;
OBSAbout::OBSAbout(QWidget *parent)
: QDialog(parent),
ui(new Ui::OBSAbout)
OBSAbout::OBSAbout(QWidget *parent) : QDialog(parent), ui(new Ui::OBSAbout)
{
ui->setupUi(this);
@@ -20,29 +18,30 @@ OBSAbout::OBSAbout(QWidget *parent)
QString bitness;
QString ver;
if(sizeof(void*) == 4)
if (sizeof(void *) == 4)
bitness = " (32 bit)";
else if(sizeof(void*) == 8)
else if (sizeof(void *) == 8)
bitness = " (64 bit)";
#ifdef HAVE_OBSCONFIG_H
ver += OBS_VERSION;
ver += OBS_VERSION;
#else
ver += LIBOBS_API_MAJOR_VER + "." +
LIBOBS_API_MINOR_VER + "." +
LIBOBS_API_PATCH_VER;
ver += LIBOBS_API_MAJOR_VER + "." + LIBOBS_API_MINOR_VER + "." +
LIBOBS_API_PATCH_VER;
#endif
ui->version->setText(ver + bitness);
ui->contribute->setText(QTStr("About.Contribute"));
ui->donate->setText("&nbsp;&nbsp;<a href='https://obsproject.com/donate'>" +
QTStr("About.Donate") + "</a>");
ui->donate->setText(
"&nbsp;&nbsp;<a href='https://obsproject.com/donate'>" +
QTStr("About.Donate") + "</a>");
ui->donate->setTextInteractionFlags(Qt::TextBrowserInteraction);
ui->donate->setOpenExternalLinks(true);
ui->getInvolved->setText("&nbsp;&nbsp;<a href='https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst'>" +
QTStr("About.GetInvolved") + "</a>");
ui->getInvolved->setText(
"&nbsp;&nbsp;<a href='https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst'>" +
QTStr("About.GetInvolved") + "</a>");
ui->getInvolved->setTextInteractionFlags(Qt::TextBrowserInteraction);
ui->getInvolved->setOpenExternalLinks(true);
@@ -66,12 +65,14 @@ OBSAbout::OBSAbout(QWidget *parent)
OBSBasic *main = OBSBasic::Get();
if (main->patronJson.empty() && !main->patronJsonThread) {
RemoteTextThread *thread = new RemoteTextThread(
"https://obsproject.com/patreon/about-box.json",
"application/json");
QObject::connect(thread, &RemoteTextThread::Result,
main, &OBSBasic::UpdatePatronJson);
QObject::connect(thread, SIGNAL(Result(const QString &, const QString &)),
this, SLOT(ShowAbout()));
"https://obsproject.com/patreon/about-box.json",
"application/json");
QObject::connect(thread, &RemoteTextThread::Result, main,
&OBSBasic::UpdatePatronJson);
QObject::connect(
thread,
SIGNAL(Result(const QString &, const QString &)), this,
SLOT(ShowAbout()));
main->patronJsonThread.reset(thread);
thread->start();
} else {