[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.
main
Adriaan de Groot 5 years ago
parent c59af8881c
commit 6de82e6857

@ -33,6 +33,9 @@ struct FuncSuppressor
const char* m_s;
};
struct NoQuote {};
struct Quote {};
DLLEXPORT extern const FuncSuppressor Continuation;
DLLEXPORT extern const FuncSuppressor SubEntry;
@ -74,6 +77,18 @@ operator<<( QDebug& s, const FuncSuppressor& f )
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.
*/

Loading…
Cancel
Save