21 if (extraInfo.isEmpty()) {
return; }
27 m_info += u
' ' % extraInfo;
34 if (index.
isMyself()) {
return QVariant::fromValue(*
this); }
37 case IndexUserName:
return QVariant::fromValue(m_userName);
38 case IndexInfo:
return QVariant::fromValue(m_info);
39 case IndexSimulatorString:
return QVariant::fromValue(m_simulatorString);
40 case IndexFlightNetworkInfo:
return QVariant::fromValue(m_flightNetwork);
55 case IndexUserName: this->
setUserName(variant.toString());
break;
56 case IndexInfo: this->
setInfo(variant.toString());
break;
69 case IndexInfo:
return this->
getInfo().compare(compareValue.
getInfo());
71 case IndexFlightNetworkInfo:
79 if (m_logFileAndPath.isEmpty()) {
return; }
85 if (m_logFileAndPath.isEmpty()) {
return false; }
91 return (m_userName.isEmpty() ? QStringLiteral(
"") : u
"user name: " % m_userName % u
"\n") %
92 (m_simulatorString.isEmpty() ? QStringLiteral(
"") : u
"simulator: " % m_simulatorString % u
"\n") %
93 (m_flightNetwork.isEmpty() ? QStringLiteral(
"") : u
"network: " % m_flightNetwork % u
"\n") %
94 (m_info.isEmpty() ? QStringLiteral(
"") : u
"info: " % m_info % u
"\n");
const QString & getSimulatorString() const
Simulator string.
void appendInfo(const QString &extraInfo)
Append some info.
QString summary() const
Summary.
void setFlightNetworkString(const QString &network)
Network string.
int comparePropertyByIndex(CPropertyIndexRef index, const CCrashInfo &compareValue) const
Compare for index.
bool writeToFile() const
Write to file (synchronous)
QString convertToQString(bool i18n=false) const
Cast as QString.
const QString & getUserName() const
Get user name.
void setUserName(const QString &userName)
User name.
const QString & getFlightNetworkString() const
Network string.
void setLogPathAndFileName(const QString &fileName)
Set path and file name.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
void setSimulatorString(const QString &simString)
Simulator string.
void triggerWritingFile() const
Trigger writing this to file (in background)
ColumnIndex
Properties by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
void setInfo(const QString &info)
Set info.
const QString & getInfo() const
Get the info.
static bool writeStringToFile(const QString &content, const QString &fileNameAndPath)
Write string to text file.
Non-owning reference to a CPropertyIndex with a subset of its features.
Q_REQUIRED_RESULT CPropertyIndexRef copyFrontRemoved() const
Copy with first element removed.
CastType frontCasted() const
First element casted to given type, usually the PropertIndex enum.
bool isMyself() const
Myself index, used with nesting.
static CWorker * fromTask(QObject *owner, const QString &name, F &&task)
Returns a new worker object which lives in a new thread.
int comparePropertyByIndex(CPropertyIndexRef index, const Derived &compareValue) const
Compare for index.
void setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
Set property by index.
QVariant propertyByIndex(CPropertyIndexRef index) const
Property by index.
Free functions in swift::misc.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.