diff options
author | hjk <hjk@qt.io> | 2023-05-12 16:51:12 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-05-12 16:04:38 +0000 |
commit | c85b72000f2861247ba832b5a22cb3746bd709ca (patch) | |
tree | ef0181f816a3a197a89863084234e5097d817b73 | |
parent | 30af7a9503c3848ac9cb35e1aebfc28d51f41d07 (diff) | |
download | qt-creator-c85b72000f2861247ba832b5a22cb3746bd709ca.tar.gz |
All: Use the shorter access to aspect values in a few places
Change-Id: Ie0ff0e4e1cf4c2750897ea733dfccb743f44fa93
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
21 files changed, 61 insertions, 58 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index 964f5241b3..097fca1820 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -523,7 +523,7 @@ void BazaarPluginPrivate::logRepository() const VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); QStringList extraOptions; - extraOptions += "--limit=" + QString::number(m_settings.logCount.value()); + extraOptions += "--limit=" + QString::number(m_settings.logCount()); m_client.log(state.topLevel(), QStringList(), extraOptions); } diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 65b3d25179..dd576f228f 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -247,8 +247,8 @@ void CodePasterPluginPrivate::post(QString data, const QString &mimeType) const FileDataList diffChunks = splitDiffToFiles(data); const int dialogResult = diffChunks.isEmpty() ? - view.show(username, {}, {}, m_settings.expiryDays.value(), data) : - view.show(username, {}, {}, m_settings.expiryDays.value(), diffChunks); + view.show(username, {}, {}, m_settings.expiryDays(), data) : + view.show(username, {}, {}, m_settings.expiryDays(), diffChunks); // Save new protocol in case user changed it. if (dialogResult == QDialog::Accepted && m_settings.protocols.value() != view.protocol()) { diff --git a/src/plugins/cpaster/fileshareprotocol.cpp b/src/plugins/cpaster/fileshareprotocol.cpp index 2ca4bfa677..6ceb8a4e13 100644 --- a/src/plugins/cpaster/fileshareprotocol.cpp +++ b/src/plugins/cpaster/fileshareprotocol.cpp @@ -141,7 +141,7 @@ void FileShareProtocol::list() QString errorMessage; const QChar blank = QLatin1Char(' '); const QFileInfoList entryInfoList = dir.entryInfoList(); - const int count = qMin(int(m_settings.displayCount.value()), entryInfoList.size()); + const int count = qMin(int(m_settings.displayCount()), entryInfoList.size()); for (int i = 0; i < count; i++) { const QFileInfo& entryFi = entryInfoList.at(i); if (parse(entryFi.absoluteFilePath(), &errorMessage, &user, &description)) { diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index 85e98c1e4c..884afc3727 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -1333,7 +1333,7 @@ CommandResult CvsPluginPrivate::runCvs(const FilePath &workingDirectory, if (executable.isEmpty()) return CommandResult(ProcessResult::StartFailed, Tr::tr("No CVS executable specified.")); - const int timeoutS = m_settings.timeout.value() * timeoutMultiplier; + const int timeoutS = m_settings.timeout() * timeoutMultiplier; return m_client->vcsSynchronousExec(workingDirectory, {executable, m_settings.addOptions(arguments)}, flags, timeoutS, outputCodec); diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 5098ba6f24..9117728f8e 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -488,10 +488,10 @@ void CdbEngine::handleInitialSessionIdle() runCommand({"sxn ibp", NoFlags}); // Do not break on initial breakpoints. runCommand({".asm source_line", NoFlags}); // Source line in assembly runCommand({m_extensionCommandPrefix - + "setparameter maxStringLength=" + QString::number(s.maximalStringLength.value()) - + " maxStackDepth=" + QString::number(s.maximalStackDepth.value()) - + " firstChance=" + (s.firstChanceExceptionTaskEntry.value() ? "1" : "0") - + " secondChance=" + (s.secondChanceExceptionTaskEntry.value() ? "1" : "0") + + "setparameter maxStringLength=" + QString::number(s.maximalStringLength()) + + " maxStackDepth=" + QString::number(s.maximalStackDepth()) + + " firstChance=" + (s.firstChanceExceptionTaskEntry() ? "1" : "0") + + " secondChance=" + (s.secondChanceExceptionTaskEntry() ? "1" : "0") , NoFlags}); if (s.cdbUsePythonDumper.value()) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 5ea6162a64..aa84c6d2d7 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -801,7 +801,7 @@ void GdbEngine::runCommand(const DebuggerCommand &command) int GdbEngine::commandTimeoutTime() const { - const int time = debuggerSettings()->gdbWatchdogTimeout.value(); + const int time = debuggerSettings()->gdbWatchdogTimeout(); return 1000 * qMax(20, time); } @@ -1016,7 +1016,7 @@ void GdbEngine::updateAll() { //PENDING_DEBUG("UPDATING ALL\n"); QTC_CHECK(state() == InferiorUnrunnable || state() == InferiorStopOk); - DebuggerCommand cmd(stackCommand(debuggerSettings()->maximalStackDepth.value())); + DebuggerCommand cmd(stackCommand(debuggerSettings()->maximalStackDepth())); cmd.callback = [this](const DebuggerResponse &r) { handleStackListFrames(r, false); }; runCommand(cmd); stackHandler()->setCurrentIndex(0); @@ -2616,13 +2616,13 @@ void GdbEngine::insertBreakpoint(const Breakpoint &bp) "QTC_DEBUGGER_PYTHON_VERBOSE"); const DebuggerSettings &s = *debuggerSettings(); cmd.arg("passexceptions", alwaysVerbose); - cmd.arg("fancy", s.useDebuggingHelpers.value()); - cmd.arg("autoderef", s.autoDerefPointers.value()); - cmd.arg("dyntype", s.useDynamicType.value()); - cmd.arg("qobjectnames", s.showQObjectNames.value()); + cmd.arg("fancy", s.useDebuggingHelpers()); + cmd.arg("autoderef", s.autoDerefPointers()); + cmd.arg("dyntype", s.useDynamicType()); + cmd.arg("qobjectnames", s.showQObjectNames()); cmd.arg("nativemixed", isNativeMixedActive()); - cmd.arg("stringcutoff", s.maximalStringLength.value()); - cmd.arg("displaystringlimit", s.displayStringLimit.value()); + cmd.arg("stringcutoff", s.maximalStringLength()); + cmd.arg("displaystringlimit", s.displayStringLimit()); cmd.arg("spec", breakpointLocation2(requested)); cmd.callback = [this, bp](const DebuggerResponse &r) { handleTracepointInsert(r, bp); }; diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 3f182c828b..ef4d7a4354 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -469,7 +469,7 @@ void LldbEngine::selectThread(const Thread &thread) DebuggerCommand cmd("selectThread"); cmd.arg("id", thread->id()); cmd.callback = [this](const DebuggerResponse &) { - fetchStack(debuggerSettings()->maximalStackDepth.value()); + fetchStack(debuggerSettings()->maximalStackDepth()); }; runCommand(cmd); } @@ -701,7 +701,7 @@ void LldbEngine::updateAll() DebuggerCommand cmd("fetchThreads"); cmd.callback = [this](const DebuggerResponse &response) { threadsHandler()->setThreads(response.data); - fetchStack(debuggerSettings()->maximalStackDepth.value()); + fetchStack(debuggerSettings()->maximalStackDepth()); reloadRegisters(); }; runCommand(cmd); diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp index 6a2390fcad..1fc6f04582 100644 --- a/src/plugins/debugger/stackhandler.cpp +++ b/src/plugins/debugger/stackhandler.cpp @@ -234,7 +234,7 @@ void StackHandler::setFramesAndCurrentIndex(const GdbMi &frames, bool isFull) targetFrame = i; } - bool canExpand = !isFull && (n >= debuggerSettings()->maximalStackDepth.value()); + bool canExpand = !isFull && (n >= debuggerSettings()->maximalStackDepth()); debuggerSettings()->expandStack.setEnabled(canExpand); setFrames(stackFrames, canExpand); diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index 0923348d94..739c0ee4ce 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -2848,7 +2848,7 @@ QSet<QString> WatchHandler::expandedINames() const int WatchHandler::maxArrayCount(const QString &iname) const { - return m_model->m_maxArrayCount.value(iname, debuggerSettings()->defaultArraySize.value()); + return m_model->m_maxArrayCount.value(iname, debuggerSettings()->defaultArraySize()); } void WatchHandler::recordTypeInfo(const GdbMi &typeInfo) diff --git a/src/plugins/fakevim/fakevimactions.h b/src/plugins/fakevim/fakevimactions.h index 6f7e303f0f..582630e83d 100644 --- a/src/plugins/fakevim/fakevimactions.h +++ b/src/plugins/fakevim/fakevimactions.h @@ -44,18 +44,21 @@ class FvBoolAspect : public FvBaseAspect { public: bool value() const { return FvBaseAspect::value().toBool(); } + bool operator()() const { return value(); } }; class FvIntegerAspect : public FvBaseAspect { public: qint64 value() const { return FvBaseAspect::value().toLongLong(); } + qint64 operator()() const { return value(); } }; class FvStringAspect : public FvBaseAspect { public: QString value() const { return FvBaseAspect::value().toString(); } + QString operator()() const { return value(); } }; class FvAspectContainer : public FvBaseAspect diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 5cf97784fe..f41c8cc63a 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -2786,7 +2786,7 @@ void FakeVimHandler::Private::ensureCursorVisible() void FakeVimHandler::Private::updateEditor() { - setTabSize(s.tabStop.value()); + setTabSize(s.tabStop()); setupCharClass(); } @@ -5412,7 +5412,7 @@ void FakeVimHandler::Private::handleInsertMode(const Input &input) const Column ind = indentation(data); if (col.logical <= ind.logical && col.logical && startsWithWhitespace(data, col.physical)) { - const int ts = s.tabStop.value(); + const int ts = s.tabStop(); const int newl = col.logical - 1 - (col.logical - 1) % ts; const QString prefix = tabExpand(newl); setLineContents(line, prefix + data.mid(col.physical)); @@ -5439,7 +5439,7 @@ void FakeVimHandler::Private::handleInsertMode(const Input &input) if (q->tabPressedInInsertMode()) { m_buffer->insertState.insertingSpaces = true; if (s.expandTab.value()) { - const int ts = s.tabStop.value(); + const int ts = s.tabStop(); const int col = logicalCursorColumn(); QString str = QString(ts - col % ts, ' '); insertText(str); @@ -5450,8 +5450,8 @@ void FakeVimHandler::Private::handleInsertMode(const Input &input) } } else if (input.isControl('d')) { // remove one level of indentation from the current line - const int shift = s.shiftWidth.value(); - const int tab = s.tabStop.value(); + const int shift = s.shiftWidth(); + const int tab = s.tabStop(); int line = cursorLine() + 1; int pos = firstPositionInLine(line); QString text = lineContents(line); @@ -6957,7 +6957,7 @@ void FakeVimHandler::Private::shiftRegionRight(int repeat) if (s.startOfLine.value()) targetPos = firstPositionInLine(beginLine); - const int sw = s.shiftWidth.value(); + const int sw = s.shiftWidth(); g.movetype = MoveLineWise; beginEditBlock(); QTextBlock block = document()->findBlockByLineNumber(beginLine - 1); @@ -7295,7 +7295,7 @@ int FakeVimHandler::Private::physicalCursorColumn() const int FakeVimHandler::Private::physicalToLogicalColumn (const int physical, const QString &line) const { - const int ts = s.tabStop.value(); + const int ts = s.tabStop(); int p = 0; int logical = 0; while (p < physical) { @@ -7316,7 +7316,7 @@ int FakeVimHandler::Private::physicalToLogicalColumn int FakeVimHandler::Private::logicalToPhysicalColumn (const int logical, const QString &line) const { - const int ts = s.tabStop.value(); + const int ts = s.tabStop(); int physical = 0; for (int l = 0; l < logical && physical < line.size(); ++physical) { QChar c = line.at(physical); @@ -7330,7 +7330,7 @@ int FakeVimHandler::Private::logicalToPhysicalColumn int FakeVimHandler::Private::windowScrollOffset() const { - return qMin(static_cast<int>(s.scrollOff.value()), linesOnScreen() / 2); + return qMin(static_cast<int>(s.scrollOff()), linesOnScreen() / 2); } int FakeVimHandler::Private::logicalCursorColumn() const @@ -8684,7 +8684,7 @@ void FakeVimHandler::Private::jump(int distance) Column FakeVimHandler::Private::indentation(const QString &line) const { - int ts = s.tabStop.value(); + int ts = s.tabStop(); int physical = 0; int logical = 0; int n = line.size(); @@ -8703,8 +8703,8 @@ Column FakeVimHandler::Private::indentation(const QString &line) const QString FakeVimHandler::Private::tabExpand(int n) const { - int ts = s.tabStop.value(); - if (s.expandTab.value() || ts < 1) + int ts = s.tabStop(); + if (s.expandTab() || ts < 1) return QString(n, ' '); return QString(n / ts, '\t') + QString(n % ts, ' '); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index a9778cbe71..2f86a7d87a 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1642,9 +1642,9 @@ void FakeVimPluginPrivate::editorOpened(IEditor *editor) return; TabSettings tabSettings; - tabSettings.m_indentSize = fakeVimSettings()->shiftWidth.value(); - tabSettings.m_tabSize = fakeVimSettings()->tabStop.value(); - tabSettings.m_tabPolicy = fakeVimSettings()->expandTab.value() + tabSettings.m_indentSize = fakeVimSettings()->shiftWidth(); + tabSettings.m_tabSize = fakeVimSettings()->tabStop(); + tabSettings.m_tabPolicy = fakeVimSettings()->expandTab() ? TabSettings::SpacesOnlyTabPolicy : TabSettings::TabsOnlyTabPolicy; tabSettings.m_continuationAlignBehavior = tew->textDocument()->tabSettings().m_continuationAlignBehavior; diff --git a/src/plugins/fossil/fossilplugin.cpp b/src/plugins/fossil/fossilplugin.cpp index 8d771eeee1..4386c4a6a4 100644 --- a/src/plugins/fossil/fossilplugin.cpp +++ b/src/plugins/fossil/fossilplugin.cpp @@ -418,10 +418,10 @@ void FossilPluginPrivate::logCurrentFile() QTC_ASSERT(state.hasFile(), return); FossilClient::SupportedFeatures features = m_client.supportedFeatures(); QStringList extraOptions; - extraOptions << "-n" << QString::number(m_client.settings().logCount.value()); + extraOptions << "-n" << QString::number(m_client.settings().logCount()); if (features.testFlag(FossilClient::TimelineWidthFeature)) - extraOptions << "-W" << QString::number(m_client.settings().timelineWidth.value()); + extraOptions << "-W" << QString::number(m_client.settings().timelineWidth()); // disable annotate context menu for older client versions, used to be supported for current revision only bool enableAnnotationContextMenu = features.testFlag(FossilClient::AnnotateRevisionFeature); @@ -503,10 +503,10 @@ void FossilPluginPrivate::logRepository() QTC_ASSERT(state.hasTopLevel(), return); FossilClient::SupportedFeatures features = m_client.supportedFeatures(); QStringList extraOptions; - extraOptions << "-n" << QString::number(m_client.settings().logCount.value()); + extraOptions << "-n" << QString::number(m_client.settings().logCount()); if (features.testFlag(FossilClient::TimelineWidthFeature)) - extraOptions << "-W" << QString::number(m_client.settings().timelineWidth.value()); + extraOptions << "-W" << QString::number(m_client.settings().timelineWidth()); m_client.log(state.topLevel(), {}, extraOptions); } diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 3bd505f25b..fa42a2565e 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -1085,7 +1085,7 @@ void GitClient::log(const FilePath &workingDirectory, const QString &fileName, editor->setWorkingDirectory(workingDir); QStringList arguments = {"log", decorateOption}; - int logCount = settings().logCount.value(); + int logCount = settings().logCount(); if (logCount > 0) arguments << "-n" << QString::number(logCount); @@ -1142,7 +1142,7 @@ void GitClient::reflog(const FilePath &workingDirectory, const QString &ref) QStringList arguments = {"reflog", noColorOption, decorateOption}; arguments << argWidget->arguments(); - int logCount = settings().logCount.value(); + int logCount = settings().logCount(); if (logCount > 0) arguments << "-n" << QString::number(logCount); @@ -3120,7 +3120,7 @@ void GitClient::synchronousSubversionFetch(const FilePath &workingDirectory) con void GitClient::subversionLog(const FilePath &workingDirectory) const { QStringList arguments = {"svn", "log"}; - int logCount = settings().logCount.value(); + int logCount = settings().logCount(); if (logCount > 0) arguments << ("--limit=" + QString::number(logCount)); diff --git a/src/plugins/git/logchangedialog.cpp b/src/plugins/git/logchangedialog.cpp index 55055cbf76..7e61b133de 100644 --- a/src/plugins/git/logchangedialog.cpp +++ b/src/plugins/git/logchangedialog.cpp @@ -224,7 +224,7 @@ LogChangeDialog::LogChangeDialog(bool isReset, QWidget *parent) : m_resetTypeComboBox->addItem(Tr::tr("Hard"), "--hard"); m_resetTypeComboBox->addItem(Tr::tr("Mixed"), "--mixed"); m_resetTypeComboBox->addItem(Tr::tr("Soft"), "--soft"); - m_resetTypeComboBox->setCurrentIndex(GitClient::settings().lastResetIndex.value()); + m_resetTypeComboBox->setCurrentIndex(GitClient::settings().lastResetIndex()); popUpLayout->addWidget(m_resetTypeComboBox); popUpLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored)); } diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index c6f4082767..5a7e74450d 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -889,8 +889,8 @@ void PerforcePluginPrivate::filelog(const FilePath &workingDir, const QString &f QTextCodec *codec = VcsBaseEditor::getCodec(workingDir, QStringList(fileName)); QStringList args; args << QLatin1String("filelog") << QLatin1String("-li"); - if (m_settings.logCount.value() > 0) - args << "-m" << QString::number(m_settings.logCount.value()); + if (m_settings.logCount() > 0) + args << "-m" << QString::number(m_settings.logCount()); if (!fileName.isEmpty()) args.append(fileName); const PerforceResponse result = runP4Cmd(workingDir, args, @@ -911,8 +911,8 @@ void PerforcePluginPrivate::changelists(const FilePath &workingDir, const QStrin QTextCodec *codec = VcsBaseEditor::getCodec(workingDir, QStringList(fileName)); QStringList args; args << QLatin1String("changelists") << QLatin1String("-lit"); - if (m_settings.logCount.value() > 0) - args << "-m" << QString::number(m_settings.logCount.value()); + if (m_settings.logCount() > 0) + args << "-m" << QString::number(m_settings.logCount()); if (!fileName.isEmpty()) args.append(fileName); const PerforceResponse result = runP4Cmd(workingDir, args, @@ -1226,7 +1226,7 @@ PerforceResponse PerforcePluginPrivate::synchronousProcess(const FilePath &worki // Run, connect stderr to the output window Process process; - const int timeOutS = (flags & LongTimeOut) ? m_settings.longTimeOutS() : m_settings.timeOutS.value(); + const int timeOutS = (flags & LongTimeOut) ? m_settings.longTimeOutS() : m_settings.timeOutS(); process.setTimeoutS(timeOutS); if (outputCodec) process.setCodec(outputCodec); @@ -1303,7 +1303,7 @@ PerforceResponse PerforcePluginPrivate::fullySynchronousProcess(const FilePath & QByteArray stdOut; QByteArray stdErr; - const int timeOutS = (flags & LongTimeOut) ? m_settings.longTimeOutS() : m_settings.timeOutS.value(); + const int timeOutS = (flags & LongTimeOut) ? m_settings.longTimeOutS() : m_settings.timeOutS(); if (!process.readDataFromProcess(&stdOut, &stdErr, timeOutS)) { process.stop(); process.waitForFinished(); diff --git a/src/plugins/perforce/perforcesettings.h b/src/plugins/perforce/perforcesettings.h index f6c52957e6..f0754e982e 100644 --- a/src/plugins/perforce/perforcesettings.h +++ b/src/plugins/perforce/perforcesettings.h @@ -41,8 +41,8 @@ public: QString *repositoryRoot /* = 0 */, QString *errorMessage); - int longTimeOutS() const { return timeOutS.value() * 10; } - int timeOutMS() const { return timeOutS.value() * 1000; } + int longTimeOutS() const { return timeOutS() * 10; } + int timeOutMS() const { return timeOutS() * 1000; } Utils::FilePath topLevel() const; Utils::FilePath topLevelSymLinkTarget() const; diff --git a/src/plugins/subversion/subversionclient.cpp b/src/plugins/subversion/subversionclient.cpp index 45cd652381..d728fb79f4 100644 --- a/src/plugins/subversion/subversionclient.cpp +++ b/src/plugins/subversion/subversionclient.cpp @@ -277,7 +277,7 @@ void SubversionClient::log(const FilePath &workingDir, const std::function<void(Utils::CommandLine &)> &addAuthOptions) { auto &settings = static_cast<SubversionSettings &>(this->settings()); - const int logCount = settings.logCount.value(); + const int logCount = settings.logCount(); QStringList svnExtraOptions = extraOptions; if (logCount > 0) svnExtraOptions << QLatin1String("-l") << QString::number(logCount); diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 1eedd61606..8d2be99c0c 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -949,10 +949,10 @@ CommandResult SubversionPluginPrivate::runSvn(const FilePath &workingDir, const CommandLine &command, RunFlags flags, QTextCodec *outputCodec, int timeoutMutiplier) const { - if (m_settings.binaryPath.value().isEmpty()) + if (m_settings.binaryPath().isEmpty()) return CommandResult(ProcessResult::StartFailed, Tr::tr("No subversion executable specified.")); - const int timeoutS = m_settings.timeout.value() * timeoutMutiplier; + const int timeoutS = m_settings.timeout() * timeoutMutiplier; return m_client->vcsSynchronousExec(workingDir, command, flags, timeoutS, outputCodec); } diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index d5ec691ec0..527db5387c 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -204,7 +204,7 @@ void VcsBaseClientImpl::vcsExecWithEditor(const Utils::FilePath &workingDirector int VcsBaseClientImpl::vcsTimeoutS() const { - return m_baseSettings->timeout.value(); + return m_baseSettings->timeout(); } VcsCommand *VcsBaseClientImpl::createVcsCommand(const FilePath &defaultWorkingDir, diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index d9717ece09..1895a64f4d 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -230,8 +230,8 @@ VcsBaseSubmitEditor::~VcsBaseSubmitEditor() void VcsBaseSubmitEditor::slotUpdateEditorSettings() { const CommonVcsSettings &s = VcsPlugin::instance()->settings(); - setLineWrapWidth(s.lineWrapWidth.value()); - setLineWrap(s.lineWrap.value()); + setLineWrapWidth(s.lineWrapWidth()); + setLineWrap(s.lineWrap()); } // Return a trimmed list of non-empty field texts |