From af32768f18f8fed1ce3d06a6bad5fd65d0574a3a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 28 Jun 2023 14:52:43 +0200 Subject: QDebug: add getter/setter for noQuotes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There were setters (quote(), noquote()), but, unlike space()/nospace(), there was no getter. Add the getter, and, for symmetry, a parametrized setter, too. [ChangeLog][QtCore][QDebug] Added setQuoteStrings()/quoteStrings() to access and manipulate the quote()/noquote() state. Change-Id: I1b73138819b4d02726a6ef862c190206431ccebc Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira --- src/corelib/io/qdebug.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/corelib/io/qdebug.cpp') diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index 56deeb7cf75..f8402dfedae 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -506,6 +506,29 @@ QDebug &QDebug::resetFormat() */ +/*! + \fn bool QDebug::quoteStrings() const + \since 6.7 + + Returns \c true if this QDebug instance will quote strings streamed into + it (which is the default). + + \sa QDebugStateSaver, quote(), noquote(), setQuoteStrings() +*/ + +/*! + \fn void QDebug::setQuoteStrings(bool b) + \since 6.7 + + Enables quoting of strings streamed into this QDebug instance if \a b is + \c true; otherwise quoting is disabled. + + The default is to quote strings. + + \sa QDebugStateSaver, quote(), noquote(), quoteStrings() +*/ + + /*! \fn QDebug &QDebug::quote() \since 5.4 -- cgit v1.2.3