MCPcopy Create free account
hub / github.com/Martchus/syncthingtray / columnCount

Method columnCount

syncthingmodel/syncthingmodel.cpp:138–147  ·  view source on GitHub ↗

! * \brief Implements columnCount() in a way that makes sense for most derived classes taking singleColumnMode() into * account. */

Source from the content-addressed store, hash-verified

136 * account.
137 */
138int SyncthingModel::columnCount(const QModelIndex &parent) const
139{
140 if (!parent.isValid()) {
141 return singleColumnMode() ? 1 : 2; // label/name/ID, status/buttons
142 } else if (!parent.parent().isValid()) {
143 return singleColumnMode() ? 1 : 2; // field name and value (or file and progress)
144 } else {
145 return 0;
146 }
147}
148
149} // namespace Data

Callers

nothing calls this directly

Calls 1

parentMethod · 0.45

Tested by

no test coverage detected