mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-28 16:45:38 +00:00
Format code according to newly added clang-format
_ /)
mo / )
|/)\)
/\_
\__|=
( )
__)(__
_____/ \\_____
| _ ___ _ ||
| | \ | | \ ||
| | | | | | ||
| |_/ | |_/ ||
| | \ | | ||
| | \ | | ||
| | \. _|_. | . ||
| ||
|repository history||
| ||
* | * ** * ** |** **
\))ejm97/.,(//,,..,,\||(,,.,\\,.((//
This commit is contained in:
+44
-45
@@ -1,65 +1,64 @@
|
||||
#include "Windows/MainWindow.h"
|
||||
#include "Code/Core.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QRegularExpression>
|
||||
#include <QRegularExpressionMatch>
|
||||
#include <QFileInfo>
|
||||
#include "Code/Core.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
RENDERDOC_LogText("QRenderDoc initialising.");
|
||||
RENDERDOC_LogText("QRenderDoc initialising.");
|
||||
|
||||
QString filename = "";
|
||||
bool temp = false;
|
||||
QString filename = "";
|
||||
bool temp = false;
|
||||
|
||||
for(int i = 0; i < argc; i++)
|
||||
{
|
||||
if(!QString::compare(argv[i], "--tempfile", Qt::CaseInsensitive))
|
||||
temp = true;
|
||||
}
|
||||
for(int i = 0; i < argc; i++)
|
||||
{
|
||||
if(!QString::compare(argv[i], "--tempfile", Qt::CaseInsensitive))
|
||||
temp = true;
|
||||
}
|
||||
|
||||
QString remoteHost = "";
|
||||
uint remoteIdent = 0;
|
||||
QString remoteHost = "";
|
||||
uint remoteIdent = 0;
|
||||
|
||||
for(int i = 0; i + 1 < argc; i++)
|
||||
{
|
||||
if(!QString::compare(argv[i], "--REMOTEACCESS", Qt::CaseInsensitive))
|
||||
{
|
||||
QRegularExpression regexp("^([a-zA-Z0-9_-]+:)?([0-9]+)$");
|
||||
for(int i = 0; i + 1 < argc; i++)
|
||||
{
|
||||
if(!QString::compare(argv[i], "--REMOTEACCESS", Qt::CaseInsensitive))
|
||||
{
|
||||
QRegularExpression regexp("^([a-zA-Z0-9_-]+:)?([0-9]+)$");
|
||||
|
||||
QRegularExpressionMatch match = regexp.match(argv[i + 1]);
|
||||
QRegularExpressionMatch match = regexp.match(argv[i + 1]);
|
||||
|
||||
if(match.hasMatch())
|
||||
{
|
||||
QString host = match.captured(1);
|
||||
if(match.hasMatch())
|
||||
{
|
||||
QString host = match.captured(1);
|
||||
|
||||
if(host.length() > 0 && host[host.length() - 1] == ':')
|
||||
host.chop(1);
|
||||
if(host.length() > 0 && host[host.length() - 1] == ':')
|
||||
host.chop(1);
|
||||
|
||||
bool ok = false;
|
||||
uint32_t ident = match.captured(2).toUInt(&ok);
|
||||
bool ok = false;
|
||||
uint32_t ident = match.captured(2).toUInt(&ok);
|
||||
|
||||
if(ok)
|
||||
{
|
||||
remoteHost = host;
|
||||
remoteIdent = ident;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ok)
|
||||
{
|
||||
remoteHost = host;
|
||||
remoteIdent = ident;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(argc > 1)
|
||||
{
|
||||
filename = argv[argc - 1];
|
||||
QFileInfo checkFile(filename);
|
||||
if(!checkFile.exists() || !checkFile.isFile())
|
||||
filename = "";
|
||||
}
|
||||
if(argc > 1)
|
||||
{
|
||||
filename = argv[argc - 1];
|
||||
QFileInfo checkFile(filename);
|
||||
if(!checkFile.exists() || !checkFile.isFile())
|
||||
filename = "";
|
||||
}
|
||||
|
||||
QApplication a(argc, argv);
|
||||
QApplication a(argc, argv);
|
||||
|
||||
Core core(filename, remoteHost, remoteIdent, temp);
|
||||
Core core(filename, remoteHost, remoteIdent, temp);
|
||||
|
||||
return a.exec();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user