1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

Simplify qstr function

This commit is contained in:
scribam 2017-08-11 21:35:53 +02:00 committed by Ivan
parent 844e09c40e
commit ae156801df
15 changed files with 15 additions and 15 deletions

View File

@ -6,7 +6,7 @@
#include <QDesktopServices>
#include <QUrl>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
about_dialog::about_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::about_dialog)
{

View File

@ -1,7 +1,7 @@
#include "auto_pause_settings_dialog.h"
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
auto_pause_settings_dialog::auto_pause_settings_dialog(QWidget *parent) : QDialog(parent)
{

View File

@ -16,7 +16,7 @@
#include "Emu/RSX/CgBinaryProgram.h"
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
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(parent), xgui_settings(xSettings)

View File

@ -5,7 +5,7 @@
#include <QFontDatabase>
#include <QCompleter>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
extern bool user_asked_for_frame_capture;
debugger_frame::debugger_frame(std::shared_ptr<gui_settings> settings, QWidget *parent)

View File

@ -11,7 +11,7 @@
#include <QObject>
#include <QComboBox>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
struct Render_Creator
{

View File

@ -8,7 +8,7 @@
#include <QTimer>
#include <QThread>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
gs_frame::gs_frame(const QString& title, int w, int h, QIcon appIcon, bool disableMouse)
: QWindow(), m_windowTitle(title), m_disable_mouse(disableMouse)

View File

@ -2,7 +2,7 @@
#include "instruction_editor_dialog.h"
#include <QFontDatabase>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
instruction_editor_dialog::instruction_editor_dialog(QWidget *parent, u32 _pc, const std::shared_ptr<cpu_thread>& _cpu, CPUDisAsm* _disasm)
: QDialog(parent)

View File

@ -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(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
void kernel_explorer::Update()
{

View File

@ -8,7 +8,7 @@
#include <QActionGroup>
#include <QScrollBar>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
struct gui_listener : logs::listener
{

View File

@ -3,7 +3,7 @@
#include "memory_viewer_panel.h"
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
memory_viewer_panel::memory_viewer_panel(QWidget* parent)
: QDialog(parent)

View File

@ -5,7 +5,7 @@
#include <QScreen>
#include <QThread>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
constexpr auto qstr = QString::fromStdString;
void msg_dialog_frame::Create(const std::string& msg)
{

View File

@ -1,7 +1,7 @@
#include "register_editor_dialog.h"
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
inline std::string sstr(const QString& _in) { return _in.toUtf8().toStdString(); }
inline std::string sstr(const QVariant& _in) { return sstr(_in.toString()); }

View File

@ -7,7 +7,7 @@ enum GCMEnumTypes
CELL_GCM_PRIMITIVE_ENUM,
};
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), static_cast<int>(_in.size())); }
constexpr auto qstr = QString::fromStdString;
rsx_debugger::rsx_debugger(QWidget* parent)
: QDialog(parent)

View File

@ -4,7 +4,7 @@
#include <QHBoxLayout>
#include <QHeaderView>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
constexpr auto qstr = QString::fromStdString;
save_data_info_dialog::save_data_info_dialog(const SaveDataEntry& save, QWidget* parent)
: QDialog(parent), m_entry(save)

View File

@ -8,7 +8,7 @@
#include <QHeaderView>
#include <QMenu>
inline QString qstr(const std::string& _in) { return QString::fromUtf8(_in.data(), _in.size()); }
constexpr auto qstr = QString::fromStdString;
//Show up the savedata list, either to choose one to save/load or to manage saves.
//I suggest to use function callbacks to give save data list or get save data entry. (Not implemented or stubbed)