diff --git a/src/platform/qt/DisplayQt.cpp b/src/platform/qt/DisplayQt.cpp index 1eefb71f0..20ec44f0d 100644 --- a/src/platform/qt/DisplayQt.cpp +++ b/src/platform/qt/DisplayQt.cpp @@ -87,8 +87,8 @@ void DisplayQt::resizeContext() { if (m_width != size.width() || m_height != size.height()) { m_width = size.width(); m_height = size.height(); - m_oldBacking = std::move(QImage()); - m_backing = std::move(QImage()); + m_oldBacking = QImage(); + m_backing = QImage(); } } diff --git a/src/platform/qt/GBAApp.h b/src/platform/qt/GBAApp.h index a563a4c42..d39f3a4a8 100644 --- a/src/platform/qt/GBAApp.h +++ b/src/platform/qt/GBAApp.h @@ -61,7 +61,6 @@ public: QFont monospaceFont() { return m_monospace; } QList windows() { return m_windows; } - Window* newWindow(); QString getOpenFileName(QWidget* owner, const QString& title, const QString& filter = {}); QStringList getOpenFileNames(QWidget* owner, const QString& title, const QString& filter = {}); @@ -81,6 +80,7 @@ public: public slots: void restartForUpdate(); + Window* newWindow(); signals: void jobFinished(qint64 jobId); diff --git a/src/platform/qt/MemoryModel.cpp b/src/platform/qt/MemoryModel.cpp index 4c991982d..1777fddd0 100644 --- a/src/platform/qt/MemoryModel.cpp +++ b/src/platform/qt/MemoryModel.cpp @@ -678,7 +678,7 @@ void MemoryModel::adjustCursor(int adjust, bool shift) { } int cursorPosition = m_top; if (shift) { - uint32_t absolute; + uint32_t absolute = adjust; if (m_selectionAnchor == m_selection.first) { if (adjust < 0 && m_base - adjust > m_selection.second) { absolute = m_base - m_selection.second + m_align; diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 87b6a8530..cc6c2512c 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1373,9 +1373,7 @@ void Window::setupMenu(QMenuBar* menubar) { } m_actions.addSeparator("file"); - m_multiWindow = m_actions.addAction(tr("New multiplayer window"), "multiWindow", [this]() { - GBAApp::app()->newWindow(); - }, "file"); + m_multiWindow = m_actions.addAction(tr("New multiplayer window"), "multiWindow", GBAApp::app(), &GBAApp::newWindow, "file"); #ifdef M_CORE_GBA Action* dolphin = m_actions.addAction(tr("Connect to Dolphin..."), "connectDolphin", openNamedTView(&m_dolphinView, this), "file"); @@ -1933,7 +1931,7 @@ Action* Window::addGameAction(const QString& visibleName, const QString& name, A template Action* Window::addGameAction(const QString& visibleName, const QString& name, T* obj, V (T::*method)(), const QString& menu, const QKeySequence& shortcut) { - return addGameAction(visibleName, name, [this, obj, method]() { + return addGameAction(visibleName, name, [obj, method]() { (obj->*method)(); }, menu, shortcut); } diff --git a/src/util/configuration.c b/src/util/configuration.c index 4c7805580..dbcefef8f 100644 --- a/src/util/configuration.c +++ b/src/util/configuration.c @@ -183,7 +183,7 @@ bool ConfigurationWrite(const struct Configuration* configuration, const char* p } bool res = ConfigurationWriteVFile(configuration, vf); vf->close(vf); - return true; + return res; } bool ConfigurationWriteVFile(const struct Configuration* configuration, struct VFile* vf) {