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:
Jarek Kobus
2024-02-01 15:46:01 +01:00
parent 2853237fd0
commit 243d063cb9
12 changed files with 48 additions and 55 deletions

View File

@@ -7,7 +7,6 @@
#include <QObject>
#include <QPointer>
#include <QSharedPointer>
#include <QPair>
namespace Core {
@@ -45,7 +44,7 @@ public:
void updateActions(const VcsBase::VcsBasePluginState &state);
signals:
void fetchStarted(const QSharedPointer<Gerrit::Internal::GerritChange> &change);
void fetchStarted(const std::shared_ptr<Gerrit::Internal::GerritChange> &change);
void fetchFinished();
private:
@@ -53,10 +52,10 @@ private:
void push();
Utils::FilePath findLocalRepository(const QString &project, const QString &branch) const;
void fetch(const QSharedPointer<GerritChange> &change, int mode);
void fetch(const std::shared_ptr<GerritChange> &change, int mode);
QSharedPointer<GerritParameters> m_parameters;
QSharedPointer<GerritServer> m_server;
std::shared_ptr<GerritParameters> m_parameters;
std::shared_ptr<GerritServer> m_server;
QPointer<GerritDialog> m_dialog;
Core::Command *m_gerritCommand = nullptr;
Core::Command *m_pushToGerritCommand = nullptr;