diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 098a8d852..5aade2809 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,6 @@ jobs: with: qt-modules: qtpositioning qtwebchannel qtwebengine qtwebsockets mo2-third-parties: - 7z zlib fmt gtest libbsarch libloot openssl libffi bzip2 python lz4 spdlog + 7z zlib gtest libbsarch libloot openssl bzip2 python lz4 spdlog boost boost-di sip pyqt pybind11 ss licenses explorerpp usvfs mo2-dependencies: cmake_common uibase githubpp bsatk esptk archive lootcli game_gamebryo diff --git a/src/categories.cpp b/src/categories.cpp index c1aa756f3..48ee4bc88 100644 --- a/src/categories.cpp +++ b/src/categories.cpp @@ -74,7 +74,7 @@ void CategoryFactory::loadCategories() bool ok = false; int temp = iter->toInt(&ok); if (!ok) { - log::error(tr("invalid category id {}").toStdString(), iter->constData()); + log::error(tr("invalid category id {0}"), iter->constData()); } nexusCats.push_back(NexusCategory("Unknown", temp)); } @@ -84,8 +84,7 @@ void CategoryFactory::loadCategories() int id = cells[0].toInt(&cell0Ok); int parentID = cells[3].trimmed().toInt(&cell3Ok); if (!cell0Ok || !cell3Ok) { - log::error(tr("invalid category line {}: {}").toStdString(), lineNum, - line.constData()); + log::error(tr("invalid category line {0}: {1}"), lineNum, line.constData()); } addCategory(id, QString::fromUtf8(cells[1].constData()), nexusCats, parentID); } else if (cells.count() == 3) { @@ -94,14 +93,13 @@ void CategoryFactory::loadCategories() int id = cells[0].toInt(&cell0Ok); int parentID = cells[2].trimmed().toInt(&cell3Ok); if (!cell0Ok || !cell3Ok) { - log::error(tr("invalid category line {}: {}").toStdString(), lineNum, - line.constData()); + log::error(tr("invalid category line {0}: {1}"), lineNum, line.constData()); } addCategory(id, QString::fromUtf8(cells[1].constData()), std::vector(), parentID); } else { - log::error(tr("invalid category line {}: {} ({} cells)").toStdString(), lineNum, + log::error(tr("invalid category line {0}: {1} ({2} cells)"), lineNum, line.constData(), cells.count()); } } @@ -122,19 +120,17 @@ void CategoryFactory::loadCategories() bool ok = false; int nexID = nexCells[2].toInt(&ok); if (!ok) { - log::error(tr("invalid nexus ID {}").toStdString(), - nexCells[2].constData()); + log::error(tr("invalid nexus ID {}"), nexCells[2].constData()); } int catID = nexCells[0].toInt(&ok); if (!ok) { - log::error(tr("invalid category id {}").toStdString(), - nexCells[0].constData()); + log::error(tr("invalid category id {}"), nexCells[0].constData()); } m_NexusMap.insert_or_assign(nexID, NexusCategory(nexName, nexID)); m_NexusMap.at(nexID).setCategoryID(catID); } else { - log::error(tr("invalid nexus category line {}: {} ({} cells)").toStdString(), - lineNum, nexLine.constData(), nexCells.count()); + log::error(tr("invalid nexus category line {0}: {1} ({2} cells)"), lineNum, + nexLine.constData(), nexCells.count()); } } } @@ -394,7 +390,7 @@ bool CategoryFactory::isDescendantOfImpl(int id, int parentID, return isDescendantOfImpl(m_Categories[index].parentID(), parentID, seen); } } else { - log::warn(tr("{} is no valid category id").toStdString(), id); + log::warn(tr("{} is no valid category id"), id); return false; } } @@ -513,11 +509,11 @@ unsigned int CategoryFactory::resolveNexusID(int nexusID) const auto result = m_NexusMap.find(nexusID); if (result != m_NexusMap.end()) { if (m_IDMap.count(result->second.categoryID())) { - log::debug(tr("nexus category id {} maps to internal {}").toStdString(), nexusID, + log::debug(tr("nexus category id {0} maps to internal {1}"), nexusID, m_IDMap.at(result->second.categoryID())); return m_IDMap.at(result->second.categoryID()); } } - log::debug(tr("nexus category id {} not mapped").toStdString(), nexusID); + log::debug(tr("nexus category id {} not mapped"), nexusID); return 0U; } diff --git a/src/directoryrefresher.cpp b/src/directoryrefresher.cpp index 6abbd0c43..3313b8c5e 100644 --- a/src/directoryrefresher.cpp +++ b/src/directoryrefresher.cpp @@ -138,7 +138,7 @@ void dumpStats(std::vector& stats) if (run == 0) { std::ofstream out(file, std::ios::out | std::ios::trunc); - out << fmt::format("what,run,{}", DirectoryStats::csvHeader()) << "\n"; + out << std::format("what,run,{}", DirectoryStats::csvHeader()) << "\n"; } std::sort(stats.begin(), stats.end(), [](auto&& a, auto&& b) { @@ -150,11 +150,11 @@ void dumpStats(std::vector& stats) DirectoryStats total; for (const auto& s : stats) { - out << fmt::format("{},{},{}", s.mod, run, s.toCsv()) << "\n"; + out << std::format("{},{},{}", s.mod, run, s.toCsv()) << "\n"; total += s; } - out << fmt::format("total,{},{}", run, total.toCsv()) << "\n"; + out << std::format("total,{},{}", run, total.toCsv()) << "\n"; ++run; } diff --git a/src/envshell.cpp b/src/envshell.cpp index 3d0f774e9..94c089b31 100644 --- a/src/envshell.cpp +++ b/src/envshell.cpp @@ -1,8 +1,12 @@ -#include "envshell.h" + +#include + #include #include #include +#include "envshell.h" + namespace env { @@ -16,7 +20,7 @@ class MenuFailed : public std::runtime_error public: MenuFailed(HRESULT r, const std::string& what) : runtime_error( - fmt::format("{}, {}", what, + std::format("{}, {}", what, QString::fromStdWString(formatSystemMessage(r)).toStdString())) {} }; @@ -478,7 +482,7 @@ void ShellMenu::invoke(const QPoint& p, int cmd) const auto r = m_cm->InvokeCommand((CMINVOKECOMMANDINFO*)&info); if (FAILED(r)) { - throw MenuFailed(r, fmt::format("InvokeCommand failed, verb={}", cmd)); + throw MenuFailed(r, std::format("InvokeCommand failed, verb={}", cmd)); } } @@ -568,7 +572,7 @@ void ShellMenuCollection::exec(const QPoint& pos) } if (!m_active) { - log::debug("SMC: command {} selected without active submenu"); + log::debug("SMC: command {} selected without active submenu", cmd); return; } diff --git a/src/organizer_en.ts b/src/organizer_en.ts index 992aa96fd..83849d97a 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -311,22 +311,22 @@ p, li { white-space: pre-wrap; } - + Error %1: Request to Nexus failed: %2 - + Add - + Remove - + Remove Nexus Mapping(s) @@ -334,67 +334,74 @@ p, li { white-space: pre-wrap; } CategoryFactory - - + invalid category id {} - - invalid category line {}: {} + + invalid category line {0}: {1} + invalid category line {}: {} + + + + + invalid category id {0} - - invalid category line {}: {} ({} cells) + + invalid category line {0}: {1} ({2} cells) + invalid category line {}: {} ({} cells) - + invalid nexus ID {} - - invalid nexus category line {}: {} ({} cells) + + invalid nexus category line {0}: {1} ({2} cells) + invalid nexus category line {}: {} ({} cells) - + Failed to save custom categories - + Failed to save nexus category mappings - - - - + + + + invalid category index: %1 - + {} is no valid category id - + invalid category id: %1 - - nexus category id {} maps to internal {} + + nexus category id {0} maps to internal {1} - + nexus category id {} not mapped @@ -3222,7 +3229,7 @@ Hide: never show separators - + Sort the plugins using LOOT. @@ -3660,7 +3667,7 @@ Hide: never show separators - + Endorse Mod Organizer @@ -3759,7 +3766,7 @@ Hide: never show separators - + There is no supported sort mechanism for this game. You will probably have to use a third-party tool. @@ -4082,156 +4089,156 @@ As a final option, you can disable Nexus category mapping altogether, which can - + Update available - + Do you want to endorse Mod Organizer on %1 now? - + Abstain from Endorsing Mod Organizer - + Are you sure you want to abstain from endorsing Mod Organizer 2? You will have to visit the mod page on the %1 Nexus site to change your mind. - + Thank you for endorsing MO2! :) - + Please reconsider endorsing MO2 on Nexus! - + None of your %1 mods appear to have had recent file updates. - + All of your mods have been checked recently. We restrict update checks to help preserve your available API requests. - + Thank you! - + Thank you for your endorsement! - + Mod ID %1 no longer seems to be available on Nexus. - + Error %1: Request to Nexus failed: %2 - - + + failed to read %1: %2 - + Error - + failed to extract %1 (errorcode %2) - + Extract BSA - + This archive contains invalid hashes. Some files may be broken. - + Extract... - + Remove '%1' from the toolbar - + Backup of load order created - + Choose backup to restore - + No Backups - + There are no backups to restore - - + + Restore failed - - + + Failed to restore the backup. Errorcode: %1 - + Backup of mod list created - + A file with the same name has already been downloaded. What would you like to do? - + Overwrite - + Rename new file - + Ignore file @@ -5075,7 +5082,7 @@ p, li { white-space: pre-wrap; } - + Open in Explorer @@ -5113,25 +5120,25 @@ p, li { white-space: pre-wrap; } - + Ignore missing data - + Mark as converted/working - + Visit on Nexus - + Visit on %1 @@ -5212,22 +5219,22 @@ p, li { white-space: pre-wrap; } - + Remap Category (From Nexus) - + Start tracking - + Stop tracking - + Tracked state unknown @@ -5404,7 +5411,7 @@ Please enter the name: - + Create Mod... @@ -5416,7 +5423,7 @@ Please enter a name: - + A mod with this name already exists @@ -5448,14 +5455,14 @@ Please enter a name: - - + + Confirm - + You are not currently authenticated with Nexus. Please do so under Settings -> Nexus. @@ -5470,247 +5477,247 @@ Please enter a name: - + Export to csv - + CSV (Comma Separated Values) is a format that can be imported in programs like Excel to create a spreadsheet. You can also use online editors and converters instead. - + Select what mods you want export: - + All installed mods - + Only active (checked) mods from your current profile - + All currently visible mods in the mod list - + Choose what Columns to export: - + Mod_Priority - + Mod_Name - + Notes_column - + Mod_Status - + Primary_Category - + Nexus_ID - + Mod_Nexus_URL - + Mod_Version - + Install_Date - + Download_File_Name - + export failed: %1 - + Failed to display overwrite dialog: %1 - + Set Priority - + Set the priority of the selected mods - + failed to rename mod: %1 - + Remove the following mods?<br><ul>%1</ul> - + failed to remove mod: %1 - + Continue? - + The versioning scheme decides which version is considered newer than another. This function will guess the versioning scheme under the assumption that the installed version is outdated. - + Sorry - + I don't know a versioning scheme where %1 is newer than %2. - + Opening Nexus Links - + You are trying to open %1 links to Nexus Mods. Are you sure you want to do this? - - + + Opening Web Pages - - + + You are trying to open %1 Web Pages. Are you sure you want to do this? - - - + + + Failed - + Installation file no longer exists - + Mods installed with old versions of MO can't be reinstalled in this way. - + Failed to create backup. - + Restore all hidden files in the following mods?<br><ul>%1</ul> - - + + Are you sure? - + About to restore all hidden files in: - + Endorsing multiple mods will take a while. Please wait... - + Overwrite? - + This will replace the existing mod "%1". Continue? - + failed to remove mod "%1" - + failed to rename "%1" to "%2" - + Move successful. - + This will move all files from overwrite into a new, regular mod. Please enter a name: - + About to recursively delete: @@ -6312,107 +6319,112 @@ Continue? - + failed to update esp info for file %1 (source id: %2), error: %3 - + Plugin not found: %1 - + Origin - + This plugin can't be disabled or moved (enforced by the game). - + This plugin can't be disabled (enforced by the game). - + Author - + Description - + Missing Masters - + Enabled Masters - + Loads Archives - + There are Archives connected to this plugin. Their assets will be added to your game, overwriting in case of conflicts following the plugin order. Loose files will always overwrite assets from Archives. (This flag only checks for Archives from the same mod as the plugin) - + Loads INI settings - + There is an ini file connected to this plugin. Its settings will be added to your game settings, overwriting in case of conflicts. - + This %1 is flagged as an ESL. It will adhere to the %1 load order but the records will be loaded in ESL space. - + This is a dummy plugin. It contains no records and is typically used to load a paired archive file. - + + Light plugins (ESL) are not supported by this game. + + + + This game does not currently permit custom plugin loading. There may be manual workarounds. - + Incompatible with %1 - + Depends on missing %1 - + Warning - + Error - + failed to restore load order for %1 @@ -6628,17 +6640,16 @@ p, li { white-space: pre-wrap; } - Fix - + No guided fix - + (There are no notifications) @@ -7008,62 +7019,62 @@ p, li { white-space: pre-wrap; } - + None - + Active - + Update available - + Has category - + Conflicted - + Has hidden files - + Endorsed - + Has backup - + Managed - + Has valid game data - + Has Nexus ID - + Tracked on Nexus @@ -7234,13 +7245,13 @@ p, li { white-space: pre-wrap; } - - - - - - - + + + + + + + Cancel @@ -7395,12 +7406,12 @@ p, li { white-space: pre-wrap; } - + No menu available - + Selected files must be in the same directory @@ -7485,8 +7496,8 @@ Destination: - - + + @@ -7537,8 +7548,8 @@ Destination: - - + + Warning @@ -7614,7 +7625,7 @@ Destination: - + <Manage...> @@ -7767,12 +7778,12 @@ Destination: - + failed to access %1 - + failed to set file time %1 @@ -7842,34 +7853,34 @@ This program is known to cause issues with Mod Organizer, such as freezing or bl - - + + Debug - - + + Info (recommended) - + Trace - + Mini (recommended) - + Data - + Full @@ -8026,12 +8037,13 @@ Example: - invalid file index for remove: {} + invalid file index for remove + invalid file index for remove: {} - - invalid file index for remove (for origin): {} + + invalid file index for remove (for origin) @@ -8041,200 +8053,201 @@ Example: - failed to change name lookup from {} to {} + failed to change name lookup from {0} to {1} + failed to change name lookup from {} to {} - + This error typically happens because an antivirus has deleted critical files from Mod Organizer's installation folder or has made them generally inaccessible. Add an exclusion for Mod Organizer's installation folder in your antivirus, reinstall Mod Organizer and try again. - + This error typically happens because an antivirus is preventing Mod Organizer from starting programs. Add an exclusion for Mod Organizer's installation folder in your antivirus and try again. - + The file '%1' does not exist. - + The working directory '%1' does not exist. - - - - + + + + Cannot start Steam - + The path to the Steam executable cannot be found. You might try reinstalling Steam. - - - + + + Continue without starting Steam - - + + The program may fail to launch. - + Cannot launch program - - - + + + Cannot start %1 - + Cannot launch helper - - + + Elevation required - + This program is requesting to run as administrator but Mod Organizer itself is not running as administrator. Running programs as administrator is typically unnecessary as long as the game and Mod Organizer have been installed outside "Program Files". You can restart Mod Organizer as administrator and try launching the program again. - - + + Restart Mod Organizer as administrator - - + + You must allow "helper.exe" to make changes to the system. - + Launch Steam - + This program requires Steam - + Mod Organizer has detected that this program likely requires Steam to be running to function properly. - + Start Steam - - + + The program might fail to run. - + Steam is running as administrator - + Running Steam as administrator is typically unnecessary and can cause problems when Mod Organizer itself is not running as administrator. You can restart Mod Organizer as administrator and try launching the program again. - - - + + + Continue - + Event Log not running - + The Event Log service is not running - + The Windows Event Log service is not running. This can prevent USVFS from running properly and your mods may not be recognized by the program being launched. - - + + Your mods might not work. - + Blacklisted program - + The program %1 is blacklisted - + The program you are attempting to launch is blacklisted in the virtual filesystem. This will likely prevent it from seeing any mods, INI files or any other virtualized files. - + Change the blacklist - + Waiting - + Please press OK once you're logged into steam. - + Select binary - + Binary @@ -8310,17 +8323,17 @@ You can restart Mod Organizer as administrator and try launching the program aga - - wrong file format - expected %1 got %2 + + wrong file format - expected %1 got '%2' for %3 - + failed to query registry path (preflight): %1 - + failed to query registry path (read): %1 @@ -8417,90 +8430,90 @@ You can restart Mod Organizer as administrator and try launching the program aga - + removal of "%1" failed: %2 - + removal of "%1" failed - + "%1" doesn't exist (remove) - + Error %1 - - + + You have an invalid custom browser command in the settings. - - + + failed to create directory "%1" - - + + failed to copy "%1" to "%2" - + %1 B - + %1 KB - + %1 MB - + %1 GB - + %1 TB - + %1 B/s - + %1 KB/s - + %1 MB/s - + %1 GB/s - + %1 TB/s @@ -9582,7 +9595,8 @@ For the other games this is not a sufficient replacement for AI! - Hint: right click link and copy link location + Click a link to open the location + Hint: right click link and copy link location @@ -10466,19 +10480,19 @@ Please open the "Nexus" tab. uibase - + h Time remaining hours - + m Time remaining minutes - + s Time remaining seconds diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 5bc3851cc..2f45116ce 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -1564,7 +1564,7 @@ void OrganizerCore::onDirectoryRefreshed() // needs to be done before post refresh tasks m_DirectoryUpdate = false; - log::debug("running {} post refresh tasks"); + log::debug("running post refresh tasks"); m_OnNextRefreshCallbacks(); m_OnNextRefreshCallbacks.disconnect_all_slots(); @@ -1947,7 +1947,7 @@ bool OrganizerCore::beforeRun( m_USVFS.updateMapping(fileMapping(profileName, customOverwrite)); m_USVFS.updateForcedLibraries(forcedLibraries); } catch (const UsvfsConnectorException& e) { - log::debug(e.what()); + log::debug("{}", e.what()); return false; } catch (const std::exception& e) { QWidget* w = nullptr; diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index 84da66e23..5468beea4 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -414,7 +414,7 @@ const FileEntryPtr DirectoryEntry::searchFile(const std::wstring& path, if (temp != nullptr) { if (len >= path.size()) { - log::error(QObject::tr("unexpected end of path").toStdString()); + log::error("{}", QObject::tr("unexpected end of path")); return FileEntryPtr(); } @@ -905,7 +905,7 @@ void DirectoryEntry::dump(const std::wstring& file) const auto e = _wfopen_s(&f, file.c_str(), L"wb"); if (e != 0 || !f) { - throw DumpFailed(fmt::format("failed to open, {} ({})", std::strerror(e), e)); + throw DumpFailed(std::format("failed to open, {} ({})", std::strerror(e), e)); } Guard g([&] { @@ -943,7 +943,7 @@ void DirectoryEntry::dump(std::FILE* f, const std::wstring& parentPath) const if (std::fwrite(lineu8.data(), lineu8.size(), 1, f) != 1) { const auto e = errno; - throw DumpFailed(fmt::format("failed to write, {} ({})", std::strerror(e), e)); + throw DumpFailed(std::format("failed to write, {} ({})", std::strerror(e), e)); } } } diff --git a/src/shared/fileregister.cpp b/src/shared/fileregister.cpp index ab94367f7..f84d49823 100644 --- a/src/shared/fileregister.cpp +++ b/src/shared/fileregister.cpp @@ -74,7 +74,7 @@ bool FileRegister::removeFile(FileIndex index) } } - log::error(QObject::tr("invalid file index for remove: {}").toStdString(), index); + log::error("{}: {}", QObject::tr("invalid file index for remove"), index); return false; } @@ -95,9 +95,8 @@ void FileRegister::removeOrigin(FileIndex index, OriginID originID) } } - log::error( - QObject::tr("invalid file index for remove (for origin): {}").toStdString(), - index); + log::error("{}: {}", QObject::tr("invalid file index for remove (for origin)"), + index); } void FileRegister::removeOriginMulti(std::set indices, OriginID originID) diff --git a/src/shared/originconnection.cpp b/src/shared/originconnection.cpp index e433891cd..e6ec8ad25 100644 --- a/src/shared/originconnection.cpp +++ b/src/shared/originconnection.cpp @@ -98,8 +98,8 @@ void OriginConnection::changeNameLookup(const std::wstring& oldName, m_OriginsNameMap.erase(iter); m_OriginsNameMap[newName] = idx; } else { - log::error(QObject::tr("failed to change name lookup from {} to {}").toStdString(), - oldName, newName); + log::error(QObject::tr("failed to change name lookup from {0} to {1}"), oldName, + newName); } } diff --git a/src/spawn.cpp b/src/spawn.cpp index 05f796a57..ae5c86ee5 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -34,8 +34,6 @@ along with Mod Organizer. If not, see . #include #include #include -#include -#include #include #include #include @@ -108,40 +106,28 @@ QString makeDetails(const SpawnParameters& sp, DWORD code, const QString& more = elevated = L"(not available)"; } - std::wstring f = L"Error {code} {codename}{more}: {error}\n" - L" . binary: '{bin}'\n" - L" . owner: {owner}\n" - L" . rights: {rights}\n" - L" . arguments: '{args}'\n" - L" . cwd: '{cwd}'{cwdexists}\n" - L" . stdout: {stdout}, stderr: {stderr}, hooked: {hooked}\n" - L" . MO elevated: {elevated}"; + auto s = std::format(L"Error {} {}{}: {}\n" + L" . binary: '{}'\n" + L" . owner: {}\n" + L" . rights: {}\n" + L" . arguments: '{}'\n" + L" . cwd: '{}'{}\n" + L" . stdout: {}, stderr: {}, hooked: {}\n" + L" . MO elevated: {}", + code, errorCodeName(code), (more.isEmpty() ? more : ", " + more), + formatSystemMessage(code), + QDir::toNativeSeparators(sp.binary.absoluteFilePath()), owner, + rights, sp.arguments, + QDir::toNativeSeparators(sp.currentDirectory.absolutePath()), + (cwdExists ? L"" : L" (not found)"), + (sp.stdOut == INVALID_HANDLE_VALUE ? L"no" : L"yes"), + (sp.stdErr == INVALID_HANDLE_VALUE ? L"no" : L"yes"), + (sp.hooked ? L"yes" : L"no"), elevated); if (sp.hooked) { - f += L"\n . usvfs x86:{x86_dll} x64:{x64_dll} proxy_x86:{x86_proxy} " - L"proxy_x64:{x64_proxy}"; - } - - const std::wstring wmore = (more.isEmpty() ? L"" : (", " + more).toStdWString()); - - const auto s = fmt::format( - f, fmt::arg(L"code", code), fmt::arg(L"codename", errorCodeName(code)), - fmt::arg(L"more", wmore), - fmt::arg(L"bin", - QDir::toNativeSeparators(sp.binary.absoluteFilePath()).toStdWString()), - fmt::arg(L"owner", owner), fmt::arg(L"rights", rights), - fmt::arg(L"error", formatSystemMessage(code)), - fmt::arg(L"args", sp.arguments.toStdWString()), - fmt::arg( - L"cwd", - QDir::toNativeSeparators(sp.currentDirectory.absolutePath()).toStdWString()), - fmt::arg(L"cwdexists", (cwdExists ? L"" : L" (not found)")), - fmt::arg(L"stdout", (sp.stdOut == INVALID_HANDLE_VALUE ? L"no" : L"yes")), - fmt::arg(L"stderr", (sp.stdErr == INVALID_HANDLE_VALUE ? L"no" : L"yes")), - fmt::arg(L"hooked", (sp.hooked ? L"yes" : L"no")), - fmt::arg(L"x86_dll", usvfs_x86_dll), fmt::arg(L"x64_dll", usvfs_x64_dll), - fmt::arg(L"x86_proxy", usvfs_x86_proxy), fmt::arg(L"x64_proxy", usvfs_x64_proxy), - fmt::arg(L"elevated", elevated)); + s += std::format(L"\n . usvfs x86:{} x64:{} proxy_x86:{} proxy_x64:{}", + usvfs_x86_dll, usvfs_x64_dll, usvfs_x86_proxy, usvfs_x64_proxy); + } return QString::fromStdWString(s); } @@ -993,7 +979,7 @@ bool helperExec(QWidget* parent, const std::wstring& moDirectory, bool backdateBSAs(QWidget* parent, const std::wstring& moPath, const std::wstring& dataPath) { - const std::wstring commandLine = fmt::format(L"backdateBSA \"{}\"", dataPath); + const std::wstring commandLine = std::format(L"backdateBSA \"{}\"", dataPath); return helperExec(parent, moPath, commandLine, FALSE); } @@ -1001,7 +987,7 @@ bool backdateBSAs(QWidget* parent, const std::wstring& moPath, bool adminLaunch(QWidget* parent, const std::wstring& moPath, const std::wstring& moFile, const std::wstring& workingDir) { - const std::wstring commandLine = fmt::format( + const std::wstring commandLine = std::format( L"adminLaunch {} \"{}\" \"{}\"", ::GetCurrentProcessId(), moFile, workingDir); return helperExec(parent, moPath, commandLine, true); diff --git a/src/transfersavesdialog.cpp b/src/transfersavesdialog.cpp index 2761ed1de..a66f05ee2 100644 --- a/src/transfersavesdialog.cpp +++ b/src/transfersavesdialog.cpp @@ -245,7 +245,7 @@ bool TransferSavesDialog::transferCharacters( QString const& character, char const* message, QDir const& sourceDirectory, SaveList& saves, QDir const& destination, const std::function& method, - char const* errmsg) + std::format_string errmsg) { if (QMessageBox::question(this, tr("Confirm"), tr(message).arg(character), QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { @@ -270,7 +270,7 @@ bool TransferSavesDialog::transferCharacters( } if (!method(sourceFile.absoluteFilePath(), destinationFile)) { - log::error(errmsg, sourceFile.absoluteFilePath(), destinationFile); + log::error(errmsg, sourceFile.absoluteFilePath(), std::move(destinationFile)); } } } diff --git a/src/transfersavesdialog.h b/src/transfersavesdialog.h index 5559b1d64..c6d05c2fb 100644 --- a/src/transfersavesdialog.h +++ b/src/transfersavesdialog.h @@ -109,7 +109,7 @@ private slots: transferCharacters(QString const& character, char const* message, QDir const& sourceDirectory, SaveList& saves, QDir const& dest, const std::function& method, - char const* errmsg); + std::format_string errmsg); }; #endif // TRANSFERSAVESDIALOG_H