Perforce: Inline PerforcePluginPrivate::applySettings

... into its only user, hope is to move it into the settings proper
at some time.

Change-Id: I5877e7e19f4c3ef0ad5dba2761b12545ab59a1e8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2023-08-08 18:32:55 +02:00
parent 98aacfd688
commit 256ee1c05a

View File

@@ -312,8 +312,6 @@ public:
bool revertProject(const FilePath &workingDir, const QStringList &args, bool unchangedOnly); bool revertProject(const FilePath &workingDir, const QStringList &args, bool unchangedOnly);
bool managesDirectoryFstat(const FilePath &directory); bool managesDirectoryFstat(const FilePath &directory);
void applySettings();
CommandLocator *m_commandLocator = nullptr; CommandLocator *m_commandLocator = nullptr;
ParameterAction *m_editAction = nullptr; ParameterAction *m_editAction = nullptr;
ParameterAction *m_addAction = nullptr; ParameterAction *m_addAction = nullptr;
@@ -553,7 +551,10 @@ PerforcePluginPrivate::PerforcePluginPrivate()
QObject::connect(&settings(), &AspectContainer::applied, this, [this] { QObject::connect(&settings(), &AspectContainer::applied, this, [this] {
settings().clearTopLevel(); settings().clearTopLevel();
applySettings(); settings().writeSettings();
m_managedDirectoryCache.clear();
getTopLevel();
emit configurationChanged();
}); });
} }
@@ -1668,14 +1669,6 @@ void PerforcePluginPrivate::setTopLevel(const FilePath &topLevel)
VcsOutputWindow::appendSilently(msg); VcsOutputWindow::appendSilently(msg);
} }
void PerforcePluginPrivate::applySettings()
{
settings().writeSettings();
m_managedDirectoryCache.clear();
getTopLevel();
emit configurationChanged();
}
void PerforcePluginPrivate::slotTopLevelFailed(const QString &errorMessage) void PerforcePluginPrivate::slotTopLevelFailed(const QString &errorMessage)
{ {
VcsOutputWindow::appendSilently(Tr::tr("Perforce: Unable to determine the repository: %1").arg(errorMessage)); VcsOutputWindow::appendSilently(Tr::tr("Perforce: Unable to determine the repository: %1").arg(errorMessage));