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

@ -3,24 +3,22 @@
#include "template.h"
#include "../static.h"
ErrorController::ErrorController(int errorCode)
:error(errorCode)
{}
void ErrorController::service(HttpRequest& request, HttpResponse& response)
: error(errorCode)
{
Q_UNUSED(request)
switch(error)
{
case 300:
response.setStatus(300,"redirect");
response.write("<html> <head> <meta http-equiv=\"refresh\" content=\"0; URL=/\"> </head> <body> </body> </html>", true);
break;
case 404:
response.setStatus(404,"not found");
response.write("404 not found",true);
break;
}
}
void ErrorController::service(HttpRequest &request, HttpResponse &response)
{
Q_UNUSED(request)
switch (error) {
case 300:
response.setStatus(300, "redirect");
response.write("<html> <head> <meta http-equiv=\"refresh\" content=\"0; URL=/\"> </head> <body> </body> </html>", true);
break;
case 404:
response.setStatus(404, "not found");
response.write("404 not found", true);
break;
}
}