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:
@@ -36,7 +36,7 @@ CommandLineParser::~CommandLineParser()
|
||||
}
|
||||
|
||||
const CommandLineParser::Option *
|
||||
CommandLineParser::AddOption(const QStringList &strings,
|
||||
CommandLineParser::add_option(const QStringList &strings,
|
||||
const QString &description, bool takes_arg,
|
||||
const QString &arg_placeholder, bool hidden)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ CommandLineParser::AddOption(const QStringList &strings,
|
||||
}
|
||||
|
||||
const CommandLineParser::PositionalArgument *
|
||||
CommandLineParser::AddPositionalArgument(const QString &name,
|
||||
CommandLineParser::add_positional_argument(const QString &name,
|
||||
const QString &description,
|
||||
bool required)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ CommandLineParser::AddPositionalArgument(const QString &name,
|
||||
return a;
|
||||
}
|
||||
|
||||
void CommandLineParser::Process(const QVector<QString> &argv)
|
||||
void CommandLineParser::process(const QVector<QString> &argv)
|
||||
{
|
||||
int positional_index = 0;
|
||||
|
||||
@@ -79,10 +79,10 @@ void CommandLineParser::Process(const QVector<QString> &argv)
|
||||
foreach (const QString &s, o.args) {
|
||||
if (!s.compare(arg_basename, Qt::CaseInsensitive)) {
|
||||
// Flag discovered!
|
||||
o.option->Set();
|
||||
o.option->set();
|
||||
|
||||
if (o.takes_arg && i + 1 < argv.size()) {
|
||||
o.option->SetSetting(argv[i + 1]);
|
||||
o.option->set_setting(argv[i + 1]);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ found_flag:
|
||||
} else {
|
||||
// Must be a positional flag
|
||||
if (positional_index < positional_args_.size()) {
|
||||
positional_args_[positional_index].option->SetSetting(argv[i]);
|
||||
positional_args_[positional_index].option->set_setting(argv[i]);
|
||||
positional_index++;
|
||||
} else {
|
||||
qWarning() << "Unknown parameter:" << argv[i];
|
||||
@@ -109,7 +109,7 @@ found_flag:
|
||||
}
|
||||
}
|
||||
|
||||
void CommandLineParser::PrintHelp(const char *filename)
|
||||
void CommandLineParser::print_help(const char *filename)
|
||||
{
|
||||
printf("%s %s\n", QCoreApplication::applicationName().toUtf8().constData(),
|
||||
QCoreApplication::applicationVersion().toUtf8().constData());
|
||||
|
||||
Reference in New Issue
Block a user