GaZaTu/x11-emoji-picker

Shift+Enter doesn't update recentEmojis in cache

zneix opened this issue · 1 comments

zneix commented

enter + escape

$ gdb ./emoji-picker 
Reading symbols from ./emoji-picker...
(gdb) set substitute-path /work .
(gdb) break EmojiPicker::onEscapePressed
Breakpoint 1 at 0x7b5aa1: file /work/src/EmojiPicker.cpp, line 437.
(gdb) run
Starting program: emoji-picker 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff28f5640 (LWP 469375)]
[New Thread 0x7ffff20bc640 (LWP 469376)]
[New Thread 0x7ffff096f640 (LWP 469378)]

Thread 1 "emoji-picker" hit Breakpoint 1, EmojiPicker::onEscapePressed (this=0x555556ab14f0, event=...) at /work/src/EmojiPicker.cpp:437
437	  EmojiPickerSettings().setRecentEmojis(_recentEmojis);
(gdb) cont
Continuing.
[Thread 0x7ffff28f5640 (LWP 469375) exited]
[Thread 0x7ffff096f640 (LWP 469378) exited]
[Thread 0x7ffff20bc640 (LWP 469376) exited]
[Inferior 1 (process 469371) exited normally]

with shift+enter (same session, breakpoint still exists):

(gdb) run
Starting program: /home/pdbogen/src/x11-emoji-picker/emoji-picker 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff28f5640 (LWP 469798)]
[New Thread 0x7ffff20bc640 (LWP 469799)]
[New Thread 0x7ffff096f640 (LWP 469833)]
[Thread 0x7ffff28f5640 (LWP 469798) exited]
[Thread 0x7ffff096f640 (LWP 469833) exited]
[Thread 0x7ffff20bc640 (LWP 469799) exited]
[Inferior 1 (process 469797) exited normally]

So code in onEscapePressed is not getting called.

Originally posted by @asymmetricia in #13 (comment)

$ cat .cache/gazatu.xyz/emoji-picker/cache.ini 
[General]
version=0.8.2

[recentEmojis]
1\emojiKey=check_mark
1\emojiStr=\x2714
2\emojiKey=check_box_with_check
2\emojiStr=\x2611
3\emojiKey=check_mark_button
3\emojiStr=\x2705
4\emojiKey=smiling_face_with_hearts
4\emojiStr=\xd83e\xdd70
size=4