forked from qt-creator/qt-creator
Replace a few more Aspect::value() calls with operator() uses
Change-Id: I9343e74bfb51af41df02a411976b82b9260be2fb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -140,7 +140,7 @@ void PythonWizardPage::initializePage()
|
||||
|
||||
bool PythonWizardPage::validatePage()
|
||||
{
|
||||
if (m_createVenv.value() && !m_venvPath.pathChooser()->isValid())
|
||||
if (m_createVenv() && !m_venvPath.pathChooser()->isValid())
|
||||
return false;
|
||||
auto wiz = qobject_cast<JsonWizard *>(wizard());
|
||||
const QMap<QString, QVariant> data = m_pySideVersion.itemValue().toMap();
|
||||
@@ -156,7 +156,7 @@ void PythonWizardPage::setupProject(const JsonWizard::GeneratorFiles &files)
|
||||
Interpreter interpreter = m_interpreter.currentInterpreter();
|
||||
Project *project = ProjectManager::openProject(Utils::mimeTypeForFile(f.file.filePath()),
|
||||
f.file.filePath().absoluteFilePath());
|
||||
if (m_createVenv.value()) {
|
||||
if (m_createVenv()) {
|
||||
auto openProjectWithInterpreter = [f](const std::optional<Interpreter> &interpreter) {
|
||||
if (!interpreter)
|
||||
return;
|
||||
@@ -202,7 +202,7 @@ void PythonWizardPage::updateInterpreters()
|
||||
void PythonWizardPage::updateStateLabel()
|
||||
{
|
||||
QTC_ASSERT(m_stateLabel, return);
|
||||
if (m_createVenv.value()) {
|
||||
if (m_createVenv()) {
|
||||
if (PathChooser *pathChooser = m_venvPath.pathChooser()) {
|
||||
if (!pathChooser->isValid()) {
|
||||
m_stateLabel->show();
|
||||
|
@@ -864,7 +864,7 @@ void SubversionPluginPrivate::vcsAnnotateHelper(const FilePath &workingDir, cons
|
||||
|
||||
CommandLine args{settings().binaryPath(), {"annotate"}};
|
||||
args << SubversionClient::AddAuthOptions();
|
||||
if (settings().spaceIgnorantAnnotation.value())
|
||||
if (settings().spaceIgnorantAnnotation())
|
||||
args << "-x" << "-uw";
|
||||
if (!revision.isEmpty())
|
||||
args << "-r" << revision;
|
||||
|
@@ -78,7 +78,7 @@ TerminalPane::TerminalPane(QObject *parent)
|
||||
static const QString shiftEsc = QKeySequence(
|
||||
QKeyCombination(Qt::ShiftModifier, Qt::Key_Escape))
|
||||
.toString(QKeySequence::NativeText);
|
||||
if (settings().sendEscapeToTerminal.value()) {
|
||||
if (settings().sendEscapeToTerminal()) {
|
||||
m_escSettingButton->setText(escKey);
|
||||
m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of Qt Creator."));
|
||||
} else {
|
||||
|
@@ -1004,7 +1004,7 @@ void TerminalWidget::paintCursor(QPainter &p) const
|
||||
cursor.shape = Internal::Cursor::Shape::Underline;
|
||||
|
||||
const bool blinkState = !cursor.blink || m_cursorBlinkState
|
||||
|| !settings().allowBlinkingCursor.value();
|
||||
|| !settings().allowBlinkingCursor();
|
||||
|
||||
if (cursor.visible && blinkState) {
|
||||
const int cursorCellWidth = m_surface->cellWidthAt(cursor.position.x(), cursor.position.y());
|
||||
@@ -1160,7 +1160,7 @@ void TerminalWidget::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
|
||||
if (event->key() == Qt::Key_Escape) {
|
||||
bool sendToTerminal = settings().sendEscapeToTerminal.value();
|
||||
bool sendToTerminal = settings().sendEscapeToTerminal();
|
||||
bool send = false;
|
||||
if (sendToTerminal && event->modifiers() == Qt::NoModifier)
|
||||
send = true;
|
||||
|
Reference in New Issue
Block a user