1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:27:34 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-09 00:11:15 +01:00 committed by Andreas Kling
parent 7235ddfd98
commit 019c9eb749
13 changed files with 41 additions and 28 deletions

View file

@ -162,7 +162,7 @@ void DownloadWidget::did_progress(Optional<u32> total_size, u32 downloaded_size)
void DownloadWidget::did_finish(bool success)
{
dbg() << "did_finish, success=" << success;
dbgln("did_finish, success={}", success);
m_close_button->set_enabled(true);
m_cancel_button->set_text("Open in Folder");

View file

@ -260,7 +260,7 @@ void IRCAppWindow::setup_menus()
auto menubar = GUI::MenuBar::construct();
auto& app_menu = menubar->add_menu("IRC Client");
app_menu.add_action(GUI::CommonActions::make_quit_action([](auto&) {
dbg() << "Terminal: Quit menu activated!";
dbgln("Terminal: Quit menu activated!");
GUI::Application::the()->quit();
return;
}));

View file

@ -308,15 +308,15 @@ Position Sheet::offset_relative_to(const Position& base, const Position& offset,
auto base_column_it = m_columns.find(base.column);
if (offset_column_it.is_end()) {
dbg() << "Column '" << offset.column << "' does not exist!";
dbgln("Column '{}' does not exist!", offset.column);
return base;
}
if (offset_base_column_it.is_end()) {
dbg() << "Column '" << offset_base.column << "' does not exist!";
dbgln("Column '{}' does not exist!", offset.column);
return base;
}
if (base_column_it.is_end()) {
dbg() << "Column '" << base.column << "' does not exist!";
dbgln("Column '{}' does not exist!", offset.column);
return offset;
}
@ -376,7 +376,7 @@ void Sheet::copy_cells(Vector<Position> from, Vector<Position> to, Optional<Posi
}
// Just disallow misaligned copies.
dbg() << "Cannot copy " << from.size() << " cells to " << to.size() << " cells";
dbgln("Cannot copy {} cells to {} cells", from.size(), to.size());
}
RefPtr<Sheet> Sheet::from_json(const JsonObject& object, Workbook& workbook)

View file

@ -208,7 +208,7 @@ int main(int argc, char* argv[])
auto& sheet = spreadsheet_widget.current_worksheet();
for (auto& line : spreadsheet_data.value().split_view('\n')) {
dbg() << "Paste line '" << line << "'";
dbgln("Paste line '{}'", line);
auto position = sheet.position_from_url(line);
if (position.has_value())
source_positions.append(position.release_value());

View file

@ -125,7 +125,7 @@ TextEditorWidget::TextEditorWidget()
m_editor->document().update_regex_matches(needle);
auto found_range = m_editor->document().find_next(needle, m_editor->normalized_selection().end(), GUI::TextDocument::SearchShouldWrap::Yes, m_find_use_regex);
dbg() << "find_next(\"" << needle << "\") returned " << found_range;
dbgln("find_next('{}') returned {}", needle, found_range);
if (found_range.is_valid()) {
m_editor->set_selection(found_range);
} else {