MCPcopy Create free account
hub / github.com/Kitware/CMake / addBinaryPath

Method addBinaryPath

Source/QtDialog/CMakeSetupDialog.cxx:1065–1084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063}
1064
1065void CMakeSetupDialog::addBinaryPath(QString const& path)
1066{
1067 QString cleanpath = QDir::cleanPath(path);
1068
1069 // update UI
1070 this->BinaryDirectory->blockSignals(true);
1071 int idx = this->BinaryDirectory->findText(cleanpath);
1072 if (idx != -1) {
1073 this->BinaryDirectory->removeItem(idx);
1074 }
1075 this->BinaryDirectory->insertItem(0, cleanpath);
1076 this->BinaryDirectory->setCurrentIndex(0);
1077 this->BinaryDirectory->blockSignals(false);
1078
1079 // save to registry
1080 QStringList buildPaths = this->loadBuildPaths();
1081 buildPaths.removeAll(cleanpath);
1082 buildPaths.prepend(cleanpath);
1083 this->saveBuildPaths(buildPaths);
1084}
1085
1086void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e)
1087{

Callers 1

prepareConfigureMethod · 0.95

Calls 4

loadBuildPathsMethod · 0.95
saveBuildPathsMethod · 0.95
cleanPathFunction · 0.85
prependMethod · 0.80

Tested by

no test coverage detected