From 61cefb2f7a7cb16dfa2732e26d2319017039ef62 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 23 Nov 2015 14:47:05 +0100 Subject: De-inline QFileSystemModel::fileInfo() and implement it efficiently De-inline the method, and return the file info that's already being cached by the model. This is ok to do in a minor release, as apps compiled against an older version of Qt will simply continue to use the less efficient implementation. Change-Id: I164c7961a8cf97447638af316512326442767dd8 Task-number: QTBUG-30902 Reviewed-by: Marc Mutz Reviewed-by: Edward Welbourne Reviewed-by: Konstantin Ritt --- src/widgets/dialogs/qfilesystemmodel_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/widgets/dialogs/qfilesystemmodel_p.h') diff --git a/src/widgets/dialogs/qfilesystemmodel_p.h b/src/widgets/dialogs/qfilesystemmodel_p.h index 57fb457071..a35c50bfc7 100644 --- a/src/widgets/dialogs/qfilesystemmodel_p.h +++ b/src/widgets/dialogs/qfilesystemmodel_p.h @@ -107,6 +107,7 @@ public: return true; return false; } + inline QFileInfo fileInfo() const { if (info) return info->fileInfo(); return QFileInfo(); } inline bool isFile() const { if (info) return info->isFile(); return true; } inline bool isSystem() const { if (info) return info->isSystem(); return true; } inline bool isHidden() const { if (info) return info->isHidden(); return false; } -- cgit v1.2.3