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