mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Fix warnings
This commit is contained in:
parent
a922d6a73d
commit
3ed7727c85
8
.vscode/settings.json
vendored
Normal file
8
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"files.associations": {
|
||||
"new": "cpp",
|
||||
"*.ipp": "cpp",
|
||||
"*.inc": "cpp",
|
||||
"string": "cpp"
|
||||
}
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ void advss::Area::Load(obs_data_t *obj, const char *name)
|
|||
}
|
||||
|
||||
SizeSelection::SizeSelection(int min, int max, QWidget *parent)
|
||||
: _x(new QSpinBox), _y(new QSpinBox), QWidget(parent)
|
||||
: QWidget(parent), _x(new QSpinBox), _y(new QSpinBox)
|
||||
{
|
||||
_x->setMinimum(min);
|
||||
_y->setMinimum(min);
|
||||
|
|
@ -88,9 +88,9 @@ void SizeSelection::YChanged(int value)
|
|||
}
|
||||
|
||||
AreaSelection::AreaSelection(int min, int max, QWidget *parent)
|
||||
: _x(new SizeSelection(min, max)),
|
||||
_y(new SizeSelection(min, max)),
|
||||
QWidget(parent)
|
||||
: QWidget(parent),
|
||||
_x(new SizeSelection(min, max)),
|
||||
_y(new SizeSelection(min, max))
|
||||
{
|
||||
_x->_x->setToolTip("X");
|
||||
_x->_y->setToolTip("Y");
|
||||
|
|
|
|||
|
|
@ -283,9 +283,9 @@ MacroConditionVideoEdit::MacroConditionVideoEdit(
|
|||
: QWidget(parent),
|
||||
_videoSelection(new QComboBox()),
|
||||
_condition(new QComboBox()),
|
||||
_imagePath(new FileSelection()),
|
||||
_usePatternForChangedCheck(new QCheckBox(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.usePatternForChangedCheck"))),
|
||||
_imagePath(new FileSelection()),
|
||||
_patternThreshold(new ThresholdSlider(
|
||||
0., 1.,
|
||||
obs_module_text(
|
||||
|
|
@ -295,31 +295,31 @@ MacroConditionVideoEdit::MacroConditionVideoEdit(
|
|||
_useAlphaAsMask(new QCheckBox(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.patternThresholdUseAlphaAsMask"))),
|
||||
_modelDataPath(new FileSelection()),
|
||||
_modelPathLayout(new QHBoxLayout),
|
||||
_objectScaleThreshold(new ThresholdSlider(
|
||||
1.1, 5.,
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.objectScaleThreshold"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.objectScaleThresholdDescription"))),
|
||||
_neighborsControlLayout(new QHBoxLayout),
|
||||
_minNeighbors(new QSpinBox()),
|
||||
_minNeighborsDescription(new QLabel(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.minNeighborDescription"))),
|
||||
_sizeLayout(new QHBoxLayout()),
|
||||
_minSize(new SizeSelection(0, 1024)),
|
||||
_maxSize(new SizeSelection(0, 4096)),
|
||||
_checkAreaControlLayout(new QHBoxLayout),
|
||||
_checkAreaEnable(new QCheckBox()),
|
||||
_checkArea(new AreaSelection(0, 99999)),
|
||||
_selectArea(new QPushButton(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.selectArea"))),
|
||||
_throttleControlLayout(new QHBoxLayout),
|
||||
_throttleEnable(new QCheckBox()),
|
||||
_throttleCount(new QSpinBox()),
|
||||
_showMatch(new QPushButton(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.showMatch"))),
|
||||
_selectArea(new QPushButton(obs_module_text(
|
||||
"AdvSceneSwitcher.condition.video.selectArea"))),
|
||||
_previewDialog(this, entryData.get(), &GetSwitcher()->m),
|
||||
_modelPathLayout(new QHBoxLayout),
|
||||
_neighborsControlLayout(new QHBoxLayout),
|
||||
_checkAreaControlLayout(new QHBoxLayout),
|
||||
_throttleControlLayout(new QHBoxLayout),
|
||||
_sizeLayout(new QHBoxLayout())
|
||||
_previewDialog(this, entryData.get(), &GetSwitcher()->m)
|
||||
{
|
||||
_imagePath->Button()->disconnect();
|
||||
_usePatternForChangedCheck->setToolTip(obs_module_text(
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ PreviewDialog::PreviewDialog(QWidget *parent,
|
|||
std::mutex *mutex)
|
||||
: QDialog(parent),
|
||||
_conditionData(conditionData),
|
||||
_imageLabel(new QLabel(this)),
|
||||
_scrollArea(new QScrollArea),
|
||||
_imageLabel(new QLabel(this)),
|
||||
_rubberBand(new QRubberBand(QRubberBand::Rectangle, this)),
|
||||
_mtx(mutex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -273,15 +273,15 @@ MacroActionAudioEdit::MacroActionAudioEdit(
|
|||
: QWidget(parent),
|
||||
_audioSources(new QComboBox),
|
||||
_actions(new QComboBox),
|
||||
_fadeTypes(new QComboBox),
|
||||
_volumePercent(new QSpinBox),
|
||||
_fade(new QCheckBox),
|
||||
_duration(new DurationSelection(parent, false)),
|
||||
_rate(new QDoubleSpinBox),
|
||||
_wait(new QCheckBox(
|
||||
obs_module_text("AdvSceneSwitcher.action.audio.fade.wait"))),
|
||||
_abortActiveFade(new QCheckBox(
|
||||
obs_module_text("AdvSceneSwitcher.action.audio.fade.abort"))),
|
||||
_duration(new DurationSelection(parent, false)),
|
||||
_rate(new QDoubleSpinBox),
|
||||
_fadeTypes(new QComboBox),
|
||||
_fadeTypeLayout(new QHBoxLayout),
|
||||
_fadeOptionsLayout(new QVBoxLayout)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -267,10 +267,6 @@ void AdvSceneSwitcher::SwapActions(Macro *m, int pos1, int pos2)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
iter_swap(m->Actions().begin() + pos1, m->Actions().begin() + pos2);
|
||||
m->UpdateActionIndices();
|
||||
|
||||
auto a1 = m->Actions().begin() + pos1;
|
||||
auto a2 = m->Actions().begin() + pos2;
|
||||
|
||||
auto widget1 = static_cast<MacroActionEdit *>(
|
||||
actionsList->ContentLayout()->takeAt(pos1)->widget());
|
||||
auto widget2 = static_cast<MacroActionEdit *>(
|
||||
|
|
|
|||
|
|
@ -371,8 +371,8 @@ static void addAnyAndAllStates(QComboBox *list)
|
|||
MacroConditionMediaEdit::MacroConditionMediaEdit(
|
||||
QWidget *parent, std::shared_ptr<MacroConditionMedia> entryData)
|
||||
: QWidget(parent),
|
||||
_mediaSources(new QComboBox()),
|
||||
_scenes(new SceneSelectionWidget(window())),
|
||||
_mediaSources(new QComboBox()),
|
||||
_states(new QComboBox()),
|
||||
_timeRestrictions(new QComboBox()),
|
||||
_time(new DurationSelection()),
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
MacroListEntryWidget::MacroListEntryWidget(std::shared_ptr<Macro> macro,
|
||||
bool highlight, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
_highlightExecutedMacros(highlight),
|
||||
_macro(macro),
|
||||
_name(new QLabel(QString::fromStdString(macro->Name()))),
|
||||
_running(new QCheckBox)
|
||||
_running(new QCheckBox),
|
||||
_macro(macro),
|
||||
_highlightExecutedMacros(highlight)
|
||||
{
|
||||
_running->setChecked(!macro->Paused());
|
||||
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@ bool MouseWheelWidgetAdjustmentGuard::eventFilter(QObject *o, QEvent *e)
|
|||
|
||||
MacroSegmentEdit::MacroSegmentEdit(bool highlight, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
_showHighlight(highlight),
|
||||
_section(new Section(300)),
|
||||
_headerInfo(new QLabel()),
|
||||
_contentLayout(new QVBoxLayout),
|
||||
_frame(new QWidget),
|
||||
_borderFrame(new QFrame),
|
||||
_contentLayout(new QVBoxLayout),
|
||||
_noBorderframe(new QFrame),
|
||||
_borderFrame(new QFrame),
|
||||
_dropLineAbove(new QFrame),
|
||||
_dropLineBelow(new QFrame)
|
||||
_dropLineBelow(new QFrame),
|
||||
_showHighlight(highlight)
|
||||
{
|
||||
_dropLineAbove->setLineWidth(3);
|
||||
_dropLineAbove->setFixedHeight(11);
|
||||
|
|
|
|||
|
|
@ -617,8 +617,8 @@ void AdvSceneSwitcher::UpMacroSegementHotkey()
|
|||
if (!macro) {
|
||||
return;
|
||||
}
|
||||
size_t actionSize = macro->Actions().size();
|
||||
size_t conditionSize = macro->Conditions().size();
|
||||
int actionSize = macro->Actions().size();
|
||||
int conditionSize = macro->Conditions().size();
|
||||
|
||||
if (currentActionIdx == -1 && currentConditionIdx == -1) {
|
||||
if (lastInteracted == MacroSection::CONDITIONS) {
|
||||
|
|
@ -673,8 +673,8 @@ void AdvSceneSwitcher::DownMacroSegementHotkey()
|
|||
if (!macro) {
|
||||
return;
|
||||
}
|
||||
size_t actionSize = macro->Actions().size();
|
||||
size_t conditionSize = macro->Conditions().size();
|
||||
int actionSize = macro->Actions().size();
|
||||
int conditionSize = macro->Conditions().size();
|
||||
|
||||
if (currentActionIdx == -1 && currentConditionIdx == -1) {
|
||||
if (lastInteracted == MacroSection::CONDITIONS) {
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ void Macro::SetPaused(bool pause)
|
|||
|
||||
void Macro::AddHelperThread(std::thread &&newThread)
|
||||
{
|
||||
for (int i = 0; i < _helperThreads.size(); i++) {
|
||||
for (unsigned int i = 0; i < _helperThreads.size(); i++) {
|
||||
if (!_helperThreads[i].joinable()) {
|
||||
_helperThreads[i] = std::move(newThread);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user