aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/terminal/terminalwidget.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2023-07-18 14:33:48 +0200
committerhjk <[email protected]>2023-07-19 05:14:13 +0000
commitbedab22e63e813719b8cdf3d0b4fd4bf323f7d42 (patch)
tree8a0c78879cafdf043183aa910a8dcebbf3e4d63c /src/plugins/terminal/terminalwidget.cpp
parent3e2e0d9393af2494a833d476a76c240adbb37329 (diff)
Replace a few aspect.value() calls with operatpor()
Change-Id: Icaada671fe8dbe59d4f596da49476b3ec2137c25 Reviewed-by: Marcus Tillmanns <[email protected]>
Diffstat (limited to 'src/plugins/terminal/terminalwidget.cpp')
-rw-r--r--src/plugins/terminal/terminalwidget.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/terminal/terminalwidget.cpp b/src/plugins/terminal/terminalwidget.cpp
index 4e88071a94f..fdb5547a4f6 100644
--- a/src/plugins/terminal/terminalwidget.cpp
+++ b/src/plugins/terminal/terminalwidget.cpp
@@ -143,9 +143,7 @@ void TerminalWidget::setupPty()
m_process = std::make_unique<Process>();
CommandLine shellCommand = m_openParameters.shellCommand.value_or(
- CommandLine{settings().shell(),
- settings().shellArguments.value(),
- CommandLine::Raw});
+ CommandLine{settings().shell(), settings().shellArguments(), CommandLine::Raw});
Environment env = m_openParameters.environment.value_or(Environment{})
.appliedToEnvironment(shellCommand.executable().deviceEnvironment());
@@ -230,8 +228,8 @@ void TerminalWidget::setupFont()
{
QFont f;
f.setFixedPitch(true);
- f.setFamily(settings().font.value());
- f.setPointSize(settings().fontSize.value());
+ f.setFamily(settings().font());
+ f.setPointSize(settings().fontSize());
setFont(f);
}
@@ -241,12 +239,12 @@ void TerminalWidget::setupColors()
// Check if the colors have changed.
std::array<QColor, 20> newColors;
for (int i = 0; i < 16; ++i) {
- newColors[i] = settings().colors[i].value();
+ newColors[i] = settings().colors[i]();
}
- newColors[ColorIndex::Background] = settings().backgroundColor.value();
- newColors[ColorIndex::Foreground] = settings().foregroundColor.value();
- newColors[ColorIndex::Selection] = settings().selectionColor.value();
- newColors[ColorIndex::FindMatch] = settings().findMatchColor.value();
+ newColors[ColorIndex::Background] = settings().backgroundColor();
+ newColors[ColorIndex::Foreground] = settings().foregroundColor();
+ newColors[ColorIndex::Selection] = settings().selectionColor();
+ newColors[ColorIndex::FindMatch] = settings().findMatchColor();
if (m_currentColors == newColors)
return;
@@ -401,7 +399,7 @@ void TerminalWidget::setupSurface()
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
});
connect(m_surface.get(), &Internal::TerminalSurface::bell, this, [] {
- if (settings().audibleBell.value())
+ if (settings().audibleBell())
QApplication::beep();
});
connect(m_surface.get(),
@@ -438,7 +436,7 @@ void TerminalWidget::setupSurface()
void TerminalWidget::configBlinkTimer()
{
bool shouldRun = m_cursor.visible && m_cursor.blink && hasFocus()
- && settings().allowBlinkingCursor.value();
+ && settings().allowBlinkingCursor();
if (shouldRun != m_cursorBlinkTimer.isActive()) {
if (shouldRun)
m_cursorBlinkTimer.start();