mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Replace QMap with QHash
This commit is contained in:
parent
c004a84f84
commit
f4e7b8c6bf
@ -128,7 +128,7 @@ Http::Response Tracker::processRequest(const Http::Request &request, const Http:
|
|||||||
|
|
||||||
void Tracker::respondToAnnounceRequest()
|
void Tracker::respondToAnnounceRequest()
|
||||||
{
|
{
|
||||||
const QMap<QString, QByteArray> &queryParams = m_request.query;
|
const QHash<QString, QByteArray> &queryParams = m_request.query;
|
||||||
TrackerAnnounceRequest announceReq;
|
TrackerAnnounceRequest announceReq;
|
||||||
|
|
||||||
// IP
|
// IP
|
||||||
|
@ -98,8 +98,8 @@ namespace Http
|
|||||||
QString method;
|
QString method;
|
||||||
QString path;
|
QString path;
|
||||||
QStringMap headers;
|
QStringMap headers;
|
||||||
QMap<QString, QByteArray> query;
|
QHash<QString, QByteArray> query;
|
||||||
QStringMap posts;
|
QHash<QString, QString> posts;
|
||||||
QVector<UploadedFile> files;
|
QVector<UploadedFile> files;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QMap>
|
#include <QHash>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QSet>
|
#include <QSet>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
@ -36,8 +36,9 @@
|
|||||||
class QString;
|
class QString;
|
||||||
|
|
||||||
struct ISessionManager;
|
struct ISessionManager;
|
||||||
using StringMap = QMap<QString, QString>;
|
|
||||||
using DataMap = QMap<QString, QByteArray>;
|
using DataMap = QHash<QString, QByteArray>;
|
||||||
|
using StringMap = QHash<QString, QString>;
|
||||||
|
|
||||||
class APIController : public QObject
|
class APIController : public QObject
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ private:
|
|||||||
WebSession *m_currentSession = nullptr;
|
WebSession *m_currentSession = nullptr;
|
||||||
Http::Request m_request;
|
Http::Request m_request;
|
||||||
Http::Environment m_env;
|
Http::Environment m_env;
|
||||||
QMap<QString, QString> m_params;
|
QHash<QString, QString> m_params;
|
||||||
const QString m_cacheID;
|
const QString m_cacheID;
|
||||||
|
|
||||||
const QRegularExpression m_apiPathPattern {(QLatin1String("^/api/v2/(?<scope>[A-Za-z_][A-Za-z_0-9]*)/(?<action>[A-Za-z_][A-Za-z_0-9]*)$"))};
|
const QRegularExpression m_apiPathPattern {(QLatin1String("^/api/v2/(?<scope>[A-Za-z_][A-Za-z_0-9]*)/(?<action>[A-Za-z_][A-Za-z_0-9]*)$"))};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user