Skip to content

Commit fa8e073

Browse files
committed
src/quick/features: fix unix namespace collision
On Linux is seems like the word "unix" is colliding with something in the namespace causing a failure to compile. Hopefully this fixes the isuse.
1 parent 9bea6c3 commit fa8e073

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/quick/features.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ QString Features::versionHash() const
5757
return Memento::VERSION_HASH;
5858
}
5959

60-
bool Features::windows() const noexcept
60+
bool Features::isWindows() const noexcept
6161
{
6262
#if defined(Q_OS_WIN)
6363
return true;
@@ -66,7 +66,7 @@ bool Features::windows() const noexcept
6666
#endif
6767
}
6868

69-
bool Features::unix() const noexcept
69+
bool Features::isUnix() const noexcept
7070
{
7171
#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)
7272
return true;
@@ -75,7 +75,7 @@ bool Features::unix() const noexcept
7575
#endif
7676
}
7777

78-
bool Features::macos() const noexcept
78+
bool Features::isMacos() const noexcept
7979
{
8080
#if defined(Q_OS_MACOS)
8181
return true;

src/quick/features.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ class Features : public QObject
6161

6262
Q_PROPERTY(
6363
bool windows
64-
READ windows
64+
READ isWindows
6565
CONSTANT
6666
)
6767

6868
Q_PROPERTY(
6969
bool unix
70-
READ unix
70+
READ isUnix
7171
CONSTANT
7272
)
7373

7474
Q_PROPERTY(
7575
bool macos
76-
READ macos
76+
READ isMacos
7777
CONSTANT
7878
)
7979

@@ -165,7 +165,7 @@ class Features : public QObject
165165
* @return false otherwise.
166166
*/
167167
[[nodiscard]]
168-
bool windows() const noexcept;
168+
bool isWindows() const noexcept;
169169

170170
/**
171171
* @brief Get if this is running on Unix, excluding macOS.
@@ -174,7 +174,7 @@ class Features : public QObject
174174
* @return false otherwise.
175175
*/
176176
[[nodiscard]]
177-
bool unix() const noexcept;
177+
bool isUnix() const noexcept;
178178

179179
/**
180180
* @brief Get if this is running on macOS.
@@ -183,7 +183,7 @@ class Features : public QObject
183183
* @return false otherwise.
184184
*/
185185
[[nodiscard]]
186-
bool macos() const noexcept;
186+
bool isMacos() const noexcept;
187187

188188
/**
189189
* @brief Get the exact OS this is running on.

0 commit comments

Comments
 (0)