~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/plugins/custom-definesandincludes/kcm_widget/projectpathsmodel.cpp

  • Committer: Package Import Robot
  • Author(s): Lisandro Damián Nicanor Pérez Meyer, Pino Toscano, Sune Vuorela, Lisandro Damián Nicanor Pérez Meyer
  • Date: 2015-09-02 21:10:24 UTC
  • mfrom: (1.3.24)
  • Revision ID: package-import@ubuntu.com-20150902211024-ntruxcyb574f3xuk
Tags: 4:4.7.1-1
* Team upload.

[ Pino Toscano ]
* Change section of kdevelop-dev to libdevel.
* Add ${misc:Depends} in kdevelop-dbg and kdevelop-l10n.

[ Sune Vuorela ]
* Make KDevelop recommend kapptemplate to have more meaningful project
  templates available.

[ Lisandro Damián Nicanor Pérez Meyer ]
* New upstream release.
  - Bump kdevplatform-dev build dependency to 1.7.1.
* Remove kde-workspace from build dependencies. We no longer provide
  a KDE 4 based workspace.
  - Add libsoprano-dev as a build dependency, it was probably previously
    pulled in by kde-workspace.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <language/duchain/indexedstring.h>
24
24
#include <util/path.h>
25
25
 
 
26
using namespace KDevelop;
 
27
 
26
28
namespace{
27
29
//TODO: Port the model to the Path api.
28
 
KUrl projectFolder( KDevelop::IProject* project )
 
30
KUrl projectFolder( IProject* project )
29
31
{
30
32
    auto url = project->path().toUrl();
31
33
    url.adjustPath( KUrl::AddTrailingSlash );
38
40
{
39
41
}
40
42
 
41
 
void ProjectPathsModel::setProject(KDevelop::IProject* w_project)
 
43
void ProjectPathsModel::setProject(IProject* w_project)
42
44
{
43
45
    project = w_project;
44
46
}
55
57
        return pathConfig.includes;
56
58
        break;
57
59
    case DefinesDataRole:
58
 
        return pathConfig.defines;
 
60
        return QVariant::fromValue(pathConfig.defines);
59
61
        break;
60
62
    case Qt::EditRole:
61
63
        return sanitizePath( pathConfig.path, true, false );
109
111
        pathConfig.includes = value.toStringList();
110
112
        break;
111
113
    case DefinesDataRole:
112
 
        pathConfig.defines = value.toHash();
 
114
        pathConfig.defines = value.value<Defines>();
113
115
        break;
114
116
    case Qt::EditRole:
115
117
        pathConfig.path = sanitizePath( value.toString(), false );
217
219
QString ProjectPathsModel::sanitizePath( const QString& path, bool expectRelative, bool needRelative ) const
218
220
{
219
221
    Q_ASSERT( project );
220
 
    Q_ASSERT( expectRelative || project->inProject(KDevelop::IndexedString(path)) );
 
222
    Q_ASSERT( expectRelative || project->inProject(IndexedString(path)) );
221
223
 
222
224
    KUrl url;
223
225
    if( expectRelative ) {