MCPcopy Create free account
hub / github.com/audacity/audacity / RestoreConnection

Method RestoreConnection

libraries/lib-project-file-io/ProjectFileIO.cpp:611–630  ·  view source on GitHub ↗

Close any current connection and switch back to using the saved

Source from the content-addressed store, hash-verified

609
610// Close any current connection and switch back to using the saved
611void ProjectFileIO::RestoreConnection()
612{
613 auto &curConn = CurrConn();
614 if (curConn)
615 {
616 if (!curConn->Close())
617 {
618 // Store an error message
619 SetDBError(
620 XO("Failed to restore connection")
621 );
622 }
623 }
624
625 curConn = std::move(mPrevConn);
626 SetFileName(mPrevFileName);
627 mTemporary = mPrevTemporary;
628
629 mPrevFileName.clear();
630}
631
632void ProjectFileIO::UseConnection(Connection &&conn, const FilePath &filePath)
633{

Callers 1

~TentativeConnectionMethod · 0.80

Calls 3

moveFunction · 0.85
CloseMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected