C++: handle case-insensitive file names in the CPlusPlus::Snapshot

... by keying on Utils::FileName

Task-number: QTCREATORBUG-12390
Change-Id: Ia98afb5a9160a7fd9225a2f9e02539ff3c35ae86
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Erik Verbruggen
2014-11-27 12:11:46 +01:00
committed by Erik Verbruggen
parent a8ece5e9b0
commit a48adcf9be
16 changed files with 141 additions and 78 deletions

View File

@@ -70,6 +70,7 @@ public:
static FileName fromString(const QString &filename, const QString &defaultExtension);
static FileName fromLatin1(const QByteArray &filename);
static FileName fromUserInput(const QString &filename);
static FileName fromUtf8(const char *filename, int filenameSize = -1);
QString toString() const;
QString toUserOutput() const;
bool exists() const;
@@ -104,6 +105,17 @@ private:
QTCREATOR_UTILS_EXPORT QTextStream &operator<<(QTextStream &s, const FileName &fn);
class QTCREATOR_UTILS_EXPORT FileNameList : public QList<FileName>
{
public:
inline FileNameList() { }
inline explicit FileNameList(const FileName &i) { append(i); }
inline FileNameList(const FileNameList &l) : QList<FileName>(l) { }
inline FileNameList(const QList<FileName> &l) : QList<FileName>(l) { }
int removeDuplicates();
};
class QTCREATOR_UTILS_EXPORT FileUtils {
public:
static bool removeRecursively(const FileName &filePath, QString *error = 0);