mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
SkylandersPortalWindow: Remove unnecessary string conversions
Same behavior without a bit of churn.
This commit is contained in:
parent
c16e98a31f
commit
6d47d6c08e
@ -44,7 +44,7 @@ SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
|
|||||||
{
|
{
|
||||||
setWindowTitle(tr("Skylanders Manager"));
|
setWindowTitle(tr("Skylanders Manager"));
|
||||||
setWindowIcon(Resources::GetAppIcon());
|
setWindowIcon(Resources::GetAppIcon());
|
||||||
setObjectName(QString::fromStdString("skylanders_manager"));
|
setObjectName(QStringLiteral("skylanders_manager"));
|
||||||
setMinimumSize(QSize(650, 500));
|
setMinimumSize(QSize(650, 500));
|
||||||
|
|
||||||
m_only_show_collection = new QCheckBox(tr("Only Show Collection"));
|
m_only_show_collection = new QCheckBox(tr("Only Show Collection"));
|
||||||
@ -64,9 +64,9 @@ SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
|
|||||||
QDir skylanders_folder;
|
QDir skylanders_folder;
|
||||||
// skylanders folder in user directory
|
// skylanders folder in user directory
|
||||||
QString user_path =
|
QString user_path =
|
||||||
QString::fromStdString(File::GetUserPath(D_USER_IDX)) + QString::fromStdString("Skylanders");
|
QString::fromStdString(File::GetUserPath(D_USER_IDX)) + QStringLiteral("Skylanders");
|
||||||
// first time initialize path in config
|
// first time initialize path in config
|
||||||
if (Config::Get(Config::MAIN_SKYLANDERS_PATH) == "")
|
if (Config::Get(Config::MAIN_SKYLANDERS_PATH).empty())
|
||||||
{
|
{
|
||||||
Config::SetBase(Config::MAIN_SKYLANDERS_PATH, user_path.toStdString());
|
Config::SetBase(Config::MAIN_SKYLANDERS_PATH, user_path.toStdString());
|
||||||
skylanders_folder = QDir(user_path);
|
skylanders_folder = QDir(user_path);
|
||||||
@ -185,7 +185,7 @@ QVBoxLayout* SkylanderPortalWindow::CreateSlotLayout()
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto* hbox_skylander = new QHBoxLayout();
|
auto* hbox_skylander = new QHBoxLayout();
|
||||||
auto* label_skyname = new QLabel(QString(tr("Skylander %1")).arg(i + 1));
|
auto* label_skyname = new QLabel(tr("Skylander %1").arg(i + 1));
|
||||||
m_edit_skylanders[i] = new QLineEdit();
|
m_edit_skylanders[i] = new QLineEdit();
|
||||||
m_edit_skylanders[i]->setEnabled(false);
|
m_edit_skylanders[i]->setEnabled(false);
|
||||||
|
|
||||||
@ -589,8 +589,7 @@ void SkylanderPortalWindow::CreateSkylanderAdvanced()
|
|||||||
auto* label_var = new QLabel(tr("Variant:"));
|
auto* label_var = new QLabel(tr("Variant:"));
|
||||||
auto* edit_id = new QLineEdit(tr("0"));
|
auto* edit_id = new QLineEdit(tr("0"));
|
||||||
auto* edit_var = new QLineEdit(tr("0"));
|
auto* edit_var = new QLineEdit(tr("0"));
|
||||||
auto* rxv =
|
auto* rxv = new QRegularExpressionValidator(QRegularExpression(QStringLiteral("\\d*")), this);
|
||||||
new QRegularExpressionValidator(QRegularExpression(QString::fromStdString("\\d*")), this);
|
|
||||||
edit_id->setValidator(rxv);
|
edit_id->setValidator(rxv);
|
||||||
edit_var->setValidator(rxv);
|
edit_var->setValidator(rxv);
|
||||||
hbox_idvar->addWidget(label_id);
|
hbox_idvar->addWidget(label_id);
|
||||||
@ -803,7 +802,7 @@ void SkylanderPortalWindow::CreateSkyfile(const QString& path, bool load_after)
|
|||||||
}
|
}
|
||||||
figure.Close();
|
figure.Close();
|
||||||
}
|
}
|
||||||
m_last_skylander_path = QFileInfo(path).absolutePath() + QString::fromStdString("/");
|
m_last_skylander_path = QFileInfo(path).absolutePath() + QLatin1Char{'/'};
|
||||||
|
|
||||||
if (load_after)
|
if (load_after)
|
||||||
LoadSkyfilePath(GetCurrentSlot(), path);
|
LoadSkyfilePath(GetCurrentSlot(), path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user