Merge branch 'olive-editor:master' into av1
This commit is contained in:
@@ -45,7 +45,8 @@ void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QStri
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "[%s] %s (%s:%u)\n", msg_type, localMsg.constData(), context.function, context.line);
|
||||
//fprintf(stderr, "[%s] %s (%s:%u)\n", msg_type, localMsg.constData(), context.function, context.line);
|
||||
fprintf(stderr, "[%s] %s\n", msg_type, localMsg.constData());
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
// Windows still seems to buffer stderr and we want to see debug messages immediately, so here we make sure each line
|
||||
|
||||
@@ -91,7 +91,7 @@ void Config::SetDefaults()
|
||||
SetEntryInternal(QStringLiteral("Autoscroll"), NodeValue::kInt, AutoScroll::kPage);
|
||||
SetEntryInternal(QStringLiteral("AutoSelectDivider"), NodeValue::kBoolean, true);
|
||||
SetEntryInternal(QStringLiteral("SetNameWithMarker"), NodeValue::kBoolean, false);
|
||||
SetEntryInternal(QStringLiteral("RectifiedWaveforms"), NodeValue::kBoolean, false);
|
||||
SetEntryInternal(QStringLiteral("RectifiedWaveforms"), NodeValue::kBoolean, true);
|
||||
SetEntryInternal(QStringLiteral("DropWithoutSequenceBehavior"), NodeValue::kInt, ImportTool::kDWSAsk);
|
||||
SetEntryInternal(QStringLiteral("Loop"), NodeValue::kBoolean, false);
|
||||
SetEntryInternal(QStringLiteral("SplitClipsCopyNodes"), NodeValue::kBoolean, true);
|
||||
|
||||
@@ -49,28 +49,26 @@ void Folder::Retranslate()
|
||||
SetInputName(kChildInput, tr("Children"));
|
||||
}
|
||||
|
||||
bool ChildExistsWithNameInternal(const Folder* n, const QString& s)
|
||||
Node *GetChildWithNameInternal(const Folder* n, const QString& s)
|
||||
{
|
||||
for (int i=0; i<n->item_child_count(); i++) {
|
||||
Node* child = n->item_child(i);
|
||||
|
||||
if (child->GetLabel() == s) {
|
||||
return true;
|
||||
} else {
|
||||
Folder* subfolder = dynamic_cast<Folder*>(child);
|
||||
|
||||
if (subfolder && ChildExistsWithNameInternal(subfolder, s)) {
|
||||
return true;
|
||||
return child;
|
||||
} else if (Folder* subfolder = dynamic_cast<Folder*>(child)) {
|
||||
if (Node *n2 = GetChildWithNameInternal(subfolder, s)) {
|
||||
return n2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Folder::ChildExistsWithName(const QString &s) const
|
||||
Node *Folder::GetChildWithName(const QString &s) const
|
||||
{
|
||||
return ChildExistsWithNameInternal(this, s);
|
||||
return GetChildWithNameInternal(this, s);
|
||||
}
|
||||
|
||||
bool Folder::HasChildRecursive(Node *child) const
|
||||
|
||||
@@ -63,7 +63,11 @@ public:
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
bool ChildExistsWithName(const QString& s) const;
|
||||
Node *GetChildWithName(const QString& s) const;
|
||||
bool ChildExistsWithName(const QString& s) const
|
||||
{
|
||||
return GetChildWithName(s);
|
||||
}
|
||||
|
||||
bool HasChildRecursive(Node *child) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user