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:
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef ACCELERATEDJOB_H
|
||||
#define ACCELERATEDJOB_H
|
||||
#ifndef OAK_ACCELERATEDJOB_H
|
||||
#define OAK_ACCELERATEDJOB_H
|
||||
|
||||
#include "node/param.h"
|
||||
#include "node/valuedatabase.h"
|
||||
@@ -36,22 +36,22 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual NodeValue Get(const QString &input) const
|
||||
virtual NodeValue get(const QString &input) const
|
||||
{
|
||||
return value_map_.value(input);
|
||||
}
|
||||
|
||||
virtual void Insert(const QString &input, const NodeValueRow &row)
|
||||
virtual void insert(const QString &input, const NodeValueRow &row)
|
||||
{
|
||||
value_map_.insert(input, row.value(input));
|
||||
}
|
||||
|
||||
virtual void Insert(const QString &input, const NodeValue &value)
|
||||
virtual void insert(const QString &input, const NodeValue &value)
|
||||
{
|
||||
value_map_.insert(input, value);
|
||||
}
|
||||
|
||||
virtual void Insert(const NodeValueRow &row)
|
||||
virtual void insert(const NodeValueRow &row)
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
value_map_.insert(row);
|
||||
@@ -62,11 +62,11 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual const NodeValueRow &GetValues() const
|
||||
virtual const NodeValueRow &get_values() const
|
||||
{
|
||||
return value_map_;
|
||||
}
|
||||
virtual NodeValueRow &GetValues()
|
||||
virtual NodeValueRow &get_values()
|
||||
{
|
||||
return value_map_;
|
||||
}
|
||||
@@ -77,4 +77,4 @@ protected:
|
||||
|
||||
}
|
||||
|
||||
#endif // ACCELERATEDJOB_H
|
||||
#endif // OAK_ACCELERATEDJOB_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef CACHEJOB_H
|
||||
#define CACHEJOB_H
|
||||
#ifndef OAK_CACHEJOB_H
|
||||
#define OAK_CACHEJOB_H
|
||||
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
@@ -39,20 +39,20 @@ public:
|
||||
filename_ = filename;
|
||||
}
|
||||
|
||||
const QString &GetFilename() const
|
||||
const QString &get_filename() const
|
||||
{
|
||||
return filename_;
|
||||
}
|
||||
void SetFilename(const QString &s)
|
||||
void set_filename(const QString &s)
|
||||
{
|
||||
filename_ = s;
|
||||
}
|
||||
|
||||
const NodeValue &GetFallback() const
|
||||
const NodeValue &get_fallback() const
|
||||
{
|
||||
return fallback_;
|
||||
}
|
||||
void SetFallback(const NodeValue &val)
|
||||
void set_fallback(const NodeValue &val)
|
||||
{
|
||||
fallback_ = val;
|
||||
}
|
||||
@@ -65,4 +65,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif // CACHEJOB_H
|
||||
#endif // OAK_CACHEJOB_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef COLORTRANSFORMJOB_H
|
||||
#define COLORTRANSFORMJOB_H
|
||||
#ifndef OAK_COLORTRANSFORMJOB_H
|
||||
#define OAK_COLORTRANSFORMJOB_H
|
||||
|
||||
#include <QMatrix4x4>
|
||||
#include <QString>
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
{
|
||||
processor_ = nullptr;
|
||||
custom_shader_src_ = nullptr;
|
||||
input_alpha_association_ = kAlphaNone;
|
||||
input_alpha_association_ = k_alpha_none;
|
||||
clear_destination_ = true;
|
||||
force_opaque_ = false;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
ColorTransformJob(const NodeValueRow &row)
|
||||
: ColorTransformJob()
|
||||
{
|
||||
Insert(row);
|
||||
insert(row);
|
||||
}
|
||||
|
||||
QString id() const
|
||||
@@ -61,98 +61,98 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetOverrideID(const QString &id)
|
||||
void set_override_id(const QString &id)
|
||||
{
|
||||
id_ = id;
|
||||
}
|
||||
|
||||
const NodeValue &GetInputTexture() const
|
||||
const NodeValue &get_input_texture() const
|
||||
{
|
||||
return input_texture_;
|
||||
}
|
||||
void SetInputTexture(const NodeValue &tex)
|
||||
void set_input_texture(const NodeValue &tex)
|
||||
{
|
||||
input_texture_ = tex;
|
||||
}
|
||||
void SetInputTexture(TexturePtr tex)
|
||||
void set_input_texture(TexturePtr tex)
|
||||
{
|
||||
Q_ASSERT(!tex->IsDummy());
|
||||
input_texture_ = NodeValue(NodeValue::kTexture, tex);
|
||||
Q_ASSERT(!tex->is_dummy());
|
||||
input_texture_ = NodeValue(NodeValue::k_texture, tex);
|
||||
}
|
||||
|
||||
ColorProcessorPtr GetColorProcessor() const
|
||||
ColorProcessorPtr get_color_processor() const
|
||||
{
|
||||
return processor_;
|
||||
}
|
||||
void SetColorProcessor(ColorProcessorPtr p)
|
||||
void set_color_processor(ColorProcessorPtr p)
|
||||
{
|
||||
processor_ = p;
|
||||
}
|
||||
|
||||
const AlphaAssociated &GetInputAlphaAssociation() const
|
||||
const AlphaAssociated &get_input_alpha_association() const
|
||||
{
|
||||
return input_alpha_association_;
|
||||
}
|
||||
void SetInputAlphaAssociation(const AlphaAssociated &e)
|
||||
void set_input_alpha_association(const AlphaAssociated &e)
|
||||
{
|
||||
input_alpha_association_ = e;
|
||||
}
|
||||
|
||||
const Node *CustomShaderSource() const
|
||||
const Node *custom_shader_source() const
|
||||
{
|
||||
return custom_shader_src_;
|
||||
}
|
||||
const QString &CustomShaderID() const
|
||||
const QString &custom_shader_id() const
|
||||
{
|
||||
return custom_shader_id_;
|
||||
}
|
||||
void SetNeedsCustomShader(const Node *node, const QString &id = QString())
|
||||
void set_needs_custom_shader(const Node *node, const QString &id = QString())
|
||||
{
|
||||
custom_shader_src_ = node;
|
||||
custom_shader_id_ = id;
|
||||
}
|
||||
|
||||
bool IsClearDestinationEnabled() const
|
||||
bool is_clear_destination_enabled() const
|
||||
{
|
||||
return clear_destination_;
|
||||
}
|
||||
void SetClearDestinationEnabled(bool e)
|
||||
void set_clear_destination_enabled(bool e)
|
||||
{
|
||||
clear_destination_ = e;
|
||||
}
|
||||
|
||||
const QMatrix4x4 &GetTransformMatrix() const
|
||||
const QMatrix4x4 &get_transform_matrix() const
|
||||
{
|
||||
return matrix_;
|
||||
}
|
||||
void SetTransformMatrix(const QMatrix4x4 &m)
|
||||
void set_transform_matrix(const QMatrix4x4 &m)
|
||||
{
|
||||
matrix_ = m;
|
||||
}
|
||||
|
||||
const QMatrix4x4 &GetCropMatrix() const
|
||||
const QMatrix4x4 &get_crop_matrix() const
|
||||
{
|
||||
return crop_matrix_;
|
||||
}
|
||||
void SetCropMatrix(const QMatrix4x4 &m)
|
||||
void set_crop_matrix(const QMatrix4x4 &m)
|
||||
{
|
||||
crop_matrix_ = m;
|
||||
}
|
||||
|
||||
const QString &GetFunctionName() const
|
||||
const QString &get_function_name() const
|
||||
{
|
||||
return function_name_;
|
||||
}
|
||||
void SetFunctionName(const QString &function_name = QString())
|
||||
void set_function_name(const QString &function_name = QString())
|
||||
{
|
||||
function_name_ = function_name;
|
||||
};
|
||||
|
||||
bool GetForceOpaque() const
|
||||
bool get_force_opaque() const
|
||||
{
|
||||
return force_opaque_;
|
||||
}
|
||||
void SetForceOpaque(bool e)
|
||||
void set_force_opaque(bool e)
|
||||
{
|
||||
force_opaque_ = e;
|
||||
}
|
||||
@@ -181,4 +181,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif // COLORTRANSFORMJOB_H
|
||||
#endif // OAK_COLORTRANSFORMJOB_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef FOOTAGEJOB_H
|
||||
#define FOOTAGEJOB_H
|
||||
#ifndef OAK_FOOTAGEJOB_H
|
||||
#define OAK_FOOTAGEJOB_H
|
||||
|
||||
#include "node/project/footage/footage.h"
|
||||
|
||||
@@ -30,13 +30,13 @@ namespace olive
|
||||
class FootageJob : public AcceleratedJob {
|
||||
public:
|
||||
FootageJob()
|
||||
: type_(Track::kNone)
|
||||
: type_(Track::k_none)
|
||||
{
|
||||
}
|
||||
|
||||
FootageJob(const TimeRange &time, const QString &decoder,
|
||||
const QString &filename, Track::Type type,
|
||||
const rational &length, LoopMode loop_mode)
|
||||
const Rational &length, LoopMode loop_mode)
|
||||
: time_(time)
|
||||
, decoder_(decoder)
|
||||
, filename_(filename)
|
||||
@@ -120,12 +120,12 @@ public:
|
||||
cache_path_ = p;
|
||||
}
|
||||
|
||||
const rational &length() const
|
||||
const Rational &length() const
|
||||
{
|
||||
return length_;
|
||||
}
|
||||
|
||||
void set_length(const rational &length)
|
||||
void set_length(const Rational &length)
|
||||
{
|
||||
length_ = length;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
|
||||
QString cache_path_;
|
||||
|
||||
rational length_;
|
||||
Rational length_;
|
||||
|
||||
LoopMode loop_mode_;
|
||||
};
|
||||
@@ -176,4 +176,4 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE(olive::FootageJob)
|
||||
|
||||
#endif // FOOTAGEJOB_H
|
||||
#endif // OAK_FOOTAGEJOB_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef GENERATEJOB_H
|
||||
#define GENERATEJOB_H
|
||||
#ifndef OAK_GENERATEJOB_H
|
||||
#define OAK_GENERATEJOB_H
|
||||
|
||||
#include "acceleratedjob.h"
|
||||
#include "codec/frame.h"
|
||||
@@ -34,10 +34,10 @@ public:
|
||||
GenerateJob(const NodeValueRow &row)
|
||||
: GenerateJob()
|
||||
{
|
||||
Insert(row);
|
||||
insert(row);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // GENERATEJOB_H
|
||||
#endif // OAK_GENERATEJOB_H
|
||||
|
||||
+14
-14
@@ -17,10 +17,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PLUGINJOB_H
|
||||
#define PLUGINJOB_H
|
||||
#ifndef OAK_PLUGINJOB_H
|
||||
#define OAK_PLUGINJOB_H
|
||||
#include "acceleratedjob.h"
|
||||
#include "pluginSupport/OlivePluginInstance.h"
|
||||
#include "pluginSupport/oliveplugininstance.h"
|
||||
#include "olive/core/util/rational.h"
|
||||
|
||||
#include <any>
|
||||
@@ -33,19 +33,19 @@ namespace plugin
|
||||
|
||||
class PluginJob : public AcceleratedJob {
|
||||
public:
|
||||
explicit PluginJob(const OFX::Host::ImageEffect::Instance *pluginInstance,
|
||||
explicit PluginJob(const OFX::Host::ImageEffect::Instance *plugin_instance,
|
||||
const PluginNode *node, NodeValueRow row,
|
||||
const olive::core::rational &time)
|
||||
const olive::core::Rational &time)
|
||||
: AcceleratedJob()
|
||||
, time_seconds_(time.toDouble())
|
||||
, time_seconds_(time.to_double())
|
||||
{
|
||||
this->pluginInstance_ = pluginInstance;
|
||||
this->pluginInstance_ = plugin_instance;
|
||||
this->node_ = node;
|
||||
Insert(row);
|
||||
insert(row);
|
||||
}
|
||||
explicit PluginJob(const OFX::Host::ImageEffect::Instance *pluginInstance,
|
||||
explicit PluginJob(const OFX::Host::ImageEffect::Instance *plugin_instance,
|
||||
const PluginNode *node, NodeValueRow row)
|
||||
: PluginJob(pluginInstance, node, row, olive::core::rational(0))
|
||||
: PluginJob(plugin_instance, node, row, olive::core::Rational(0))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
return const_cast<PluginNode *>(node_);
|
||||
}
|
||||
|
||||
OFX::Host::ImageEffect::Instance *pluginInstance()
|
||||
OFX::Host::ImageEffect::Instance *plugin_instance()
|
||||
{
|
||||
return const_cast<OFX::Host::ImageEffect::Instance *>(pluginInstance_);
|
||||
}
|
||||
@@ -67,9 +67,9 @@ public:
|
||||
private:
|
||||
const OFX::Host::ImageEffect::Instance *pluginInstance_ = nullptr;
|
||||
|
||||
QHash<OfxTime, QHash<QString, std::any>> paramsOnTime;
|
||||
QHash<OfxTime, QHash<QString, std::any>> paramsOnTime_;
|
||||
|
||||
QHash<QString, std::any> params;
|
||||
QHash<QString, std::any> params_;
|
||||
|
||||
const PluginNode *node_ = nullptr;
|
||||
double time_seconds_ = 0.0;
|
||||
@@ -78,4 +78,4 @@ private:
|
||||
} // plugin
|
||||
} // olive
|
||||
|
||||
#endif //PLUGINJOB_H
|
||||
#endif //OAK_PLUGINJOB_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef SAMPLEJOB_H
|
||||
#define SAMPLEJOB_H
|
||||
#ifndef OAK_SAMPLEJOB_H
|
||||
#define OAK_SAMPLEJOB_H
|
||||
|
||||
#include "acceleratedjob.h"
|
||||
|
||||
@@ -35,14 +35,14 @@ public:
|
||||
|
||||
SampleJob(const TimeRange &time, const NodeValue &value)
|
||||
{
|
||||
samples_ = value.toSamples();
|
||||
samples_ = value.to_samples();
|
||||
time_ = time;
|
||||
}
|
||||
|
||||
SampleJob(const TimeRange &time, const QString &from,
|
||||
const NodeValueRow &row)
|
||||
{
|
||||
samples_ = row[from].toSamples();
|
||||
samples_ = row[from].to_samples();
|
||||
time_ = time;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
return samples_;
|
||||
}
|
||||
|
||||
bool HasSamples() const
|
||||
bool has_samples() const
|
||||
{
|
||||
return samples_.is_allocated();
|
||||
}
|
||||
@@ -71,4 +71,4 @@ private:
|
||||
|
||||
Q_DECLARE_METATYPE(olive::SampleJob)
|
||||
|
||||
#endif // SAMPLEJOB_H
|
||||
#endif // OAK_SAMPLEJOB_H
|
||||
|
||||
+18
-18
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef SHADERJOB_H
|
||||
#define SHADERJOB_H
|
||||
#ifndef OAK_SHADERJOB_H
|
||||
#define OAK_SHADERJOB_H
|
||||
|
||||
#include <QMatrix4x4>
|
||||
#include <QVector>
|
||||
@@ -42,66 +42,66 @@ public:
|
||||
ShaderJob(const NodeValueRow &row)
|
||||
: ShaderJob()
|
||||
{
|
||||
Insert(row);
|
||||
insert(row);
|
||||
}
|
||||
|
||||
const QString &GetShaderID() const
|
||||
const QString &get_shader_id() const
|
||||
{
|
||||
return shader_id_;
|
||||
}
|
||||
|
||||
void SetShaderID(const QString &id)
|
||||
void set_shader_id(const QString &id)
|
||||
{
|
||||
shader_id_ = id;
|
||||
}
|
||||
|
||||
void SetIterations(int iterations, const NodeInput &iterative_input)
|
||||
void set_iterations(int iterations, const NodeInput &iterative_input)
|
||||
{
|
||||
SetIterations(iterations, iterative_input.input());
|
||||
set_iterations(iterations, iterative_input.input());
|
||||
}
|
||||
|
||||
void SetIterations(int iterations, const QString &iterative_input)
|
||||
void set_iterations(int iterations, const QString &iterative_input)
|
||||
{
|
||||
iterations_ = iterations;
|
||||
iterative_input_ = iterative_input;
|
||||
}
|
||||
|
||||
int GetIterationCount() const
|
||||
int get_iteration_count() const
|
||||
{
|
||||
return iterations_;
|
||||
}
|
||||
|
||||
const QString &GetIterativeInput() const
|
||||
const QString &get_iterative_input() const
|
||||
{
|
||||
return iterative_input_;
|
||||
}
|
||||
|
||||
Texture::Interpolation GetInterpolation(const QString &id) const
|
||||
Texture::Interpolation get_interpolation(const QString &id) const
|
||||
{
|
||||
return interpolation_.value(id, Texture::kDefaultInterpolation);
|
||||
return interpolation_.value(id, Texture::k_default_interpolation);
|
||||
}
|
||||
|
||||
const QHash<QString, Texture::Interpolation> &GetInterpolationMap() const
|
||||
const QHash<QString, Texture::Interpolation> &get_interpolation_map() const
|
||||
{
|
||||
return interpolation_;
|
||||
}
|
||||
|
||||
void SetInterpolation(const NodeInput &input, Texture::Interpolation interp)
|
||||
void set_interpolation(const NodeInput &input, Texture::Interpolation interp)
|
||||
{
|
||||
interpolation_.insert(input.input(), interp);
|
||||
}
|
||||
|
||||
void SetInterpolation(const QString &id, Texture::Interpolation interp)
|
||||
void set_interpolation(const QString &id, Texture::Interpolation interp)
|
||||
{
|
||||
interpolation_.insert(id, interp);
|
||||
}
|
||||
|
||||
void SetVertexCoordinates(const QVector<float> &vertex_coords)
|
||||
void set_vertex_coordinates(const QVector<float> &vertex_coords)
|
||||
{
|
||||
vertex_overrides_ = vertex_coords;
|
||||
}
|
||||
|
||||
const QVector<float> &GetVertexCoordinates()
|
||||
const QVector<float> &get_vertex_coordinates()
|
||||
{
|
||||
return vertex_overrides_;
|
||||
}
|
||||
@@ -120,4 +120,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif // SHADERJOB_H
|
||||
#endif // OAK_SHADERJOB_H
|
||||
|
||||
Reference in New Issue
Block a user