mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-11 11:06:03 -05:00
Adapt to enable testing and add more tests
This commit is contained in:
@@ -8,9 +8,6 @@ namespace advss {
|
||||
class Macro;
|
||||
class MacroSegment;
|
||||
|
||||
/*******************************************************************************
|
||||
* Advanced Scene Switcher window
|
||||
*******************************************************************************/
|
||||
class MacroEdit : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ void MacroSelection::HideSelectedMacro()
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef UNIT_TEST
|
||||
const auto m = ssWindow->ui->macros->GetCurrentMacro();
|
||||
if (!m) {
|
||||
return;
|
||||
@@ -61,6 +62,7 @@ void MacroSelection::HideSelectedMacro()
|
||||
}
|
||||
|
||||
qobject_cast<QListView *>(view())->setRowHidden(idx, true);
|
||||
#endif // !UNIT_TEST
|
||||
}
|
||||
|
||||
void MacroSelection::HideGroups()
|
||||
|
||||
@@ -1141,9 +1141,11 @@ void Macro::ClearHotkeys() const
|
||||
void setHotkeyDescriptionHelper(const char *formatModuleText,
|
||||
const std::string name, const obs_hotkey_id id)
|
||||
{
|
||||
#ifndef UNIT_TEST
|
||||
QString format{obs_module_text(formatModuleText)};
|
||||
QString hotkeyDesc = format.arg(QString::fromStdString(name));
|
||||
obs_hotkey_set_description(id, hotkeyDesc.toStdString().c_str());
|
||||
#endif // !UNIT_TEST
|
||||
}
|
||||
|
||||
void Macro::SetHotkeysDesc() const
|
||||
|
||||
Reference in New Issue
Block a user