Parcourir la source

DisplaySettings: Use format instead of printf.

asynts il y a 4 ans
Parent
commit
7fd4646acb

+ 2 - 2
Applications/DisplaySettings/DisplaySettings.cpp

@@ -338,14 +338,14 @@ void DisplaySettingsWidget::send_settings_to_window_server()
 {
     auto result = GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetResolution>(m_monitor_widget->desktop_resolution());
     if (!result->success()) {
-        GUI::MessageBox::show(root_widget()->window(), String::format("Reverting to resolution %dx%d", result->resolution().width(), result->resolution().height()),
+        GUI::MessageBox::show(root_widget()->window(), String::formatted("Reverting to resolution {}x{}", result->resolution().width(), result->resolution().height()),
             "Unable to set resolution", GUI::MessageBox::Type::Error);
     }
 
     if (!m_monitor_widget->wallpaper().is_empty()) {
         GUI::Desktop::the().set_wallpaper(m_monitor_widget->wallpaper());
     } else {
-        dbg() << "Setting color input: __" << m_color_input->text() << "__";
+        dbgln("Setting color input: __{}__", m_color_input->text());
         GUI::Desktop::the().set_wallpaper("");
         GUI::Desktop::the().set_background_color(m_color_input->text());
     }

+ 1 - 1
Applications/DisplaySettings/main.cpp

@@ -54,7 +54,7 @@ int main(int argc, char** argv)
     auto instance = DisplaySettingsWidget::construct();
 
     auto window = GUI::Window::construct();
-    dbg() << "main window: " << window;
+    dbgln("main window: {}", window);
     window->set_title("Display settings");
     window->resize(360, 390);
     window->set_resizable(false);