MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / addEmptyRow

Method addEmptyRow

launcher/ui/pages/instance/ServersPage.cpp:246–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244 }
245
246 int addEmptyRow(int position)
247 {
248 if(m_locked)
249 {
250 return -1;
251 }
252 if(position < 0 || position >= rowCount())
253 {
254 position = rowCount();
255 }
256 beginInsertRows(QModelIndex(), position, position);
257 m_servers.insert(position, Server());
258 endInsertRows();
259 scheduleSave();
260 return position;
261 }
262
263 bool removeRow(int row)
264 {

Callers 1

Calls 3

QModelIndexClass · 0.85
insertMethod · 0.80
ServerClass · 0.70

Tested by

no test coverage detected