MCPcopy Create free account
hub / github.com/bumptop/BumpTop / checkForMultipleGuids

Method checkForMultipleGuids

trunk/win/Source/BT_StatsManager.cpp:749–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747}
748
749bool StatsManager::checkForMultipleGuids()
750{
751 QString guid = "";
752
753 QString statsDir = native(winOS->GetStatsDirectory());
754 vector<QString> statsDirListing = fsManager->getDirectoryContents(statsDir, "stats_*");
755 for (int i = 0; i < statsDirListing.size(); ++i)
756 {
757 // upload the file
758 QString localPath = statsDirListing[i];
759 QString fileName = QFileInfo(localPath).fileName();
760 if (fileName.size() > 44)
761 {
762 QString a_guid = fileName.mid(7, 36);
763 if (guid == "") guid = a_guid;
764 if (a_guid != guid)
765 {
766 GUID_LOG("found more than one GUID! " + guid + " and " + a_guid);
767 for (int j = 0; j < statsDirListing.size(); ++j)
768 {
769 GUID_LOG("\t" + statsDirListing[j]);
770 }
771 return true;
772 }
773 }
774 }
775 return false;
776}
777
778void StatsManager::onPowerSuspend()
779{

Callers

nothing calls this directly

Calls 7

QFileInfoClass · 0.85
GetStatsDirectoryMethod · 0.80
getDirectoryContentsMethod · 0.80
fileNameMethod · 0.80
nativeFunction · 0.70
sizeMethod · 0.45
midMethod · 0.45

Tested by

no test coverage detected