MCPcopy Create free account
hub / github.com/KDE/kdevelop / setPaths

Method setPaths

plugins/custom-definesandincludes/kcm_widget/projectpathsmodel.cpp:133–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void ProjectPathsModel::setPaths(const QVector< ConfigEntry >& paths )
134{
135 beginResetModel();
136 projectPaths.clear();
137 for (const ConfigEntry& existingPathConfig : paths) {
138 // Sanitize the path of loaded config
139 ConfigEntry config = existingPathConfig;
140 bool rootPath = config.path == QLatin1String(".") ? true : false;
141 config.path = sanitizePath(rootPath ? QString() : config.path );
142 addPathInternal(config, rootPath);
143 }
144 addPathInternal( ConfigEntry(sanitizePath( QString() )), true ); // add an empty "root" config entry if one does not exist
145 endResetModel();
146}
147
148bool ProjectPathsModel::removeRows( int row, int count, const QModelIndex& parent )
149{

Callers 1

loadFromMethod · 0.45

Calls 3

ConfigEntryClass · 0.85
QStringClass · 0.50
clearMethod · 0.45

Tested by

no test coverage detected