Meta+Applications: Make clang-format-10 clean
This commit is contained in:
parent
8940bc3503
commit
9ef1461ec9
Notes:
sideshowbarker
2024-07-19 02:14:59 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/9ef1461ec9c Pull-request: https://github.com/SerenityOS/serenity/pull/3541 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/linusg
27 changed files with 57 additions and 51 deletions
|
@ -33,9 +33,9 @@
|
|||
#include <LibJS/Interpreter.h>
|
||||
#include <LibWeb/DOM/DocumentType.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOMTreeModel.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
#include <LibJS/Runtime/Error.h>
|
||||
#include <LibWeb/DOM/DocumentType.h>
|
||||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOMTreeModel.h>
|
||||
#include <LibWeb/HTML/HTMLBodyElement.h>
|
||||
|
||||
namespace Browser {
|
||||
|
||||
|
@ -94,7 +94,7 @@ ConsoleWidget::ConsoleWidget()
|
|||
output_html.append(String::format("<pre>%s</pre>", escape_html_entities(hint).characters()));
|
||||
m_interpreter->throw_exception<JS::SyntaxError>(error.to_string());
|
||||
} else {
|
||||
m_interpreter->run(m_interpreter->global_object(),*program);
|
||||
m_interpreter->run(m_interpreter->global_object(), *program);
|
||||
}
|
||||
|
||||
if (m_interpreter->exception()) {
|
||||
|
|
|
@ -78,7 +78,6 @@ DownloadWidget::DownloadWidget(const URL& url)
|
|||
browser_image.load_from_file("/res/graphics/download-animation.gif");
|
||||
animation_layout.add_spacer();
|
||||
|
||||
|
||||
auto& source_label = add<GUI::Label>(String::format("From: %s", url.to_string().characters()));
|
||||
source_label.set_text_alignment(Gfx::TextAlignment::CenterLeft);
|
||||
source_label.set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
*/
|
||||
|
||||
#include "DisplaySettings.h"
|
||||
#include <LibGUI/ItemListModel.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibCore/ConfigFile.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
|
@ -35,6 +34,7 @@
|
|||
#include <LibGUI/ComboBox.h>
|
||||
#include <LibGUI/Desktop.h>
|
||||
#include <LibGUI/FilePicker.h>
|
||||
#include <LibGUI/ItemListModel.h>
|
||||
#include <LibGUI/Label.h>
|
||||
#include <LibGUI/MessageBox.h>
|
||||
#include <LibGUI/WindowServerConnection.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
class ManualNode {
|
||||
public:
|
||||
virtual ~ManualNode() {}
|
||||
virtual ~ManualNode() { }
|
||||
|
||||
virtual NonnullOwnPtrVector<ManualNode>& children() const = 0;
|
||||
virtual const ManualNode* parent() const = 0;
|
||||
|
|
|
@ -32,7 +32,7 @@ class ManualSectionNode;
|
|||
|
||||
class ManualPageNode : public ManualNode {
|
||||
public:
|
||||
virtual ~ManualPageNode() override {}
|
||||
virtual ~ManualPageNode() override { }
|
||||
|
||||
ManualPageNode(const ManualSectionNode& section, const StringView& page)
|
||||
: m_section(section)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
class ManualSectionNode : public ManualNode {
|
||||
public:
|
||||
virtual ~ManualSectionNode() override {}
|
||||
virtual ~ManualSectionNode() override { }
|
||||
|
||||
ManualSectionNode(String section, String name)
|
||||
: m_section(section)
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
#include <LibGUI/TreeView.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibMarkdown/Document.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <LibWeb/InProcessWebView.h>
|
||||
#include <LibWeb/Layout/LayoutNode.h>
|
||||
#include <libgen.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -42,6 +42,7 @@ struct KeyPosition {
|
|||
#define KEY_COUNT 63
|
||||
|
||||
struct KeyPosition keys[KEY_COUNT] = {
|
||||
// clang-format off
|
||||
[ 0] = { 0, 0, 0, 0, 0, false, 0, ""},
|
||||
|
||||
[ 1] = { 0x29, 0, 0, 50, 50, true, 41, "`"},
|
||||
|
@ -59,7 +60,6 @@ struct KeyPosition keys[KEY_COUNT] = {
|
|||
[13] = { 0x0D, 612, 0, 50, 50, true, 13, "="},
|
||||
[14] = { 0x0E, 663, 0, 100, 50, false, 0, "back space"},
|
||||
|
||||
|
||||
[15] = { 0x0F, 0, 52, 76, 50, false, 0, "tab"},
|
||||
[16] = { 0x10, 77, 52, 50, 50, true, 16, "q"},
|
||||
[17] = { 0x11, 128, 52, 50, 50, true, 17, "w"},
|
||||
|
@ -75,7 +75,6 @@ struct KeyPosition keys[KEY_COUNT] = {
|
|||
[27] = { 0x1B, 638, 52, 50, 50, true, 27, "]"},
|
||||
[28] = { 0x1C, 689, 52, 74, 50, false, 0, "enter"},
|
||||
|
||||
|
||||
[29] = { 0x3A, 0, 104, 101, 50, false, 0, "caps lock"},
|
||||
[30] = { 0x1E, 103, 104, 50, 50, true, 30, "a"},
|
||||
[31] = { 0x1F, 154, 104, 50, 50, true, 31, "s"},
|
||||
|
@ -90,8 +89,6 @@ struct KeyPosition keys[KEY_COUNT] = {
|
|||
[40] = { 0x28, 614, 104, 50, 50, true, 40, "\""},
|
||||
[41] = { 0x2B, 665, 104, 50, 50, true, 43, "\\"},
|
||||
|
||||
|
||||
|
||||
[42] = { 0x2A, 0, 156, 76, 50, false, 0, "left shift"},
|
||||
[43] = { 0x56, 77, 156, 50, 50, true, 86, "\\"},
|
||||
[44] = { 0x2C, 128, 156, 50, 50, true, 44, "z"},
|
||||
|
@ -114,4 +111,5 @@ struct KeyPosition keys[KEY_COUNT] = {
|
|||
[60] = {0xE05C, 587, 208, 50, 50, false, 0, "right\nsuper"},
|
||||
[61] = {0xE05D, 638, 208, 50, 50, false, 0, "menu"},
|
||||
[62] = {0xE01D, 689, 208, 74, 50, false, 0, "right ctrl"}
|
||||
// clang-format on
|
||||
};
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
return adopt(*new CharacterMapFileListModel(file_names));
|
||||
}
|
||||
|
||||
virtual ~CharacterMapFileListModel() override {}
|
||||
virtual ~CharacterMapFileListModel() override { }
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex&) const override
|
||||
{
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
#include "CharacterMapFileListModel.h"
|
||||
#include <AK/QuickSort.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <AK/QuickSort.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/DirIterator.h>
|
||||
#include <LibCore/File.h>
|
||||
|
@ -59,12 +59,12 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (unveil("/res", "r") < 0 ) {
|
||||
if (unveil("/res", "r") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (unveil("/bin/keymap", "x") < 0 ) {
|
||||
if (unveil("/bin/keymap", "x") < 0) {
|
||||
perror("unveil");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace PixelPaint {
|
|||
|
||||
class CreateNewLayerDialog final : public GUI::Dialog {
|
||||
C_OBJECT(CreateNewLayerDialog);
|
||||
|
||||
public:
|
||||
const Gfx::IntSize& layer_size() const { return m_layer_size; }
|
||||
const String& layer_name() const { return m_layer_name; }
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
#include "Tool.h"
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
virtual void image_did_add_layer(size_t) { }
|
||||
virtual void image_did_remove_layer(size_t) { }
|
||||
virtual void image_did_modify_layer(size_t) { }
|
||||
virtual void image_did_modify_layer_stack() {}
|
||||
virtual void image_did_modify_layer_stack() { }
|
||||
virtual void image_did_change() { }
|
||||
};
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
#include "Layer.h"
|
||||
#include "Tool.h"
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibGfx/Palette.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
|
|
|
@ -108,22 +108,28 @@ void MoveTool::on_context_menu(Layer& layer, GUI::ContextMenuEvent& event)
|
|||
{
|
||||
if (!m_context_menu) {
|
||||
m_context_menu = GUI::Menu::construct();
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_front_action([this](auto&) {
|
||||
m_editor->image()->move_layer_to_front(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_back_action([this](auto&) {
|
||||
m_editor->image()->move_layer_to_back(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_front_action(
|
||||
[this](auto&) {
|
||||
m_editor->image()->move_layer_to_front(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
m_context_menu->add_action(GUI::CommonActions::make_move_to_back_action(
|
||||
[this](auto&) {
|
||||
m_editor->image()->move_layer_to_back(*m_context_menu_layer);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
m_context_menu->add_separator();
|
||||
m_context_menu->add_action(GUI::Action::create("Delete layer", Gfx::Bitmap::load_from_file("/res/icons/16x16/delete.png"), [this](auto&) {
|
||||
m_editor->image()->remove_layer(*m_context_menu_layer);
|
||||
// FIXME: This should not be done imperatively here. Perhaps a Image::Client interface that ImageEditor can implement?
|
||||
if (m_editor->active_layer() == m_context_menu_layer)
|
||||
m_editor->set_active_layer(nullptr);
|
||||
m_editor->layers_did_change();
|
||||
}, m_editor));
|
||||
m_context_menu->add_action(GUI::Action::create(
|
||||
"Delete layer", Gfx::Bitmap::load_from_file("/res/icons/16x16/delete.png"), [this](auto&) {
|
||||
m_editor->image()->remove_layer(*m_context_menu_layer);
|
||||
// FIXME: This should not be done imperatively here. Perhaps a Image::Client interface that ImageEditor can implement?
|
||||
if (m_editor->active_layer() == m_context_menu_layer)
|
||||
m_editor->set_active_layer(nullptr);
|
||||
m_editor->layers_did_change();
|
||||
},
|
||||
m_editor));
|
||||
}
|
||||
m_context_menu_layer = layer;
|
||||
m_context_menu->popup(event.screen_position());
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ public:
|
|||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "PickerTool"; }
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "Tool.h"
|
||||
#include <LibGfx/Point.h>
|
||||
#include <LibGUI/Forward.h>
|
||||
#include <LibGfx/Point.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
|
|
|
@ -40,14 +40,14 @@ public:
|
|||
|
||||
virtual const char* class_name() const = 0;
|
||||
|
||||
virtual void on_mousedown(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||
virtual void on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||
virtual void on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) {}
|
||||
virtual void on_context_menu(Layer&, GUI::ContextMenuEvent&) {}
|
||||
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) {}
|
||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) {}
|
||||
virtual void on_keydown(GUI::KeyEvent&) {}
|
||||
virtual void on_keyup(GUI::KeyEvent&) {}
|
||||
virtual void on_mousedown(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) { }
|
||||
virtual void on_mousemove(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) { }
|
||||
virtual void on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&) { }
|
||||
virtual void on_context_menu(Layer&, GUI::ContextMenuEvent&) { }
|
||||
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) { }
|
||||
virtual void on_second_paint(const Layer&, GUI::PaintEvent&) { }
|
||||
virtual void on_keydown(GUI::KeyEvent&) { }
|
||||
virtual void on_keyup(GUI::KeyEvent&) { }
|
||||
|
||||
virtual bool is_move_tool() const { return false; }
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ public:
|
|||
virtual ~SampleWidget() override;
|
||||
|
||||
void set_buffer(Audio::Buffer*);
|
||||
|
||||
private:
|
||||
SampleWidget();
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include "SoundPlayerWidget.h"
|
||||
#include <LibAudio/ClientConnection.h>
|
||||
#include <LibGfx/CharacterBitmap.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -34,6 +33,7 @@
|
|||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGUI/Window.h>
|
||||
#include <LibGfx/CharacterBitmap.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
class ProcessFileDescriptorMapWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessFileDescriptorMapWidget);
|
||||
|
||||
public:
|
||||
virtual ~ProcessFileDescriptorMapWidget() override;
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
class PagemapPaintingDelegate final : public GUI::TableCellPaintingDelegate {
|
||||
public:
|
||||
virtual ~PagemapPaintingDelegate() override {}
|
||||
virtual ~PagemapPaintingDelegate() override { }
|
||||
|
||||
virtual void paint(GUI::Painter& painter, const Gfx::IntRect& a_rect, const Gfx::Palette&, const GUI::ModelIndex& index) override
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
class ProcessUnveiledPathsWidget final : public GUI::Widget {
|
||||
C_OBJECT(ProcessUnveiledPathsWidget);
|
||||
|
||||
public:
|
||||
virtual ~ProcessUnveiledPathsWidget() override;
|
||||
|
||||
|
|
|
@ -94,8 +94,8 @@ PreviewWidget::PreviewWidget(const Gfx::Palette& preview_palette)
|
|||
m_inactive_window_icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png");
|
||||
|
||||
m_close_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-close.png");
|
||||
m_maximize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-maximize.png");;
|
||||
m_minimize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-minimize.png");;
|
||||
m_maximize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-maximize.png");
|
||||
m_minimize_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/window-minimize.png");
|
||||
|
||||
m_gallery = add<MiniWidgetGallery>();
|
||||
set_greedy_for_hits(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue