DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.16k stars 39 forks source link

Shortcut Editor: Store shortcut and widget in variables #335

Closed sonic2kk closed 6 months ago

sonic2kk commented 6 months ago

Instead of calling self.ui.tableShortcuts.cellWidget(index, col) or self.shortcuts[index] each time in PupguiShortcutDialog#txt_changed, we can store these with more readable variable names. I don't think this has any impact on performance, purely for readability :-)

Tested with my shortcuts and didn't see any behaviour regressions.

DavidoTek commented 6 months ago

Thanks, makes it a bit more clean!

I don't think this has any impact on performance, purely for readability :-)

Getting rid of the array indexing could even improve the performance by a very tiny bit (we're talking microseconds though :smile:)