forked from qt-creator/qt-creator
Vcs: Pimpl plugins
Essentially rename all *Plugin into *PluginPrivate, and pull out the actual IPlugin related pieces into new *Plugin classes. Shift the construction of the PluginPrivate to initialize(), following the general pattern. I tried to keep the patch as mechanical as possible, giving room to some obvious but less mechanical cleanup needs, that are intentionally left out of this here. Change-Id: Iac662bf73338f9f7669064ed67b960246875c23c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -55,7 +55,7 @@ bool RemoteModel::removeRemote(int row)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
bool success = GitPluginPrivate::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, {"rm", remoteName(row)}, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
@@ -69,7 +69,7 @@ bool RemoteModel::addRemote(const QString &name, const QString &url)
|
||||
if (name.isEmpty() || url.isEmpty())
|
||||
return false;
|
||||
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
bool success = GitPluginPrivate::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, {"add", name, url}, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
@@ -80,7 +80,7 @@ bool RemoteModel::renameRemote(const QString &oldName, const QString &newName)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
bool success = GitPluginPrivate::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, {"rename", oldName, newName}, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
@@ -91,7 +91,7 @@ bool RemoteModel::updateUrl(const QString &name, const QString &newUrl)
|
||||
{
|
||||
QString output;
|
||||
QString error;
|
||||
bool success = GitPlugin::client()->synchronousRemoteCmd(
|
||||
bool success = GitPluginPrivate::client()->synchronousRemoteCmd(
|
||||
m_workingDirectory, {"set-url", name, newUrl}, &output, &error);
|
||||
if (success)
|
||||
success = refresh(m_workingDirectory, &error);
|
||||
@@ -186,7 +186,7 @@ bool RemoteModel::refresh(const QString &workingDirectory, QString *errorMessage
|
||||
|
||||
// get list of remotes.
|
||||
QMap<QString,QString> remotesList
|
||||
= GitPlugin::client()->synchronousRemotesList(workingDirectory, errorMessage);
|
||||
= GitPluginPrivate::client()->synchronousRemotesList(workingDirectory, errorMessage);
|
||||
|
||||
beginResetModel();
|
||||
m_remotes.clear();
|
||||
|
||||
Reference in New Issue
Block a user