mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:48:11 +00:00
Meta+DevTools: Make clang-format-10 clean
This commit is contained in:
parent
b3909ac0dd
commit
25488ddcad
18 changed files with 24 additions and 53 deletions
|
@ -72,7 +72,7 @@ private:
|
||||||
Vector<String> m_suggestions;
|
Vector<String> m_suggestions;
|
||||||
};
|
};
|
||||||
|
|
||||||
AutoCompleteBox::~AutoCompleteBox() {}
|
AutoCompleteBox::~AutoCompleteBox() { }
|
||||||
|
|
||||||
AutoCompleteBox::AutoCompleteBox(WeakPtr<Editor> editor)
|
AutoCompleteBox::AutoCompleteBox(WeakPtr<Editor> editor)
|
||||||
: m_editor(move(editor))
|
: m_editor(move(editor))
|
||||||
|
|
|
@ -26,7 +26,6 @@ set(SOURCES
|
||||||
Project.cpp
|
Project.cpp
|
||||||
ProjectFile.cpp
|
ProjectFile.cpp
|
||||||
TerminalWrapper.cpp
|
TerminalWrapper.cpp
|
||||||
Tool.cpp
|
|
||||||
WidgetTool.cpp
|
WidgetTool.cpp
|
||||||
WidgetTreeModel.cpp
|
WidgetTreeModel.cpp
|
||||||
main.cpp
|
main.cpp
|
||||||
|
|
|
@ -66,7 +66,7 @@ void DebugInfoWidget::init_toolbar()
|
||||||
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
pthread_mutex_unlock(Debugger::the().continue_mutex());
|
||||||
});
|
});
|
||||||
|
|
||||||
m_step_out_action = GUI::Action::create("Step Out", { Mod_Shift, Key_F11 },Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-out.png"), [](auto&) {
|
m_step_out_action = GUI::Action::create("Step Out", { Mod_Shift, Key_F11 }, Gfx::Bitmap::load_from_file("/res/icons/16x16/debug-step-out.png"), [](auto&) {
|
||||||
pthread_mutex_lock(Debugger::the().continue_mutex());
|
pthread_mutex_lock(Debugger::the().continue_mutex());
|
||||||
Debugger::the().set_continue_type(Debugger::ContinueType::SourceStepOut);
|
Debugger::the().set_continue_type(Debugger::ContinueType::SourceStepOut);
|
||||||
pthread_cond_signal(Debugger::the().continue_cond());
|
pthread_cond_signal(Debugger::the().continue_cond());
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace HackStudio {
|
||||||
class DebugInfoWidget final : public GUI::Widget {
|
class DebugInfoWidget final : public GUI::Widget {
|
||||||
C_OBJECT(DebugInfoWidget)
|
C_OBJECT(DebugInfoWidget)
|
||||||
public:
|
public:
|
||||||
virtual ~DebugInfoWidget() override {}
|
virtual ~DebugInfoWidget() override { }
|
||||||
|
|
||||||
void update_state(const Debug::DebugSession&, const PtraceRegisters&);
|
void update_state(const Debug::DebugSession&, const PtraceRegisters&);
|
||||||
void program_stopped();
|
void program_stopped();
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
#include "DisassemblyWidget.h"
|
#include "DisassemblyWidget.h"
|
||||||
#include "DisassemblyModel.h"
|
#include "DisassemblyModel.h"
|
||||||
#include <LibGfx/Palette.h>
|
|
||||||
#include <LibGUI/BoxLayout.h>
|
#include <LibGUI/BoxLayout.h>
|
||||||
#include <LibGUI/Painter.h>
|
#include <LibGUI/Painter.h>
|
||||||
|
#include <LibGfx/Palette.h>
|
||||||
|
|
||||||
namespace HackStudio {
|
namespace HackStudio {
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
#include "Debugger.h"
|
#include "Debugger.h"
|
||||||
#include <AK/NonnullOwnPtr.h>
|
#include <AK/NonnullOwnPtr.h>
|
||||||
#include <LibGUI/Label.h>
|
#include <LibGUI/Label.h>
|
||||||
#include <LibGUI/TableView.h>
|
|
||||||
#include <LibGUI/Model.h>
|
#include <LibGUI/Model.h>
|
||||||
|
#include <LibGUI/TableView.h>
|
||||||
#include <LibGUI/Widget.h>
|
#include <LibGUI/Widget.h>
|
||||||
#include <sys/arch/i386/regs.h>
|
#include <sys/arch/i386/regs.h>
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ public:
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void update() override {}
|
virtual void update() override { }
|
||||||
virtual GUI::ModelIndex index(int row, int column = 0, const GUI::ModelIndex& = GUI::ModelIndex()) const override { return create_index(row, column, &m_matches.at(row)); }
|
virtual GUI::ModelIndex index(int row, int column = 0, const GUI::ModelIndex& = GUI::ModelIndex()) const override { return create_index(row, column, &m_matches.at(row)); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -35,7 +35,7 @@ namespace HackStudio {
|
||||||
class FindInFilesWidget final : public GUI::Widget {
|
class FindInFilesWidget final : public GUI::Widget {
|
||||||
C_OBJECT(FindInFilesWidget)
|
C_OBJECT(FindInFilesWidget)
|
||||||
public:
|
public:
|
||||||
virtual ~FindInFilesWidget() override {}
|
virtual ~FindInFilesWidget() override { }
|
||||||
|
|
||||||
void focus_textbox_and_select_all();
|
void focus_textbox_and_select_all();
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
|
|
||||||
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
|
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
|
||||||
|
|
||||||
virtual void update() override {}
|
virtual void update() override { }
|
||||||
virtual GUI::ModelIndex index(int row, int column, const GUI::ModelIndex&) const override;
|
virtual GUI::ModelIndex index(int row, int column, const GUI::ModelIndex&) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -39,7 +39,7 @@ typedef Function<void(const String& original_content, const String& diff)> ViewD
|
||||||
class GitWidget final : public GUI::Widget {
|
class GitWidget final : public GUI::Widget {
|
||||||
C_OBJECT(GitWidget)
|
C_OBJECT(GitWidget)
|
||||||
public:
|
public:
|
||||||
virtual ~GitWidget() override {}
|
virtual ~GitWidget() override { }
|
||||||
|
|
||||||
void refresh();
|
void refresh();
|
||||||
void set_view_diff_callback(ViewDiffCallback callback);
|
void set_view_diff_callback(ViewDiffCallback callback);
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/String.h>
|
|
||||||
#include <AK/JsonObject.h>
|
#include <AK/JsonObject.h>
|
||||||
#include <AK/NonnullOwnPtrVector.h>
|
#include <AK/NonnullOwnPtrVector.h>
|
||||||
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
|
||||||
class RemoteObjectPropertyModel;
|
class RemoteObjectPropertyModel;
|
||||||
|
|
|
@ -33,12 +33,12 @@ class Profile;
|
||||||
class ProfileNode;
|
class ProfileNode;
|
||||||
|
|
||||||
struct InstructionData {
|
struct InstructionData {
|
||||||
X86::Instruction insn;
|
X86::Instruction insn;
|
||||||
String disassembly;
|
String disassembly;
|
||||||
StringView bytes;
|
StringView bytes;
|
||||||
FlatPtr address { 0 };
|
FlatPtr address { 0 };
|
||||||
u32 event_count { 0 };
|
u32 event_count { 0 };
|
||||||
float percent { 0 };
|
float percent { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class DisassemblyModel final : public GUI::Model {
|
class DisassemblyModel final : public GUI::Model {
|
||||||
|
|
|
@ -117,8 +117,7 @@ void Profile::rebuild_tree()
|
||||||
|
|
||||||
ProfileNode* node = nullptr;
|
ProfileNode* node = nullptr;
|
||||||
|
|
||||||
auto for_each_frame = [&]<typename Callback>(Callback callback)
|
auto for_each_frame = [&]<typename Callback>(Callback callback) {
|
||||||
{
|
|
||||||
if (!m_inverted) {
|
if (!m_inverted) {
|
||||||
for (size_t i = 0; i < event.frames.size(); ++i) {
|
for (size_t i = 0; i < event.frames.size(); ++i) {
|
||||||
if (callback(event.frames.at(i), i == event.frames.size() - 1) == IterationDecision::Break)
|
if (callback(event.frames.at(i), i == event.frames.size() - 1) == IterationDecision::Break)
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include <LibGUI/Model.h>
|
#include <LibGUI/Model.h>
|
||||||
|
|
||||||
|
|
||||||
class Profile;
|
class Profile;
|
||||||
|
|
||||||
class ProfileModel final : public GUI::Model {
|
class ProfileModel final : public GUI::Model {
|
||||||
|
|
|
@ -37,7 +37,7 @@ class BoolValuesModel final : public GUI::Model {
|
||||||
public:
|
public:
|
||||||
virtual int row_count(const GUI::ModelIndex&) const override { return 2; }
|
virtual int row_count(const GUI::ModelIndex&) const override { return 2; }
|
||||||
virtual int column_count(const GUI::ModelIndex&) const override { return 1; }
|
virtual int column_count(const GUI::ModelIndex&) const override { return 1; }
|
||||||
virtual void update() override {}
|
virtual void update() override { }
|
||||||
virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override
|
virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override
|
||||||
{
|
{
|
||||||
if (role != GUI::ModelRole::Display)
|
if (role != GUI::ModelRole::Display)
|
||||||
|
@ -54,8 +54,8 @@ public:
|
||||||
|
|
||||||
class BoolModelEditingDelegate : public GUI::ModelEditingDelegate {
|
class BoolModelEditingDelegate : public GUI::ModelEditingDelegate {
|
||||||
public:
|
public:
|
||||||
BoolModelEditingDelegate() {}
|
BoolModelEditingDelegate() { }
|
||||||
virtual ~BoolModelEditingDelegate() override {}
|
virtual ~BoolModelEditingDelegate() override { }
|
||||||
|
|
||||||
virtual RefPtr<GUI::Widget> create_widget() override
|
virtual RefPtr<GUI::Widget> create_widget() override
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,9 +130,9 @@ void VBWidget::add_property(const String& name, Function<GUI::Variant(const GUI:
|
||||||
prop.m_setter = move(setter);
|
prop.m_setter = move(setter);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VB_ADD_PROPERTY(gclass, name, getter, setter, variant_type) \
|
#define VB_ADD_PROPERTY(gclass, name, getter, setter, variant_type) \
|
||||||
add_property( \
|
add_property( \
|
||||||
name, \
|
name, \
|
||||||
[](auto& widget) -> GUI::Variant { return ((const gclass&)widget).getter(); }, \
|
[](auto& widget) -> GUI::Variant { return ((const gclass&)widget).getter(); }, \
|
||||||
[](auto& widget, auto& value) { ((gclass&)widget).setter(value.to_##variant_type()); })
|
[](auto& widget, auto& value) { ((gclass&)widget).setter(value.to_##variant_type()); })
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
#include <AK/NonnullRefPtr.h>
|
#include <AK/NonnullRefPtr.h>
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/Weakable.h>
|
#include <AK/Weakable.h>
|
||||||
#include <LibGfx/Rect.h>
|
|
||||||
#include <LibGUI/Widget.h>
|
#include <LibGUI/Widget.h>
|
||||||
|
#include <LibGfx/Rect.h>
|
||||||
|
|
||||||
class VBForm;
|
class VBForm;
|
||||||
class VBProperty;
|
class VBProperty;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue