| 149 | } |
| 150 | |
| 151 | void ProjectCore::addProjectProperty(WindowService *windowService, DToolButton *projectProperty) |
| 152 | { |
| 153 | projectProperty->setIcon(QIcon::fromTheme("settings")); |
| 154 | projectProperty->setToolTip(tr("Open activted project`s property dialog")); |
| 155 | |
| 156 | connect(projectProperty, &DToolButton::clicked, this, [=]() { |
| 157 | project.openProjectPropertys(ProjectKeeper::instance()->treeView()->getActiveProjectInfo()); |
| 158 | }, |
| 159 | Qt::DirectConnection); |
| 160 | // todo(zta :temp only supprt cmake project do other kit later |
| 161 | connect(ProjectProxy::instance(), &ProjectProxy::projectActivated, this, [=](const ProjectInfo &prjInfo) { |
| 162 | if (prjInfo.kitName() != "cmake") |
| 163 | projectProperty->setEnabled(false); |
| 164 | else |
| 165 | projectProperty->setEnabled(true); |
| 166 | }, |
| 167 | Qt::DirectConnection); |
| 168 | } |
| 169 | |
| 170 | void ProjectCore::initLocator(dpf::PluginServiceContext &ctx) |
| 171 | { |
nothing calls this directly
no test coverage detected