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:
2026-07-19 16:10:54 +08:00
parent cb1718a103
commit bb40b4923e
1014 changed files with 44257 additions and 44220 deletions
+41 -41
View File
@@ -19,8 +19,8 @@
***/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#ifndef OAK_MAINWINDOW_H
#define OAK_MAINWINDOW_H
#include <kddockwidgets/Config.h>
#include <kddockwidgets/MainWindow.h>
@@ -61,21 +61,21 @@ public:
virtual ~MainWindow() override;
void LoadLayout(const MainWindowLayoutInfo &info);
void load_layout(const MainWindowLayoutInfo &info);
MainWindowLayoutInfo SaveLayout() const;
MainWindowLayoutInfo save_layout() const;
TimelinePanel *OpenSequence(Sequence *sequence, bool enable_focus = true);
TimelinePanel *open_sequence(Sequence *sequence, bool enable_focus = true);
void CloseSequence(Sequence *sequence);
void close_sequence(Sequence *sequence);
bool IsSequenceOpen(Sequence *sequence) const;
bool is_sequence_open(Sequence *sequence) const;
void OpenFolder(Folder *i, bool floating);
void open_folder(Folder *i, bool floating);
void OpenNodeInViewer(ViewerOutput *node);
void open_node_in_viewer(ViewerOutput *node);
enum ProgressStatus { kProgressNone, kProgressShow, kProgressError };
enum ProgressStatus { k_progress_none, k_progress_show, k_progress_error };
/**
* @brief Where applicable, show progress on an operating system level
@@ -83,25 +83,25 @@ public:
* * For Windows, this is shown as progress in the taskbar.
* * For macOS, this is shown as progress in the dock.
*/
void SetApplicationProgressStatus(ProgressStatus status);
void set_application_progress_status(ProgressStatus status);
/**
* @brief If SetApplicationProgressStatus is set to kShowProgress, set the value with this
*
* Expects a percentage (0-100 inclusive).
*/
void SetApplicationProgressValue(int value);
void set_application_progress_value(int value);
void SelectFootage(const QVector<Footage *> &e);
void select_footage(const QVector<Footage *> &e);
public slots:
void SetProject(Project *p);
void set_project(Project *p);
void SetFullscreen(bool fullscreen);
void set_fullscreen(bool fullscreen);
void ToggleMaximizedPanel();
void toggle_maximized_panel();
void SetDefaultLayout();
void set_default_layout();
protected:
virtual void showEvent(QShowEvent *e) override;
@@ -119,28 +119,28 @@ protected:
#endif
private:
TimelinePanel *AppendTimelinePanel();
TimelinePanel *append_timeline_panel();
template <typename T>
T *AppendPanelInternal(const QString &panel_name, QList<T *> &list);
T *append_panel_internal(const QString &panel_name, QList<T *> &list);
template <typename T> void RemovePanelInternal(QList<T *> &list, T *panel);
template <typename T> void remove_panel_internal(QList<T *> &list, T *panel);
void RemoveTimelinePanel(TimelinePanel *panel);
void remove_timeline_panel(TimelinePanel *panel);
void TimelineFocused(ViewerOutput *viewer);
void timeline_focused(ViewerOutput *viewer);
static QString GetCustomShortcutsFile();
static QString get_custom_shortcuts_file();
void LoadCustomShortcuts();
void load_custom_shortcuts();
void SaveCustomShortcuts();
void save_custom_shortcuts();
void UpdateAudioMonitorParams(ViewerOutput *viewer);
void update_audio_monitor_params(ViewerOutput *viewer);
void UpdateNodePanelContextFromTimelinePanel(TimelinePanel *panel);
void update_node_panel_context_from_timeline_panel(TimelinePanel *panel);
void SelectFootageForProjectPanel(const QVector<Footage *> &e,
void select_footage_for_project_panel(const QVector<Footage *> &e,
ProjectPanel *p);
QByteArray premaximized_state_;
@@ -174,32 +174,32 @@ private:
Project *project_;
private slots:
void FocusedPanelChanged(PanelWidget *panel);
void focused_panel_changed(PanelWidget *panel);
void UpdateTitle();
void update_title();
void TimelineCloseRequested();
void timeline_close_requested();
void ViewerCloseRequested();
void viewer_close_requested();
void ViewerWithPanelRemovedFromGraph();
void viewer_with_panel_removed_from_graph();
void FolderPanelCloseRequested();
void folder_panel_close_requested();
void StatusBarDoubleClicked();
void status_bar_double_clicked();
void NodePanelGroupOpenedOrClosed();
void node_panel_group_opened_or_closed();
#ifdef Q_OS_LINUX
void ShowNouveauWarning();
void show_nouveau_warning();
#endif
void TimelinePanelSelectionChanged(const QVector<Block *> &blocks);
void timeline_panel_selection_changed(const QVector<Block *> &blocks);
void ShowWelcomeDialog();
void show_welcome_dialog();
void RevealViewerInProject(ViewerOutput *r);
void RevealViewerInFootageViewer(ViewerOutput *r, const TimeRange &range);
void reveal_viewer_in_project(ViewerOutput *r);
void reveal_viewer_in_footage_viewer(ViewerOutput *r, const TimeRange &range);
};
}