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

Method dropEvent

Source/QtDialog/CMakeSetupDialog.cxx:1106–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1104}
1105
1106void 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
1132QStringList CMakeSetupDialog::loadBuildPaths()
1133{

Callers

nothing calls this directly

Calls 6

setBinaryDirectoryMethod · 0.95
setSourceDirectoryMethod · 0.95
QStringClass · 0.85
binaryDirectoryMethod · 0.80
cmakeInstanceMethod · 0.80
countMethod · 0.45

Tested by

no test coverage detected