Skip to content

Commit 5ac4d1f

Browse files
committed
Fix half of util.h being in the global namespace
lift(), merge(), HomeserverData and QString aliases should have been inside Quotient:: but the namespace was closed to define operator<<(QDebug, ...) and not reopened again after that.
1 parent 0894fc1 commit 5ac4d1f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Quotient/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ int Quotient::minorVersion()
128128

129129
int Quotient::patchVersion() { return Quotient_VERSION_PATCH; }
130130

131-
bool HomeserverData::checkMatrixSpecVersion(QStringView targetVersion) const
131+
bool Quotient::HomeserverData::checkMatrixSpecVersion(QStringView targetVersion) const
132132
{
133133
// TODO: Replace this naïve implementation with something smarter that can check things like
134134
// 1.12 > 1.11 and maybe even 1.10 > 1.9

Quotient/util.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ inline QDebug operator<<(QDebug dbg, QElapsedTimer et)
369369
return dbg;
370370
}
371371

372+
namespace Quotient {
372373
//! \brief Lift an operation into dereferenceable types (std::optional or pointers)
373374
//!
374375
//! This is a more generic version of std::optional::and_then() that accepts an arbitrary number of
@@ -434,3 +435,4 @@ struct QUOTIENT_API HomeserverData {
434435

435436
bool checkMatrixSpecVersion(QStringView targetVersion) const;
436437
};
438+
} // namespace Quotient

0 commit comments

Comments
 (0)