Changeset View
Changeset View
Standalone View
Standalone View
src/engine/idutils.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | |||||
42 | } | 42 | } | ||
43 | 43 | | |||
44 | /** | 44 | /** | ||
45 | * Convert the QT_STATBUF into a 64 bit unique identifier for the file. | 45 | * Convert the QT_STATBUF into a 64 bit unique identifier for the file. | ||
46 | * This identifier is combination of the device id and inode number. | 46 | * This identifier is combination of the device id and inode number. | ||
47 | */ | 47 | */ | ||
48 | inline quint64 statBufToId(const QT_STATBUF& stBuf) | 48 | inline quint64 statBufToId(const QT_STATBUF& stBuf) | ||
49 | { | 49 | { | ||
50 | // We're loosing 32 bits of info, so this could potentially break | 50 | // We're losing 32 bits of info, so this could potentially break | ||
51 | // on file systems with really large inode and device ids | 51 | // on file systems with really large inode and device ids | ||
52 | return devIdAndInodeToId(static_cast<quint32>(stBuf.st_dev), | 52 | return devIdAndInodeToId(static_cast<quint32>(stBuf.st_dev), | ||
53 | static_cast<quint32>(stBuf.st_ino)); | 53 | static_cast<quint32>(stBuf.st_ino)); | ||
54 | } | 54 | } | ||
55 | 55 | | |||
56 | inline quint64 filePathToId(const QByteArray& filePath) | 56 | inline quint64 filePathToId(const QByteArray& filePath) | ||
57 | { | 57 | { | ||
58 | QT_STATBUF statBuf; | 58 | QT_STATBUF statBuf; | ||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |