mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +00:00
Everywhere: Run clang-format
This commit is contained in:
parent
0376c127f6
commit
086969277e
1665 changed files with 8479 additions and 8479 deletions
|
@ -24,7 +24,7 @@ NonnullOwnPtr<M3UParser> M3UParser::from_file(const String path)
|
|||
return from_memory(String { contents, NoChomp }, use_utf8);
|
||||
}
|
||||
|
||||
NonnullOwnPtr<M3UParser> M3UParser::from_memory(const String& m3u_contents, bool utf8)
|
||||
NonnullOwnPtr<M3UParser> M3UParser::from_memory(String const& m3u_contents, bool utf8)
|
||||
{
|
||||
auto parser = make<M3UParser>();
|
||||
VERIFY(!m3u_contents.is_null() && !m3u_contents.is_empty() && !m3u_contents.is_whitespace());
|
||||
|
@ -38,7 +38,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info)
|
|||
auto vec = make<Vector<M3UEntry>>();
|
||||
|
||||
if (m_use_utf8) {
|
||||
//TODO: Implement M3U8 parsing
|
||||
// TODO: Implement M3U8 parsing
|
||||
TODO();
|
||||
return vec;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info)
|
|||
auto display_name = ext_inf.value().substring_view(seconds.length() + 1);
|
||||
VERIFY(!display_name.is_empty() && !display_name.is_null() && !display_name.is_empty());
|
||||
metadata_for_next_file.track_display_title = display_name;
|
||||
//TODO: support the alternative, non-standard #EXTINF value of a key=value dictionary
|
||||
// TODO: support the alternative, non-standard #EXTINF value of a key=value dictionary
|
||||
continue;
|
||||
}
|
||||
if (auto playlist = tag("#PLAYLIST:"); playlist.has_value())
|
||||
|
@ -88,7 +88,7 @@ NonnullOwnPtr<Vector<M3UEntry>> M3UParser::parse(bool include_extended_info)
|
|||
metadata_for_next_file.album_artist = move(ext_art.value());
|
||||
else if (auto ext_genre = tag("#EXTGENRE:"); ext_genre.has_value())
|
||||
metadata_for_next_file.album_genre = move(ext_genre.value());
|
||||
//TODO: Support M3A files (M3U files with embedded mp3 files)
|
||||
// TODO: Support M3A files (M3U files with embedded mp3 files)
|
||||
}
|
||||
|
||||
return vec;
|
||||
|
|
|
@ -33,7 +33,7 @@ struct M3UEntry {
|
|||
class M3UParser {
|
||||
public:
|
||||
static NonnullOwnPtr<M3UParser> from_file(String path);
|
||||
static NonnullOwnPtr<M3UParser> from_memory(const String& m3u_contents, bool utf8);
|
||||
static NonnullOwnPtr<M3UParser> from_memory(String const& m3u_contents, bool utf8);
|
||||
|
||||
NonnullOwnPtr<Vector<M3UEntry>> parse(bool include_extended_info);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void PlaybackManager::loop(bool loop)
|
|||
m_loop = loop;
|
||||
}
|
||||
|
||||
void PlaybackManager::seek(const int position)
|
||||
void PlaybackManager::seek(int const position)
|
||||
{
|
||||
if (!m_loader)
|
||||
return;
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
void play();
|
||||
void stop();
|
||||
void pause();
|
||||
void seek(const int position);
|
||||
void seek(int const position);
|
||||
void loop(bool);
|
||||
bool toggle_pause();
|
||||
void set_loader(NonnullRefPtr<Audio::Loader>&&);
|
||||
|
|
|
@ -51,12 +51,12 @@ void Playlist::try_fill_missing_info(Vector<M3UEntry>& entries, StringView path)
|
|||
entry.extended_info->track_display_title = LexicalPath::title(entry.path);
|
||||
|
||||
if (!entry.extended_info->track_length_in_seconds.has_value()) {
|
||||
//TODO: Implement embedded metadata extractor for other audio formats
|
||||
// TODO: Implement embedded metadata extractor for other audio formats
|
||||
if (auto reader = Audio::Loader::create(entry.path); !reader.is_error())
|
||||
entry.extended_info->track_length_in_seconds = reader.value()->total_samples() / reader.value()->sample_rate();
|
||||
}
|
||||
|
||||
//TODO: Implement a metadata parser for the uncomfortably numerous popular embedded metadata formats
|
||||
// TODO: Implement a metadata parser for the uncomfortably numerous popular embedded metadata formats
|
||||
}
|
||||
|
||||
for (auto& entry : to_delete)
|
||||
|
|
|
@ -19,7 +19,7 @@ PlaylistWidget::PlaylistWidget()
|
|||
m_table_view->set_selection_mode(GUI::AbstractView::SelectionMode::SingleSelection);
|
||||
m_table_view->set_selection_behavior(GUI::AbstractView::SelectionBehavior::SelectRows);
|
||||
m_table_view->set_highlight_selected_rows(true);
|
||||
m_table_view->on_doubleclick = [&](const Gfx::Point<int>& point) {
|
||||
m_table_view->on_doubleclick = [&](Gfx::Point<int> const& point) {
|
||||
auto player = dynamic_cast<Player*>(window()->main_widget());
|
||||
auto index = m_table_view->index_at_event_position(point);
|
||||
if (!index.is_valid())
|
||||
|
@ -50,7 +50,7 @@ GUI::Variant PlaylistModel::data(const GUI::ModelIndex& index, GUI::ModelRole ro
|
|||
}
|
||||
if (role == GUI::ModelRole::Sort)
|
||||
return data(index, GUI::ModelRole::Display);
|
||||
if (role == static_cast<GUI::ModelRole>(PlaylistModelCustomRole::FilePath)) //path
|
||||
if (role == static_cast<GUI::ModelRole>(PlaylistModelCustomRole::FilePath)) // path
|
||||
return m_playlist_items[index.row()].path;
|
||||
|
||||
return {};
|
||||
|
|
|
@ -39,7 +39,7 @@ class PlaylistTableView : public GUI::TableView {
|
|||
public:
|
||||
void doubleclick_event(GUI::MouseEvent& event) override;
|
||||
|
||||
Function<void(const Gfx::Point<int>&)> on_doubleclick;
|
||||
Function<void(Gfx::Point<int> const&)> on_doubleclick;
|
||||
|
||||
private:
|
||||
PlaylistTableView();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue