| 429 | } |
| 430 | |
| 431 | void 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 | |
| 460 | QHash<QString, QString> readCacheValues(const KDevelop::Path& cmakeCachePath, QSet<QString> variables) |
| 461 | { |
no test coverage detected