forked from qt-creator/qt-creator
Gerrit: Replace QSharedPointer with std::shared_ptr
According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Change-Id: I2954186d7e1df0f6e07fa840204f2a4b00fed73e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -64,7 +64,7 @@ QDebug operator<<(QDebug d, const GerritChange &c)
|
||||
}
|
||||
|
||||
// Format default Url for a change
|
||||
static inline QString defaultUrl(const QSharedPointer<GerritParameters> &p,
|
||||
static inline QString defaultUrl(const std::shared_ptr<GerritParameters> &p,
|
||||
const GerritServer &server,
|
||||
int gerritNumber)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ class QueryContext : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
QueryContext(const QString &query,
|
||||
const QSharedPointer<GerritParameters> &p,
|
||||
const std::shared_ptr<GerritParameters> &p,
|
||||
const GerritServer &server,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
@@ -236,7 +236,7 @@ private:
|
||||
enum { timeOutMS = 30000 };
|
||||
|
||||
QueryContext::QueryContext(const QString &query,
|
||||
const QSharedPointer<GerritParameters> &p,
|
||||
const std::shared_ptr<GerritParameters> &p,
|
||||
const GerritServer &server,
|
||||
QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -338,7 +338,7 @@ void QueryContext::timeout()
|
||||
m_timer.start();
|
||||
}
|
||||
|
||||
GerritModel::GerritModel(const QSharedPointer<GerritParameters> &p, QObject *parent)
|
||||
GerritModel::GerritModel(const std::shared_ptr<GerritParameters> &p, QObject *parent)
|
||||
: QStandardItemModel(0, ColumnCount, parent)
|
||||
, m_parameters(p)
|
||||
{
|
||||
@@ -445,7 +445,7 @@ QStandardItem *GerritModel::itemForNumber(int number) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void GerritModel::refresh(const QSharedPointer<GerritServer> &server, const QString &query)
|
||||
void GerritModel::refresh(const std::shared_ptr<GerritServer> &server, const QString &query)
|
||||
{
|
||||
if (m_query)
|
||||
m_query->terminate();
|
||||
@@ -731,7 +731,7 @@ static GerritChangePtr parseRestOutput(const QJsonObject &object, const GerritSe
|
||||
return change;
|
||||
}
|
||||
|
||||
static bool parseOutput(const QSharedPointer<GerritParameters> ¶meters,
|
||||
static bool parseOutput(const std::shared_ptr<GerritParameters> ¶meters,
|
||||
const GerritServer &server,
|
||||
const QByteArray &output,
|
||||
QList<GerritChangePtr> &result)
|
||||
|
||||
Reference in New Issue
Block a user