[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdevplatform/plugins/cvs
From:       Evgeniy Ivanov <pfx.kde () gmail ! com>
Date:       2008-06-19 13:20:01
Message-ID: 485A5D01.2040004 () gmail ! com
[Download RAW message or body]

Andreas Pakulat wrote:
> On 19.06.08 10:57:52, Evgeniy Ivanov wrote:
> 
> > SVN commit 822153 by eivanov:
> > 
> > Fixed the bug that apaku described in the mailing list. QFileInfo::path() should \
> > be used only for files and not for dirs 
> > 
> > M  +5 -1      cvsproxy.cpp  
> > 
> > 
> > --- trunk/KDE/kdevplatform/plugins/cvs/cvsproxy.cpp #822152:822153
> > @@ -34,7 +34,11 @@
> > 
> > bool CvsProxy::isValidDirectory(const KUrl & dirPath) const
> > {
> > -    QString path = QFileInfo(dirPath.path()).path() + QDir::separator() + "CVS";
> > +    QString path;
> > +    if (QFileInfo(dirPath.path()).isFile())
> > +        path = QFileInfo(dirPath.path()).path() + QDir::separator() + "CVS";
> > +    else
> > +        path = dirPath.toLocalFile() + QDir::separator() + "CVS";
> > 
> 
> This is the "correct but slow" implementation, now you can do the
> "correct and fast" version ;) QFileInfo should be allocated only once,
> because it involves creation of QFileSystemEngine which is relatively
> expensive. Also fetching the path part of the url can be done once and
> the result stored then instead of calling it 3 times (basically)
> 
> Andrea
Ok, thanks.
Committed r822189 :)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic