It only needs to be updated when we changes the symbols, not every time the code widget updates and it does take a while to update them so this fixes some delay when updating the code window.
Putting the columns to resizeToContents causes way too much resizes per updates which can cause severe lags and even crashes. This only does one resize at the end of the columns.
One, which was also possible in Wx is to add an mbp after the core stopped which shouldn't be possible as it needs to add the memcheck on the core thread which wouldn't be running. The other fix is Qt specific where it doesn't clear the breakpoints on stop.
The items were editable while you cannot edit the breakpoints at the moment and the last breakpoint deleted would not cause the row count to change to 0.
Not only it colors the entire row instead of just the address, but if the pc is the selected row, the pc color will overwrite the selection, this is done via a stylesheet.
This commit makes the colors hardcoded except when there is no symbols loaded, in which case, it uses the theme colors, except for the PC which is hardcoded to black on green. This makes a compromise between making use of the corespoinding theme color and the text being nicely readable on all themes.
This aligns the values to the right since It looks odd to be aligned to the left with any format other than hexadecimal. It also sets the font tot he debugger font and disallow selection as a previous commit made the selection pointless since it now relies on the current item.
It seemed impossible to SELECT an item, however, when right clicking, the CURRENT item is set to the appropriate cell, this commit makes the view use thta cell instead of the first selected one.
This makes it possible to use enums as the config type.
Default values are now clearer and there's no need for casts
when calling Config::Get/Set anymore.
In order to add support for enums, the common code was updated to
handle enums by using the underlying type when loading/saving settings.
A copy constructor is also provided for conversions from
`ConfigInfo<Enum>` to `ConfigInfo<underlying_type<Enum>>`
so that enum settings can still easily work with code that doesn't care
about the actual enum values (like Graphics{Choice,Radio} in DolphinQt2
which only treat the setting as an integer).
This excludes the second argument from template deduction.
Otherwise, it is required to manually cast the second argument to
the ConfigInfo type (because implicit conversions won't work).
e.g. to set the value for a ConfigInfo<std::string> from a string
literal, you'd need a ugly `std::string("yourstring")`.
Avoids needing to iterate and append the characters in one case. This also
alters the function to not need to construct a temporary std::string
(QString's toUtf8() is sufficient, as QByteArray exposes iterators).
toStdString() is equivalent to retrieving the QString's underlying
QByteArray via calling QString's .toUtf8 member function and then
calling .toStdString() on the result of it (discarding the QByteArray
afterwords), so this just trims off an unnecessary step in the process.
This is also somewhat more indicative of the conversions going on:
toStdString() converts the underlying character sequence of a
QString to UTF-8, not strict ASCII, so we're really using a superset of
ASCII.