[libcalamares] Add convenience for QDebug.noquote()
- Use << Logger::NoQuote{} to turn off quoting **and** the space - In practice, in Calamares we use this only around other processes' output, where we want neither quotes nor spaces.
This commit is contained in:
parent
c59af8881c
commit
6de82e6857
@ -33,6 +33,9 @@ struct FuncSuppressor
|
|||||||
const char* m_s;
|
const char* m_s;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct NoQuote {};
|
||||||
|
struct Quote {};
|
||||||
|
|
||||||
DLLEXPORT extern const FuncSuppressor Continuation;
|
DLLEXPORT extern const FuncSuppressor Continuation;
|
||||||
DLLEXPORT extern const FuncSuppressor SubEntry;
|
DLLEXPORT extern const FuncSuppressor SubEntry;
|
||||||
|
|
||||||
@ -74,6 +77,18 @@ operator<<( QDebug& s, const FuncSuppressor& f )
|
|||||||
return s << f.m_s;
|
return s << f.m_s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline QDebug&
|
||||||
|
operator<<( QDebug& s, const NoQuote& )
|
||||||
|
{
|
||||||
|
return s.noquote().nospace();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDebug&
|
||||||
|
operator<<( QDebug& s, const Quote& )
|
||||||
|
{
|
||||||
|
return s.quote().space();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The full path of the log file.
|
* @brief The full path of the log file.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user