summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-05-28 11:53:16 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-28 17:31:20 +0200
commit0dc9af5f7e26b0dfa42cb75c900b9ef7a2192425 (patch)
tree93dbbbeb714f258bd7fb044633eb83bdcd908286 /Applications
parentc11351ac507f863699d78aec46a77bd4d59e743c (diff)
downloadserenity-0dc9af5f7e26b0dfa42cb75c900b9ef7a2192425.zip
Add clang-format file
Also run it across the whole tree to get everything using the One True Style. We don't yet run this in an automated fashion as it's a little slow, but there is a snippet to do so in makeall.sh.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FileManager/DirectoryView.h13
-rw-r--r--Applications/FontEditor/FontEditor.h2
-rw-r--r--Applications/FontEditor/GlyphEditorWidget.h2
-rw-r--r--Applications/FontEditor/GlyphMapWidget.h2
-rw-r--r--Applications/IRCClient/IRCAppWindow.h4
-rw-r--r--Applications/IRCClient/IRCChannel.h6
-rw-r--r--Applications/IRCClient/IRCChannelMemberListModel.h7
-rw-r--r--Applications/IRCClient/IRCClient.h9
-rw-r--r--Applications/IRCClient/IRCLogBuffer.h2
-rw-r--r--Applications/IRCClient/IRCLogBufferModel.h3
-rw-r--r--Applications/IRCClient/IRCQuery.h6
-rw-r--r--Applications/IRCClient/IRCWindow.h3
-rw-r--r--Applications/IRCClient/IRCWindowListModel.h5
-rw-r--r--Applications/ProcessManager/GraphWidget.h2
-rw-r--r--Applications/ProcessManager/MemoryStatsWidget.h2
-rw-r--r--Applications/ProcessManager/ProcessModel.h5
-rw-r--r--Applications/ProcessManager/ProcessTableView.h3
-rw-r--r--Applications/Taskbar/TaskbarButton.h2
-rw-r--r--Applications/Taskbar/TaskbarWindow.h4
-rw-r--r--Applications/Taskbar/WindowIdentifier.h1
-rw-r--r--Applications/Taskbar/WindowList.h7
-rw-r--r--Applications/Terminal/Terminal.h18
22 files changed, 63 insertions, 45 deletions
diff --git a/Applications/FileManager/DirectoryView.h b/Applications/FileManager/DirectoryView.h
index 58ff16d628..c494419e5d 100644
--- a/Applications/FileManager/DirectoryView.h
+++ b/Applications/FileManager/DirectoryView.h
@@ -1,10 +1,10 @@
#pragma once
#include <AK/Vector.h>
-#include <LibGUI/GTableView.h>
+#include <LibGUI/GDirectoryModel.h>
#include <LibGUI/GItemView.h>
#include <LibGUI/GStackWidget.h>
-#include <LibGUI/GDirectoryModel.h>
+#include <LibGUI/GTableView.h>
#include <sys/stat.h>
class DirectoryView final : public GStackWidget {
@@ -26,7 +26,12 @@ public:
Function<void(String)> on_status_message;
Function<void(int done, int total)> on_thumbnail_progress;
- enum ViewMode { Invalid, List, Icon };
+ enum ViewMode
+ {
+ Invalid,
+ List,
+ Icon
+ };
void set_view_mode(ViewMode);
ViewMode view_mode() const { return m_view_mode; }
@@ -41,7 +46,7 @@ private:
ViewMode m_view_mode { Invalid };
Retained<GDirectoryModel> m_model;
- int m_path_history_position{ 0 };
+ int m_path_history_position { 0 };
Vector<String> m_path_history;
void add_path_to_history(const String& path);
diff --git a/Applications/FontEditor/FontEditor.h b/Applications/FontEditor/FontEditor.h
index 3d41d6b768..9132c5029a 100644
--- a/Applications/FontEditor/FontEditor.h
+++ b/Applications/FontEditor/FontEditor.h
@@ -1,7 +1,7 @@
#pragma once
-#include <LibGUI/GWidget.h>
#include <AK/Function.h>
+#include <LibGUI/GWidget.h>
class GlyphEditorWidget;
class GlyphMapWidget;
diff --git a/Applications/FontEditor/GlyphEditorWidget.h b/Applications/FontEditor/GlyphEditorWidget.h
index 2e9c311ccd..3784c054b5 100644
--- a/Applications/FontEditor/GlyphEditorWidget.h
+++ b/Applications/FontEditor/GlyphEditorWidget.h
@@ -1,5 +1,5 @@
-#include <LibGUI/GFrame.h>
#include <AK/Function.h>
+#include <LibGUI/GFrame.h>
class GlyphEditorWidget final : public GFrame {
public:
diff --git a/Applications/FontEditor/GlyphMapWidget.h b/Applications/FontEditor/GlyphMapWidget.h
index 07aafbe2e1..e5746aff0b 100644
--- a/Applications/FontEditor/GlyphMapWidget.h
+++ b/Applications/FontEditor/GlyphMapWidget.h
@@ -1,7 +1,7 @@
#pragma once
-#include <LibGUI/GFrame.h>
#include <AK/Function.h>
+#include <LibGUI/GFrame.h>
class GlyphMapWidget final : public GFrame {
public:
diff --git a/Applications/IRCClient/IRCAppWindow.h b/Applications/IRCClient/IRCAppWindow.h
index e34c281f2e..96e0867a67 100644
--- a/Applications/IRCClient/IRCAppWindow.h
+++ b/Applications/IRCClient/IRCAppWindow.h
@@ -1,9 +1,9 @@
#pragma once
-#include <LibGUI/GWindow.h>
-#include <LibGUI/GWidget.h>
#include "IRCClient.h"
#include "IRCWindow.h"
+#include <LibGUI/GWidget.h>
+#include <LibGUI/GWindow.h>
class GAction;
class GStackWidget;
diff --git a/Applications/IRCClient/IRCChannel.h b/Applications/IRCClient/IRCChannel.h
index 8770dd181d..de9132639a 100644
--- a/Applications/IRCClient/IRCChannel.h
+++ b/Applications/IRCClient/IRCChannel.h
@@ -1,11 +1,11 @@
#pragma once
+#include "IRCLogBuffer.h"
#include <AK/AKString.h>
#include <AK/CircularQueue.h>
-#include <AK/Vector.h>
-#include <AK/Retainable.h>
#include <AK/RetainPtr.h>
-#include "IRCLogBuffer.h"
+#include <AK/Retainable.h>
+#include <AK/Vector.h>
class IRCClient;
class IRCChannelMemberListModel;
diff --git a/Applications/IRCClient/IRCChannelMemberListModel.h b/Applications/IRCClient/IRCChannelMemberListModel.h
index 2f67cf15ca..ac380ec62d 100644
--- a/Applications/IRCClient/IRCChannelMemberListModel.h
+++ b/Applications/IRCClient/IRCChannelMemberListModel.h
@@ -1,13 +1,16 @@
#pragma once
-#include <LibGUI/GModel.h>
#include <AK/Function.h>
+#include <LibGUI/GModel.h>
class IRCChannel;
class IRCChannelMemberListModel final : public GModel {
public:
- enum Column { Name };
+ enum Column
+ {
+ Name
+ };
static Retained<IRCChannelMemberListModel> create(IRCChannel& channel) { return adopt(*new IRCChannelMemberListModel(channel)); }
virtual ~IRCChannelMemberListModel() override;
diff --git a/Applications/IRCClient/IRCClient.h b/Applications/IRCClient/IRCClient.h
index 2ae4c348fa..ac02b9e9fc 100644
--- a/Applications/IRCClient/IRCClient.h
+++ b/Applications/IRCClient/IRCClient.h
@@ -1,13 +1,13 @@
#pragma once
+#include "IRCLogBuffer.h"
+#include "IRCWindow.h"
#include <AK/AKString.h>
-#include <AK/HashMap.h>
#include <AK/CircularQueue.h>
#include <AK/Function.h>
-#include <LibCore/CTCPSocket.h>
+#include <AK/HashMap.h>
#include <LibCore/CConfigFile.h>
-#include "IRCLogBuffer.h"
-#include "IRCWindow.h"
+#include <LibCore/CTCPSocket.h>
class IRCChannel;
class IRCQuery;
@@ -17,6 +17,7 @@ class CNotifier;
class IRCClient final : public CObject {
friend class IRCChannel;
friend class IRCQuery;
+
public:
IRCClient();
virtual ~IRCClient() override;
diff --git a/Applications/IRCClient/IRCLogBuffer.h b/Applications/IRCClient/IRCLogBuffer.h
index e1b6b472dd..7d2bdff220 100644
--- a/Applications/IRCClient/IRCLogBuffer.h
+++ b/Applications/IRCClient/IRCLogBuffer.h
@@ -2,8 +2,8 @@
#include <AK/AKString.h>
#include <AK/CircularQueue.h>
-#include <AK/Retainable.h>
#include <AK/RetainPtr.h>
+#include <AK/Retainable.h>
#include <SharedGraphics/Color.h>
class IRCLogBufferModel;
diff --git a/Applications/IRCClient/IRCLogBufferModel.h b/Applications/IRCClient/IRCLogBufferModel.h
index 5be8237d07..d5479da887 100644
--- a/Applications/IRCClient/IRCLogBufferModel.h
+++ b/Applications/IRCClient/IRCLogBufferModel.h
@@ -6,7 +6,8 @@ class IRCLogBuffer;
class IRCLogBufferModel final : public GModel {
public:
- enum Column {
+ enum Column
+ {
Timestamp = 0,
Name,
Text,
diff --git a/Applications/IRCClient/IRCQuery.h b/Applications/IRCClient/IRCQuery.h
index 8d26d92881..88f941fbdf 100644
--- a/Applications/IRCClient/IRCQuery.h
+++ b/Applications/IRCClient/IRCQuery.h
@@ -1,11 +1,11 @@
#pragma once
+#include "IRCLogBuffer.h"
#include <AK/AKString.h>
#include <AK/CircularQueue.h>
-#include <AK/Vector.h>
-#include <AK/Retainable.h>
#include <AK/RetainPtr.h>
-#include "IRCLogBuffer.h"
+#include <AK/Retainable.h>
+#include <AK/Vector.h>
class IRCClient;
class IRCWindow;
diff --git a/Applications/IRCClient/IRCWindow.h b/Applications/IRCClient/IRCWindow.h
index 2fce542fe5..f8fe692542 100644
--- a/Applications/IRCClient/IRCWindow.h
+++ b/Applications/IRCClient/IRCWindow.h
@@ -11,7 +11,8 @@ class GTextEditor;
class IRCWindow : public GWidget {
public:
- enum Type {
+ enum Type
+ {
Server,
Channel,
Query,
diff --git a/Applications/IRCClient/IRCWindowListModel.h b/Applications/IRCClient/IRCWindowListModel.h
index d565eb78e3..93fa6b6abd 100644
--- a/Applications/IRCClient/IRCWindowListModel.h
+++ b/Applications/IRCClient/IRCWindowListModel.h
@@ -1,14 +1,15 @@
#pragma once
-#include <LibGUI/GModel.h>
#include <AK/Function.h>
+#include <LibGUI/GModel.h>
class IRCClient;
class IRCWindow;
class IRCWindowListModel final : public GModel {
public:
- enum Column {
+ enum Column
+ {
Name,
};
diff --git a/Applications/ProcessManager/GraphWidget.h b/Applications/ProcessManager/GraphWidget.h
index 83971c20bc..1d39beb1f1 100644
--- a/Applications/ProcessManager/GraphWidget.h
+++ b/Applications/ProcessManager/GraphWidget.h
@@ -1,5 +1,5 @@
-#include <LibGUI/GFrame.h>
#include <AK/CircularQueue.h>
+#include <LibGUI/GFrame.h>
class GraphWidget final : public GFrame {
public:
diff --git a/Applications/ProcessManager/MemoryStatsWidget.h b/Applications/ProcessManager/MemoryStatsWidget.h
index 2f6b1dc183..e3912b9b94 100644
--- a/Applications/ProcessManager/MemoryStatsWidget.h
+++ b/Applications/ProcessManager/MemoryStatsWidget.h
@@ -1,7 +1,7 @@
#pragma once
-#include <LibGUI/GWidget.h>
#include <LibCore/CFile.h>
+#include <LibGUI/GWidget.h>
class GLabel;
class GraphWidget;
diff --git a/Applications/ProcessManager/ProcessModel.h b/Applications/ProcessManager/ProcessModel.h
index 92ff292a0b..3f6b18b111 100644
--- a/Applications/ProcessManager/ProcessModel.h
+++ b/Applications/ProcessManager/ProcessModel.h
@@ -3,15 +3,16 @@
#include <AK/AKString.h>
#include <AK/HashMap.h>
#include <AK/Vector.h>
-#include <LibGUI/GModel.h>
#include <LibCore/CFile.h>
+#include <LibGUI/GModel.h>
#include <unistd.h>
class GraphWidget;
class ProcessModel final : public GModel {
public:
- enum Column {
+ enum Column
+ {
Icon = 0,
Name,
CPU,
diff --git a/Applications/ProcessManager/ProcessTableView.h b/Applications/ProcessManager/ProcessTableView.h
index 28aef8ce0e..24c45e3365 100644
--- a/Applications/ProcessManager/ProcessTableView.h
+++ b/Applications/ProcessManager/ProcessTableView.h
@@ -1,7 +1,7 @@
#pragma once
-#include <LibGUI/GTableView.h>
#include <AK/Function.h>
+#include <LibGUI/GTableView.h>
#include <unistd.h>
class GraphWidget;
@@ -19,4 +19,3 @@ public:
private:
virtual void model_notification(const GModelNotification&) override;
};
-
diff --git a/Applications/Taskbar/TaskbarButton.h b/Applications/Taskbar/TaskbarButton.h
index 6cb790521a..2a84b0b410 100644
--- a/Applications/Taskbar/TaskbarButton.h
+++ b/Applications/Taskbar/TaskbarButton.h
@@ -1,7 +1,7 @@
#pragma once
-#include <LibGUI/GButton.h>
#include "WindowIdentifier.h"
+#include <LibGUI/GButton.h>
class TaskbarButton final : public GButton {
public:
diff --git a/Applications/Taskbar/TaskbarWindow.h b/Applications/Taskbar/TaskbarWindow.h
index 856185343f..fbfd4a50c4 100644
--- a/Applications/Taskbar/TaskbarWindow.h
+++ b/Applications/Taskbar/TaskbarWindow.h
@@ -1,6 +1,6 @@
-#include <LibGUI/GWindow.h>
-#include <LibGUI/GWidget.h>
#include "WindowList.h"
+#include <LibGUI/GWidget.h>
+#include <LibGUI/GWindow.h>
class TaskbarWindow final : public GWindow {
public:
diff --git a/Applications/Taskbar/WindowIdentifier.h b/Applications/Taskbar/WindowIdentifier.h
index afed91a288..f5fcd65bfc 100644
--- a/Applications/Taskbar/WindowIdentifier.h
+++ b/Applications/Taskbar/WindowIdentifier.h
@@ -18,6 +18,7 @@ public:
{
return m_client_id == other.m_client_id && m_window_id == other.m_window_id;
}
+
private:
int m_client_id { -1 };
int m_window_id { -1 };
diff --git a/Applications/Taskbar/WindowList.h b/Applications/Taskbar/WindowList.h
index 6ebaaa5328..12cefb52ab 100644
--- a/Applications/Taskbar/WindowList.h
+++ b/Applications/Taskbar/WindowList.h
@@ -1,10 +1,10 @@
#pragma once
+#include "WindowIdentifier.h"
#include <AK/AKString.h>
#include <AK/HashMap.h>
-#include <SharedGraphics/Rect.h>
#include <LibGUI/GButton.h>
-#include "WindowIdentifier.h"
+#include <SharedGraphics/Rect.h>
class Window {
public:
@@ -64,7 +64,8 @@ class WindowList {
public:
static WindowList& the();
- template<typename Callback> void for_each_window(Callback callback)
+ template<typename Callback>
+ void for_each_window(Callback callback)
{
for (auto& it : m_windows)
callback(*it.value);
diff --git a/Applications/Terminal/Terminal.h b/Applications/Terminal/Terminal.h
index 52484080d7..4a84165256 100644
--- a/Applications/Terminal/Terminal.h
+++ b/Applications/Terminal/Terminal.h
@@ -3,12 +3,12 @@
#include <AK/AKString.h>
#include <AK/Types.h>
#include <AK/Vector.h>
-#include <SharedGraphics/GraphicsBitmap.h>
-#include <SharedGraphics/Rect.h>
-#include <LibGUI/GFrame.h>
+#include <LibCore/CConfigFile.h>
#include <LibCore/CNotifier.h>
#include <LibCore/CTimer.h>
-#include <LibCore/CConfigFile.h>
+#include <LibGUI/GFrame.h>
+#include <SharedGraphics/GraphicsBitmap.h>
+#include <SharedGraphics/Rect.h>
class Font;
@@ -45,7 +45,6 @@ private:
void invalidate_cursor();
void set_window_title(const String&);
-
void inject_string(const String&);
void unimplemented_escape();
void unimplemented_xterm_escape();
@@ -107,7 +106,11 @@ private:
bool dirty { false };
word length { 0 };
};
- Line& line(size_t index) { ASSERT(index < m_rows); return *m_lines[index]; }
+ Line& line(size_t index)
+ {
+ ASSERT(index < m_rows);
+ return *m_lines[index];
+ }
Line** m_lines { nullptr };
@@ -125,7 +128,8 @@ private:
void execute_escape_sequence(byte final);
void execute_xterm_command();
- enum EscapeState {
+ enum EscapeState
+ {
Normal,
ExpectBracket,
ExpectParameter,