| 1063 | } |
| 1064 | |
| 1065 | void 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 | |
| 1086 | void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e) |
| 1087 | { |
no test coverage detected