Browse Source

Use `std::pair` instead of `QPair`

PR #19548.
adaptive-webui-19844
Victor Chernyakin 1 year ago committed by GitHub
parent
commit
65930ddf94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/base/http/requestparser.cpp
  2. 1
      src/base/utils/net.cpp
  3. 3
      src/base/utils/net.h

3
src/base/http/requestparser.cpp

@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
#include "requestparser.h"
#include <algorithm>
#include <utility>
#include <QByteArrayView>
#include <QDebug>
@ -45,7 +46,7 @@ @@ -45,7 +46,7 @@
using namespace Http;
using namespace Utils::ByteArray;
using QStringPair = QPair<QString, QString>;
using QStringPair = std::pair<QString, QString>;
namespace
{

1
src/base/utils/net.cpp

@ -30,7 +30,6 @@ @@ -30,7 +30,6 @@
#include <QList>
#include <QNetworkInterface>
#include <QPair>
#include <QSslCertificate>
#include <QSslKey>
#include <QString>

3
src/base/utils/net.h

@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
#pragma once
#include <optional>
#include <utility>
#include <QtContainerFwd>
#include <QHostAddress>
@ -40,7 +41,7 @@ class QString; @@ -40,7 +41,7 @@ class QString;
namespace Utils::Net
{
// alias for `QHostAddress::parseSubnet()` return type
using Subnet = QPair<QHostAddress, int>;
using Subnet = std::pair<QHostAddress, int>;
bool isValidIP(const QString &ip);
std::optional<Subnet> parseSubnet(const QString &subnetStr);

Loading…
Cancel
Save