summaryrefslogtreecommitdiff
path: root/DevTools
diff options
context:
space:
mode:
Diffstat (limited to 'DevTools')
-rw-r--r--DevTools/FormCompiler/main.cpp4
-rw-r--r--DevTools/HackStudio/Editor.cpp10
-rw-r--r--DevTools/HackStudio/Editor.h4
-rw-r--r--DevTools/HackStudio/EditorWrapper.h2
-rw-r--r--DevTools/HackStudio/ProcessStateWidget.cpp4
-rw-r--r--DevTools/HackStudio/ProcessStateWidget.h7
-rw-r--r--DevTools/HackStudio/Project.cpp10
-rw-r--r--DevTools/HackStudio/ProjectFile.cpp4
-rw-r--r--DevTools/HackStudio/TerminalWrapper.cpp2
-rw-r--r--DevTools/HackStudio/main.cpp4
-rw-r--r--DevTools/IPCCompiler/main.cpp4
-rw-r--r--DevTools/Inspector/RemoteProcess.cpp4
-rw-r--r--DevTools/Inspector/RemoteProcess.h2
-rw-r--r--DevTools/ProfileViewer/Profile.cpp4
-rw-r--r--DevTools/VisualBuilder/VBForm.cpp8
-rw-r--r--DevTools/VisualBuilder/VBWidget.cpp2
16 files changed, 39 insertions, 36 deletions
diff --git a/DevTools/FormCompiler/main.cpp b/DevTools/FormCompiler/main.cpp
index 12078c87b9..22c793bce6 100644
--- a/DevTools/FormCompiler/main.cpp
+++ b/DevTools/FormCompiler/main.cpp
@@ -39,8 +39,8 @@ int main(int argc, char** argv)
return 0;
}
- auto file = CFile::construct(argv[1]);
- if (!file->open(CIODevice::ReadOnly)) {
+ auto file = Core::File::construct(argv[1]);
+ if (!file->open(Core::IODevice::ReadOnly)) {
fprintf(stderr, "Error: Cannot open %s: %s\n", argv[1], file->error_string());
return 1;
}
diff --git a/DevTools/HackStudio/Editor.cpp b/DevTools/HackStudio/Editor.cpp
index 09b598ccc6..82cb12af10 100644
--- a/DevTools/HackStudio/Editor.cpp
+++ b/DevTools/HackStudio/Editor.cpp
@@ -67,7 +67,7 @@ const EditorWrapper& Editor::wrapper() const
return static_cast<const EditorWrapper&>(*parent());
}
-void Editor::focusin_event(CEvent& event)
+void Editor::focusin_event(Core::Event& event)
{
wrapper().set_editor_has_focus({}, true);
if (on_focus)
@@ -75,7 +75,7 @@ void Editor::focusin_event(CEvent& event)
GTextEditor::focusin_event(event);
}
-void Editor::focusout_event(CEvent& event)
+void Editor::focusout_event(Core::Event& event)
{
wrapper().set_editor_has_focus({}, false);
GTextEditor::focusout_event(event);
@@ -103,7 +103,7 @@ static HashMap<String, String>& man_paths()
static HashMap<String, String> paths;
if (paths.is_empty()) {
// FIXME: This should also search man3, possibly other places..
- CDirIterator it("/usr/share/man/man2", CDirIterator::Flags::SkipDots);
+ Core::DirIterator it("/usr/share/man/man2", Core::DirIterator::Flags::SkipDots);
while (it.has_next()) {
auto path = String::format("/usr/share/man/man2/%s", it.next_path().characters());
auto title = FileSystemPath(path).title();
@@ -132,8 +132,8 @@ void Editor::show_documentation_tooltip_if_available(const String& hovered_token
#ifdef EDITOR_DEBUG
dbg() << "opening " << it->value;
#endif
- auto file = CFile::construct(it->value);
- if (!file->open(CFile::ReadOnly)) {
+ auto file = Core::File::construct(it->value);
+ if (!file->open(Core::File::ReadOnly)) {
dbg() << "failed to open " << it->value << " " << file->error_string();
return;
}
diff --git a/DevTools/HackStudio/Editor.h b/DevTools/HackStudio/Editor.h
index df3e8e900d..f57b8adcab 100644
--- a/DevTools/HackStudio/Editor.h
+++ b/DevTools/HackStudio/Editor.h
@@ -44,8 +44,8 @@ public:
void notify_did_rehighlight();
private:
- virtual void focusin_event(CEvent&) override;
- virtual void focusout_event(CEvent&) override;
+ virtual void focusin_event(Core::Event&) override;
+ virtual void focusout_event(Core::Event&) override;
virtual void paint_event(GPaintEvent&) override;
virtual void mousemove_event(GMouseEvent&) override;
virtual void cursor_did_change() override;
diff --git a/DevTools/HackStudio/EditorWrapper.h b/DevTools/HackStudio/EditorWrapper.h
index c2425a242a..89763f578f 100644
--- a/DevTools/HackStudio/EditorWrapper.h
+++ b/DevTools/HackStudio/EditorWrapper.h
@@ -52,7 +52,7 @@ private:
};
template<>
-inline bool is<EditorWrapper>(const CObject& object)
+inline bool Core::is<EditorWrapper>(const Core::Object& object)
{
return !strcmp(object.class_name(), "EditorWrapper");
}
diff --git a/DevTools/HackStudio/ProcessStateWidget.cpp b/DevTools/HackStudio/ProcessStateWidget.cpp
index 00dd7172e7..7f8f64fa46 100644
--- a/DevTools/HackStudio/ProcessStateWidget.cpp
+++ b/DevTools/HackStudio/ProcessStateWidget.cpp
@@ -57,7 +57,7 @@ ProcessStateWidget::ProcessStateWidget(GWidget* parent)
memory_label_label->set_font(Font::default_bold_font());
m_memory_label = GLabel::construct("", this);
- m_timer = CTimer::construct(500, [this] {
+ m_timer = Core::Timer::construct(500, [this] {
refresh();
});
}
@@ -70,7 +70,7 @@ void ProcessStateWidget::refresh()
{
pid_t pid = tcgetpgrp(m_tty_fd);
- auto processes = CProcessStatisticsReader::get_all();
+ auto processes = Core::ProcessStatisticsReader::get_all();
auto child_process_data = processes.get(pid);
if (!child_process_data.has_value())
diff --git a/DevTools/HackStudio/ProcessStateWidget.h b/DevTools/HackStudio/ProcessStateWidget.h
index 98125a5b4c..423a2a650a 100644
--- a/DevTools/HackStudio/ProcessStateWidget.h
+++ b/DevTools/HackStudio/ProcessStateWidget.h
@@ -28,7 +28,10 @@
#include <LibGUI/GWidget.h>
-class CTimer;
+namespace Core {
+class Timer;
+}
+
class GLabel;
class ProcessStateWidget final : public GWidget {
@@ -48,7 +51,7 @@ private:
RefPtr<GLabel> m_cpu_label;
RefPtr<GLabel> m_memory_label;
- RefPtr<CTimer> m_timer;
+ RefPtr<Core::Timer> m_timer;
int m_tty_fd { -1 };
};
diff --git a/DevTools/HackStudio/Project.cpp b/DevTools/HackStudio/Project.cpp
index 04f407c8c0..0c6cd386e7 100644
--- a/DevTools/HackStudio/Project.cpp
+++ b/DevTools/HackStudio/Project.cpp
@@ -190,8 +190,8 @@ Project::~Project()
OwnPtr<Project> Project::load_from_file(const String& path)
{
- auto file = CFile::construct(path);
- if (!file->open(CFile::ReadOnly))
+ auto file = Core::File::construct(path);
+ if (!file->open(Core::File::ReadOnly))
return nullptr;
Vector<String> files;
@@ -225,12 +225,12 @@ bool Project::remove_file(const String& filename)
bool Project::save()
{
- auto project_file = CFile::construct(m_path);
- if (!project_file->open(CFile::WriteOnly))
+ auto project_file = Core::File::construct(m_path);
+ if (!project_file->open(Core::File::WriteOnly))
return false;
for (auto& file : m_files) {
- // FIXME: Check for error here. CIODevice::printf() needs some work on error reporting.
+ // FIXME: Check for error here. IODevice::printf() needs some work on error reporting.
project_file->printf("%s\n", file.name().characters());
}
diff --git a/DevTools/HackStudio/ProjectFile.cpp b/DevTools/HackStudio/ProjectFile.cpp
index 619062bda7..ecc327af1a 100644
--- a/DevTools/HackStudio/ProjectFile.cpp
+++ b/DevTools/HackStudio/ProjectFile.cpp
@@ -32,8 +32,8 @@ const GTextDocument& ProjectFile::document() const
{
if (!m_document) {
m_document = GTextDocument::create(nullptr);
- auto file = CFile::construct(m_name);
- if (!file->open(CFile::ReadOnly)) {
+ auto file = Core::File::construct(m_name);
+ if (!file->open(Core::File::ReadOnly)) {
ASSERT_NOT_REACHED();
}
m_document->set_text(file->read_all());
diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp
index 1b43870aa9..af2a0f87d4 100644
--- a/DevTools/HackStudio/TerminalWrapper.cpp
+++ b/DevTools/HackStudio/TerminalWrapper.cpp
@@ -163,7 +163,7 @@ TerminalWrapper::TerminalWrapper(GWidget* parent)
{
set_layout(make<GVBoxLayout>());
- RefPtr<CConfigFile> config = CConfigFile::get_for_app("Terminal");
+ RefPtr<Core::ConfigFile> config = Core::ConfigFile::get_for_app("Terminal");
m_terminal_widget = TerminalWidget::construct(-1, false, config);
add_child(*m_terminal_widget);
diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp
index 55b0ddfc44..d4c2059fd1 100644
--- a/DevTools/HackStudio/main.cpp
+++ b/DevTools/HackStudio/main.cpp
@@ -180,8 +180,8 @@ int main(int argc, char** argv)
if (input_box->exec() == GInputBox::ExecCancel)
return;
auto filename = input_box->text_value();
- auto file = CFile::construct(filename);
- if (!file->open((CIODevice::OpenMode)(CIODevice::WriteOnly | CIODevice::MustBeNew))) {
+ auto file = Core::File::construct(filename);
+ if (!file->open((Core::IODevice::OpenMode)(Core::IODevice::WriteOnly | Core::IODevice::MustBeNew))) {
GMessageBox::show(String::format("Failed to create '%s'", filename.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, g_window);
return;
}
diff --git a/DevTools/IPCCompiler/main.cpp b/DevTools/IPCCompiler/main.cpp
index c960bc2a51..a58fe758a9 100644
--- a/DevTools/IPCCompiler/main.cpp
+++ b/DevTools/IPCCompiler/main.cpp
@@ -66,8 +66,8 @@ int main(int argc, char** argv)
return 0;
}
- auto file = CFile::construct(argv[1]);
- if (!file->open(CIODevice::ReadOnly)) {
+ auto file = Core::File::construct(argv[1]);
+ if (!file->open(Core::IODevice::ReadOnly)) {
fprintf(stderr, "Error: Cannot open %s: %s\n", argv[1], file->error_string());
return 1;
}
diff --git a/DevTools/Inspector/RemoteProcess.cpp b/DevTools/Inspector/RemoteProcess.cpp
index 94cf82a38e..49ec3312ee 100644
--- a/DevTools/Inspector/RemoteProcess.cpp
+++ b/DevTools/Inspector/RemoteProcess.cpp
@@ -34,7 +34,7 @@
RemoteProcess::RemoteProcess(pid_t pid)
: m_pid(pid)
, m_object_graph_model(RemoteObjectGraphModel::create(*this))
- , m_socket(CLocalSocket::construct())
+ , m_socket(Core::LocalSocket::construct())
{
}
@@ -152,7 +152,7 @@ void RemoteProcess::update()
}
};
- auto success = m_socket->connect(CSocketAddress::local(String::format("/tmp/rpc.%d", m_pid)));
+ auto success = m_socket->connect(Core::SocketAddress::local(String::format("/tmp/rpc.%d", m_pid)));
if (!success) {
fprintf(stderr, "Couldn't connect to PID %d\n", m_pid);
exit(1);
diff --git a/DevTools/Inspector/RemoteProcess.h b/DevTools/Inspector/RemoteProcess.h
index 4876666580..73e7aca37b 100644
--- a/DevTools/Inspector/RemoteProcess.h
+++ b/DevTools/Inspector/RemoteProcess.h
@@ -58,6 +58,6 @@ private:
pid_t m_pid { -1 };
String m_process_name;
NonnullRefPtr<RemoteObjectGraphModel> m_object_graph_model;
- RefPtr<CLocalSocket> m_socket;
+ RefPtr<Core::LocalSocket> m_socket;
NonnullOwnPtrVector<RemoteObject> m_roots;
};
diff --git a/DevTools/ProfileViewer/Profile.cpp b/DevTools/ProfileViewer/Profile.cpp
index fb1de12c46..ea0671dfad 100644
--- a/DevTools/ProfileViewer/Profile.cpp
+++ b/DevTools/ProfileViewer/Profile.cpp
@@ -157,8 +157,8 @@ void Profile::rebuild_tree()
OwnPtr<Profile> Profile::load_from_file(const StringView& path)
{
- auto file = CFile::construct(path);
- if (!file->open(CIODevice::ReadOnly)) {
+ auto file = Core::File::construct(path);
+ if (!file->open(Core::IODevice::ReadOnly)) {
fprintf(stderr, "Unable to open %s, error: %s\n", String(path).characters(), file->error_string());
return nullptr;
}
diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp
index e829840f1d..d4b55c8036 100644
--- a/DevTools/VisualBuilder/VBForm.cpp
+++ b/DevTools/VisualBuilder/VBForm.cpp
@@ -381,8 +381,8 @@ void VBForm::mousemove_event(GMouseEvent& event)
void VBForm::load_from_file(const String& path)
{
- auto file = CFile::construct(path);
- if (!file->open(CIODevice::ReadOnly)) {
+ auto file = Core::File::construct(path);
+ if (!file->open(Core::IODevice::ReadOnly)) {
GMessageBox::show(String::format("Could not open '%s' for reading", path.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window());
return;
}
@@ -417,8 +417,8 @@ void VBForm::load_from_file(const String& path)
void VBForm::write_to_file(const String& path)
{
- auto file = CFile::construct(path);
- if (!file->open(CIODevice::WriteOnly)) {
+ auto file = Core::File::construct(path);
+ if (!file->open(Core::IODevice::WriteOnly)) {
GMessageBox::show(String::format("Could not open '%s' for writing", path.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window());
return;
}
diff --git a/DevTools/VisualBuilder/VBWidget.cpp b/DevTools/VisualBuilder/VBWidget.cpp
index 96862f5d85..52279c1740 100644
--- a/DevTools/VisualBuilder/VBWidget.cpp
+++ b/DevTools/VisualBuilder/VBWidget.cpp
@@ -138,7 +138,7 @@ void VBWidget::add_property(const String& name, Function<GVariant(const GWidget&
void VBWidget::setup_properties()
{
- VB_ADD_PROPERTY(CObject, "name", name, set_name, string);
+ VB_ADD_PROPERTY(Core::Object, "name", name, set_name, string);
VB_ADD_PROPERTY(GWidget, "width", width, set_width, i32);
VB_ADD_PROPERTY(GWidget, "height", height, set_height, i32);