From acfa76aa381f7220606962777510809fa55a6a04 Mon Sep 17 00:00:00 2001 From: LFsWang Date: Thu, 31 Mar 2016 18:58:37 +0800 Subject: Fix encode problem On Windows --- src/citra_qt/game_list.cpp | 4 ++-- src/citra_qt/main.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index a0b216b0a..ffcab1f03 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -66,7 +66,7 @@ void GameList::ValidateEntry(const QModelIndex& item) if (file_path.isEmpty()) return; - std::string std_file_path(file_path.toLocal8Bit()); + std::string std_file_path(file_path.toStdString()); if (!FileUtil::Exists(std_file_path) || FileUtil::IsDirectory(std_file_path)) return; emit GameChosen(file_path); @@ -148,7 +148,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, bool d emit EntryReady({ new GameListItem(QString::fromStdString(Loader::GetFileTypeString(filetype))), - new GameListItemPath(QString::fromLocal8Bit(physical_name.c_str())), + new GameListItemPath(QString::fromStdString(physical_name)), new GameListItemSize(FileUtil::GetSize(physical_name)), }); } diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 32cceaf7e..f621f5d66 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -417,7 +417,7 @@ void GMainWindow::UpdateRecentFiles() { } void GMainWindow::OnGameListLoadFile(QString game_path) { - BootGame(game_path.toLocal8Bit().data()); + BootGame(game_path.toStdString()); } void GMainWindow::OnMenuLoadFile() { @@ -428,7 +428,7 @@ void GMainWindow::OnMenuLoadFile() { if (!filename.isEmpty()) { settings.setValue("romsPath", QFileInfo(filename).path()); - BootGame(filename.toLocal8Bit().data()); + BootGame(filename.toStdString()); } } @@ -440,7 +440,7 @@ void GMainWindow::OnMenuLoadSymbolMap() { if (!filename.isEmpty()) { settings.setValue("symbolsPath", QFileInfo(filename).path()); - LoadSymbolMap(filename.toLocal8Bit().data()); + LoadSymbolMap(filename.toStdString()); } } @@ -461,7 +461,7 @@ void GMainWindow::OnMenuRecentFile() { QString filename = action->data().toString(); QFileInfo file_info(filename); if (file_info.exists()) { - BootGame(filename.toLocal8Bit().data()); + BootGame(filename.toStdString()); } else { // Display an error message and remove the file from the list. QMessageBox::information(this, tr("File not found"), tr("File \"%1\" not found").arg(filename)); -- cgit v1.2.3 From 87afef73b1825426ec43f36e2da4915dea632489 Mon Sep 17 00:00:00 2001 From: LFsWang Date: Thu, 31 Mar 2016 20:29:39 +0800 Subject: remove debug code --- src/citra_qt/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/citra_qt') diff --git a/src/citra_qt/config.cpp b/src/citra_qt/config.cpp index d1a19ade9..8e247ff5c 100644 --- a/src/citra_qt/config.cpp +++ b/src/citra_qt/config.cpp @@ -16,7 +16,7 @@ Config::Config() { // TODO: Don't hardcode the path; let the frontend decide where to put the config files. qt_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "qt-config.ini"; FileUtil::CreateFullPath(qt_config_loc); - qt_config = new QSettings(QString::fromLocal8Bit(qt_config_loc.c_str()), QSettings::IniFormat); + qt_config = new QSettings(QString::fromStdString(qt_config_loc), QSettings::IniFormat); Reload(); } -- cgit v1.2.3