mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
SQLStudio: Remove (unimplemented) ability to open database storage files
It may be handy to have some sort of storage inspector at some point but for now, it doesn't make sense to open a database file. So only allow opening script files, and don't make assumptions on their extension.
This commit is contained in:
parent
690389ae81
commit
e3d5b67eaf
Notes:
sideshowbarker
2024-07-17 02:26:43 +09:00
Author: https://github.com/trflynn89
Commit: e3d5b67eaf
Pull-request: https://github.com/SerenityOS/serenity/pull/16710
3 changed files with 4 additions and 19 deletions
|
@ -39,18 +39,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
};
|
||||
|
||||
auto needs_new_script = true;
|
||||
if (file_to_open) {
|
||||
auto path = LexicalPath(file_to_open);
|
||||
if (path.extension().equals_ignoring_case("sql"sv)) {
|
||||
main_widget->open_script_from_file(path);
|
||||
needs_new_script = false;
|
||||
} else if (path.extension().equals_ignoring_case("db"sv)) {
|
||||
main_widget->open_database_from_file(path);
|
||||
}
|
||||
}
|
||||
if (needs_new_script)
|
||||
main_widget->open_script_from_file(path);
|
||||
} else {
|
||||
main_widget->open_new_script();
|
||||
}
|
||||
|
||||
window->show();
|
||||
return app->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue