<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QFileInfo Caching]]></title><description><![CDATA[<p dir="auto">Hi I have a simple technical question - in the official QFileInfo class reference page it says:</p>
<p dir="auto"><strong>Note: To speed up performance, QFileInfo caches information about the file.</strong></p>
<p dir="auto">I need to retrieve file size and last modified date/time from files.  Is this information cached upon construction of the QFileInfo object?  If not is it cached after calling the relevant methods lastmodified() and size()?</p>
<p dir="auto">If that information is cached in either of these ways, if I pass QFileInfo objects with cached data from a worker thread to a main gui thread using signals/slots will the information stay cached?</p>
<p dir="auto">Thanks for the help.</p>
]]></description><link>https://forum.qt.io/topic/92696/qfileinfo-caching</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 20:05:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/92696.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Jul 2018 20:30:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QFileInfo Caching on Tue, 17 Jul 2018 21:21:30 GMT]]></title><description><![CDATA[<p dir="auto">Again from a quick look at the <a href="https://code.woboq.org/qt5/qtbase/src/corelib/io/qfileinfo_p.h.html" target="_blank" rel="noopener noreferrer nofollow ugc">code</a>, the cache data are not tied to any thread.</p>
]]></description><link>https://forum.qt.io/post/470171</link><guid isPermaLink="true">https://forum.qt.io/post/470171</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 17 Jul 2018 21:21:30 GMT</pubDate></item><item><title><![CDATA[Reply to QFileInfo Caching on Mon, 16 Jul 2018 23:00:23 GMT]]></title><description><![CDATA[<p dir="auto">Thank SGaist.  Does the info persist as cached when moved from worker thread to main gui thread via signal/slot?</p>
]]></description><link>https://forum.qt.io/post/469877</link><guid isPermaLink="true">https://forum.qt.io/post/469877</guid><dc:creator><![CDATA[Crag_Hack]]></dc:creator><pubDate>Mon, 16 Jul 2018 23:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to QFileInfo Caching on Mon, 16 Jul 2018 20:49:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">From a quick look at the <a href="https://code.woboq.org/qt5/qtbase/src/corelib/io/qfileinfo.cpp.html" target="_blank" rel="noopener noreferrer nofollow ugc">sources</a>, it looks like the informations are cached when accessed the first time. Note that you can also disable the caching mechanism if needed.</p>
]]></description><link>https://forum.qt.io/post/469856</link><guid isPermaLink="true">https://forum.qt.io/post/469856</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 16 Jul 2018 20:49:38 GMT</pubDate></item></channel></rss>