Modernize API usage
This commit is contained in:
1 parent
cbc2b4b320
commit
1978dbf52d
5 files changed
+13
-15
No files matched your search
@@ -42,7 +42,7 @@ BackgroundPropertiesDialog::BackgroundPropertiesDialog(Background &background, P
|
|||||||
|
|
||||||
connect(m_ui->lineEditName, &QLineEdit::textChanged,
|
connect(m_ui->lineEditName, &QLineEdit::textChanged,
|
||||||
this, &BackgroundPropertiesDialog::changed);
|
this, &BackgroundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxTileset, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxTileset, &QCheckBox::checkStateChanged,
|
||||||
this, &BackgroundPropertiesDialog::changed);
|
this, &BackgroundPropertiesDialog::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ void GameInformationDialog::textItalic()
|
|||||||
void GameInformationDialog::textFamily(const QString &f)
|
void GameInformationDialog::textFamily(const QString &f)
|
||||||
{
|
{
|
||||||
QTextCharFormat fmt;
|
QTextCharFormat fmt;
|
||||||
fmt.setFontFamily(f);
|
fmt.setFontFamilies({f});
|
||||||
mergeFormatOnWordOrSelection(fmt);
|
mergeFormatOnWordOrSelection(fmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,21 +70,21 @@ SoundPropertiesDialog::SoundPropertiesDialog(Sound &sound, ProjectTreeModel &pro
|
|||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->radioButtonMultimedia, &QRadioButton::toggled,
|
connect(m_ui->radioButtonMultimedia, &QRadioButton::toggled,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxChorus, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxChorus, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxFlanger, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxFlanger, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxGargle, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxGargle, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxEcho, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxEcho, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxReverb, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxReverb, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->horizontalSliderVolume, &QSlider::valueChanged,
|
connect(m_ui->horizontalSliderVolume, &QSlider::valueChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->horizontalSliderPan, &QSlider::valueChanged,
|
connect(m_ui->horizontalSliderPan, &QSlider::valueChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxPreload, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxPreload, &QCheckBox::checkStateChanged,
|
||||||
this, &SoundPropertiesDialog::changed);
|
this, &SoundPropertiesDialog::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ SpritePropertiesDialog::SpritePropertiesDialog(Sprite &sprite, ProjectTreeModel
|
|||||||
this, &SpritePropertiesDialog::changed);
|
this, &SpritePropertiesDialog::changed);
|
||||||
connect(m_ui->spinBoxOriginY, &QSpinBox::valueChanged,
|
connect(m_ui->spinBoxOriginY, &QSpinBox::valueChanged,
|
||||||
this, &SpritePropertiesDialog::changed);
|
this, &SpritePropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxPreciseCollisionChecking, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxPreciseCollisionChecking, &QCheckBox::checkStateChanged,
|
||||||
this, &SpritePropertiesDialog::changed);
|
this, &SpritePropertiesDialog::changed);
|
||||||
connect(m_ui->checkBoxSeparateCollisionMasks, &QCheckBox::stateChanged,
|
connect(m_ui->checkBoxSeparateCollisionMasks, &QCheckBox::checkStateChanged,
|
||||||
this, &SpritePropertiesDialog::changed);
|
this, &SpritePropertiesDialog::changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <ranges>
|
||||||
|
|
||||||
#include "editorguiutils.h"
|
#include "editorguiutils.h"
|
||||||
|
|
||||||
@@ -106,11 +107,8 @@ void PathPointsWidget::paintEvent(QPaintEvent *event)
|
|||||||
painter.drawLine(point0.point, point1.point);
|
painter.drawLine(point0.point, point1.point);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::adjacent_find(std::cbegin(*m_points), std::cend(*m_points),
|
for (auto&& [p0, p1] : std::views::adjacent<2>(*m_points))
|
||||||
[&](const Path::Point &point0, const Path::Point &point1){
|
drawLine(p0, p1);
|
||||||
drawLine(point0, point1);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (m_closed && m_points->size() >= 2)
|
if (m_closed && m_points->size() >= 2)
|
||||||
drawLine(m_points->back(), m_points->front());
|
drawLine(m_points->back(), m_points->front());
|
||||||
|
|||||||
Reference in new issue
Block a user