~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk

« back to all changes in this revision

Viewing changes to src/plugin/folderlistmodel/dirmodel.cpp

  • Committer: Tarmac
  • Author(s): Arto Jalkanen
  • Date: 2014-09-04 03:24:34 UTC
  • mfrom: (259.1.2 ubuntu-filemanager-app)
  • Revision ID: tarmac-20140904032434-oub6k3uwedfyz1ro
Some clean-up, documentation, for the security changes.

Approved by Ubuntu Phone Apps Jenkins Bot, Carlos Jose Mazieri.

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
    , mIsRecursive(false)
128
128
    , mReadsMediaMetadata(false)
129
129
    , mShowHiddenFiles(false)
130
 
    , mShowNonMTPPaths(true)
 
130
    , mOnlyMTPPaths(false)
131
131
    , mSortBy(SortByName)
132
132
    , mSortOrder(SortAscending)
133
133
    , mCompareFunction(0)  
502
502
}
503
503
 
504
504
bool DirModel::allowAccess(const QString &absoluteFilePath) const {
505
 
    return mShowNonMTPPaths || isMTPPath(absoluteFilePath);
 
505
    return !mOnlyMTPPaths || isMTPPath(absoluteFilePath);
506
506
}
507
507
 
508
508
void DirModel::onItemsAdded(const DirItemInfoList &newFiles)
1072
1072
    }
1073
1073
}
1074
1074
 
1075
 
bool DirModel::getShowNonMTPPaths() const
 
1075
bool DirModel::getOnlyMTPPaths() const
1076
1076
{
1077
 
    return mShowNonMTPPaths;
 
1077
    return mOnlyMTPPaths;
1078
1078
}
1079
1079
 
1080
1080
 
1081
 
void DirModel::setShowNonMTPPaths(bool show)
 
1081
void DirModel::setOnlyMTPPaths(bool onlyMTPPaths)
1082
1082
{
1083
 
    if (show != mShowNonMTPPaths)
 
1083
    if (onlyMTPPaths != mOnlyMTPPaths)
1084
1084
    {
1085
 
        mShowNonMTPPaths = show;
 
1085
        mOnlyMTPPaths = onlyMTPPaths;
1086
1086
        refresh();
1087
 
        emit showNonMTPPathsChanged();
 
1087
        emit onlyMTPPathsChanged();
1088
1088
    }
1089
1089
}
1090
1090