Changeset View
Changeset View
Standalone View
Standalone View
autotests/jobremotetest.h
Show All 40 Lines | 40 | private Q_SLOTS: | |||
---|---|---|---|---|---|
41 | void initTestCase(); | 41 | void initTestCase(); | ||
42 | void cleanupTestCase(); | 42 | void cleanupTestCase(); | ||
43 | 43 | | |||
44 | // Remote tests | 44 | // Remote tests | ||
45 | void putAndGet(); | 45 | void putAndGet(); | ||
46 | void openFileWriting(); | 46 | void openFileWriting(); | ||
47 | void openFileReading(); | 47 | void openFileReading(); | ||
48 | void openFileRead0Bytes(); | 48 | void openFileRead0Bytes(); | ||
49 | void openFileTruncating(); | ||||
49 | 50 | | |||
50 | //void calculateRemainingSeconds(); | 51 | //void calculateRemainingSeconds(); | ||
51 | 52 | | |||
52 | Q_SIGNALS: | 53 | Q_SIGNALS: | ||
53 | void exitLoop(); | 54 | void exitLoop(); | ||
54 | 55 | | |||
55 | protected Q_SLOTS: | 56 | protected Q_SLOTS: | ||
56 | //void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ); | 57 | //void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ); | ||
Show All 11 Lines | |||||
68 | void slotFileJobClose(KIO::Job *job); | 69 | void slotFileJobClose(KIO::Job *job); | ||
69 | 70 | | |||
70 | void slotFileJob2Data(KIO::Job *job, const QByteArray &data); | 71 | void slotFileJob2Data(KIO::Job *job, const QByteArray &data); | ||
71 | void slotFileJob2Redirection(KIO::Job *job, const QUrl &url); | 72 | void slotFileJob2Redirection(KIO::Job *job, const QUrl &url); | ||
72 | void slotFileJob2Mimetype(KIO::Job *job, const QString &type); | 73 | void slotFileJob2Mimetype(KIO::Job *job, const QString &type); | ||
73 | void slotFileJob2Open(KIO::Job *job); | 74 | void slotFileJob2Open(KIO::Job *job); | ||
74 | void slotFileJob2Written(KIO::Job *job, KIO::filesize_t written); | 75 | void slotFileJob2Written(KIO::Job *job, KIO::filesize_t written); | ||
75 | void slotFileJob2Position(KIO::Job *job, KIO::filesize_t offset); | 76 | void slotFileJob2Position(KIO::Job *job, KIO::filesize_t offset); | ||
76 | void slotFileJob2Close(KIO::Job *job); | | |||
77 | 77 | | |||
78 | void slotFileJob3Open(KIO::Job *job); | 78 | void slotFileJob3Open(KIO::Job *job); | ||
79 | void slotFileJob3Position(KIO::Job *job, KIO::filesize_t offset); | 79 | void slotFileJob3Position(KIO::Job *job, KIO::filesize_t offset); | ||
80 | void slotFileJob3Data(KIO::Job *job, const QByteArray &data); | 80 | void slotFileJob3Data(KIO::Job *job, const QByteArray &data); | ||
81 | void slotFileJob3Close(KIO::Job *job); | 81 | | ||
82 | void slotFileJob4Open(KIO::Job *job); | ||||
83 | void slotFileJob4Truncated(KIO::Job *job, KIO::filesize_t length); | ||||
82 | 84 | | |||
83 | private: | 85 | private: | ||
84 | void enterLoop(); | 86 | void enterLoop(); | ||
85 | enum { AlreadyExists = 1 }; | 87 | enum { AlreadyExists = 1 }; | ||
86 | 88 | | |||
87 | int m_result; | 89 | int m_result; | ||
88 | bool m_closeSignalCalled; | 90 | bool m_closeSignalCalled; | ||
91 | QFile m_truncatedFile; | ||||
89 | QByteArray m_data; | 92 | QByteArray m_data; | ||
90 | QStringList m_names; | 93 | QStringList m_names; | ||
91 | int m_dataReqCount; | 94 | int m_dataReqCount; | ||
92 | QString m_mimetype; | 95 | QString m_mimetype; | ||
93 | 96 | | |||
94 | // openReadWrite test | 97 | // openReadWrite test | ||
95 | KIO::FileJob *fileJob; | 98 | KIO::FileJob *fileJob; | ||
96 | int m_rwCount; | 99 | int m_rwCount; | ||
97 | }; | 100 | }; | ||
98 | 101 | | |||
99 | #endif | 102 | #endif |