| 1916 | } |
| 1917 | |
| 1918 | void DocumentData::setRemoteLocation( |
| 1919 | int32 dc, |
| 1920 | uint64 access, |
| 1921 | const QByteArray &fileReference) { |
| 1922 | _fileReference = fileReference; |
| 1923 | if (_dc != dc || _access != access) { |
| 1924 | _dc = dc; |
| 1925 | _access = access; |
| 1926 | if (!isNull()) { |
| 1927 | if (_location.check()) { |
| 1928 | session().local().writeFileLocation(mediaKey(), _location); |
| 1929 | } else { |
| 1930 | _location = session().local().readFileLocation(mediaKey()); |
| 1931 | if (_location.inMediaCache()) { |
| 1932 | setLoadedInMediaCacheLocation(); |
| 1933 | } else if (_location.isEmpty() && loadedInMediaCache()) { |
| 1934 | session().local().writeFileLocation( |
| 1935 | mediaKey(), |
| 1936 | Core::FileLocation::InMediaCacheLocation()); |
| 1937 | } |
| 1938 | } |
| 1939 | } |
| 1940 | } |
| 1941 | } |
| 1942 | |
| 1943 | void DocumentData::setStoryMedia(bool value) { |
| 1944 | if (value) { |
nothing calls this directly
no test coverage detected