Format code using clang-format

This commit is contained in:
Luis Ángel San Martín
2019-05-30 19:46:37 +02:00
parent e0eb94e3ae
commit e3ec56aa43
356 changed files with 19824 additions and 21874 deletions

View File

@ -2,54 +2,52 @@
#include <QCoreApplication>
PackageManager::PackageManager()
:_7z(0)
: _7z(0)
{
}
void PackageManager::createPackage(const QString & libraryPath,const QString & dest)
void PackageManager::createPackage(const QString &libraryPath, const QString &dest)
{
QStringList attributes;
attributes << "a" << "-y" << "-ttar" << dest+".clc" << libraryPath ;
_7z = new QProcess();
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError)));
connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SIGNAL(exported()));
QStringList attributes;
attributes << "a"
<< "-y"
<< "-ttar" << dest + ".clc" << libraryPath;
_7z = new QProcess();
connect(_7z, SIGNAL(error(QProcess::ProcessError)), this, SLOT(openingError(QProcess::ProcessError)));
connect(_7z, SIGNAL(finished(int, QProcess::ExitStatus)), this, SIGNAL(exported()));
#if defined Q_OS_UNIX && !defined Q_OS_MAC
_7z->start("7z",attributes); //TODO: use 7z.so
_7z->start("7z", attributes); //TODO: use 7z.so
#else
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7zip",attributes); //TODO: use 7z.dll
_7z->start(QCoreApplication::applicationDirPath() + "/utils/7zip", attributes); //TODO: use 7z.dll
#endif
}
void PackageManager::extractPackage(const QString & packagePath,const QString & destDir)
void PackageManager::extractPackage(const QString &packagePath, const QString &destDir)
{
QStringList attributes;
QString output = "-o";
output += destDir;
attributes << "x" << "-y" << output << packagePath;
_7z = new QProcess();
connect(_7z,SIGNAL(error(QProcess::ProcessError)),this,SLOT(openingError(QProcess::ProcessError)));
connect(_7z,SIGNAL(finished(int,QProcess::ExitStatus)),this,SIGNAL(imported()));
QStringList attributes;
QString output = "-o";
output += destDir;
attributes << "x"
<< "-y" << output << packagePath;
_7z = new QProcess();
connect(_7z, SIGNAL(error(QProcess::ProcessError)), this, SLOT(openingError(QProcess::ProcessError)));
connect(_7z, SIGNAL(finished(int, QProcess::ExitStatus)), this, SIGNAL(imported()));
#if defined Q_OS_UNIX && !defined Q_OS_MAC
_7z->start("7z",attributes); //TODO: use 7z.so
_7z->start("7z", attributes); //TODO: use 7z.so
#else
_7z->start(QCoreApplication::applicationDirPath()+"/utils/7zip",attributes); //TODO: use 7z.dll
_7z->start(QCoreApplication::applicationDirPath() + "/utils/7zip", attributes); //TODO: use 7z.dll
#endif
}
void PackageManager::cancel()
{
if(_7z!=0)
{
_7z->disconnect();
_7z->kill();
if(creating)
{
//TODO remove dest+".clc"
}
else
{
//TODO fixed: is done by libraryWindow
}
}
if (_7z != 0) {
_7z->disconnect();
_7z->kill();
if (creating) {
//TODO remove dest+".clc"
} else {
//TODO fixed: is done by libraryWindow
}
}
}