[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'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.</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"><<a href="mailto:aacid@kde.org" \
target="_blank">aacid@kde.org</a>></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>
> Git commit 8b9f8b3082d43c4605ef78d18009b98b5997f7eb by Mark Gaiser.<br>
> Committed on 22/09/2013 at 18:00.<br>
> Pushed by markg into branch 'KDE/4.11'.<br>
><br>
> If details where set to 0 then every entry would get a \
"UDS_LINK_DEST"<br> > field. This patch prevents that and only adds a \
"UDS_LINK_DEST" field if<br> > the entry is a link.<br>
><br>
> M +2 -2 kioslave/file/file_unix.cpp<br>
><br>
> <a href="http://commits.kde.org/kdelibs/8b9f8b3082d43c4605ef78d18009b98b5997f7eb" \
target="_blank">http://commits.kde.org/kdelibs/8b9f8b3082d43c4605ef78d18009b98b5997f7eb</a><br>
><br>
> diff --git a/kioslave/file/file_unix.cpp b/kioslave/file/file_unix.cpp<br>
> index 7d8192d..4734399 100644<br>
> --- a/kioslave/file/file_unix.cpp<br>
> +++ b/kioslave/file/file_unix.cpp<br>
> @@ -382,8 +382,8 @@ void FileProtocol::listDir( const KUrl& url)<br>
> entry.insert(KIO::UDSEntry::UDS_NAME, filename);<br>
> #ifdef HAVE_DIRENT_D_TYPE<br>
> entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,<br>
> - (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG \
);<br> > - const bool isSymLink = (ep->d_type & DT_LNK);<br>
> + (ep->d_type == DT_DIR) ? S_IFDIR : S_IFREG );<br>
> + const bool isSymLink = (ep->d_type == DT_LNK);<br>
> #else<br>
> // oops, no fast way, we need to stat (e.g. on Solaris)<br>
> if (KDE_lstat(ep->d_name, &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