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

Function removeBuildDirConfig

plugins/cmake/cmakeutils.cpp:431–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431void removeBuildDirConfig( KDevelop::IProject* project )
432{
433 int buildDirIndex = currentBuildDirIndex( project );
434 if ( !buildDirGroupExists( project, buildDirIndex ) )
435 {
436 qCWarning(CMAKE) << "build directory config" << buildDirIndex << "to be removed but does not exist";
437 return;
438 }
439
440 int bdCount = buildDirCount(project);
441 setBuildDirCount( project, bdCount - 1 );
442 removeOverrideBuildDirIndex( project );
443 setCurrentBuildDirIndex( project, -1 );
444
445 // move (rename) the upper config groups to keep the numbering
446 // if there's nothing to move, just delete the group physically
447 if (buildDirIndex + 1 == bdCount)
448 buildDirGroup( project, buildDirIndex ).deleteGroup();
449
450 else for (int i = buildDirIndex + 1; i < bdCount; ++i)
451 {
452 KConfigGroup src = buildDirGroup( project, i );
453 KConfigGroup dest = buildDirGroup( project, i - 1 );
454 dest.deleteGroup();
455 src.copyTo(&dest);
456 src.deleteGroup();
457 }
458}
459
460QHash<QString, QString> readCacheValues(const KDevelop::Path& cmakeCachePath, QSet<QString> variables)
461{

Callers 1

removeBuildDirMethod · 0.85

Calls 8

currentBuildDirIndexFunction · 0.85
buildDirGroupExistsFunction · 0.85
buildDirCountFunction · 0.85
setBuildDirCountFunction · 0.85
setCurrentBuildDirIndexFunction · 0.85
buildDirGroupFunction · 0.85
copyToMethod · 0.45

Tested by

no test coverage detected