Merge pull request #6551 from lioncash/qt-misc

DolphinQt: Remove a few unused variables
This commit is contained in:
Léo Lam 2018-03-28 07:50:44 +02:00 committed by GitHub
commit 10f198f3cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 6 additions and 16 deletions

View File

@ -310,8 +310,8 @@ void CodeWidget::UpdateFunctionCalls(Symbol* symbol)
if (call_symbol)
{
auto* item = new QListWidgetItem(QString::fromStdString(
StringFromFormat("> %s (%08x)", call_symbol->name.c_str(), addr).c_str()));
auto* item = new QListWidgetItem(
QString::fromStdString(StringFromFormat("> %s (%08x)", call_symbol->name.c_str(), addr)));
item->setData(Qt::UserRole, addr);
m_function_calls_list->addItem(item);
@ -331,7 +331,7 @@ void CodeWidget::UpdateFunctionCallers(Symbol* symbol)
if (caller_symbol)
{
auto* item = new QListWidgetItem(QString::fromStdString(
StringFromFormat("< %s (%08x)", caller_symbol->name.c_str(), addr).c_str()));
StringFromFormat("< %s (%08x)", caller_symbol->name.c_str(), addr)));
item->setData(Qt::UserRole, addr);
m_function_callers_list->addItem(item);

View File

@ -928,7 +928,6 @@ bool MainWindow::NetPlayHost(const QString& game_id)
const std::string traversal_host = Config::Get(Config::NETPLAY_TRAVERSAL_SERVER);
const u16 traversal_port = Config::Get(Config::NETPLAY_TRAVERSAL_PORT);
const std::string nickname = Config::Get(Config::NETPLAY_NICKNAME);
if (is_traversal)
host_port = Config::Get(Config::NETPLAY_LISTEN_PORT);

View File

@ -929,7 +929,7 @@ void MenuBar::LoadSymbolMap()
g_symbolDB.LoadMap(existing_map_file);
QMessageBox::information(
this, tr("Information"),
tr("Loaded symbols from '%1'").arg(QString::fromStdString(existing_map_file.c_str())));
tr("Loaded symbols from '%1'").arg(QString::fromStdString(existing_map_file)));
}
HLE::PatchFunctions();
@ -978,7 +978,7 @@ void MenuBar::SaveCode()
CBoot::FindMapFile(&existing_map_file, &writable_map_file);
const std::string path =
writable_map_file.substr(0, writable_map_file.find_last_of(".")) + "_code.map";
writable_map_file.substr(0, writable_map_file.find_last_of('.')) + "_code.map";
g_symbolDB.SaveCodeMap(path);
}

View File

@ -109,7 +109,7 @@ void MD5Dialog::SetResult(int pid, const std::string& result)
m_status_labels[pid]->setText(
tr("%1[%2]: %3").arg(player_name, QString::number(pid), QString::fromStdString(result)));
if (m_last_result == "")
if (m_last_result.empty())
{
m_check_label->setText(tr("The hashes match!"));
return;

View File

@ -6,9 +6,7 @@
#include <QIcon>
#include <QPixmap>
#include <QScreen>
#include <QStringList>
#include "Common/CommonPaths.h"
#include "Common/FileUtil.h"
#include "Core/ConfigManager.h"
#include "DolphinQt2/Resources.h"
@ -82,8 +80,6 @@ QPixmap Resources::GetScaledThemePixmap(const std::string& name)
void Resources::Init()
{
QString sys_dir = QString::fromStdString(File::GetSysDirectory() + RESOURCES_DIR + DIR_SEP);
for (const std::string& platform :
{"Platform_Gamecube", "Platform_Wii", "Platform_Wad", "Platform_File"})
{

View File

@ -4,7 +4,6 @@
#include "DolphinQt2/SearchBar.h"
#include <QCheckBox>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>

View File

@ -6,7 +6,6 @@
#include <QWidget>
class QCheckBox;
class QLineEdit;
class QPushButton;
@ -25,7 +24,5 @@ private:
void ConnectWidgets();
QLineEdit* m_search_edit;
QCheckBox* m_wii_check;
QCheckBox* m_gc_check;
QPushButton* m_close_button;
};

View File

@ -245,7 +245,6 @@ void WiiPane::OnUSBWhitelistAddButton()
void WiiPane::OnUSBWhitelistRemoveButton()
{
std::set<std::pair<u16, u16>> test_set = SConfig::GetInstance().m_usb_passthrough_devices;
QString device = m_whitelist_usb_list->currentItem()->text().left(9);
QString vid =
QString(device.split(QString::fromStdString(":"), QString::SplitBehavior::KeepEmptyParts)[0]);