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:
+23
-23
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef RENDERTICKET_H
|
||||
#define RENDERTICKET_H
|
||||
#ifndef OAK_RENDERTICKET_H
|
||||
#define OAK_RENDERTICKET_H
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QMutex>
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
* This function is thread safe, unless `lock` is set to false. Then the caller has responsibility
|
||||
* of locking the mutex before and unlocking after this function is called.
|
||||
*/
|
||||
bool IsRunning(bool lock = true);
|
||||
bool is_running(bool lock = true);
|
||||
|
||||
/**
|
||||
* @brief Determine how many times ticket has been finished
|
||||
@@ -52,27 +52,27 @@ public:
|
||||
* This function is thread safe, unless `lock` is set to false. Then the caller has responsibility
|
||||
* of locking the mutex before and unlocking after this function is called.
|
||||
*/
|
||||
int GetFinishCount(bool lock = true);
|
||||
int get_finish_count(bool lock = true);
|
||||
|
||||
/**
|
||||
* @brief Check if this ticket has a result
|
||||
*
|
||||
* If this ticket is running, this will always return false.
|
||||
*/
|
||||
bool HasResult();
|
||||
bool has_result();
|
||||
|
||||
/**
|
||||
* @brief Get value, if any
|
||||
*/
|
||||
QVariant Get();
|
||||
QVariant get();
|
||||
|
||||
/**
|
||||
* @brief Wait for ticket to be finished
|
||||
*
|
||||
* If this ticket is not running, this function returns immediately.
|
||||
*/
|
||||
void WaitForFinished();
|
||||
void WaitForFinished(QMutex *mutex);
|
||||
void wait_for_finished();
|
||||
void wait_for_finished(QMutex *mutex);
|
||||
|
||||
/**
|
||||
* @brief Access this ticket's mutex
|
||||
@@ -90,30 +90,30 @@ public:
|
||||
*
|
||||
* If any value is set, it is cleared.
|
||||
*/
|
||||
void Start();
|
||||
void start();
|
||||
|
||||
/**
|
||||
* @brief Finish ticket with no value
|
||||
*
|
||||
* Sets ticket to no longer running and assume it has received no result.
|
||||
*/
|
||||
void Finish();
|
||||
void finish();
|
||||
|
||||
/**
|
||||
* @brief Finish ticket with value
|
||||
*
|
||||
* Sets ticket to no longer running and provide a value generated by the operation requested.
|
||||
*/
|
||||
void Finish(QVariant result);
|
||||
void finish(QVariant result);
|
||||
|
||||
signals:
|
||||
/**
|
||||
* @brief Emitted when finish has been called by any means (either cancelled or with a result)
|
||||
*/
|
||||
void Finished();
|
||||
void finished();
|
||||
|
||||
private:
|
||||
void FinishInternal(bool has_result, QVariant result);
|
||||
void finish_internal(bool has_result, QVariant result);
|
||||
|
||||
bool is_running_;
|
||||
|
||||
@@ -135,35 +135,35 @@ class RenderTicketWatcher : public QObject {
|
||||
public:
|
||||
RenderTicketWatcher(QObject *parent = nullptr);
|
||||
|
||||
RenderTicketPtr GetTicket() const
|
||||
RenderTicketPtr get_ticket() const
|
||||
{
|
||||
return ticket_;
|
||||
}
|
||||
|
||||
void SetTicket(RenderTicketPtr ticket);
|
||||
void set_ticket(RenderTicketPtr ticket);
|
||||
|
||||
bool IsRunning();
|
||||
bool is_running();
|
||||
|
||||
void WaitForFinished();
|
||||
void wait_for_finished();
|
||||
|
||||
QVariant Get();
|
||||
QVariant get();
|
||||
|
||||
bool HasResult();
|
||||
bool has_result();
|
||||
|
||||
void Cancel();
|
||||
void cancel();
|
||||
|
||||
signals:
|
||||
void Finished(RenderTicketWatcher *watcher);
|
||||
void finished(RenderTicketWatcher *watcher);
|
||||
|
||||
private:
|
||||
RenderTicketPtr ticket_;
|
||||
|
||||
private slots:
|
||||
void TicketFinished();
|
||||
void ticket_finished();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(olive::RenderTicketPtr)
|
||||
|
||||
#endif // RENDERTICKET_H
|
||||
#endif // OAK_RENDERTICKET_H
|
||||
|
||||
Reference in New Issue
Block a user