Commit Graph

1024 Commits

Author SHA1 Message Date
Léo Lam 9335400f65
Merge pull request #6862 from aldelaro5/qt-unify-pause-play
Qt: make the pause play button only one button
2018-05-16 14:07:35 +02:00
Jack Andersen d14f6e9ee6 Qt/CodeViewWidget: Dynamic background dimming for dark themes 2018-05-15 18:59:40 -10:00
aldelaro5 33ed5b2e99
Qt/Debugger: Use QApplication::instance() as the connection context in Host_UpdateDisasmDialog()
Because running on the host instance doesn't actually allow to fire the event.  This fix a regression where stepping would not udpate the GUI at all.
2018-05-16 00:42:35 -04:00
aldelaro5 bc43f45119
Qt: make the pause play button only one button
This is to avoid several issue with using 2 actions and switching between them.  This commit will instead have one action get his property changed on pause and play.
2018-05-15 23:37:50 -04:00
spycrab 6c09ce3d95 Qt: Use proper signals 2018-05-15 20:13:12 +02:00
spycrab 79533ef789 Qt/PathPane: Disable "Remove" button when not applicable 2018-05-15 20:13:12 +02:00
spycrab 40e6abad09 Qt/AudioPane: Improve layout 2018-05-15 20:13:12 +02:00
spycrab 54d81ed13a Qt/SettingsWindow: Wrap tabs in scrollareas 2018-05-15 20:13:12 +02:00
spycrab b9bd4ecbcb Qt/Host: Fix random crashes when exiting fullscreen 2018-05-15 18:22:26 +02:00
spycrab e922f91cc3 Qt/GeneralWidget: Restore the adapter properly 2018-05-14 21:16:20 +02:00
Léo Lam 159f6115e2
Merge pull request #6851 from lioncash/usage
BreakpointWidget: Move variables closer to usage sites in OnLoad()
2018-05-14 19:18:05 +02:00
Léo Lam b5761f9dc7
Merge pull request #6852 from lioncash/code
CodeViewWidget: Minor changes
2018-05-14 19:17:35 +02:00
Léo Lam 5b15060127
Merge pull request #6857 from spycrab/qt_minor_win
Qt: Minor window fixes
2018-05-14 19:11:56 +02:00
Zexaron ff971b1a6f Qt/GeneralWidget remove unnecesary description wiring 2018-05-14 18:18:18 +02:00
spycrab ca5dc25694
Merge pull request #6858 from lioncash/capture
DolphinQt2: Resolve unused lambda capture warnings
2018-05-14 16:47:55 +02:00
spycrab 26b1048975
Merge pull request #6850 from lioncash/moc
DolphinQt2: Add missing Q_OBJECT macro to all QObject-related classes missing it
2018-05-14 16:29:53 +02:00
Lioncash e2543ea801
DolphinQt2: Resolve unused lambda capture warnings
Resolves -Wunused-lambda-capture warnings.
2018-05-14 10:11:47 -04:00
spycrab 7e9bf12246 Qt: Minor window fixes
* Remove some more "What's this?" buttons
* Add some missing titles
2018-05-14 11:10:04 +02:00
aldelaro5 6f2d8fad8f
Qt: allow to resize the render widget however wanted on render to main 2018-05-14 00:43:31 -04:00
Lioncash d7a3ce26de CodeViewWidget: Get rid of magic values in OnInsertBLR() and OnInsertNOP()
A call like ReplaceAddress(address, 0) is pretty ambiguous; so is
ReplaceAddress(address, false), so use an enum class that tells people
straight-up what the replacer is.

This also gets rid of the really weird naming, where if 'blr' is true,
we'd be replacing the address with a NOP, rather than an actual BLR
instruction, so we invert that so it actually makes sense. There's no
actual bug fixed here though, considering the OnInsert functions
specified the correct values; it's literally just weird naming.
2018-05-13 18:33:51 -04:00
Lioncash bbc0aee5ea CodeViewWidget: Replaces usages of QString::fromStdString with QStringLiteral where applicable
There's no need to construct a std::string here, when there's no dynamic
elements to the text.
2018-05-13 18:11:09 -04:00
Lioncash 644bbb29f3 CodeViewWidget: Remove unnecessary includes 2018-05-13 18:06:37 -04:00
Lioncash 7032863569 CodeViewWidget: Remove unnecessary QColor constructions
QBrush also accepts regular GlobalColor values as well.
2018-05-13 18:01:10 -04:00
Lioncash a0a0295f9d BreakpointWidget: Move variables closer to usage sites in OnLoad()
In the early-out case, we now don't end up constructing two vectors
that aren't even used. It also keeps relevant code together.
2018-05-13 17:56:03 -04:00
aldelaro5 2c861e75f5
Qt/debugger: only consider debugger hotkeys if debugging is enabled 2018-05-13 17:39:44 -04:00
Léo Lam 345838d517
Merge pull request #6842 from spycrab/qt_map_apply
Qt/Mapping: Fix mapping changes not being applied instantly
2018-05-13 23:34:18 +02:00
Lioncash 222fe58e25 DolphinQt2: Add missing Q_OBJECT macro to all QObject-related classes missing it
Without this macro, if any signals or slots were attempted to be used,
they wouldn't work; neither would various other features of the Qt
meta-object system. This can also lead to weird behavior in other
circumstances. Qt's documentation specifically states:

"Therefore, we strongly recommend that all subclasses of QObject use the
Q_OBJECT macro regardless of whether or not they actually use signals,
slots, and properties."

on its page for "The Meta-Object System", which can be seen here:
https://doc.qt.io/qt-5/metaobjects.html

Let's opt for "always do the right thing", and keep the code extensible
for the future and not have random things blow up on us.
2018-05-13 17:33:32 -04:00
spycrab c7a0b6c9f8
Merge pull request #6831 from spycrab/qt_memcard_fixes
Qt/GCMemcardManager: Fix multiple issues
2018-05-13 23:14:46 +02:00
JosJuice 74d561085c
Merge pull request #6848 from lioncash/guard
DolphinQt2: Add missing header guards for CheatCodeEditor and MappingIndicator
2018-05-13 22:21:40 +02:00
Lioncash b03c433543 DolphinQt2: Add missing header guards for CheatCodeEditor and MappingIndicator
Prevents potential double inclusion issues from ever happening.
2018-05-13 16:11:30 -04:00
Léo Lam 8f44423a5b
Merge pull request #6846 from spycrab/qt_native_sep
Qt: Use native dir separators
2018-05-13 22:10:10 +02:00
Léo Lam 6c38e4b47f
Merge pull request #6847 from lioncash/fs-include
FilesystemWidget: Replace DiscIO includes with forward declarations
2018-05-13 22:08:09 +02:00
Lioncash d1d584d16b FilesystemWidget: Replace DiscIO includes with forward declarations
Avoids the need to use an ugly ifdef around a header, and also resolves
an indirect inclusion in PropertiesDialog.
2018-05-13 16:01:16 -04:00
Léo Lam 1fe92b8be7
Merge pull request #6845 from lioncash/patch-dlg
NewPatchDialog/PatchesWidget: Use forward declarations where applicable
2018-05-13 22:00:43 +02:00
Léo Lam 07b57c7ac6
Merge pull request #6843 from lioncash/patch
PatchEngine: Minor changes
2018-05-13 21:58:55 +02:00
spycrab 5673a64612 Qt: Use native dir separators 2018-05-13 21:51:38 +02:00
Lioncash 0995cfef6a PatchEngine: Make PatchType an enum class
Makes the enum strongly typed. A function for retrieving the string
representation of the enum is also added, which allows hiding the array
that contains all of the strings from view (i.e. we operate on the API,
not the exposed internals). This also allows us to bounds check any
querying for the strings.
2018-05-13 15:46:51 -04:00
Lioncash 799e4154be PatchesWidget: Convert Core and UICommon includes into forward declarations
Avoids propagating inclusions through UI headers
2018-05-13 15:38:58 -04:00
Lioncash df3f9af6d7 NewPatchDialog: Convert PatchEngine include into a forward declaration
Avoids needing to include Core headers in UI-related header files,
preventing unintentional propagation.
2018-05-13 15:34:46 -04:00
spycrab 9e2f9db94c Qt/Mapping: Fix mapping changes not being applied instantly 2018-05-13 21:21:31 +02:00
spycrab b9ae157835 Qt/RenderWidget: Fix render-to-main focus 2018-05-13 21:08:34 +02:00
Lioncash a166cf2481 PatchEngine: Give Patch and PatchEntry default member initializers
Avoids potentially using the values uninitialized. While we're at it,
also drop the prefixed underscores from one of the constructors.
2018-05-13 15:08:32 -04:00
Lioncash 15a522fe9b DolphinQt2/NewPatchDialog: Remove unused <iostream> include
Including <iostream> causes a static constructor to be injected into the
translation unit, even if the everything from the header itself is
unused.
2018-05-13 14:04:22 -04:00
Léo Lam 9d1157f695
Merge pull request #6839 from spycrab/qt_start_top
Qt: Fix render widget not being on top when using -n / -e
2018-05-13 18:20:00 +02:00
Léo Lam e828c243f3
Merge pull request #6836 from leoetlino/wii-save-cleanup
WiiSave: (not so) Minor cleanup
2018-05-13 18:19:22 +02:00
spycrab 17795a615b
Merge pull request #6838 from spycrab/qt_map_save
Qt/ControllersWindow: Fix changing devices while emulation is running
2018-05-13 18:17:13 +02:00
Léo Lam 80b3d7ccb8 WiiSave: Allow users to specify export directory
Export and ExportAll now open a directory picker (that defaults to the
previous default directory, i.e. the Dolphin user dir).

Also removes the need to return the path in the export functions since
the user knows which path they chose.
2018-05-13 17:42:56 +02:00
Léo Lam a93d816c28 WiiSave: Move dialogs to UI code
This moves the result dialogs to DolphinQt2, since WiiSave should not
really be responsible for interacting with the user as a simple
Wii save importing/exporting class.

This also fixes Wii save import/export showing result dialogs twice,
once from WiiSave, and another time from DolphinQt2.
2018-05-13 17:42:55 +02:00
Léo Lam 41c4486c65 WiiSave: Clean up constructors
Move the import/export operation into separate functions, as it doesn't
really make sense for the constructor to do *everything*, including
printing success/failure message boxes.

The existing constructor was split into two: one that takes a path,
and another taking a title ID. This makes it more obvious what is
actually done when a path/TID is passed and also clarifies what
parameters should be passed. (No more magic 0 or "" value.)
2018-05-13 17:42:55 +02:00
Léo Lam 00bc1f28f2 Rename CWiiSaveCrypted to WiiSave 2018-05-13 17:42:55 +02:00
spycrab fa77e09239 Qt: Fix render widget not being on top when using -n / -e 2018-05-13 17:32:29 +02:00
spycrab 2ca75ae05a Qt/ControllersWindow: Fix changing devices while emulation is running 2018-05-13 14:04:39 +02:00
Léo Lam 99dff10d43
Merge pull request #6837 from spycrab/qt_position
Qt/RenderWidget: Save position and size using QSettings
2018-05-13 11:47:04 +02:00
spycrab 760a0be28a Qt/RenderWidget: Save position and size using QSettings 2018-05-13 01:27:56 +02:00
Léo Lam 66c1b909c2
Merge pull request #6765 from aldelaro5/Qt-debugger-fixes
Qt/debugger: fix a bunch of things
2018-05-13 01:20:11 +02:00
Léo Lam ad5a69be79
Merge pull request #6826 from spycrab/qt_netplay2
Qt/NetPlayDialog: Improve player list
2018-05-13 01:17:51 +02:00
aldelaro5 5c688b2d2b
Qt/debugger: Don't update the symbols list unnecessarily
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.
2018-05-12 19:15:26 -04:00
aldelaro5 be6b4edb0c
Qt/debugger: only resize the columns of the code view once per update
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.
2018-05-12 19:15:26 -04:00
aldelaro5 daf8df951c
Qt/Debugger: Update the register view properly on pause and step 2018-05-12 19:15:24 -04:00
aldelaro5 7388774f10
Qt/debugger: fix some possible crashes and inconsistencies in the breakpoint widget
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.
2018-05-12 19:06:18 -04:00
aldelaro5 09792fde70
Qt/debugger: recenter the code widget when selecting a breakpoint 2018-05-12 19:04:37 -04:00
aldelaro5 53803c1fca
Qt/debugger: fix minor issues in the breakpointWidget
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.
2018-05-12 19:04:37 -04:00
aldelaro5 238c801711
Qt/debugger: properly updates when we break
The Host_UpdateDisasmDialog was unimplemented in Qt which is required to get updates when we break.  Additionally, this updates the debugger toolbar.
2018-05-12 19:04:30 -04:00
Léo Lam f91b729b61
Merge pull request #6825 from leoetlino/onion-types
Config: Fix implicit conversions/enum config types
2018-05-12 21:59:43 +02:00
aldelaro5 70ca98c8e7
Qt/debugger: change how the selected line in the code widget looks
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.
2018-05-12 15:47:16 -04:00
aldelaro5 9a2dd470a0
Qt/debugger: change some colors logic in the codeWidget
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.
2018-05-12 15:47:16 -04:00
aldelaro5 9bacb3cb26
Qt/RegisterView: fix minor aesthetic issues
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.
2018-05-12 15:47:16 -04:00
aldelaro5 8c23335be3
Qt/RegisterView: fix the context menu not working correctly
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.
2018-05-12 15:47:16 -04:00
aldelaro5 f9a6f97dca
Make the dock widgets (logger and debugger) be on the left by default
Like they were in Wx.
2018-05-12 15:47:16 -04:00
spycrab 229c92d0bf Qt/GCMemcardManager: Properly perform actions and do error checking 2018-05-12 21:38:30 +02:00
spycrab 8b3358e208 Qt/GCMemcardManager: Fix broken export message 2018-05-12 20:35:16 +02:00
spycrab bf0ee9f702
Merge pull request #6822 from spycrab/qt_fix_defaults
Qt: Fix mapping defaults
2018-05-12 19:22:53 +02:00
spycrab d8a95834f3 Qt/NetPlayDialog: Improve player list 2018-05-12 18:25:38 +02:00
Léo Lam 6763a3fce1 Config: Add support for enums
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).
2018-05-12 18:10:26 +02:00
Léo Lam 7dca7c237e Config: Fix template deduction for implicit conversions
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")`.
2018-05-12 14:30:18 +02:00
Léo Lam e78235943e
Merge pull request #6823 from spycrab/qt_reset_hotkey
Qt: Implement "Reset" hotkey
2018-05-12 13:12:24 +02:00
Léo Lam a712cfe339
Merge pull request #6624 from spycrab/qt_dbg_jit
Qt/Debugger: Implement "JIT" widget
2018-05-12 13:02:47 +02:00
spycrab 226b6888d6 Qt: Implement "Reset" hotkey 2018-05-12 03:56:10 +02:00
spycrab c118af73c2 Qt: Fix mapping defaults 2018-05-12 01:31:42 +02:00
spycrab 0abce1419b Qt/NetPlayDialog: Fix broken IP label 2018-05-11 21:22:57 +02:00
spycrab 76f6c7523f
Merge pull request #6810 from spycrab/qt_fix_hotkey_conf
Qt/MappingButton: Fix occasionally broken indicator
2018-05-11 21:05:43 +02:00
spycrab 49d2f6f15a Qt/HotkeyScheduler: Use onion config 2018-05-11 20:47:30 +02:00
spycrab 16e2ac9257 VideoCommon/RenderBase: Refactor OSD messages 2018-05-11 18:24:08 +02:00
spycrab 1dfcffcce2 Qt/Debugger: Implement "JIT" widget 2018-05-11 18:10:35 +02:00
spycrab 082573bd6b
Merge pull request #6808 from spycrab/qt_hotkey_osd
Qt/HotkeyScheduler: Show OSD information
2018-05-11 15:51:37 +02:00
spycrab 66190ae4d6 Qt/HotkeyScheduler: Show OSD information 2018-05-11 12:49:20 +02:00
spycrab 242fadc76f Qt/MappingButton: Fix occasionally broken indicator 2018-05-11 12:37:48 +02:00
Léo Lam 5071973a51
Merge pull request #6805 from spycrab/qt_netplay
Qt/NetPlayDialog: Multiple improvements
2018-05-11 10:39:53 +02:00
Lioncash 6d0cab3743 DolphinQt2/MemoryWidget: Use QString's toUtf8() where applicable instead of toStdString()
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.
2018-05-10 22:10:45 -04:00
spycrab 3cca051850
Merge pull request #6806 from spycrab/qt_iowindow_crash
Qt/IOWindow: Fix crash
2018-05-10 21:18:48 +02:00
spycrab 146979f67e Qt/IOWindow: Fix crash 2018-05-10 21:12:19 +02:00
spycrab 09449e2bca Qt/NetPlayDialog: Use QToolButton instead of a QComboBox 2018-05-10 20:51:12 +02:00
spycrab 26bee93943 Qt/NetPlayDialog: Show more friendly interface names 2018-05-10 20:51:12 +02:00
spycrab 0141ce9305 Qt/NetPlayDialog: Restore window geometry 2018-05-10 20:51:12 +02:00
spycrab 0ee7bddd4f Qt/NetPlayDialog: Add splitter 2018-05-10 20:51:12 +02:00
spycrab 6ea2b2e7e5 Qt/NetPlayDialog: Fix duplicate messages 2018-05-10 20:51:12 +02:00
spycrab 7550389c72 Qt/NetPlayDialog: Escape HTML in chat 2018-05-10 19:19:09 +02:00
spycrab 893c5e694e Qt/NetPlayDialog: Use more readable colors 2018-05-10 19:14:19 +02:00
spycrab 6e9d0ff6de
Merge pull request #6802 from Neui/qt-remember-main-window-position-and-size
Qt: Save and restore main window size and position
2018-05-10 18:26:38 +02:00
Neui f6d5896bc7 Qt: Save and restore main window size and position 2018-05-10 18:19:17 +02:00