Git: Aspectify settings

Change-Id: I87dfeba360967cc77cc230811bcd9f67b3ea6e38
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2021-03-16 06:00:25 +01:00
parent f2c34e51e9
commit aa69415ac7
19 changed files with 379 additions and 529 deletions

View File

@@ -34,7 +34,6 @@
#include "gitsubmiteditor.h"
#include "remotedialog.h"
#include "stashdialog.h"
#include "settingspage.h"
#include "logchangedialog.h"
#include "mergetool.h"
#include "gitutils.h"
@@ -1486,7 +1485,7 @@ void GitPluginPrivate::pull()
const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
QString topLevel = state.topLevel();
bool rebase = m_settings.boolValue(GitSettings::pullRebaseKey);
bool rebase = m_settings.pullRebase.value();
if (!rebase) {
QString currentBranch = m_gitClient.synchronousCurrentLocalBranch(topLevel);
@@ -1821,8 +1820,7 @@ QObject *GitPlugin::remoteCommand(const QStringList &options, const QString &wor
void GitPluginPrivate::updateRepositoryBrowserAction()
{
const bool repositoryEnabled = currentState().hasTopLevel();
const bool hasRepositoryBrowserCmd
= !m_settings.stringValue(GitSettings::repositoryBrowserCmd).isEmpty();
const bool hasRepositoryBrowserCmd = !m_settings.repositoryBrowserCmd.value().isEmpty();
m_repositoryBrowserAction->setEnabled(repositoryEnabled && hasRepositoryBrowserCmd);
}