| 155 | } |
| 156 | |
| 157 | bool VistaFileOperation::createShellItemArrayFromPaths(QList<LPWSTR>& paths, IShellItemArray** shellItemArray) |
| 158 | { |
| 159 | PCIDLIST_ABSOLUTE_ARRAY pidlArray = new LPCITEMIDLIST[paths.size()]; |
| 160 | for (int i = 0; i < paths.size(); i++) |
| 161 | { |
| 162 | LPITEMIDLIST pidl = getAbsolutePidlFromAbsFilePath(paths[i]); |
| 163 | if (!pidl) |
| 164 | { |
| 165 | delete [] pidlArray; |
| 166 | return false; |
| 167 | } |
| 168 | pidlArray[i] = (LPCITEMIDLIST) pidl; |
| 169 | } |
| 170 | |
| 171 | HRESULT hr = pSHCreateShellItemArrayFromIDLists(paths.size(), pidlArray, shellItemArray); |
| 172 | |
| 173 | delete [] pidlArray; |
| 174 | |
| 175 | if (SUCCEEDED(hr)) |
| 176 | return true; |
| 177 | |
| 178 | return false; |
| 179 | } |
| 180 | |
| 181 | bool VistaFileOperation::moveFiles(QList<LPWSTR>& src, LPWSTR destFolder, QList<FileOperationResult>& results) |
| 182 | { |
nothing calls this directly
no test coverage detected