Changeset View
Changeset View
Standalone View
Standalone View
src/core/statjob.h
Show First 20 Lines • Show All 102 Lines • ▼ Show 20 Line(s) | 99 | #endif | |||
---|---|---|---|---|---|
103 | * Call this in the slot connected to result, | 103 | * Call this in the slot connected to result, | ||
104 | * and only after making sure no error happened. | 104 | * and only after making sure no error happened. | ||
105 | * @return the result of the stat | 105 | * @return the result of the stat | ||
106 | */ | 106 | */ | ||
107 | const UDSEntry &statResult() const; | 107 | const UDSEntry &statResult() const; | ||
108 | 108 | | |||
109 | /** | 109 | /** | ||
110 | * @brief most local URL | 110 | * @brief most local URL | ||
111 | * Call this in the slot connected to result, | 111 | * | ||
112 | * and only after making sure no error happened. | 112 | * Call this in a slot connected to the result signal, and only after making sure no error | ||
113 | * @return the most local URL for the URL we were stat'ing. | 113 | * happened. | ||
114 | * | ||||
115 | * @return the most local URL for the URL we were stat'ing | ||||
114 | * | 116 | * | ||
115 | * Sample usage: | 117 | * Sample usage: | ||
116 | * | 118 | * | ||
117 | * @code | 119 | * @code | ||
118 | * KIO::StatJob* job = KIO::mostLocalUrl("desktop:/foo"); | 120 | * KIO::StatJob *job = KIO::mostLocalUrl("desktop:/foo"); | ||
119 | * job->uiDelegate()->setWindow(this); | 121 | * job->uiDelegate()->setWindow(this); | ||
120 | * connect(job, &KJob::result, this, &MyClass::slotMostLocalUrlResult); | 122 | * connect(job, &KJob::result, this, &MyClass::slotMostLocalUrlResult); | ||
121 | * [...] | 123 | * [...] | ||
122 | * // and in the slot slotMostLocalUrlResult(KJob *job) | 124 | * // and in slotMostLocalUrlResult(KJob *job) | ||
123 | * if (job->error()) { | 125 | * if (job->error()) { | ||
124 | * [...] // doesn't exist | 126 | * [...] // doesn't exist | ||
125 | * } else { | 127 | * } else { | ||
126 | * const QUrl localUrl = job->mostLocalUrl(); | 128 | * const QUrl localUrl = job->mostLocalUrl(); | ||
127 | * // localUrl = file:///$HOME/Desktop/foo | 129 | * // localUrl = file:///$HOME/Desktop/foo | ||
128 | * [...] | 130 | * [...] | ||
129 | * } | 131 | * } | ||
130 | * @endcode | 132 | * @endcode | ||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |