Procházet zdrojové kódy

SQLStudio: Stop lying about string types

Hendiadyoin1 před 2 roky
rodič
revize
3d1fd17f8b

+ 1 - 1
Userland/DevTools/SQLStudio/MainWidget.cpp

@@ -351,7 +351,7 @@ void MainWidget::open_new_script()
 
 void MainWidget::open_script_from_file(LexicalPath const& file_path)
 {
-    auto& editor = m_tab_widget->add_tab<ScriptEditor>(String::from_deprecated_string(file_path.title()).release_value_but_fixme_should_propagate_errors());
+    auto& editor = m_tab_widget->add_tab<ScriptEditor>(String::from_utf8(file_path.title()).release_value_but_fixme_should_propagate_errors());
 
     if (auto result = editor.open_script_from_file(file_path); result.is_error()) {
         GUI::MessageBox::show_error(window(), DeprecatedString::formatted("Failed to open {}\n{}", file_path, result.error()));

+ 1 - 1
Userland/DevTools/SQLStudio/ScriptEditor.cpp

@@ -72,7 +72,7 @@ ErrorOr<bool> ScriptEditor::save_as()
 
     auto parent = static_cast<GUI::TabWidget*>(parent_widget());
     if (parent)
-        parent->set_tab_title(*this, String::from_deprecated_string(lexical_path.title()).release_value_but_fixme_should_propagate_errors());
+        parent->set_tab_title(*this, String::from_utf8(lexical_path.title()).release_value_but_fixme_should_propagate_errors());
 
     document().set_unmodified();
     return true;