The class SocketAddress is meant only for creating a proper socket address structure. It should not be handling
cleanup of the socket file. FdReceiver is better suited for this job.
Details
- Reviewers
ossi dfaure - Group Reviewers
Frameworks - Commits
- R241:3e7c84e877e5: Move task of cleaning up socket file to FdReceiver
Diff Detail
- Repository
- R241 KIO
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
62 ↗ | (On Diff #26831) | any particular reason not to use QFile::remove() here as well? |
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
62 ↗ | (On Diff #26831) | I didn't want to include QFile. That's the only reason. |
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
62 ↗ | (On Diff #26831) | uhm, you're still using it in this very line, just differently ;) |
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
62 ↗ | (On Diff #26831) | *head-desk* |
Used QString::toLocal8Bit() instead of QFile::encodeName(). QFile wasn't supposed to be included in this commit.
did you make sure that this is the only place where SocketAddress is used?
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
41 | do the first unlink right before here, so it's equivalent with the old code, just better structured. | |
57 | that's a good addition, but it isn't logically part of this patch, because it adds a new feature (cleanup at exit) instead of only refactoring. | |
src/ioslaves/file/file_unix.cpp | ||
87 | that's the wrong place, imo. leave it FdReceiver, so it's more local. |
SocketAddress is used only in FdSender and FdRecevier.
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
57 | So shall I commit this change separately right after pushing this patch? Or after all the related patches are pushed? |
note that the commit message needs a minor adjustment now.
src/ioslaves/file/fdreceiver.cpp | ||
---|---|---|
57 | the order really doesn't matter here. |