Review Request 112064: Port S_IS*(x) macros to their qplatformdefs equivalents

Aurélien Gâteau agateau at kde.org
Fri Aug 16 10:31:15 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112064/
-----------------------------------------------------------

(Updated Aug. 16, 2013, 12:31 p.m.)


Review request for KDE Frameworks.


Changes
-------

Changed kfileitem.cpp to only use S_ISSOCK, S_ISCHR, S_ISBLK and S_ISFIFO when building on Q_OS_UNIX.

Is this the best way to go or should we do as kfileitem.cpp initially did for S_ISSOCK?

#ifndef S_ISSOCK
#define S_ISSOCK(x) false
#endif


Description
-------

Port S_IS*(x) macros to their qplatformdefs equivalents because they do not exist on Windows:

S_ISLNK(x) => (x & QT_STAT_LNK)
S_ISREG(x) => (x & QT_STAT_REG)
S_ISDIR(x) => (x & QT_STAT_DIR)

Some of those macros do not have equivalents though. Some are used in files which do not matter for Windows, but not all of them:

kdesu/client.cpp:
- S_ISSOCK

kioslave/file/file_unix.cpp:
- S_ISFIFO
- S_ISSOCK

kpty/kgrantpty.c:
- S_ISCHR

staging/kio/src/core/kfileitem.cpp:
- S_ISSOCK
- S_ISCHR
- S_ISBLK
- S_ISFIFO

tier1/solid/src/solid/backends/shared/udevqtclient.cpp:
- S_ISBLK
- S_ISCHR


Diffs (updated)
-----

  khtml/khtml_part.cpp d944a29 
  kio/kfile/kpropertiesdialog.cpp 995e962 
  kio/kio/krun.cpp db727cc 
  kio/tests/fileundomanagertest.cpp c8cde0c 
  kio/tests/kioslavetest.cpp 8a894e1 
  kio/tests/kiotesthelper.h b0082fe 
  kioslave/file/file.cpp 6329fab 
  kioslave/file/file_unix.cpp 1eb2279 
  staging/kio/src/core/kfileitem.cpp f8a4ac1 
  staging/kio/src/core/udsentry.cpp df52d97 
  staging/kio/src/widgets/kurlcompletion.cpp 2378086 
  tier1/karchive/src/k7zip.cpp 2957f30 
  tier1/karchive/src/kzip.cpp 1390b4a 
  tier1/kcoreaddons/src/io/kdirwatch.cpp 6590ee2 

Diff: http://git.reviewboard.kde.org/r/112064/diff/


Testing
-------

Compiles


Thanks,

Aurélien Gâteau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130816/e48d436a/attachment.html>


More information about the Kde-frameworks-devel mailing list