mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix some warnings
This commit is contained in:
parent
8f5e755c09
commit
b3ec5cca98
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ public:
|
|||
QFont monospaceFont() { return m_monospace; }
|
||||
|
||||
QList<Window*> 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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<DolphinConnector>(&m_dolphinView, this), "file");
|
||||
|
@ -1933,7 +1931,7 @@ Action* Window::addGameAction(const QString& visibleName, const QString& name, A
|
|||
|
||||
template<typename T, typename V>
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue