- 
    
Bug
 - 
    Resolution: Done
 - 
    
P3: Somewhat important
 - 
    5.13.1
 - 
    None
 
- 
        
 - 
        efaa4aa2a1452cf73bc3117c49d1345a4106fd57 (qt/qtbase/5.15)
 
QString QFile::decodeName(const char *localFileName) creates QByteArray from the passed const char * argument in order to finally call QString::fromLocal8Bit(const QByteArray &str).
QByteArray constructor makes a deep copy of the const char * argument, which can be avoided if QFile::decodeName called QString::fromLocal8Bit(const char *str, int size = -1) instead.
This is a trivial fix which will save memory allocations and improve performance. I attach a patch for this.