MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / UpdateVersionNumberInName

Function UpdateVersionNumberInName

pcsx2-qt/AutoUpdaterDialog.cpp:782–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

780#elif defined(__APPLE__)
781
782static QString UpdateVersionNumberInName(QString name, QStringView new_version)
783{
784 QString current_version_string(BuildVersion::GitTag);
785 QStringView current_version = current_version_string;
786 if (!current_version.empty() && !new_version.empty() && current_version[0] == 'v' && new_version[0] == 'v')
787 {
788 current_version = current_version.mid(1);
789 new_version = new_version.mid(1);
790 }
791 if (!current_version.empty() && !new_version.empty())
792 name.replace(current_version.data(), current_version.size(), new_version.data(), new_version.size());
793 return name;
794}
795
796bool AutoUpdaterDialog::processUpdate(const std::vector<u8>& data, QProgressDialog& progress)
797{

Callers 1

processUpdateMethod · 0.85

Calls 4

emptyMethod · 0.45
replaceMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected