[haiku-commits] Change in haiku[master]: Input preferences: remove dead code

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 19 Jun 2022 13:21:39 +0000

From Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>:

Adrien Destugues has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/5383 ;)


Change subject: Input preferences: remove dead code
......................................................................

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
---
M src/preferences/input/KeyboardSettings.cpp
1 file changed, 0 insertions(+), 22 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/83/5383/1

diff --git a/src/preferences/input/KeyboardSettings.cpp 
b/src/preferences/input/KeyboardSettings.cpp
index 84b7eb6..1c99f3f 100644
--- a/src/preferences/input/KeyboardSettings.cpp
+++ b/src/preferences/input/KeyboardSettings.cpp
@@ -26,33 +26,11 @@
                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;
 }



--
To view, visit https://review.haiku-os.org/c/haiku/+/5383
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ic5e1d6bd6a8452bd779dc73872148d5c32ab12e5
Gerrit-Change-Number: 5383
Gerrit-PatchSet: 1
Gerrit-Owner: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: Input preferences: remove dead code - Gerrit