mirror of https://github.com/mgba-emu/mgba.git
Qt: Resolve -Wreorder warnings
This commit is contained in:
parent
ccfb9f24f5
commit
686380b6c4
|
@ -13,8 +13,8 @@ using namespace QGBA;
|
|||
|
||||
AssetView::AssetView(GameController* controller, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_controller(controller)
|
||||
, m_tileCache(controller->tileCache())
|
||||
, m_controller(controller)
|
||||
{
|
||||
m_updateTimer.setSingleShot(true);
|
||||
m_updateTimer.setInterval(1);
|
||||
|
|
|
@ -11,8 +11,8 @@ using namespace QGBA;
|
|||
|
||||
DebuggerController::DebuggerController(GameController* controller, mDebugger* debugger, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_gameController(controller)
|
||||
, m_debugger(debugger)
|
||||
, m_gameController(controller)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ GameController::GameController(QObject* parent)
|
|||
, m_gameOpen(false)
|
||||
, m_vf(nullptr)
|
||||
, m_useBios(false)
|
||||
, m_override(nullptr)
|
||||
, m_audioProcessor(AudioProcessor::create())
|
||||
, m_pauseAfterFrame(false)
|
||||
, m_sync(true)
|
||||
|
@ -62,16 +63,15 @@ GameController::GameController(QObject* parent)
|
|||
, m_videoLayers()
|
||||
, m_autofire{}
|
||||
, m_autofireStatus{}
|
||||
, m_inputController(nullptr)
|
||||
, m_multiplayer(nullptr)
|
||||
, m_stream(nullptr)
|
||||
, m_stateSlot(1)
|
||||
, m_backupLoadState(nullptr)
|
||||
, m_backupSaveState(nullptr)
|
||||
, m_saveStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_SAVEDATA | SAVESTATE_CHEATS | SAVESTATE_RTC)
|
||||
, m_loadStateFlags(SAVESTATE_SCREENSHOT | SAVESTATE_RTC)
|
||||
, m_preload(false)
|
||||
, m_override(nullptr)
|
||||
, m_inputController(nullptr)
|
||||
, m_multiplayer(nullptr)
|
||||
, m_stream(nullptr)
|
||||
, m_vl(nullptr)
|
||||
, m_vlVf(nullptr)
|
||||
{
|
||||
|
|
|
@ -21,16 +21,16 @@ Q_OBJECT
|
|||
public:
|
||||
struct RegisterItem {
|
||||
RegisterItem(const QString& description, uint start, uint size = 1, bool readonly = false)
|
||||
: description(description)
|
||||
, start(start)
|
||||
: start(start)
|
||||
, size(size)
|
||||
, readonly(readonly) {}
|
||||
, readonly(readonly)
|
||||
, description(description) {}
|
||||
RegisterItem(const QString& description, uint start, uint size, QStringList items, bool readonly = false)
|
||||
: description(description)
|
||||
, start(start)
|
||||
: start(start)
|
||||
, size(size)
|
||||
, items(items)
|
||||
, readonly(readonly) {}
|
||||
, readonly(readonly)
|
||||
, description(description)
|
||||
, items(items) {}
|
||||
uint start;
|
||||
uint size;
|
||||
bool readonly;
|
||||
|
|
|
@ -26,16 +26,16 @@ mSDLEvents InputController::s_sdlEvents;
|
|||
|
||||
InputController::InputController(int playerId, QWidget* topLevel, QObject* parent)
|
||||
: QObject(parent)
|
||||
, m_playerId(playerId)
|
||||
, m_config(nullptr)
|
||||
, m_gamepadTimer(nullptr)
|
||||
, m_playerId(playerId)
|
||||
, m_allowOpposing(false)
|
||||
, m_topLevel(topLevel)
|
||||
, m_focusParent(topLevel)
|
||||
#ifdef BUILD_SDL
|
||||
, m_sdlPlayer{}
|
||||
, m_playerAttached(false)
|
||||
#endif
|
||||
, m_allowOpposing(false)
|
||||
, m_topLevel(topLevel)
|
||||
, m_focusParent(topLevel)
|
||||
, m_gamepadTimer(nullptr)
|
||||
{
|
||||
mInputMapInit(&m_inputMap, &GBAInputInfo);
|
||||
|
||||
|
|
|
@ -179,8 +179,6 @@ constexpr InputProfile::InputProfile(const char* name,
|
|||
keys.keyR,
|
||||
keys.keyL,
|
||||
}
|
||||
, m_shortcutButtons(shortcutButtons)
|
||||
, m_shortcutAxes(shortcutAxes)
|
||||
, m_axes {
|
||||
axes.keyA,
|
||||
axes.keyB,
|
||||
|
@ -193,6 +191,8 @@ constexpr InputProfile::InputProfile(const char* name,
|
|||
axes.keyR,
|
||||
axes.keyL,
|
||||
}
|
||||
, m_shortcutButtons(shortcutButtons)
|
||||
, m_shortcutAxes(shortcutAxes)
|
||||
, m_tiltAxis(tiltAxis)
|
||||
, m_gyroAxis(gyroAxis)
|
||||
, m_gyroSensitivity(gyroSensitivity)
|
||||
|
|
|
@ -16,12 +16,12 @@ using namespace QGBA;
|
|||
|
||||
KeyEditor::KeyEditor(QWidget* parent)
|
||||
: QLineEdit(parent)
|
||||
, m_direction(GamepadAxisEvent::NEUTRAL)
|
||||
, m_hatDirection(GamepadHatEvent::CENTER)
|
||||
, m_key(-1)
|
||||
, m_axis(-1)
|
||||
, m_hat(-1)
|
||||
, m_button(false)
|
||||
, m_direction(GamepadAxisEvent::NEUTRAL)
|
||||
, m_hatDirection(GamepadHatEvent::CENTER)
|
||||
{
|
||||
setAlignment(Qt::AlignCenter);
|
||||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
|
|
@ -23,8 +23,8 @@ using namespace QGBA;
|
|||
LoadSaveState::LoadSaveState(GameController* controller, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_controller(controller)
|
||||
, m_currentFocus(controller->stateSlot() - 1)
|
||||
, m_mode(LoadSave::LOAD)
|
||||
, m_currentFocus(controller->stateSlot() - 1)
|
||||
{
|
||||
setAttribute(Qt::WA_TranslucentBackground);
|
||||
m_ui.setupUi(this);
|
||||
|
|
|
@ -72,9 +72,9 @@ QString LogController::toString(int level) {
|
|||
}
|
||||
|
||||
LogController::Stream::Stream(LogController* controller, int level, int category)
|
||||
: m_log(controller)
|
||||
, m_level(level)
|
||||
: m_level(level)
|
||||
, m_category(category)
|
||||
, m_log(controller)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ using namespace QGBA;
|
|||
MemoryModel::MemoryModel(QWidget* parent)
|
||||
: QAbstractScrollArea(parent)
|
||||
, m_core(nullptr)
|
||||
, m_codec(nullptr)
|
||||
, m_top(0)
|
||||
, m_align(1)
|
||||
, m_selection(0, 0)
|
||||
, m_selectionAnchor(0)
|
||||
, m_codec(nullptr)
|
||||
{
|
||||
m_font.setFamily("Source Code Pro");
|
||||
m_font.setStyleHint(QFont::Monospace);
|
||||
|
|
|
@ -555,8 +555,8 @@ ShortcutController::ShortcutItem::ShortcutItem(QAction* action, const QString& n
|
|||
ShortcutController::ShortcutItem::ShortcutItem(ShortcutController::ShortcutItem::Functions functions, int shortcut, const QString& visibleName, const QString& name, ShortcutItem* parent)
|
||||
: m_action(nullptr)
|
||||
, m_shortcut(shortcut)
|
||||
, m_functions(functions)
|
||||
, m_menu(nullptr)
|
||||
, m_functions(functions)
|
||||
, m_name(name)
|
||||
, m_visibleName(visibleName)
|
||||
, m_button(-1)
|
||||
|
|
|
@ -65,11 +65,19 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
|
|||
: QMainWindow(parent)
|
||||
, m_log(0)
|
||||
, m_logView(new LogView(&m_log))
|
||||
#ifdef USE_DEBUGGERS
|
||||
, m_console(nullptr)
|
||||
#endif
|
||||
, m_stateWindow(nullptr)
|
||||
, m_screenWidget(new WindowBackground())
|
||||
, m_logo(":/res/mgba-1024.png")
|
||||
, m_config(config)
|
||||
, m_inputController(playerId, this)
|
||||
, m_mruMenu(nullptr)
|
||||
, m_shortcutController(new ShortcutController(this))
|
||||
, m_fullscreenOnStart(false)
|
||||
, m_autoresume(false)
|
||||
, m_wasOpened(false)
|
||||
#ifdef USE_FFMPEG
|
||||
, m_videoView(nullptr)
|
||||
#endif
|
||||
|
@ -79,14 +87,6 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
|
|||
#ifdef USE_GDB_STUB
|
||||
, m_gdbController(nullptr)
|
||||
#endif
|
||||
#ifdef USE_DEBUGGERS
|
||||
, m_console(nullptr)
|
||||
#endif
|
||||
, m_mruMenu(nullptr)
|
||||
, m_shortcutController(new ShortcutController(this))
|
||||
, m_fullscreenOnStart(false)
|
||||
, m_autoresume(false)
|
||||
, m_wasOpened(false)
|
||||
{
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setAcceptDrops(true);
|
||||
|
|
Loading…
Reference in New Issue