mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Web UI code clean up
This commit is contained in:
@@ -41,35 +41,28 @@ void HttpResponseGenerator::setMessage(const QString& message) {
|
||||
setMessage(message.toUtf8());
|
||||
}
|
||||
|
||||
void HttpResponseGenerator::stripMessage()
|
||||
{
|
||||
void HttpResponseGenerator::stripMessage() {
|
||||
message.clear();
|
||||
}
|
||||
|
||||
void HttpResponseGenerator::setContentTypeByExt(const QString ext)
|
||||
{
|
||||
if(ext == "css")
|
||||
{
|
||||
void HttpResponseGenerator::setContentTypeByExt(const QString& ext) {
|
||||
if(ext == "css") {
|
||||
setContentType("text/css");
|
||||
return;
|
||||
}
|
||||
if(ext == "gif")
|
||||
{
|
||||
if(ext == "gif") {
|
||||
setContentType("image/gif");
|
||||
return;
|
||||
}
|
||||
if(ext == "htm" || ext == "html")
|
||||
{
|
||||
if(ext == "htm" || ext == "html") {
|
||||
setContentType("text/html");
|
||||
return;
|
||||
}
|
||||
if(ext == "js")
|
||||
{
|
||||
if(ext == "js") {
|
||||
setContentType("text/javascript");
|
||||
return;
|
||||
}
|
||||
if(ext == "png")
|
||||
{
|
||||
if(ext == "png") {
|
||||
setContentType("image/x-png");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user