Changeset View
Changeset View
Standalone View
Standalone View
plugins/cmake/cmakemodelitems.cpp
Show All 26 Lines | 25 | CMakeTargetItem::CMakeTargetItem(KDevelop::ProjectFolderItem* parent, const QString& name, const KDevelop::Path &builtUrl) | |||
---|---|---|---|---|---|
27 | , m_builtUrl(builtUrl) | 27 | , m_builtUrl(builtUrl) | ||
28 | {} | 28 | {} | ||
29 | 29 | | |||
30 | QUrl CMakeTargetItem::builtUrl() const | 30 | QUrl CMakeTargetItem::builtUrl() const | ||
31 | { | 31 | { | ||
32 | if (!m_builtUrl.isEmpty()) | 32 | if (!m_builtUrl.isEmpty()) | ||
33 | return m_builtUrl.toUrl(); | 33 | return m_builtUrl.toUrl(); | ||
34 | 34 | | |||
35 | const KDevelop::Path buildDir = CMake::currentBuildDir(project()); | 35 | const KDevelop::Path buildDir = CMake::currentBuildDir(project(), true); | ||
36 | if (buildDir.isEmpty()) | 36 | if (buildDir.isEmpty()) | ||
37 | return QUrl(); | 37 | return QUrl(); | ||
38 | 38 | | |||
39 | QString p = project()->path().relativePath(parent()->path()); | 39 | QString p = project()->path().relativePath(parent()->path()); | ||
40 | return KDevelop::Path(KDevelop::Path(buildDir, p), text()).toUrl(); | 40 | return KDevelop::Path(KDevelop::Path(buildDir, p), text()).toUrl(); | ||
41 | } | 41 | } | ||
42 | 42 | | |||
43 | QUrl CMakeTargetItem::installedUrl() const | 43 | QUrl CMakeTargetItem::installedUrl() const | ||
44 | { | 44 | { | ||
45 | return QUrl(); | 45 | return QUrl(); | ||
46 | } | 46 | } |