浏览代码

SQLStudio: Stop lying about string types

Hendiadyoin1 2 年之前
父节点
当前提交
3d1fd17f8b
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Userland/DevTools/SQLStudio/MainWidget.cpp
  2. 1 1
      Userland/DevTools/SQLStudio/ScriptEditor.cpp

+ 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)
 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()) {
     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()));
         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());
     auto parent = static_cast<GUI::TabWidget*>(parent_widget());
     if (parent)
     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();
     document().set_unmodified();
     return true;
     return true;