~ubuntu-branches/ubuntu/trusty/kdevelop/trusty

« back to all changes in this revision

Viewing changes to projectmanagers/cmake/parser/cmakeprojectvisitor.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-10 17:21:01 UTC
  • mfrom: (1.7.17)
  • Revision ID: package-import@ubuntu.com-20130610172101-wyeovt5ueu1pm0gv
Tags: 4:4.5.1-0ubuntu1
* New upstream release
* Merge with Debian git packaging, remaining changes
 - replaces/conflucts kdevelop-custom-buildsystem, now build into KDevelop

Show diffs side-by-side

added added

removed removed

Lines of Context:
1622
1622
    QString val;
1623
1623
    switch(filecomp->type())
1624
1624
    {
1625
 
        case GetFilenameComponentAst::Path:
1626
 
            val=fi.path();
1627
 
            break;
 
1625
        case GetFilenameComponentAst::Path: {
 
1626
            int idx = filecomp->fileName().lastIndexOf(QDir::separator());
 
1627
            if(idx>=0)
 
1628
                val=filecomp->fileName().left(idx);
 
1629
        }   break;
1628
1630
        case GetFilenameComponentAst::Absolute:
1629
1631
            val=fi.absoluteFilePath();
1630
1632
            break;
1698
1700
            m_vars->insert(list->list(), theList);
1699
1701
            break;
1700
1702
        case ListAst::Find: {
1701
 
            int idx=theList.indexOf(list->elements().first());
1702
 
            
 
1703
            QString element;
 
1704
            int idx=-1;
 
1705
            if(!list->elements().isEmpty()) {
 
1706
                element = list->elements().first();
 
1707
                idx=theList.indexOf(element);
 
1708
            }
1703
1709
            m_vars->insert(list->output(), QStringList(QString::number(idx)));
1704
1710
            kDebug(9042) << "List: Find" << theList << list->output() << list->elements() << idx;
1705
1711
        }   break;