LibGUI+FileManager: Misc tweaks courtesy of clang-format

This commit is contained in:
Sergey Bugaev 2020-01-10 19:06:00 +03:00 committed by Andreas Kling
parent fdeb91e000
commit 10324f95b0
Notes: sideshowbarker 2024-07-19 10:13:22 +09:00
16 changed files with 21 additions and 20 deletions

View File

@ -272,8 +272,10 @@ int main(int argc, char** argv)
properties->exec();
});
enum class ConfirmBeforeDelete { No,
Yes };
enum class ConfirmBeforeDelete {
No,
Yes
};
auto do_delete = [&](ConfirmBeforeDelete confirm, const GAction& action) {
Vector<String> paths;

View File

@ -1,8 +1,8 @@
#pragma once
#include <LibCore/CTimer.h>
#include <LibGUI/GWidget.h>
#include <LibDraw/TextAlignment.h>
#include <LibGUI/GWidget.h>
class GPainter;

View File

@ -1,11 +1,11 @@
#pragma once
#include <AK/String.h>
#include <AK/Badge.h>
#include <AK/Function.h>
#include <AK/HashTable.h>
#include <AK/NonnullRefPtr.h>
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/WeakPtr.h>
#include <AK/Weakable.h>
#include <LibDraw/GraphicsBitmap.h>

View File

@ -1,10 +1,10 @@
#include <AK/StringBuilder.h>
#include <Kernel/KeyCode.h>
#include <LibDraw/StylePainter.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GActionGroup.h>
#include <LibGUI/GButton.h>
#include <LibGUI/GPainter.h>
#include <LibDraw/StylePainter.h>
GButton::GButton(GWidget* parent)
: GAbstractButton(parent)

View File

@ -1,11 +1,11 @@
#pragma once
#include <AK/String.h>
#include <AK/Function.h>
#include <LibGUI/GAbstractButton.h>
#include <AK/String.h>
#include <LibDraw/GraphicsBitmap.h>
#include <LibDraw/StylePainter.h>
#include <LibDraw/TextAlignment.h>
#include <LibGUI/GAbstractButton.h>
class GAction;

View File

@ -1,7 +1,7 @@
#pragma once
#include <AK/String.h>
#include <AK/Function.h>
#include <AK/String.h>
#include <LibGUI/GAbstractButton.h>
class GCheckBox : public GAbstractButton {

View File

@ -1,8 +1,8 @@
#pragma once
#include <AK/String.h>
#include <AK/Badge.h>
#include <AK/Function.h>
#include <AK/String.h>
#include <LibDraw/Rect.h>
class GWindowServerConnection;

View File

@ -1,8 +1,8 @@
#pragma once
#include <AK/String.h>
#include <AK/Function.h>
#include <AK/HashMap.h>
#include <AK/String.h>
class Font;

View File

@ -1,6 +1,6 @@
#include <LibDraw/StylePainter.h>
#include <LibGUI/GFrame.h>
#include <LibGUI/GPainter.h>
#include <LibDraw/StylePainter.h>
GFrame::GFrame(GWidget* parent)
: GWidget(parent)

View File

@ -1,7 +1,7 @@
#pragma once
#include <LibGUI/GWidget.h>
#include <LibDraw/StylePainter.h>
#include <LibGUI/GWidget.h>
class GFrame : public GWidget {
C_OBJECT(GFrame)

View File

@ -116,7 +116,7 @@ void GItemView::mousedown_event(GMouseEvent& event)
if (event.button() == GMouseButton::Left) {
m_left_mousedown_position = event.position();
if (item_index == -1) {
if(event.modifiers() & Mod_Ctrl) {
if (event.modifiers() & Mod_Ctrl) {
selection().for_each_index([&](auto& index) {
m_rubber_band_remembered_selection.append(index);
});
@ -150,7 +150,7 @@ void GItemView::mouseup_event(GMouseEvent& event)
}
int item_index = item_at_event_position(event.position());
auto index = model()->index(item_index, m_model_column);
if((selection().size() > 1) & m_might_drag) {
if ((selection().size() > 1) & m_might_drag) {
selection().set(index);
m_might_drag = false;
}
@ -170,7 +170,7 @@ void GItemView::mousemove_event(GMouseEvent& event)
for (auto item_index : items_intersecting_rect(rubber_band_rect)) {
selection().add(model()->index(item_index, model_column()));
}
if(event.modifiers() & Mod_Ctrl) {
if (event.modifiers() & Mod_Ctrl) {
for (auto storeditem : m_rubber_band_remembered_selection) {
selection().add(storeditem);
}

View File

@ -1,7 +1,7 @@
#pragma once
#include <LibGUI/GFrame.h>
#include <LibDraw/TextAlignment.h>
#include <LibGUI/GFrame.h>
class GraphicsBitmap;

View File

@ -1,9 +1,9 @@
#pragma once
#include <AK/String.h>
#include <AK/Badge.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/OwnPtr.h>
#include <AK/String.h>
class GAction;
class GMenu;

View File

@ -26,7 +26,7 @@ public:
virtual GVariant value() const = 0;
virtual void set_value(const GVariant&) = 0;
virtual void will_begin_editing() { }
virtual void will_begin_editing() {}
protected:
virtual RefPtr<GWidget> create_widget() = 0;

View File

@ -66,7 +66,6 @@ void GUndoStack::push(NonnullOwnPtr<GCommand>&& command)
m_stack[0].m_undo_vector.prepend(move(command));
}
void GUndoStack::finalize_current_combo()
{
if (m_stack.is_empty())