1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 03:37:35 +00:00

Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes

This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
This commit is contained in:
Linus Groh 2021-02-25 21:10:47 +01:00 committed by Andreas Kling
parent be9df404fd
commit e265054c12
73 changed files with 111 additions and 110 deletions

View file

@ -101,7 +101,7 @@ void DisplaySettingsWidget::create_frame()
m_wallpaper_combo = *find_descendant_of_type_named<GUI::ComboBox>("wallpaper_combo");
m_wallpaper_combo->set_only_allow_values_from_model(true);
m_wallpaper_combo->set_model(*GUI::ItemListModel<AK::String>::create(m_wallpapers));
m_wallpaper_combo->set_model(*GUI::ItemListModel<String>::create(m_wallpapers));
m_wallpaper_combo->on_change = [this](auto& text, const GUI::ModelIndex& index) {
String path = text;
if (path.starts_with("/") && m_monitor_widget->set_wallpaper(path)) {
@ -139,7 +139,7 @@ void DisplaySettingsWidget::create_frame()
m_mode_combo = *find_descendant_of_type_named<GUI::ComboBox>("mode_combo");
m_mode_combo->set_only_allow_values_from_model(true);
m_mode_combo->set_model(*GUI::ItemListModel<AK::String>::create(m_modes));
m_mode_combo->set_model(*GUI::ItemListModel<String>::create(m_modes));
m_mode_combo->on_change = [this](auto&, const GUI::ModelIndex& index) {
m_monitor_widget->set_wallpaper_mode(m_modes.at(index.row()));
m_monitor_widget->update();

View file

@ -79,7 +79,7 @@ public:
void refresh();
void launch(const AK::URL&, const LauncherHandler&);
void launch(const URL&, const LauncherHandler&);
Function<void(const StringView& path, bool can_write_in_path)> on_path_change;
Function<void(GUI::AbstractView&)> on_selection_change;

View file

@ -36,7 +36,7 @@ struct KeyPosition {
int height;
bool enabled;
int map_index;
AK::String name;
String name;
};
#define KEY_COUNT 63

View file

@ -189,7 +189,7 @@ void KeyboardMapperWidget::save_to_file(const StringView& file_name)
auto add_array = [&](String name, u32* values) {
JsonArray items;
for (int i = 0; i < 90; i++) {
AK::StringBuilder sb;
StringBuilder sb;
if (values[i])
sb.append_code_point(values[i]);
@ -282,7 +282,7 @@ void KeyboardMapperWidget::set_current_map(const String current_map)
if (index == 0)
continue;
AK::StringBuilder sb;
StringBuilder sb;
sb.append_code_point(map[index]);
m_keys.at(k)->set_text(sb.to_string());

View file

@ -78,7 +78,7 @@ void QSWidget::navigate(Directions direction)
StringBuilder sb;
sb.append("/");
sb.join("/", parts);
AK::String current_dir = sb.to_string();
auto current_dir = sb.to_string();
if (m_files_in_same_dir.is_empty()) {
Core::DirIterator iterator(current_dir, Core::DirIterator::Flags::SkipDots);