MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / toString

Method toString

src/envmodule.cpp:74–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74QString Module::toString() const
75{
76 QStringList sl;
77
78 // file size
79 sl.push_back(displayPath());
80 sl.push_back(QString("%1 B").arg(m_fileSize));
81
82 // version
83 if (m_version.isEmpty() && m_versionString.isEmpty()) {
84 sl.push_back("(no version)");
85 } else {
86 if (!m_version.isEmpty()) {
87 sl.push_back(m_version);
88 }
89
90 if (!m_versionString.isEmpty() && m_versionString != m_version) {
91 sl.push_back(versionString());
92 }
93 }
94
95 // timestamp
96 if (m_timestamp.isValid()) {
97 sl.push_back(m_timestamp.toString(Qt::DateFormat::ISODate));
98 } else {
99 sl.push_back("(no timestamp)");
100 }
101
102 // md5
103 if (!m_md5.isEmpty()) {
104 sl.push_back(m_md5);
105 }
106
107 return sl.join(", ");
108}
109
110Module::FileInfo Module::getFileInfo() const
111{

Callers 1

timestampStringMethod · 0.45

Calls 3

QStringClass · 0.85
isEmptyMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected