Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/file/file.cpp
Show All 27 Lines | |||||
28 | 28 | | |||
29 | #include <QDirIterator> | 29 | #include <QDirIterator> | ||
30 | #include <qplatformdefs.h> | 30 | #include <qplatformdefs.h> | ||
31 | 31 | | |||
32 | #include <KDiskFreeSpaceInfo> | 32 | #include <KDiskFreeSpaceInfo> | ||
33 | 33 | | |||
34 | #include "kioglobal_p.h" | 34 | #include "kioglobal_p.h" | ||
35 | 35 | | |||
36 | #ifdef Q_OS_UNIX | ||||
37 | #include "legacycodec.h" | ||||
38 | #endif | ||||
39 | | ||||
36 | #include <assert.h> | 40 | #include <assert.h> | ||
37 | #include <errno.h> | 41 | #include <errno.h> | ||
38 | #ifdef Q_OS_WIN | 42 | #ifdef Q_OS_WIN | ||
39 | #include <sys/utime.h> | 43 | #include <sys/utime.h> | ||
40 | #include <qt_windows.h> | 44 | #include <qt_windows.h> | ||
41 | #include <winsock2.h> //struct timeval | 45 | #include <winsock2.h> //struct timeval | ||
42 | #else | 46 | #else | ||
43 | #include <utime.h> | 47 | #include <utime.h> | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 104 | { | |||
101 | QCoreApplication app(argc, argv); // needed for QSocketNotifier | 105 | QCoreApplication app(argc, argv); // needed for QSocketNotifier | ||
102 | app.setApplicationName(QStringLiteral("kio_file")); | 106 | app.setApplicationName(QStringLiteral("kio_file")); | ||
103 | 107 | | |||
104 | if (argc != 4) { | 108 | if (argc != 4) { | ||
105 | fprintf(stderr, "Usage: kio_file protocol domain-socket1 domain-socket2\n"); | 109 | fprintf(stderr, "Usage: kio_file protocol domain-socket1 domain-socket2\n"); | ||
106 | exit(-1); | 110 | exit(-1); | ||
107 | } | 111 | } | ||
108 | 112 | | |||
113 | #ifdef Q_OS_UNIX | ||||
114 | LegacyCodec codec; | ||||
115 | #endif | ||||
116 | | ||||
109 | FileProtocol slave(argv[2], argv[3]); | 117 | FileProtocol slave(argv[2], argv[3]); | ||
110 | 118 | | |||
111 | // Make sure the first kDebug is after the slave ctor (which sets a SIGPIPE handler) | 119 | // Make sure the first kDebug is after the slave ctor (which sets a SIGPIPE handler) | ||
112 | // This is useful in case kdeinit was autostarted by another app, which then exited and closed fd2 | 120 | // This is useful in case kdeinit was autostarted by another app, which then exited and closed fd2 | ||
113 | // (e.g. ctest does that, or closing the terminal window would do that) | 121 | // (e.g. ctest does that, or closing the terminal window would do that) | ||
114 | //qDebug() << "Starting" << getpid(); | 122 | //qDebug() << "Starting" << getpid(); | ||
115 | 123 | | |||
116 | slave.dispatchLoop(); | 124 | slave.dispatchLoop(); | ||
▲ Show 20 Lines • Show All 1433 Lines • Show Last 20 Lines |