Browse Source

Make Path::operator== a free function

adaptive-webui-19844
Chocobo1 3 years ago
parent
commit
610009fb7f
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/base/path.cpp
  2. 2
      src/base/path.h

2
src/base/path.cpp

@ -272,7 +272,7 @@ Path Path::createUnchecked(const QString &pathStr)
bool operator==(const Path &lhs, const Path &rhs) bool operator==(const Path &lhs, const Path &rhs)
{ {
return (lhs.m_pathStr.compare(rhs.m_pathStr, CASE_SENSITIVITY) == 0); return (lhs.data().compare(rhs.data(), CASE_SENSITIVITY) == 0);
} }
bool operator!=(const Path &lhs, const Path &rhs) bool operator!=(const Path &lhs, const Path &rhs)

2
src/base/path.h

@ -76,7 +76,6 @@ public:
static void stripRootFolder(PathList &filePaths); static void stripRootFolder(PathList &filePaths);
static void addRootFolder(PathList &filePaths, const Path &rootFolder); static void addRootFolder(PathList &filePaths, const Path &rootFolder);
friend bool operator==(const Path &lhs, const Path &rhs);
friend Path operator/(const Path &lhs, const Path &rhs); friend Path operator/(const Path &lhs, const Path &rhs);
friend Path operator+(const Path &lhs, const QString &rhs); friend Path operator+(const Path &lhs, const QString &rhs);
@ -90,6 +89,7 @@ private:
Q_DECLARE_METATYPE(Path) Q_DECLARE_METATYPE(Path)
bool operator==(const Path &lhs, const Path &rhs);
bool operator!=(const Path &lhs, const Path &rhs); bool operator!=(const Path &lhs, const Path &rhs);
Path operator+(const Path &lhs, const char rhs[]); Path operator+(const Path &lhs, const char rhs[]);
Path operator+(const Path &lhs, const std::string &rhs); Path operator+(const Path &lhs, const std::string &rhs);

Loading…
Cancel
Save