MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / unlock

Method unlock

libraries/LocalPeer/src/LockedFile_win.cpp:164–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164bool LockedFile::unlock()
165{
166 if (!isOpen()) {
167 qWarning("QtLockedFile::unlock(): file is not opened");
168 return false;
169 }
170
171 if (!isLocked())
172 return true;
173
174 if (m_lock_mode == ReadLock) {
175 ReleaseMutex(rmutex);
176 CloseHandle(rmutex);
177 rmutex = 0;
178 } else {
179 foreach (Qt::HANDLE mutex, rmutexes) {
180 ReleaseMutex(mutex);
181 CloseHandle(mutex);
182 }
183 rmutexes.clear();
184 ReleaseMutex(wmutex);
185 }
186
187 m_lock_mode = LockedFile::NoLock;
188 return true;
189}
190
191LockedFile::~LockedFile()
192{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected