forked from qt-creator/qt-creator
Utils: Add a FilePath::lastModified() interface
And a local implementation. Change-Id: I26400d960890c1cfb3daf82e6bfdeffa68455471 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1302,6 +1302,12 @@ uint FilePath::hash(uint seed) const
|
||||
return qHash(m_data, seed);
|
||||
}
|
||||
|
||||
QDateTime FilePath::lastModified() const
|
||||
{
|
||||
QTC_CHECK(!needsDevice());
|
||||
return toFileInfo().lastModified();
|
||||
}
|
||||
|
||||
QTextStream &operator<<(QTextStream &s, const FilePath &fn)
|
||||
{
|
||||
return s << fn.toString();
|
||||
|
@@ -171,6 +171,7 @@ public:
|
||||
bool isEmpty() const;
|
||||
|
||||
uint hash(uint seed) const;
|
||||
QDateTime lastModified() const;
|
||||
|
||||
// NOTE: Most FilePath operations on FilePath created from URL currently
|
||||
// do not work. Among the working are .toVariant() and .toUrl().
|
||||
|
Reference in New Issue
Block a user