| 956 | } |
| 957 | |
| 958 | void LiveCapture::cleanItems() |
| 959 | { |
| 960 | for(int i = 0; i < ui->captures->count(); i++) |
| 961 | { |
| 962 | Capture *cap = GetCapture(ui->captures->item(i)); |
| 963 | |
| 964 | if(!cap->saved) |
| 965 | { |
| 966 | if(cap->path == m_Ctx.GetCaptureFilename()) |
| 967 | { |
| 968 | m_Main->takeCaptureOwnership(); |
| 969 | } |
| 970 | else |
| 971 | { |
| 972 | // if connected, prefer using the live connection |
| 973 | if(m_Connected.available() && !cap->local) |
| 974 | { |
| 975 | QMutexLocker l(&m_DeleteCapturesLock); |
| 976 | m_DeleteCaptures.push_back(cap->remoteID); |
| 977 | } |
| 978 | else |
| 979 | { |
| 980 | m_Ctx.Replay().DeleteCapture(cap->path, cap->local); |
| 981 | } |
| 982 | |
| 983 | if(cap->local) |
| 984 | { |
| 985 | m_Main->RemoveRecentCapture(cap->path); |
| 986 | } |
| 987 | } |
| 988 | } |
| 989 | |
| 990 | delete cap; |
| 991 | } |
| 992 | ui->captures->clear(); |
| 993 | } |
| 994 | |
| 995 | void LiveCapture::fileSaved(QString from, QString to) |
| 996 | { |
no test coverage detected