| 1104 | } |
| 1105 | |
| 1106 | void CMakeSetupDialog::dropEvent(QDropEvent* e) |
| 1107 | { |
| 1108 | if (!(this->CurrentState == ReadyConfigure || |
| 1109 | this->CurrentState == ReadyGenerate)) { |
| 1110 | return; |
| 1111 | } |
| 1112 | |
| 1113 | QMimeData const* dat = e->mimeData(); |
| 1114 | QList<QUrl> urls = dat->urls(); |
| 1115 | QString file = urls.count() ? urls[0].toLocalFile() : QString(); |
| 1116 | if (file.endsWith("CMakeCache.txt", Qt::CaseInsensitive)) { |
| 1117 | QFileInfo info(file); |
| 1118 | if (this->CMakeThread->cmakeInstance()->binaryDirectory() != |
| 1119 | info.absolutePath()) { |
| 1120 | this->setBinaryDirectory(info.absolutePath()); |
| 1121 | } |
| 1122 | } else if (file.endsWith("CMakeLists.txt", Qt::CaseInsensitive)) { |
| 1123 | QFileInfo info(file); |
| 1124 | if (this->CMakeThread->cmakeInstance()->binaryDirectory() != |
| 1125 | info.absolutePath()) { |
| 1126 | this->setSourceDirectory(info.absolutePath()); |
| 1127 | this->setBinaryDirectory(info.absolutePath()); |
| 1128 | } |
| 1129 | } |
| 1130 | } |
| 1131 | |
| 1132 | QStringList CMakeSetupDialog::loadBuildPaths() |
| 1133 | { |
nothing calls this directly
no test coverage detected