Warning, file /sdk/cervisia/cvsdir.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  *  Copyright (C) 1999-2002 Bernd Gehrmann
0003  *                          bernd@mail.berlios.de
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 2 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0018  */
0019 
0020 #include "cvsdir.h"
0021 
0022 #include "dirignorelist.h"
0023 #include "globalignorelist.h"
0024 using namespace Cervisia;
0025 
0026 CvsDir::CvsDir(const QString &path)
0027     : QDir(path, 0, QDir::Name, QDir::TypeMask | QDir::Hidden | QDir::NoSymLinks)
0028 {
0029 }
0030 
0031 const QFileInfoList *CvsDir::entryInfoList() const
0032 {
0033     DirIgnoreList ignorelist(absolutePath());
0034     const QFileInfoList &fulllist = QDir::entryInfoList();
0035     if (fulllist.empty())
0036         return 0;
0037 
0038     entrylist.clear();
0039 
0040     Q_FOREACH (const QFileInfo &info, fulllist) {
0041         if (!ignorelist.matches(&info) && !GlobalIgnoreList().matches(&info))
0042             entrylist.append(info);
0043     }
0044 
0045     return &entrylist;
0046 }
0047 
0048 // Local Variables:
0049 // c-basic-offset: 4
0050 // End: