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

List:       kde-commits
Subject:    Re: [kdelibs/KDE/4.11] kioslave/file: If details where set to 0 then every entry would get a "UDS_LI
From:       Mark <markg85 () gmail ! com>
Date:       2013-09-22 21:02:04
Message-ID: CAPd6JnFNFUsUSxrMnT_aacQh8L7YQ944-BW=s5LoxJXSRRJdFQ () mail ! gmail ! com
[Download RAW message or body]

Hi Albert,

Yes it is. I didn't made the test for 4.xx, but i did for frameworks. You
can find it in the K-F-D list with the title: "New test with C++11 and
lambda (UDSEntry testcase)". The case is quite heavily dependent on Qt5 and
even C++11.

Cheers,
Mark


On Sun, Sep 22, 2013 at 10:57 PM, Albert Astals Cid <aacid@kde.org> wrote:

> Is this unit-testable?
>
> Cheers,
>   Albert
>
> El Diumenge, 22 de setembre de 2013, a les 18:03:22, Mark Gaiser va
> escriure:
> > Git commit 8b9f8b3082d43c4605ef78d18009b98b5997f7eb by Mark Gaiser.
> > Committed on 22/09/2013 at 18:00.
> > Pushed by markg into branch 'KDE/4.11'.
> >
> > If details where set to 0 then every entry would get a "UDS_LINK_DEST"
> > field. This patch prevents that and only adds a "UDS_LINK_DEST" field if
> > the entry is a link.
> >
> > M  +2    -2    kioslave/file/file_unix.cpp
> >
> > http://commits.kde.org/kdelibs/8b9f8b3082d43c4605ef78d18009b98b5997f7eb
> >
> > diff --git a/kioslave/file/file_unix.cpp b/kioslave/file/file_unix.cpp
> > index 7d8192d..4734399 100644
> > --- a/kioslave/file/file_unix.cpp
> > +++ b/kioslave/file/file_unix.cpp
> > @@ -382,8 +382,8 @@ void FileProtocol::listDir( const KUrl& url)
> >              entry.insert(KIO::UDSEntry::UDS_NAME, filename);
> >  #ifdef HAVE_DIRENT_D_TYPE
> >              entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
> > -                         (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG );
> > -            const bool isSymLink = (ep->d_type & DT_LNK);
> > +                         (ep->d_type == DT_DIR) ? S_IFDIR : S_IFREG );
> > +            const bool isSymLink = (ep->d_type == DT_LNK);
> >  #else
> >              // oops, no fast way, we need to stat (e.g. on Solaris)
> >              if (KDE_lstat(ep->d_name, &st) == -1) {
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Hi Albert,<div><br></div><div>Yes it is. I didn&#39;t made the test \
for 4.xx, but i did for frameworks. You can find it in the K-F-D list with the title: \
&quot;New test with C++11 and lambda (UDSEntry testcase)&quot;. The case is quite \
heavily dependent on Qt5 and even C++11.</div>

<div><br></div><div>Cheers,</div><div>Mark</div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 22, 2013 at 10:57 \
PM, Albert Astals Cid <span dir="ltr">&lt;<a href="mailto:aacid@kde.org" \
target="_blank">aacid@kde.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Is this unit-testable?<br> <br>
Cheers,<br>
  Albert<br>
<br>
El Diumenge, 22 de setembre de 2013, a les 18:03:22, Mark Gaiser va escriure:<br>
&gt; Git commit 8b9f8b3082d43c4605ef78d18009b98b5997f7eb by Mark Gaiser.<br>
&gt; Committed on 22/09/2013 at 18:00.<br>
&gt; Pushed by markg into branch &#39;KDE/4.11&#39;.<br>
&gt;<br>
&gt; If details where set to 0 then every entry would get a \
&quot;UDS_LINK_DEST&quot;<br> &gt; field. This patch prevents that and only adds a \
&quot;UDS_LINK_DEST&quot; field if<br> &gt; the entry is a link.<br>
&gt;<br>
&gt; M  +2    -2    kioslave/file/file_unix.cpp<br>
&gt;<br>
&gt; <a href="http://commits.kde.org/kdelibs/8b9f8b3082d43c4605ef78d18009b98b5997f7eb" \
target="_blank">http://commits.kde.org/kdelibs/8b9f8b3082d43c4605ef78d18009b98b5997f7eb</a><br>
 &gt;<br>
&gt; diff --git a/kioslave/file/file_unix.cpp b/kioslave/file/file_unix.cpp<br>
&gt; index 7d8192d..4734399 100644<br>
&gt; --- a/kioslave/file/file_unix.cpp<br>
&gt; +++ b/kioslave/file/file_unix.cpp<br>
&gt; @@ -382,8 +382,8 @@ void FileProtocol::listDir( const KUrl&amp; url)<br>
&gt;              entry.insert(KIO::UDSEntry::UDS_NAME, filename);<br>
&gt;  #ifdef HAVE_DIRENT_D_TYPE<br>
&gt;              entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,<br>
&gt; -                         (ep-&gt;d_type &amp; DT_DIR) ? S_IFDIR : S_IFREG \
);<br> &gt; -            const bool isSymLink = (ep-&gt;d_type &amp; DT_LNK);<br>
&gt; +                         (ep-&gt;d_type == DT_DIR) ? S_IFDIR : S_IFREG );<br>
&gt; +            const bool isSymLink = (ep-&gt;d_type == DT_LNK);<br>
&gt;  #else<br>
&gt;              // oops, no fast way, we need to stat (e.g. on Solaris)<br>
&gt;              if (KDE_lstat(ep-&gt;d_name, &amp;st) == -1) {<br>
<br>
</blockquote></div><br></div>



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

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