mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-07 23:45:12 +00:00
Qt: Simplify some string conversion bloat
This commit is contained in:
parent
82f97d33d1
commit
c4282e63fb
10 changed files with 16 additions and 37 deletions
|
|
@ -5,8 +5,6 @@
|
|||
#include <QKeyEvent>
|
||||
#include <QMouseEvent>
|
||||
|
||||
constexpr auto qstr = QString::fromStdString;
|
||||
|
||||
call_stack_list::call_stack_list(QWidget* parent) : QListWidget(parent)
|
||||
{
|
||||
setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
|
|
@ -37,7 +35,7 @@ void call_stack_list::HandleUpdate(const std::vector<std::pair<u32, u32>>& call_
|
|||
|
||||
for (const auto& addr : call_stack)
|
||||
{
|
||||
const QString text = qstr(fmt::format("0x%08llx (sp=0x%08llx)", addr.first, addr.second));
|
||||
const QString text = QString::fromStdString(fmt::format("0x%08llx (sp=0x%08llx)", addr.first, addr.second));
|
||||
QListWidgetItem* call_stack_item = new QListWidgetItem(text);
|
||||
call_stack_item->setData(Qt::UserRole, { addr.first });
|
||||
addItem(call_stack_item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue