Skip to content

Commit

Permalink
ui: Remove switch HAVE_PROPERTY_BUTTON
Browse files Browse the repository at this point in the history
The switch HAVE_PROPERTY_BUTTON was required to distinguish obs-studio
>= 27.0.1 or not.
Now, obs-studio 28.0.0 is the minum required version so that the switch
is no longer necessary.
  • Loading branch information
norihiro committed Aug 6, 2024
1 parent 7214e00 commit bf865f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions ui/face-tracker-dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,9 @@ FTDock::FTDock(QWidget *parent)
mainLayout->addWidget(enableButton);
connect(enableButton, &QPushButton::clicked, this, &FTDock::enableButtonClicked);

#ifdef HAVE_PROPERTY_BUTTON
propertyButton = new QPushButton(obs_module_text("Properties"), this);
mainLayout->addWidget(propertyButton);
connect(propertyButton, &QPushButton::clicked, this, &FTDock::propertyButtonClicked);
#endif

ftWidget = new FTWidget(data, this);
mainLayout->addWidget(ftWidget);
Expand Down Expand Up @@ -473,7 +471,6 @@ void FTDock::enableButtonClicked(bool checked)
}
}

#ifdef HAVE_PROPERTY_BUTTON
void FTDock::propertyButtonClicked(bool checked)
{
UNUSED_PARAMETER(checked);
Expand All @@ -493,7 +490,6 @@ void FTDock::propertyButtonClicked(bool checked)

obs_source_release(target);
}
#endif // HAVE_PROPERTY_BUTTON

void FTDock::notrackButtonChanged(int state)
{
Expand Down
9 changes: 0 additions & 9 deletions ui/face-tracker-dock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
#include <obs.hpp>
#include <obs-frontend-api.h>

// the necessary APIs are implemented at 27.0.1-107-g5b18faeb4.
#if LIBOBS_API_VER > MAKE_SEMANTIC_VERSION(27, 0, 1)
#define HAVE_PROPERTY_BUTTON
#endif

class FTDock : public QDockWidget {
Q_OBJECT

Expand All @@ -28,9 +23,7 @@ class FTDock : public QDockWidget {
class QPushButton *pauseButton;
class QPushButton *resetButton;
class QPushButton *enableButton;
#ifdef HAVE_PROPERTY_BUTTON
class QPushButton *propertyButton;
#endif
class FTWidget *ftWidget;
class QCheckBox *notrackButton;

Expand Down Expand Up @@ -72,9 +65,7 @@ private slots:
void pauseButtonClicked(bool checked);
void resetButtonClicked(bool checked);
void enableButtonClicked(bool checked);
#ifdef HAVE_PROPERTY_BUTTON
void propertyButtonClicked(bool checked);
#endif
void notrackButtonChanged(int state);
};

Expand Down

0 comments on commit bf865f0

Please sign in to comment.