mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Clean up Web UI code
This commit is contained in:
parent
61faf34ef7
commit
5fe562c0fa
@ -104,7 +104,7 @@ void HttpConnection::write() {
|
||||
void HttpConnection::translateDocument(QString& data) {
|
||||
static QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),%µ&\\-\\.]+)\\)"));
|
||||
static QRegExp mnemonic("\\(?&([a-zA-Z]?\\))?");
|
||||
std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget",
|
||||
const std::string contexts[] = {"TransferListFiltersWidget", "TransferListWidget",
|
||||
"PropertiesWidget", "MainWindow", "HttpServer",
|
||||
"confirmDeletionDlg", "TrackerList", "TorrentFilesModel",
|
||||
"options_imp", "Preferences", "TrackersAdditionDlg",
|
||||
|
@ -41,10 +41,6 @@ void HttpResponseGenerator::setMessage(const QString& message) {
|
||||
setMessage(message.toUtf8());
|
||||
}
|
||||
|
||||
void HttpResponseGenerator::stripMessage() {
|
||||
message.clear();
|
||||
}
|
||||
|
||||
void HttpResponseGenerator::setContentTypeByExt(const QString& ext) {
|
||||
if(ext == "css") {
|
||||
setContentType("text/css");
|
||||
|
@ -40,10 +40,9 @@ class HttpResponseGenerator : public QHttpResponseHeader
|
||||
public:
|
||||
void setMessage(const QByteArray& message);
|
||||
void setMessage(const QString& message);
|
||||
void stripMessage();
|
||||
void setContentTypeByExt(const QString& ext);
|
||||
inline QByteArray toByteArray() const {
|
||||
return QHttpResponseHeader::toString().toLocal8Bit() + message;
|
||||
return QHttpResponseHeader::toString().toUtf8() + message;
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user