mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 18:53:28 +01:00
Remove about 100 warnings from rpcs3qt code.
This commit is contained in:
parent
866b9524b3
commit
fa7407cd42
@ -6,7 +6,7 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_dialog)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#include "auto_pause_settings_dialog.h"
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialog(parent)
|
||||
{
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
#include "Emu/RSX/CgBinaryProgram.h"
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||
|
||||
cg_disasm_window::cg_disasm_window(std::shared_ptr<gui_settings> xSettings, QWidget* parent): QWidget(), xgui_settings(xSettings)
|
||||
cg_disasm_window::cg_disasm_window(std::shared_ptr<gui_settings> xSettings, QWidget* parent): QWidget(parent), xgui_settings(xSettings)
|
||||
{
|
||||
setWindowTitle(tr("Cg Disasm"));
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
@ -76,7 +76,7 @@ void cg_disasm_window::ShowContextMenu(const QPoint &pos)
|
||||
ShowDisasm();
|
||||
});
|
||||
|
||||
myMenu.exec(QCursor::pos());
|
||||
myMenu.exec(mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void cg_disasm_window::ShowDisasm()
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QFontDatabase>
|
||||
#include <QCompleter>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
extern bool user_asked_for_frame_capture;
|
||||
|
||||
debugger_frame::debugger_frame(std::shared_ptr<gui_settings> settings, QWidget *parent)
|
||||
@ -20,7 +20,6 @@ debugger_frame::debugger_frame(std::shared_ptr<gui_settings> settings, QWidget *
|
||||
body = new QWidget(this);
|
||||
mono = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
mono.setPointSize(pSize);
|
||||
QFontMetrics* fontMetrics = new QFontMetrics(mono);
|
||||
|
||||
QVBoxLayout* vbox_p_main = new QVBoxLayout();
|
||||
QHBoxLayout* hbox_b_main = new QHBoxLayout();
|
||||
@ -370,7 +369,6 @@ void debugger_frame::Show_Val()
|
||||
if (cpu)
|
||||
{
|
||||
unsigned long pc = cpu ? GetPc() : 0x0;
|
||||
bool ok;
|
||||
addr->setText("Address: " + QString("%1").arg(pc, 8, 16, QChar('0'))); // set address input line to 8 digits
|
||||
p_pc->setPlaceholderText(QString("%1").arg(pc, 8, 16, QChar('0')));
|
||||
}
|
||||
@ -618,6 +616,8 @@ void debugger_list::wheelEvent(QWheelEvent* event)
|
||||
|
||||
void debugger_list::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
|
||||
if (count() < 1 || visualItemRect(item(0)).height() < 1)
|
||||
{
|
||||
return;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <QObject>
|
||||
#include <QComboBox>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
struct Render_Creator
|
||||
{
|
||||
|
@ -991,7 +991,7 @@ void game_list_frame::PopulateGameGrid(uint maxCols, const QSize& image_size, co
|
||||
|
||||
if (c != 0)
|
||||
{ // if left over games exist -- if empty entries exist
|
||||
for (int col = c; col < maxCols; ++col)
|
||||
for (uint col = c; col < maxCols; ++col)
|
||||
{
|
||||
QTableWidgetItem* emptyItem = new QTableWidgetItem();
|
||||
emptyItem->setFlags(Qt::NoItemFlags);
|
||||
|
@ -50,5 +50,7 @@ void game_list_grid_delegate::paint(QPainter * painter, const QStyleOptionViewIt
|
||||
|
||||
QSize game_list_grid_delegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
|
||||
{
|
||||
Q_UNUSED(option);
|
||||
Q_UNUSED(index);
|
||||
return m_size;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QTimer>
|
||||
#include <QThread>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
gs_frame::gs_frame(const QString& title, int w, int h, QIcon appIcon, bool disableMouse)
|
||||
: QWindow(), m_windowTitle(title), m_disable_mouse(disableMouse)
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <QColor>
|
||||
#include <QBitmap>
|
||||
|
||||
typedef struct GUI_SAVE
|
||||
struct GUI_SAVE
|
||||
{
|
||||
QString key;
|
||||
QString name;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "instruction_editor_dialog.h"
|
||||
#include <QFontDatabase>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr<cpu_thread>& _cpu, CPUDisAsm* _disasm)
|
||||
: QDialog(parent)
|
||||
@ -84,7 +84,8 @@ instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, c
|
||||
void instruction_editor_dialog::updatePreview()
|
||||
{
|
||||
bool ok;
|
||||
ulong opcode = t2_instr->text().toULong(&ok, 16);
|
||||
//ulong opcode = t2_instr->text().toULong(&ok, 16);
|
||||
|
||||
if (ok)
|
||||
{
|
||||
if (g_system == system_type::psv)
|
||||
|
@ -60,7 +60,7 @@ kernel_explorer::kernel_explorer(QWidget* parent) : QDialog(parent)
|
||||
Update();
|
||||
};
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
void kernel_explorer::Update()
|
||||
{
|
||||
@ -144,7 +144,7 @@ void kernel_explorer::Update()
|
||||
{
|
||||
case SYS_MEM_OBJECT:
|
||||
{
|
||||
auto& mem = static_cast<lv2_memory&>(obj);
|
||||
// auto& mem = static_cast<lv2_memory&>(obj);
|
||||
l_addTreeChild(node, qstr(fmt::format("Memory: ID = 0x%08x", id)));
|
||||
break;
|
||||
}
|
||||
@ -171,13 +171,13 @@ void kernel_explorer::Update()
|
||||
}
|
||||
case SYS_INTR_TAG_OBJECT:
|
||||
{
|
||||
auto& tag = static_cast<lv2_int_tag&>(obj);
|
||||
// auto& tag = static_cast<lv2_int_tag&>(obj);
|
||||
l_addTreeChild(node, qstr(fmt::format("Intr Tag: ID = 0x%08x", id)));
|
||||
break;
|
||||
}
|
||||
case SYS_INTR_SERVICE_HANDLE_OBJECT:
|
||||
{
|
||||
auto& serv = static_cast<lv2_int_serv&>(obj);
|
||||
// auto& serv = static_cast<lv2_int_serv&>(obj);
|
||||
l_addTreeChild(node, qstr(fmt::format("Intr Svc: ID = 0x%08x", id)));
|
||||
break;
|
||||
}
|
||||
@ -223,7 +223,7 @@ void kernel_explorer::Update()
|
||||
}
|
||||
case SYS_TIMER_OBJECT:
|
||||
{
|
||||
auto& timer = static_cast<lv2_timer&>(obj);
|
||||
// auto& timer = static_cast<lv2_timer&>(obj);
|
||||
l_addTreeChild(node, qstr(fmt::format("Timer: ID = 0x%08x", id)));
|
||||
break;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QActionGroup>
|
||||
#include <QScrollBar>
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
struct gui_listener : logs::listener
|
||||
{
|
||||
|
@ -615,7 +615,6 @@ void main_window::DecryptSPRXLibraries()
|
||||
if (elf_file && elf_file.size() >= 4 && elf_file.read<u32>() == "SCE\0"_u32)
|
||||
{
|
||||
const std::size_t prx_ext_pos = prx_path.find_last_of('.');
|
||||
const std::string& prx_ext = fmt::to_upper(prx_path.substr(prx_ext_pos != -1 ? prx_ext_pos : prx_path.size()));
|
||||
const std::string& prx_name = prx_path.substr(prx_dir.size());
|
||||
|
||||
elf_file = decrypt_self(std::move(elf_file));
|
||||
@ -1203,8 +1202,6 @@ void main_window::CreateConnects()
|
||||
});
|
||||
connect (gameListFrame, &game_list_frame::RequestIconSizeActSet, [=](const int& idx)
|
||||
{
|
||||
int index = GUI::gl_max_slider_pos / 4;
|
||||
|
||||
if (idx < GUI::get_Index((GUI::gl_icon_size_small + GUI::gl_icon_size_min) / 2)) ui->setIconSizeTinyAct->setChecked(true);
|
||||
else if (idx < GUI::get_Index((GUI::gl_icon_size_medium + GUI::gl_icon_size_small) / 2)) ui->setIconSizeSmallAct->setChecked(true);
|
||||
else if (idx < GUI::get_Index((GUI::gl_icon_size_max + GUI::gl_icon_size_medium) / 2)) ui->setIconSizeMediumAct->setChecked(true);
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "memory_viewer_panel.h"
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
memory_viewer_panel::memory_viewer_panel(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
@ -219,7 +219,6 @@ memory_viewer_panel::memory_viewer_panel(QWidget* parent)
|
||||
connect(b_fprev, &QAbstractButton::clicked, [=]() { m_addr -= m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_fnext, &QAbstractButton::clicked, [=]() { m_addr += m_rowcount * m_colcount; ShowMemory(); });
|
||||
connect(b_img, &QAbstractButton::clicked, [=]() {
|
||||
u32 addr = m_addr;
|
||||
int mode = cbox_img_mode->currentIndex();
|
||||
int sizex = sb_img_size_x->value();
|
||||
int sizey = sb_img_size_y->value();
|
||||
@ -301,7 +300,6 @@ void memory_viewer_panel::ShowMemory()
|
||||
|
||||
void memory_viewer_panel::ShowImage(QWidget* parent, u32 addr, int mode, u32 width, u32 height, bool flipv)
|
||||
{
|
||||
QImage::Format format;
|
||||
unsigned char* originalBuffer = (unsigned char*)vm::base(addr);
|
||||
unsigned char* convertedBuffer = (unsigned char*)malloc(width * height * 4);
|
||||
switch(mode)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#include "register_editor_dialog.h"
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
|
||||
inline std::string sstr(const QVariant& _in) { return sstr(_in.toString()); }
|
||||
|
||||
|
@ -7,14 +7,15 @@ enum GCMEnumTypes
|
||||
CELL_GCM_PRIMITIVE_ENUM,
|
||||
};
|
||||
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
|
||||
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
|
||||
|
||||
rsx_debugger::rsx_debugger(QWidget* parent)
|
||||
rsx_debugger::rsx_debugger(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, m_item_count(37)
|
||||
, m_addr(0x0)
|
||||
, m_cur_texture(0)
|
||||
, exit(false)
|
||||
, palette_bg()
|
||||
{
|
||||
setWindowTitle(tr("RSX Debugger"));
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
@ -24,8 +25,8 @@ rsx_debugger::rsx_debugger(QWidget* parent)
|
||||
mono = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||
mono.setPointSize(pSize);
|
||||
fontMetrics = new QFontMetrics(mono);
|
||||
palette_bg = new QPalette();
|
||||
palette_bg->setColor(backgroundRole(), QColor(240, 240, 240));
|
||||
|
||||
palette_bg.setColor(backgroundRole(), QColor(240, 240, 240));
|
||||
QHBoxLayout* hbox_panel = new QHBoxLayout();
|
||||
|
||||
//Tools
|
||||
@ -377,9 +378,9 @@ namespace
|
||||
if (img.isNull()) return;
|
||||
//QString title = qstr(fmt::format("Raw Image @ 0x%x", addr));
|
||||
QLabel* canvas = new QLabel();
|
||||
QPalette* pal_bg = new QPalette();
|
||||
pal_bg->setColor(canvas->backgroundRole(), QColor(240, 240, 240));
|
||||
canvas->setPalette(*pal_bg); //This fix the ugly background color under Windows
|
||||
QPalette pal_bg;
|
||||
pal_bg.setColor(canvas->backgroundRole(), QColor(240, 240, 240));
|
||||
canvas->setPalette(pal_bg); //This fix the ugly background color under Windows
|
||||
canvas->setPixmap(QPixmap::fromImage(img));
|
||||
canvas->setFixedSize(img.size());
|
||||
canvas->show();
|
||||
@ -411,7 +412,7 @@ void Buffer::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
return;
|
||||
}
|
||||
|
||||
const auto buffers = render->display_buffers;
|
||||
const auto buffers = render->display_buffers;
|
||||
|
||||
// TODO: Is there any better way to choose the color buffers
|
||||
#define SHOW_BUFFER(id) \
|
||||
|
@ -60,7 +60,7 @@ class rsx_debugger : public QDialog
|
||||
u32 pSize;
|
||||
|
||||
QLineEdit* t_addr;
|
||||
QPalette* palette_bg;
|
||||
QPalette palette_bg;
|
||||
QFont mono;
|
||||
QFontMetrics* fontMetrics;
|
||||
|
||||
|
@ -66,6 +66,7 @@ save_data_list_dialog::save_data_list_dialog(const std::vector<SaveDataEntry>& e
|
||||
connect(m_list, &QTableWidget::currentCellChanged, this, [&](int cr, int cc, int pr, int pc) {
|
||||
m_selectedEntry = cr;
|
||||
UpdateSelectionLabel();
|
||||
Q_UNUSED(cr); Q_UNUSED(pr); Q_UNUSED(pc);
|
||||
});
|
||||
|
||||
// TODO: Unstub functions inside of this context menu so it makes sense to show this menu
|
||||
|
@ -6,6 +6,6 @@
|
||||
class table_item_delegate : public QItemDelegate
|
||||
{
|
||||
public:
|
||||
explicit table_item_delegate(QObject *parent = 0) {}
|
||||
explicit table_item_delegate(QObject *parent = 0) : QItemDelegate(parent) {}
|
||||
virtual void drawFocus(QPainter * /*painter*/, const QStyleOptionViewItem & /*option*/, const QRect & /*rect*/) const {}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user