style: unify identifier naming per updated conventions
Automated with clang-tidy readability-identifier-naming (config added to .clang-tidy) plus scripted passes, per the updated rules now documented in CONTRIBUTING.md: - types (class/struct/enum/alias/template params): PascalCase - functions, variables, members: snake_case (incl. rational -> Rational) - private/protected members: trailing underscore; static member variables likewise (instance_, available_themes_) - constants and enum values: snake_case (kLinear -> k_linear, F32P -> f32p); ALL_CAPS reserved for macros - macros: OAK_ prefix (OLIVE_ADD_TEST/OLIVE_ASSERT/OLIVE_CONFIG -> OAK_ADD_TEST/OAK_ASSERT/OAK_CONFIG, GL_PREAMBLE -> OAK_GL_PREAMBLE, include guards -> OAK_*) - file names: all lowercase (Current/Plugin/OliveHost/OliveClip/ OlivePluginInstance -> current/plugin/olivehost/oliveclip/ oliveplugininstance) - getters share the member name sans underscore, setters set_foo() - Qt and third-party (OpenFX) virtual overrides and framework callbacks keep their original names (exempt in .clang-tidy) Manual follow-ups required where automation could not reach: - string-based QMetaObject/SIGNAL/SLOT references updated to renamed methods (AddTask, CreatedFile, DeleteSpecificFile, moveSelectionUp, ...) - macro bodies referencing renamed methods (OLIVE_CONFIG, NODE_DEFAULT_DESTRUCTOR, MANAGEDDISPLAYWIDGET_*) - self-shadowing locals renamed where signals/methods became same-named (size_changed, worker_count, selected_items, import param, filters) - third_party OFX member/namespace usages restored (OFX::Host::*, _created, _clipPrefsDirty, createInstance, clearPersistentMessage) - STL protocol aliases restored (const_iterator) with .clang-tidy ignore rules; qHash overloads restored Full build and test suite pass: ctest 4/4, ~1960 gtest cases green.
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
namespace olive
|
||||
{
|
||||
|
||||
const rational TimelineWorkArea::kResetIn = 0;
|
||||
const rational TimelineWorkArea::kResetOut = RATIONAL_MAX;
|
||||
const Rational TimelineWorkArea::k_reset_in = 0;
|
||||
const Rational TimelineWorkArea::k_reset_out = RATIONAL_MAX;
|
||||
|
||||
TimelineWorkArea::TimelineWorkArea(QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -43,7 +43,7 @@ bool TimelineWorkArea::enabled() const
|
||||
void TimelineWorkArea::set_enabled(bool e)
|
||||
{
|
||||
workarea_enabled_ = e;
|
||||
emit EnabledChanged(workarea_enabled_);
|
||||
emit enabled_changed(workarea_enabled_);
|
||||
}
|
||||
|
||||
const TimeRange &TimelineWorkArea::range() const
|
||||
@@ -54,13 +54,13 @@ const TimeRange &TimelineWorkArea::range() const
|
||||
void TimelineWorkArea::set_range(const TimeRange &range)
|
||||
{
|
||||
workarea_range_ = range;
|
||||
emit RangeChanged(workarea_range_);
|
||||
emit range_changed(workarea_range_);
|
||||
}
|
||||
|
||||
bool TimelineWorkArea::load(QXmlStreamReader *reader)
|
||||
{
|
||||
rational range_in = this->in();
|
||||
rational range_out = this->out();
|
||||
Rational range_in = this->in();
|
||||
Rational range_out = this->out();
|
||||
|
||||
uint version = 0;
|
||||
XMLAttributeLoop(reader, attr)
|
||||
@@ -71,15 +71,15 @@ bool TimelineWorkArea::load(QXmlStreamReader *reader)
|
||||
}
|
||||
Q_UNUSED(version)
|
||||
|
||||
while (XMLReadNextStartElement(reader)) {
|
||||
while (xml_read_next_start_element(reader)) {
|
||||
if (reader->name() == QStringLiteral("enabled")) {
|
||||
this->set_enabled(reader->readElementText() != QStringLiteral("0"));
|
||||
} else if (reader->name() == QStringLiteral("in")) {
|
||||
range_in =
|
||||
rational::fromString(reader->readElementText().toStdString());
|
||||
Rational::from_string(reader->readElementText().toStdString());
|
||||
} else if (reader->name() == QStringLiteral("out")) {
|
||||
range_out =
|
||||
rational::fromString(reader->readElementText().toStdString());
|
||||
Rational::from_string(reader->readElementText().toStdString());
|
||||
} else {
|
||||
reader->skipCurrentElement();
|
||||
}
|
||||
@@ -101,22 +101,22 @@ void TimelineWorkArea::save(QXmlStreamWriter *writer) const
|
||||
writer->writeTextElement(QStringLiteral("enabled"),
|
||||
QString::number(this->enabled()));
|
||||
writer->writeTextElement(QStringLiteral("in"),
|
||||
QString::fromStdString(this->in().toString()));
|
||||
QString::fromStdString(this->in().to_string()));
|
||||
writer->writeTextElement(QStringLiteral("out"),
|
||||
QString::fromStdString(this->out().toString()));
|
||||
QString::fromStdString(this->out().to_string()));
|
||||
}
|
||||
|
||||
const rational &TimelineWorkArea::in() const
|
||||
const Rational &TimelineWorkArea::in() const
|
||||
{
|
||||
return workarea_range_.in();
|
||||
}
|
||||
|
||||
const rational &TimelineWorkArea::out() const
|
||||
const Rational &TimelineWorkArea::out() const
|
||||
{
|
||||
return workarea_range_.out();
|
||||
}
|
||||
|
||||
const rational &TimelineWorkArea::length() const
|
||||
const Rational &TimelineWorkArea::length() const
|
||||
{
|
||||
return workarea_range_.length();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user