From 3f18d506fa8d9084615c964a0e787d4613b937d0 Mon Sep 17 00:00:00 2001 From: PulkoMandy Date: Sat, 18 Jun 2022 20:45:36 +0200 Subject: [PATCH] Input preferences: remove dead code The old keyboard preferences used to save its window position in the keyboard_settings file. The new Input preferences does not, but part of the code had not been removed yet so it would still open the file (and then do nothing with it) Change-Id: Ic5e1d6bd6a8452bd779dc73872148d5c32ab12e5 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5383 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/preferences/input/KeyboardSettings.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/preferences/input/KeyboardSettings.cpp b/src/preferences/input/KeyboardSettings.cpp index 84b7eb696e..1c99f3f6cf 100644 --- a/src/preferences/input/KeyboardSettings.cpp +++ b/src/preferences/input/KeyboardSettings.cpp @@ -26,33 +26,11 @@ KeyboardSettings::KeyboardSettings() fSettings.key_repeat_delay = kb_default_key_repeat_delay; fOriginalSettings = fSettings; - - BPath path; - BFile file; - - status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path); - if (status == B_OK) { - status = path.Append(kb_settings_file); - if (status == B_OK) - status = file.SetTo(path.Path(), B_READ_ONLY); - } } KeyboardSettings::~KeyboardSettings() { - BPath path; - BFile file; - - if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) < B_OK) - return; - - if (path.Append(kb_settings_file) < B_OK) - return; - - // be careful: don't create the file if it doesn't already exist - if (file.SetTo(path.Path(), B_WRITE_ONLY) < B_OK) - return; }