Merge pull request #7737 from spycrab/qt_fix_warnings

DolphinQt: Fix some warnings
This commit is contained in:
spycrab 2019-01-25 17:30:41 +01:00 committed by GitHub
commit f0ac74d1b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -361,7 +361,7 @@ void GameList::ShowContextMenu(const QPoint&)
tag_action->setCheckable(true); tag_action->setCheckable(true);
tag_action->setChecked(game_tags.contains(tag)); tag_action->setChecked(game_tags.contains(tag));
connect(tag_action, &QAction::toggled, this, [this, path, tag, model](bool checked) { connect(tag_action, &QAction::toggled, [path, tag, model](bool checked) {
if (!checked) if (!checked)
model->RemoveGameTag(path, tag); model->RemoveGameTag(path, tag);
else else

View File

@ -73,7 +73,7 @@ GameTracker::GameTracker(QObject* parent) : QFileSystemWatcher(parent)
[this](const std::shared_ptr<const UICommon::GameFile>& game) { [this](const std::shared_ptr<const UICommon::GameFile>& game) {
emit GameUpdated(game); emit GameUpdated(game);
}); });
QueueOnObject(this, [this] { Settings::Instance().NotifyMetadataRefreshComplete(); }); QueueOnObject(this, [] { Settings::Instance().NotifyMetadataRefreshComplete(); });
break; break;
case CommandType::PurgeCache: case CommandType::PurgeCache:
m_cache.Clear(UICommon::GameFileCache::DeleteOnDisk::Yes); m_cache.Clear(UICommon::GameFileCache::DeleteOnDisk::Yes);
@ -136,7 +136,7 @@ void GameTracker::StartInternal()
if (cache_updated) if (cache_updated)
m_cache.Save(); m_cache.Save();
QueueOnObject(this, [this] { Settings::Instance().NotifyMetadataRefreshComplete(); }); QueueOnObject(this, [] { Settings::Instance().NotifyMetadataRefreshComplete(); });
} }
bool GameTracker::AddPath(const QString& dir) bool GameTracker::AddPath(const QString& dir)

View File

@ -315,7 +315,7 @@ void NetPlayDialog::ConnectWidgets()
client->AdjustPadBufferSize(value); client->AdjustPadBufferSize(value);
}); });
connect(m_host_input_authority_box, &QCheckBox::toggled, [this](bool checked) { connect(m_host_input_authority_box, &QCheckBox::toggled, [](bool checked) {
auto server = Settings::Instance().GetNetPlayServer(); auto server = Settings::Instance().GetNetPlayServer();
if (server) if (server)
server->SetHostInputAuthority(checked); server->SetHostInputAuthority(checked);

View File

@ -268,7 +268,7 @@ void RenderWidget::PassEventToImGui(const QEvent* event)
// The actual text input goes through AddInputCharactersUTF8(). // The actual text input goes through AddInputCharactersUTF8().
const QKeyEvent* key_event = static_cast<const QKeyEvent*>(event); const QKeyEvent* key_event = static_cast<const QKeyEvent*>(event);
const bool is_down = event->type() == QEvent::KeyPress; const bool is_down = event->type() == QEvent::KeyPress;
const int key = (key_event->key() & 0x1FF); const u32 key = static_cast<u32>(key_event->key() & 0x1FF);
auto lock = g_renderer->GetImGuiLock(); auto lock = g_renderer->GetImGuiLock();
if (key < ArraySize(ImGui::GetIO().KeysDown)) if (key < ArraySize(ImGui::GetIO().KeysDown))
ImGui::GetIO().KeysDown[key] = is_down; ImGui::GetIO().KeysDown[key] = is_down;