libquentier 0.8.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
Public Member Functions | List of all members
quentier::ErrorString Class Reference

The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (base) and non-translatable (details) parts of the error description. More...

#include <ErrorString.h>

Inheritance diagram for quentier::ErrorString:
Inheritance graph
[legend]
Collaboration diagram for quentier::ErrorString:
Collaboration graph
[legend]

Public Member Functions

 ErrorString (const char *error=nullptr)
 
 ErrorString (const QString &error)
 
 ErrorString (const ErrorString &other)
 
 ErrorString (ErrorString &&other) noexcept
 
ErrorStringoperator= (const ErrorString &other)
 
ErrorStringoperator= (ErrorString &&other) noexcept
 
const QStringbase () const noexcept
 
QStringbase ()
 
const QStringListadditionalBases () const noexcept
 
QStringListadditionalBases ()
 
const QStringdetails () const noexcept
 
QStringdetails ()
 
void setBase (QString error)
 
void setBase (const char *error)
 
void appendBase (const QString &error)
 
void appendBase (const QStringList &errors)
 
void appendBase (const char *error)
 
void setDetails (const QString &error)
 
void setDetails (const char *error)
 
bool isEmpty () const
 
void clear ()
 
QString localizedString () const
 
QString nonLocalizedString () const
 
QTextStreamprint (QTextStream &strm) const override
 
- Public Member Functions inherited from quentier::Printable
QString toString () const
 

Detailed Description

The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (base) and non-translatable (details) parts of the error description.

  1. base() methods return const and non-const links to the primary translatable string
  2. details() methods ruturn const and non-const links to non-translatable string (coming from some third party library etc)
  3. additionalBases() methods return const and non-const links to additional translatable strings; one translatable string is not always enough because the error message might be composed from different parts

Member Function Documentation

◆ print()

QTextStream & quentier::ErrorString::print ( QTextStream strm) const
overridevirtual

Implements quentier::Printable.