From 258797615f596b678e1d3b2f2b9a01292c4ec87a Mon Sep 17 00:00:00 2001 From: Arisotura Date: Tue, 24 Aug 2021 17:27:08 +0200 Subject: [PATCH] add Close button to the dialog, because some hipsters apparently thought titlebars with close-buttons weren't cool anymore, or something. also fix more possible compile errors. can we now, please, be done with the stupid shit? --- src/frontend/qt_sdl/TitleManagerDialog.cpp | 8 ++--- src/frontend/qt_sdl/TitleManagerDialog.ui | 42 +++++++++++++++++++++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/frontend/qt_sdl/TitleManagerDialog.cpp b/src/frontend/qt_sdl/TitleManagerDialog.cpp index 117b8b94..7697b539 100644 --- a/src/frontend/qt_sdl/TitleManagerDialog.cpp +++ b/src/frontend/qt_sdl/TitleManagerDialog.cpp @@ -135,10 +135,10 @@ void TitleManagerDialog::createTitleItem(u32 category, u32 titleid) QListWidgetItem* item = new QListWidgetItem(title + QString(extra)); item->setIcon(icon); - item->setData(Qt::UserRole, (((u64)category<<32) | (u64)titleid)); - item->setData(Qt::UserRole+1, *(u32*)&header[0x238]); // public.sav size - item->setData(Qt::UserRole+2, *(u32*)&header[0x23C]); // private.sav size - item->setData(Qt::UserRole+3, (u32)((header[0x1BF] & 0x04) ? 0x4000 : 0)); // banner.sav size + item->setData(Qt::UserRole, QVariant(((u64)category<<32) | (u64)titleid)); + item->setData(Qt::UserRole+1, QVariant(*(u32*)&header[0x238])); // public.sav size + item->setData(Qt::UserRole+2, QVariant(*(u32*)&header[0x23C])); // private.sav size + item->setData(Qt::UserRole+3, QVariant((u32)((header[0x1BF] & 0x04) ? 0x4000 : 0))); // banner.sav size ui->lstTitleList->addItem(item); } diff --git a/src/frontend/qt_sdl/TitleManagerDialog.ui b/src/frontend/qt_sdl/TitleManagerDialog.ui index be52752d..8e84681d 100644 --- a/src/frontend/qt_sdl/TitleManagerDialog.ui +++ b/src/frontend/qt_sdl/TitleManagerDialog.ui @@ -86,8 +86,48 @@ + + + + QDialogButtonBox::Close + + + - + + + buttonBox + accepted() + TitleManagerDialog + accept() + + + 303 + 448 + + + 303 + 232 + + + + + buttonBox + rejected() + TitleManagerDialog + reject() + + + 303 + 448 + + + 303 + 232 + + + +