KIO

job_error.cpp
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 David Faure <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-only
6 */
7 
8 #include "job.h"
9 #include "kioglobal_p.h"
10 #include <kprotocolmanager.h>
11 #include <KLocalizedString>
12 #include <KStringHandler>
13 
14 #include <QLocale>
15 #include <QUrl>
16 #include <QDateTime>
17 #include <QDataStream>
18 #include <sys/stat.h> // S_IRUSR etc
19 
20 static const int s_maxFilePathLength = 80;
21 
23 {
25 }
26 
27 KIOCORE_EXPORT QString KIO::buildErrorString(int errorCode, const QString &errorText)
28 {
30 
31  switch (errorCode) {
32  case KIO::ERR_CANNOT_OPEN_FOR_READING:
33  result = i18n("Could not read %1.", errorText);
34  break;
35  case KIO::ERR_CANNOT_OPEN_FOR_WRITING:
36  result = i18n("Could not write to %1.", KStringHandler::csqueeze(errorText, s_maxFilePathLength));
37  break;
38  case KIO::ERR_CANNOT_LAUNCH_PROCESS:
39  result = i18n("Could not start process %1.", errorText);
40  break;
41  case KIO::ERR_INTERNAL:
42  result = i18n("Internal Error\nPlease send a full bug report at https://bugs.kde.org\n%1", errorText);
43  break;
44  case KIO::ERR_MALFORMED_URL:
45  result = i18n("Malformed URL %1.", errorText);
46  break;
47  case KIO::ERR_UNSUPPORTED_PROTOCOL:
48  result = i18n("The protocol %1 is not supported.", errorText);
49  break;
50  case KIO::ERR_NO_SOURCE_PROTOCOL:
51  result = i18n("The protocol %1 is only a filter protocol.", errorText);
52  break;
53  case KIO::ERR_UNSUPPORTED_ACTION:
54  result = errorText;
55 // result = i18n( "Unsupported action %1" ).arg( errorText );
56  break;
58  result = i18n("%1 is a folder, but a file was expected.", errorText);
59  break;
60  case KIO::ERR_IS_FILE:
61  result = i18n("%1 is a file, but a folder was expected.", errorText);
62  break;
63  case KIO::ERR_DOES_NOT_EXIST:
64  result = i18n("The file or folder %1 does not exist.", errorText);
65  break;
66  case KIO::ERR_FILE_ALREADY_EXIST:
67  result = i18n("A file named %1 already exists.", errorText);
68  break;
69  case KIO::ERR_DIR_ALREADY_EXIST:
70  result = i18n("A folder named %1 already exists.", errorText);
71  break;
72  case KIO::ERR_UNKNOWN_HOST:
73  result = errorText.isEmpty() ? i18n("No hostname specified.") : i18n("Unknown host %1", errorText);
74  break;
75  case KIO::ERR_ACCESS_DENIED:
76  result = i18n("Access denied to %1.", errorText);
77  break;
78  case KIO::ERR_WRITE_ACCESS_DENIED:
79  result = i18n("Access denied.\nCould not write to %1.", errorText);
80  break;
81  case KIO::ERR_CANNOT_ENTER_DIRECTORY:
82  result = i18n("Could not enter folder %1.", errorText);
83  break;
84  case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM:
85  result = i18n("The protocol %1 does not implement a folder service.", errorText);
86  break;
87  case KIO::ERR_CYCLIC_LINK:
88  result = i18n("Found a cyclic link in %1.", errorText);
89  break;
90  case KIO::ERR_USER_CANCELED:
91  // Do nothing in this case. The user doesn't need to be told what he just did.
92  break;
93  case KIO::ERR_CYCLIC_COPY:
94  result = i18n("Found a cyclic link while copying %1.", errorText);
95  break;
96  case KIO::ERR_CANNOT_CREATE_SOCKET:
97  result = i18n("Could not create socket for accessing %1.", errorText);
98  break;
99  case KIO::ERR_CANNOT_CONNECT:
100  result = i18n("Could not connect to host %1.", errorText.isEmpty() ? QStringLiteral("localhost") : errorText);
101  break;
102  case KIO::ERR_CONNECTION_BROKEN:
103  result = i18n("Connection to host %1 is broken.", errorText);
104  break;
105  case KIO::ERR_NOT_FILTER_PROTOCOL:
106  result = i18n("The protocol %1 is not a filter protocol.", errorText);
107  break;
108  case KIO::ERR_CANNOT_MOUNT:
109  result = i18n("Could not mount device.\nThe reported error was:\n%1", errorText);
110  break;
111  case KIO::ERR_CANNOT_UNMOUNT:
112  result = i18n("Could not unmount device.\nThe reported error was:\n%1", errorText);
113  break;
114  case KIO::ERR_CANNOT_READ:
115  result = i18n("Could not read file %1.", errorText);
116  break;
117  case KIO::ERR_CANNOT_WRITE:
118  result = i18n("Could not write to file %1.", errorText);
119  break;
120  case KIO::ERR_CANNOT_BIND:
121  result = i18n("Could not bind %1.", errorText);
122  break;
123  case KIO::ERR_CANNOT_LISTEN:
124  result = i18n("Could not listen %1.", errorText);
125  break;
126  case KIO::ERR_CANNOT_ACCEPT:
127  result = i18n("Could not accept %1.", errorText);
128  break;
129  case KIO::ERR_CANNOT_LOGIN:
130  result = errorText;
131  break;
132  case KIO::ERR_CANNOT_STAT:
133  result = i18n("Could not access %1.", errorText);
134  break;
135  case KIO::ERR_CANNOT_CLOSEDIR:
136  result = i18n("Could not terminate listing %1.", errorText);
137  break;
138  case KIO::ERR_CANNOT_MKDIR:
139  result = i18n("Could not make folder %1.", KStringHandler::csqueeze(errorText, s_maxFilePathLength));
140  break;
141  case KIO::ERR_CANNOT_RMDIR:
142  result = i18n("Could not remove folder %1.", errorText);
143  break;
144  case KIO::ERR_CANNOT_RESUME:
145  result = i18n("Could not resume file %1.", errorText);
146  break;
147  case KIO::ERR_CANNOT_RENAME:
148  result = i18n("Could not rename file %1.", KStringHandler::csqueeze(errorText, s_maxFilePathLength));
149  break;
150  case KIO::ERR_CANNOT_CHMOD:
151  result = i18n("Could not change permissions for %1.", errorText);
152  break;
153  case KIO::ERR_CANNOT_CHOWN:
154  result = i18n("Could not change ownership for %1.", errorText);
155  break;
156  case KIO::ERR_CANNOT_DELETE:
157  result = i18n("Could not delete file %1.", errorText);
158  break;
159  case KIO::ERR_SLAVE_DIED:
160  result = i18n("The process for the %1 protocol died unexpectedly.", errorText);
161  break;
162  case KIO::ERR_OUT_OF_MEMORY:
163  result = i18n("Error. Out of memory.\n%1", errorText);
164  break;
165  case KIO::ERR_UNKNOWN_PROXY_HOST:
166  result = i18n("Unknown proxy host\n%1", errorText);
167  break;
168  case KIO::ERR_CANNOT_AUTHENTICATE:
169  result = i18n("Authorization failed, %1 authentication not supported", errorText);
170  break;
171  case KIO::ERR_ABORTED:
172  result = i18n("User canceled action\n%1", errorText);
173  break;
174  case KIO::ERR_INTERNAL_SERVER:
175  result = i18n("Internal error in server\n%1", errorText);
176  break;
177  case KIO::ERR_SERVER_TIMEOUT:
178  result = i18n("Timeout on server\n%1", errorText);
179  break;
180  case KIO::ERR_UNKNOWN:
181  result = i18n("Unknown error\n%1", errorText);
182  break;
183  case KIO::ERR_UNKNOWN_INTERRUPT:
184  result = i18n("Unknown interrupt\n%1", errorText);
185  break;
186  /*
187  case KIO::ERR_CHECKSUM_MISMATCH:
188  if (errorText)
189  result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg(errorText);
190  else
191  result = i18n( "Warning: MD5 Checksum for %1 does not match checksum returned from server" ).arg("document");
192  break;
193  */
194  case KIO::ERR_CANNOT_DELETE_ORIGINAL:
195  result = i18n("Could not delete original file %1.\nPlease check permissions.", errorText);
196  break;
197  case KIO::ERR_CANNOT_DELETE_PARTIAL:
198  result = i18n("Could not delete partial file %1.\nPlease check permissions.", errorText);
199  break;
200  case KIO::ERR_CANNOT_RENAME_ORIGINAL:
201  result = i18n("Could not rename original file %1.\nPlease check permissions.", errorText);
202  break;
203  case KIO::ERR_CANNOT_RENAME_PARTIAL:
204  result = i18n("Could not rename partial file %1.\nPlease check permissions.", errorText);
205  break;
206  case KIO::ERR_CANNOT_SYMLINK:
207  result = i18n("Could not create symlink %1.\nPlease check permissions.", errorText);
208  break;
209  case KIO::ERR_NO_CONTENT:
210  result = errorText;
211  break;
212  case KIO::ERR_DISK_FULL:
213  result = i18n("There is not enough space on the disk to write %1.", errorText);
214  break;
216  result = i18n("The source and destination are the same file.\n%1", errorText);
217  break;
219  result = errorText;
220  break;
222  result = i18n("%1 is required by the server, but is not available.", errorText);
223  break;
225  result = i18n("Access to restricted port in POST denied.");
226  break;
227  case KIO::ERR_POST_NO_SIZE:
228  result = i18n("The required content size information was not provided for a POST operation.");
229  break;
231  result = i18n("A file or folder cannot be dropped onto itself");
232  break;
234  result = i18n("A folder cannot be moved into itself");
235  break;
237  result = i18n("Communication with the local password server failed");
238  break;
240  result = i18n("Unable to create io-slave. %1", errorText);
241  break;
243  result = xi18nc("@info", "Cannot transfer <filename>%1</filename> because it is too large. The destination filesystem only supports files up to 4GiB", errorText);
244  break;
246  result = i18n("Privilege escalation is not necessary because \n'%1' is owned by the current user.\nPlease retry after changing permissions.", errorText);
247  break;
248  default:
249  result = i18n("Unknown error code %1\n%2\nPlease send a full bug report at https://bugs.kde.org.", errorCode, errorText);
250  break;
251  }
252 
253  return result;
254 }
255 
257  int method /*= -1*/) const
258 {
259  QString errorName, techName, description, ret2;
260  QStringList causes, solutions, ret;
261 
262  QByteArray raw = rawErrorDetail(error(), errorText(), reqUrl, method);
263  QDataStream stream(raw);
264 
265  stream >> errorName >> techName >> description >> causes >> solutions;
266 
267  QString url, protocol, datetime;
268  if (reqUrl) {
269  QString prettyUrl;
270  prettyUrl = reqUrl->toDisplayString();
271  url = prettyUrl.toHtmlEscaped();
272  protocol = reqUrl->scheme();
273  } else {
274  url = i18nc("@info url", "(unknown)");
275  }
276 
278 
279  ret << errorName;
280  ret << i18nc("@info %1 error name, %2 description",
281  "<qt><p><b>%1</b></p><p>%2</p></qt>", errorName, description);
282 
283  ret2 = QStringLiteral("<qt>");
284  if (!techName.isEmpty())
285  ret2 += QLatin1String("<p>") + i18n("<b>Technical reason</b>: ") +
286  techName + QLatin1String("</p>");
287  ret2 += QLatin1String("<p>") + i18n("<b>Details of the request</b>:") +
288  QLatin1String("</p><ul>") + i18n("<li>URL: %1</li>", url);
289  if (!protocol.isEmpty()) {
290  ret2 += i18n("<li>Protocol: %1</li>", protocol);
291  }
292  ret2 += i18n("<li>Date and time: %1</li>", datetime) +
293  i18n("<li>Additional information: %1</li>", errorText()) +
294  QLatin1String("</ul>");
295  if (!causes.isEmpty()) {
296  ret2 += QLatin1String("<p>") + i18n("<b>Possible causes</b>:") +
297  QLatin1String("</p><ul><li>") + causes.join(QLatin1String("</li><li>")) +
298  QLatin1String("</li></ul>");
299  }
300  if (!solutions.isEmpty()) {
301  ret2 += QLatin1String("<p>") + i18n("<b>Possible solutions</b>:") +
302  QLatin1String("</p><ul><li>") + solutions.join(QLatin1String("</li><li>")) +
303  QLatin1String("</li></ul>");
304  }
305  ret2 += QLatin1String("</qt>");
306  ret << ret2;
307 
308  return ret;
309 }
310 
311 KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, const QString &errorText,
312  const QUrl *reqUrl /*= 0*/, int /*method = -1*/)
313 {
314  QString url, host, protocol, datetime, domain, path, filename;
315  bool isSlaveNetwork = false;
316  if (reqUrl) {
317  url = reqUrl->toDisplayString();
318  host = reqUrl->host();
319  protocol = reqUrl->scheme();
320 
321  if (host.startsWith(QLatin1String("www."))) {
322  domain = host.mid(4);
323  } else {
324  domain = host;
325  }
326 
327  filename = reqUrl->fileName();
328  path = reqUrl->path();
329 
330  // detect if protocol is a network protocol...
331  if (!protocol.isEmpty()) {
332  isSlaveNetwork = KProtocolInfo::protocolClass(protocol) == QLatin1String(":internet");
333  }
334  } else {
335  // assume that the errorText has the location we are interested in
336  url = host = domain = path = filename = errorText;
337  }
338 
339  if (protocol.isEmpty()) {
340  protocol = i18nc("@info protocol", "(unknown)");
341  }
342 
344 
345  QString errorName, techName, description;
346  QStringList causes, solutions;
347 
348  // c == cause, s == solution
349  QString sSysadmin = i18n("Contact your appropriate computer support system, "
350  "whether the system administrator, or technical support group for further "
351  "assistance.");
352  QString sServeradmin = i18n("Contact the administrator of the server "
353  "for further assistance.");
354  // FIXME active link to permissions dialog
355  QString sAccess = i18n("Check your access permissions on this resource.");
356  QString cAccess = i18n("Your access permissions may be inadequate to "
357  "perform the requested operation on this resource.");
358  QString cLocked = i18n("The file may be in use (and thus locked) by "
359  "another user or application.");
360  QString sQuerylock = i18n("Check to make sure that no other "
361  "application or user is using the file or has locked the file.");
362  QString cHardware = i18n("Although unlikely, a hardware error may have "
363  "occurred.");
364  QString cBug = i18n("You may have encountered a bug in the program.");
365  QString cBuglikely = i18n("This is most likely to be caused by a bug in the "
366  "program. Please consider submitting a full bug report as detailed below.");
367  QString sUpdate = i18n("Update your software to the latest version. "
368  "Your distribution should provide tools to update your software.");
369  QString sBugreport = i18n("When all else fails, please consider helping the "
370  "KDE team or the third party maintainer of this software by submitting a "
371  "high quality bug report. If the software is provided by a third party, "
372  "please contact them directly. Otherwise, first look to see if "
373  "the same bug has been submitted by someone else by searching at the "
374  "<a href=\"https://bugs.kde.org/\">KDE bug reporting website</a>. If not, take "
375  "note of the details given above, and include them in your bug report, along "
376  "with as many other details as you think might help.");
377  QString cNetwork = i18n("There may have been a problem with your network "
378  "connection.");
379  // FIXME netconf kcontrol link
380  QString cNetconf = i18n("There may have been a problem with your network "
381  "configuration. If you have been accessing the Internet with no problems "
382  "recently, this is unlikely.");
383  QString cNetpath = i18n("There may have been a problem at some point along "
384  "the network path between the server and this computer.");
385  QString sTryagain = i18n("Try again, either now or at a later time.");
386  QString cProtocol = i18n("A protocol error or incompatibility may have occurred.");
387  QString sExists = i18n("Ensure that the resource exists, and try again.");
388  QString cExists = i18n("The specified resource may not exist.");
389  QString sTypo = i18n("Double-check that you have entered the correct location "
390  "and try again.");
391  QString sNetwork = i18n("Check your network connection status.");
392 
393  switch (errorCode) {
394  case KIO::ERR_CANNOT_OPEN_FOR_READING:
395  errorName = i18n("Cannot Open Resource For Reading");
396  description = i18n("This means that the contents of the requested file "
397  "or folder <strong>%1</strong> could not be retrieved, as read "
398  "access could not be obtained.", path);
399  causes << i18n("You may not have permissions to read the file or open "
400  "the folder.") << cLocked << cHardware;
401  solutions << sAccess << sQuerylock << sSysadmin;
402  break;
403 
404  case KIO::ERR_CANNOT_OPEN_FOR_WRITING:
405  errorName = i18n("Cannot Open Resource For Writing");
406  description = i18n("This means that the file, <strong>%1</strong>, could "
407  "not be written to as requested, because access with permission to "
408  "write could not be obtained.", KStringHandler::csqueeze(filename, s_maxFilePathLength));
409  causes << cAccess << cLocked << cHardware;
410  solutions << sAccess << sQuerylock << sSysadmin;
411  break;
412 
413  case KIO::ERR_CANNOT_LAUNCH_PROCESS:
414  errorName = i18n("Cannot Launch Process required by the %1 Protocol", protocol);
415  techName = i18n("Unable to Launch Process");
416  description = i18n("The program on your computer which provides access "
417  "to the <strong>%1</strong> protocol could not be found or started. This is "
418  "usually due to technical reasons.", protocol);
419  causes << i18n("The program which provides compatibility with this "
420  "protocol may not have been updated with your last update of KDE. "
421  "This can cause the program to be incompatible with the current version "
422  "and thus not start.") << cBug;
423  solutions << sUpdate << sSysadmin;
424  break;
425 
426  case KIO::ERR_INTERNAL:
427  errorName = i18n("Internal Error");
428  description = i18n("The program on your computer which provides access "
429  "to the <strong>%1</strong> protocol has reported an internal error.",
430  protocol);
431  causes << cBuglikely;
432  solutions << sUpdate << sBugreport;
433  break;
434 
435  case KIO::ERR_MALFORMED_URL:
436  errorName = i18n("Improperly Formatted URL");
437  description = i18n("The <strong>U</strong>niform <strong>R</strong>esource "
438  "<strong>L</strong>ocator (URL) that you entered was not properly "
439  "formatted. The format of a URL is generally as follows:"
440  "<blockquote><strong>protocol://user:[email protected]:port/folder/"
441  "filename.extension?query=value</strong></blockquote>");
442  solutions << sTypo;
443  break;
444 
445  case KIO::ERR_UNSUPPORTED_PROTOCOL:
446  errorName = i18n("Unsupported Protocol %1", protocol);
447  description = i18n("The protocol <strong>%1</strong> is not supported "
448  "by the KDE programs currently installed on this computer.",
449  protocol);
450  causes << i18n("The requested protocol may not be supported.")
451  << i18n("The versions of the %1 protocol supported by this computer and "
452  "the server may be incompatible.", protocol);
453  solutions << i18n("You may perform a search on the Internet for a KDE "
454  "program (called a kioslave or ioslave) which supports this protocol. "
455  "Places to search include <a href=\"https://kde-apps.org/\">"
456  "https://kde-apps.org/</a> and <a href=\"http://freshmeat.net/\">"
457  "http://freshmeat.net/</a>.")
458  << sUpdate << sSysadmin;
459  break;
460 
461  case KIO::ERR_NO_SOURCE_PROTOCOL:
462  errorName = i18n("URL Does Not Refer to a Resource.");
463  techName = i18n("Protocol is a Filter Protocol");
464  description = i18n("The <strong>U</strong>niform <strong>R</strong>esource "
465  "<strong>L</strong>ocator (URL) that you entered did not refer to a "
466  "specific resource.");
467  causes << i18n("KDE is able to communicate through a protocol within a "
468  "protocol; the protocol specified is only for use in such situations, "
469  "however this is not one of these situations. This is a rare event, and "
470  "is likely to indicate a programming error.");
471  solutions << sTypo;
472  break;
473 
474  case KIO::ERR_UNSUPPORTED_ACTION:
475  errorName = i18n("Unsupported Action: %1", errorText);
476  description = i18n("The requested action is not supported by the KDE "
477  "program which is implementing the <strong>%1</strong> protocol.",
478  protocol);
479  causes << i18n("This error is very much dependent on the KDE program. The "
480  "additional information should give you more information than is available "
481  "to the KDE input/output architecture.");
482  solutions << i18n("Attempt to find another way to accomplish the same "
483  "outcome.");
484  break;
485 
487  errorName = i18n("File Expected");
488  description = i18n("The request expected a file, however the "
489  "folder <strong>%1</strong> was found instead.", path);
490  causes << i18n("This may be an error on the server side.") << cBug;
491  solutions << sUpdate << sSysadmin;
492  break;
493 
494  case KIO::ERR_IS_FILE:
495  errorName = i18n("Folder Expected");
496  description = i18n("The request expected a folder, however "
497  "the file <strong>%1</strong> was found instead.", filename);
498  causes << cBug;
499  solutions << sUpdate << sSysadmin;
500  break;
501 
502  case KIO::ERR_DOES_NOT_EXIST:
503  errorName = i18n("File or Folder Does Not Exist");
504  description = i18n("The specified file or folder <strong>%1</strong> "
505  "does not exist.", path);
506  causes << cExists;
507  solutions << sExists;
508  break;
509 
510  case KIO::ERR_FILE_ALREADY_EXIST:
511  errorName = i18n("File Already Exists");
512  description = i18n("The requested file could not be created because a "
513  "file with the same name already exists.");
514  solutions << i18n("Try moving the current file out of the way first, "
515  "and then try again.")
516  << i18n("Delete the current file and try again.")
517  << i18n("Choose an alternate filename for the new file.");
518  break;
519 
520  case KIO::ERR_DIR_ALREADY_EXIST:
521  errorName = i18n("Folder Already Exists");
522  description = i18n("The requested folder could not be created because "
523  "a folder with the same name already exists.");
524  solutions << i18n("Try moving the current folder out of the way first, "
525  "and then try again.")
526  << i18n("Delete the current folder and try again.")
527  << i18n("Choose an alternate name for the new folder.");
528  break;
529 
530  case KIO::ERR_UNKNOWN_HOST:
531  errorName = i18n("Unknown Host");
532  description = i18n("An unknown host error indicates that the server with "
533  "the requested name, <strong>%1</strong>, could not be "
534  "located on the Internet.", host);
535  causes << i18n("The name that you typed, %1, may not exist: it may be "
536  "incorrectly typed.", host)
537  << cNetwork << cNetconf;
538  solutions << sNetwork << sSysadmin;
539  break;
540 
541  case KIO::ERR_ACCESS_DENIED:
542  errorName = i18n("Access Denied");
543  description = i18n("Access was denied to the specified resource, "
544  "<strong>%1</strong>.", url);
545  causes << i18n("You may have supplied incorrect authentication details or "
546  "none at all.")
547  << i18n("Your account may not have permission to access the "
548  "specified resource.");
549  solutions << i18n("Retry the request and ensure your authentication details "
550  "are entered correctly.") << sSysadmin;
551  if (!isSlaveNetwork) {
552  solutions << sServeradmin;
553  }
554  break;
555 
556  case KIO::ERR_WRITE_ACCESS_DENIED:
557  errorName = i18n("Write Access Denied");
558  description = i18n("This means that an attempt to write to the file "
559  "<strong>%1</strong> was rejected.", filename);
560  causes << cAccess << cLocked << cHardware;
561  solutions << sAccess << sQuerylock << sSysadmin;
562  break;
563 
564  case KIO::ERR_CANNOT_ENTER_DIRECTORY:
565  errorName = i18n("Unable to Enter Folder");
566  description = i18n("This means that an attempt to enter (in other words, "
567  "to open) the requested folder <strong>%1</strong> was rejected.",
568  path);
569  causes << cAccess << cLocked;
570  solutions << sAccess << sQuerylock << sSysadmin;
571  break;
572 
573  case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM:
574  errorName = i18n("Folder Listing Unavailable");
575  techName = i18n("Protocol %1 is not a Filesystem", protocol);
576  description = i18n("This means that a request was made which requires "
577  "determining the contents of the folder, and the KDE program supporting "
578  "this protocol is unable to do so.");
579  causes << cBug;
580  solutions << sUpdate << sBugreport;
581  break;
582 
583  case KIO::ERR_CYCLIC_LINK:
584  errorName = i18n("Cyclic Link Detected");
585  description = i18n("UNIX environments are commonly able to link a file or "
586  "folder to a separate name and/or location. KDE detected a link or "
587  "series of links that results in an infinite loop - i.e. the file was "
588  "(perhaps in a roundabout way) linked to itself.");
589  solutions << i18n("Delete one part of the loop in order that it does not "
590  "cause an infinite loop, and try again.") << sSysadmin;
591  break;
592 
593  case KIO::ERR_USER_CANCELED:
594  // Do nothing in this case. The user doesn't need to be told what he just did.
595  // rodda: However, if we have been called, an application is about to display
596  // this information anyway. If we don't return sensible information, the
597  // user sees a blank dialog (I have seen this myself)
598  errorName = i18n("Request Aborted By User");
599  description = i18n("The request was not completed because it was "
600  "aborted.");
601  solutions << i18n("Retry the request.");
602  break;
603 
604  case KIO::ERR_CYCLIC_COPY:
605  errorName = i18n("Cyclic Link Detected During Copy");
606  description = i18n("UNIX environments are commonly able to link a file or "
607  "folder to a separate name and/or location. During the requested copy "
608  "operation, KDE detected a link or series of links that results in an "
609  "infinite loop - i.e. the file was (perhaps in a roundabout way) linked "
610  "to itself.");
611  solutions << i18n("Delete one part of the loop in order that it does not "
612  "cause an infinite loop, and try again.") << sSysadmin;
613  break;
614 
615  case KIO::ERR_CANNOT_CREATE_SOCKET:
616  errorName = i18n("Could Not Create Network Connection");
617  techName = i18n("Could Not Create Socket");
618  description = i18n("This is a fairly technical error in which a required "
619  "device for network communications (a socket) could not be created.");
620  causes << i18n("The network connection may be incorrectly configured, or "
621  "the network interface may not be enabled.");
622  solutions << sNetwork << sSysadmin;
623  break;
624 
625  case KIO::ERR_CANNOT_CONNECT:
626  errorName = i18n("Connection to Server Refused");
627  description = i18n("The server <strong>%1</strong> refused to allow this "
628  "computer to make a connection.", host);
629  causes << i18n("The server, while currently connected to the Internet, "
630  "may not be configured to allow requests.")
631  << i18n("The server, while currently connected to the Internet, "
632  "may not be running the requested service (%1).", protocol)
633  << i18n("A network firewall (a device which restricts Internet "
634  "requests), either protecting your network or the network of the server, "
635  "may have intervened, preventing this request.");
636  solutions << sTryagain << sServeradmin << sSysadmin;
637  break;
638 
639  case KIO::ERR_CONNECTION_BROKEN:
640  errorName = i18n("Connection to Server Closed Unexpectedly");
641  description = i18n("Although a connection was established to "
642  "<strong>%1</strong>, the connection was closed at an unexpected point "
643  "in the communication.", host);
644  causes << cNetwork << cNetpath << i18n("A protocol error may have occurred, "
645  "causing the server to close the connection as a response to the error.");
646  solutions << sTryagain << sServeradmin << sSysadmin;
647  break;
648 
649  case KIO::ERR_NOT_FILTER_PROTOCOL:
650  errorName = i18n("URL Resource Invalid");
651  techName = i18n("Protocol %1 is not a Filter Protocol", protocol);
652  description = i18n("The <strong>U</strong>niform <strong>R</strong>esource "
653  "<strong>L</strong>ocator (URL) that you entered did not refer to "
654  "a valid mechanism of accessing the specific resource, "
655  "<strong>%1%2</strong>.",
656  !host.isNull() ? host + QLatin1Char('/') : QString(), path);
657  causes << i18n("KDE is able to communicate through a protocol within a "
658  "protocol. This request specified a protocol be used as such, however "
659  "this protocol is not capable of such an action. This is a rare event, "
660  "and is likely to indicate a programming error.");
661  solutions << sTypo << sSysadmin;
662  break;
663 
664  case KIO::ERR_CANNOT_MOUNT:
665  errorName = i18n("Unable to Initialize Input/Output Device");
666  techName = i18n("Could Not Mount Device");
667  description = i18n("The requested device could not be initialized "
668  "(\"mounted\"). The reported error was: <strong>%1</strong>",
669  errorText);
670  causes << i18n("The device may not be ready, for example there may be "
671  "no media in a removable media device (i.e. no CD-ROM in a CD drive), "
672  "or in the case of a peripheral/portable device, the device may not "
673  "be correctly connected.")
674  << i18n("You may not have permissions to initialize (\"mount\") the "
675  "device. On UNIX systems, often system administrator privileges are "
676  "required to initialize a device.")
677  << cHardware;
678  solutions << i18n("Check that the device is ready; removable drives "
679  "must contain media, and portable devices must be connected and powered "
680  "on.; and try again.") << sAccess << sSysadmin;
681  break;
682 
683  case KIO::ERR_CANNOT_UNMOUNT:
684  errorName = i18n("Unable to Uninitialize Input/Output Device");
685  techName = i18n("Could Not Unmount Device");
686  description = i18n("The requested device could not be uninitialized "
687  "(\"unmounted\"). The reported error was: <strong>%1</strong>",
688  errorText);
689  causes << i18n("The device may be busy, that is, still in use by "
690  "another application or user. Even such things as having an open "
691  "browser window on a location on this device may cause the device to "
692  "remain in use.")
693  << i18n("You may not have permissions to uninitialize (\"unmount\") "
694  "the device. On UNIX systems, system administrator privileges are "
695  "often required to uninitialize a device.")
696  << cHardware;
697  solutions << i18n("Check that no applications are accessing the device, "
698  "and try again.") << sAccess << sSysadmin;
699  break;
700 
701  case KIO::ERR_CANNOT_READ:
702  errorName = i18n("Cannot Read From Resource");
703  description = i18n("This means that although the resource, "
704  "<strong>%1</strong>, was able to be opened, an error occurred while "
705  "reading the contents of the resource.", url);
706  causes << i18n("You may not have permissions to read from the resource.");
707  if (!isSlaveNetwork) {
708  causes << cNetwork;
709  }
710  causes << cHardware;
711  solutions << sAccess;
712  if (!isSlaveNetwork) {
713  solutions << sNetwork;
714  }
715  solutions << sSysadmin;
716  break;
717 
718  case KIO::ERR_CANNOT_WRITE:
719  errorName = i18n("Cannot Write to Resource");
720  description = i18n("This means that although the resource, <strong>%1</strong>"
721  ", was able to be opened, an error occurred while writing to the resource.",
722  url);
723  causes << i18n("You may not have permissions to write to the resource.");
724  if (!isSlaveNetwork) {
725  causes << cNetwork;
726  }
727  causes << cHardware;
728  solutions << sAccess;
729  if (!isSlaveNetwork) {
730  solutions << sNetwork;
731  }
732  solutions << sSysadmin;
733  break;
734 
735  case KIO::ERR_CANNOT_BIND:
736  errorName = i18n("Could Not Listen for Network Connections");
737  techName = i18n("Could Not Bind");
738  description = i18n("This is a fairly technical error in which a required "
739  "device for network communications (a socket) could not be established "
740  "to listen for incoming network connections.");
741  causes << i18n("The network connection may be incorrectly configured, or "
742  "the network interface may not be enabled.");
743  solutions << sNetwork << sSysadmin;
744  break;
745 
746  case KIO::ERR_CANNOT_LISTEN:
747  errorName = i18n("Could Not Listen for Network Connections");
748  techName = i18n("Could Not Listen");
749  description = i18n("This is a fairly technical error in which a required "
750  "device for network communications (a socket) could not be established "
751  "to listen for incoming network connections.");
752  causes << i18n("The network connection may be incorrectly configured, or "
753  "the network interface may not be enabled.");
754  solutions << sNetwork << sSysadmin;
755  break;
756 
757  case KIO::ERR_CANNOT_ACCEPT:
758  errorName = i18n("Could Not Accept Network Connection");
759  description = i18n("This is a fairly technical error in which an error "
760  "occurred while attempting to accept an incoming network connection.");
761  causes << i18n("The network connection may be incorrectly configured, or "
762  "the network interface may not be enabled.")
763  << i18n("You may not have permissions to accept the connection.");
764  solutions << sNetwork << sSysadmin;
765  break;
766 
767  case KIO::ERR_CANNOT_LOGIN:
768  errorName = i18n("Could Not Login: %1", errorText);
769  description = i18n("An attempt to login to perform the requested "
770  "operation was unsuccessful.");
771  causes << i18n("You may have supplied incorrect authentication details or "
772  "none at all.")
773  << i18n("Your account may not have permission to access the "
774  "specified resource.") << cProtocol;
775  solutions << i18n("Retry the request and ensure your authentication details "
776  "are entered correctly.") << sServeradmin << sSysadmin;
777  break;
778 
779  case KIO::ERR_CANNOT_STAT:
780  errorName = i18n("Could Not Determine Resource Status");
781  techName = i18n("Could Not Stat Resource");
782  description = i18n("An attempt to determine information about the status "
783  "of the resource <strong>%1</strong>, such as the resource name, type, "
784  "size, etc., was unsuccessful.", url);
785  causes << i18n("The specified resource may not have existed or may "
786  "not be accessible.") << cProtocol << cHardware;
787  solutions << i18n("Retry the request and ensure your authentication details "
788  "are entered correctly.") << sSysadmin;
789  break;
790 
791  case KIO::ERR_CANNOT_CLOSEDIR:
792  //result = i18n( "Could not terminate listing %1" ).arg( errorText );
793  errorName = i18n("Could Not Cancel Listing");
794  techName = i18n("FIXME: Document this");
795  break;
796 
797  case KIO::ERR_CANNOT_MKDIR:
798  errorName = i18n("Could Not Create Folder");
799  description = i18n("An attempt to create the requested folder failed.");
800  causes << cAccess << i18n("The location where the folder was to be created "
801  "may not exist.");
802  if (!isSlaveNetwork) {
803  causes << cProtocol;
804  }
805  solutions << i18n("Retry the request.") << sAccess;
806  break;
807 
808  case KIO::ERR_CANNOT_RMDIR:
809  errorName = i18n("Could Not Remove Folder");
810  description = i18n("An attempt to remove the specified folder, "
811  "<strong>%1</strong>, failed.", path);
812  causes << i18n("The specified folder may not exist.")
813  << i18n("The specified folder may not be empty.")
814  << cAccess;
815  if (!isSlaveNetwork) {
816  causes << cProtocol;
817  }
818  solutions << i18n("Ensure that the folder exists and is empty, and try "
819  "again.") << sAccess;
820  break;
821 
822  case KIO::ERR_CANNOT_RESUME:
823  errorName = i18n("Could Not Resume File Transfer");
824  description = i18n("The specified request asked that the transfer of "
825  "file <strong>%1</strong> be resumed at a certain point of the "
826  "transfer. This was not possible.", filename);
827  causes << i18n("The protocol, or the server, may not support file "
828  "resuming.");
829  solutions << i18n("Retry the request without attempting to resume "
830  "transfer.");
831  break;
832 
833  case KIO::ERR_CANNOT_RENAME:
834  errorName = i18n("Could Not Rename Resource");
835  description = i18n("An attempt to rename the specified resource "
836  "<strong>%1</strong> failed.", KStringHandler::csqueeze(url, s_maxFilePathLength));
837  causes << cAccess << cExists;
838  if (!isSlaveNetwork) {
839  causes << cProtocol;
840  }
841  solutions << sAccess << sExists;
842  break;
843 
844  case KIO::ERR_CANNOT_CHMOD:
845  errorName = i18n("Could Not Alter Permissions of Resource");
846  description = i18n("An attempt to alter the permissions on the specified "
847  "resource <strong>%1</strong> failed.", url);
848  causes << cAccess << cExists;
849  solutions << sAccess << sExists;
850  break;
851 
852  case KIO::ERR_CANNOT_CHOWN:
853  errorName = i18n("Could Not Change Ownership of Resource");
854  description = i18n("An attempt to change the ownership of the specified "
855  "resource <strong>%1</strong> failed.", url);
856  causes << cAccess << cExists;
857  solutions << sAccess << sExists;
858  break;
859 
860  case KIO::ERR_CANNOT_DELETE:
861  errorName = i18n("Could Not Delete Resource");
862  description = i18n("An attempt to delete the specified resource "
863  "<strong>%1</strong> failed.", url);
864  causes << cAccess << cExists;
865  solutions << sAccess << sExists;
866  break;
867 
868  case KIO::ERR_SLAVE_DIED:
869  errorName = i18n("Unexpected Program Termination");
870  description = i18n("The program on your computer which provides access "
871  "to the <strong>%1</strong> protocol has unexpectedly terminated.",
872  url);
873  causes << cBuglikely;
874  solutions << sUpdate << sBugreport;
875  break;
876 
877  case KIO::ERR_OUT_OF_MEMORY:
878  errorName = i18n("Out of Memory");
879  description = i18n("The program on your computer which provides access "
880  "to the <strong>%1</strong> protocol could not obtain the memory "
881  "required to continue.", protocol);
882  causes << cBuglikely;
883  solutions << sUpdate << sBugreport;
884  break;
885 
886  case KIO::ERR_UNKNOWN_PROXY_HOST:
887  errorName = i18n("Unknown Proxy Host");
888  description = i18n("While retrieving information about the specified "
889  "proxy host, <strong>%1</strong>, an Unknown Host error was encountered. "
890  "An unknown host error indicates that the requested name could not be "
891  "located on the Internet.", errorText);
892  causes << i18n("There may have been a problem with your network "
893  "configuration, specifically your proxy's hostname. If you have been "
894  "accessing the Internet with no problems recently, this is unlikely.")
895  << cNetwork;
896  solutions << i18n("Double-check your proxy settings and try again.")
897  << sSysadmin;
898  break;
899 
900  case KIO::ERR_CANNOT_AUTHENTICATE:
901  errorName = i18n("Authentication Failed: Method %1 Not Supported",
902  errorText);
903  description = i18n("Although you may have supplied the correct "
904  "authentication details, the authentication failed because the "
905  "method that the server is using is not supported by the KDE "
906  "program implementing the protocol %1.", protocol);
907  solutions << i18n("Please file a bug at <a href=\"https://bugs.kde.org/\">"
908  "https://bugs.kde.org/</a> to inform the KDE team of the unsupported "
909  "authentication method.") << sSysadmin;
910  break;
911 
912  case KIO::ERR_ABORTED:
913  errorName = i18n("Request Aborted");
914  description = i18n("The request was not completed because it was "
915  "aborted.");
916  solutions << i18n("Retry the request.");
917  break;
918 
919  case KIO::ERR_INTERNAL_SERVER:
920  errorName = i18n("Internal Error in Server");
921  description = i18n("The program on the server which provides access "
922  "to the <strong>%1</strong> protocol has reported an internal error: "
923  "%2.", protocol, errorText);
924  causes << i18n("This is most likely to be caused by a bug in the "
925  "server program. Please consider submitting a full bug report as "
926  "detailed below.");
927  solutions << i18n("Contact the administrator of the server "
928  "to advise them of the problem.")
929  << i18n("If you know who the authors of the server software are, "
930  "submit the bug report directly to them.");
931  break;
932 
933  case KIO::ERR_SERVER_TIMEOUT:
934  errorName = i18n("Timeout Error");
935  description = i18n("Although contact was made with the server, a "
936  "response was not received within the amount of time allocated for "
937  "the request as follows:<ul>"
938  "<li>Timeout for establishing a connection: %1 seconds</li>"
939  "<li>Timeout for receiving a response: %2 seconds</li>"
940  "<li>Timeout for accessing proxy servers: %3 seconds</li></ul>"
941  "Please note that you can alter these timeout settings in the KDE "
942  "System Settings, by selecting Network Settings -> Connection Preferences.",
946  causes << cNetpath << i18n("The server was too busy responding to other "
947  "requests to respond.");
948  solutions << sTryagain << sServeradmin;
949  break;
950 
951  case KIO::ERR_UNKNOWN:
952  errorName = i18n("Unknown Error");
953  description = i18n("The program on your computer which provides access "
954  "to the <strong>%1</strong> protocol has reported an unknown error: "
955  "%2.", protocol, errorText);
956  causes << cBug;
957  solutions << sUpdate << sBugreport;
958  break;
959 
960  case KIO::ERR_UNKNOWN_INTERRUPT:
961  errorName = i18n("Unknown Interruption");
962  description = i18n("The program on your computer which provides access "
963  "to the <strong>%1</strong> protocol has reported an interruption of "
964  "an unknown type: %2.", protocol, errorText);
965  causes << cBug;
966  solutions << sUpdate << sBugreport;
967  break;
968 
969  case KIO::ERR_CANNOT_DELETE_ORIGINAL:
970  errorName = i18n("Could Not Delete Original File");
971  description = i18n("The requested operation required the deleting of "
972  "the original file, most likely at the end of a file move operation. "
973  "The original file <strong>%1</strong> could not be deleted.",
974  errorText);
975  causes << cAccess;
976  solutions << sAccess;
977  break;
978 
979  case KIO::ERR_CANNOT_DELETE_PARTIAL:
980  errorName = i18n("Could Not Delete Temporary File");
981  description = i18n("The requested operation required the creation of "
982  "a temporary file in which to save the new file while being "
983  "downloaded. This temporary file <strong>%1</strong> could not be "
984  "deleted.", errorText);
985  causes << cAccess;
986  solutions << sAccess;
987  break;
988 
989  case KIO::ERR_CANNOT_RENAME_ORIGINAL:
990  errorName = i18n("Could Not Rename Original File");
991  description = i18n("The requested operation required the renaming of "
992  "the original file <strong>%1</strong>, however it could not be "
993  "renamed.", errorText);
994  causes << cAccess;
995  solutions << sAccess;
996  break;
997 
998  case KIO::ERR_CANNOT_RENAME_PARTIAL:
999  errorName = i18n("Could Not Rename Temporary File");
1000  description = i18n("The requested operation required the creation of "
1001  "a temporary file <strong>%1</strong>, however it could not be "
1002  "created.", errorText);
1003  causes << cAccess;
1004  solutions << sAccess;
1005  break;
1006 
1007  case KIO::ERR_CANNOT_SYMLINK:
1008  errorName = i18n("Could Not Create Link");
1009  techName = i18n("Could Not Create Symbolic Link");
1010  description = i18n("The requested symbolic link %1 could not be created.",
1011  errorText);
1012  causes << cAccess;
1013  solutions << sAccess;
1014  break;
1015 
1016  case KIO::ERR_NO_CONTENT:
1017  errorName = i18n("No Content");
1018  description = errorText;
1019  break;
1020 
1021  case KIO::ERR_DISK_FULL:
1022  errorName = i18n("Disk Full");
1023  description = i18n("The requested file <strong>%1</strong> could not be "
1024  "written to as there is inadequate disk space.", errorText);
1025  solutions << i18n("Free up enough disk space by 1) deleting unwanted and "
1026  "temporary files; 2) archiving files to removable media storage such as "
1027  "CD-Recordable discs; or 3) obtain more storage capacity.")
1028  << sSysadmin;
1029  break;
1030 
1032  errorName = i18n("Source and Destination Files Identical");
1033  description = i18n("The operation could not be completed because the "
1034  "source and destination files are the same file.");
1035  solutions << i18n("Choose a different filename for the destination file.");
1036  break;
1037 
1039  errorName = i18n("File or Folder dropped onto itself");
1040  description = i18n("The operation could not be completed because the "
1041  "source and destination file or folder are the same.");
1042  solutions << i18n("Drop the item into a different file or folder.");
1043  break;
1044 
1045  // We assume that the slave has all the details
1047  errorName.clear();
1048  description = errorText;
1049  break;
1050 
1052  errorName = i18n("Folder moved into itself");
1053  description = i18n("The operation could not be completed because the "
1054  "source can not be moved into itself.");
1055  solutions << i18n("Move the item into a different folder.");
1056  break;
1057 
1059  errorName = i18n("Could not communicate with password server");
1060  description = i18n("The operation could not be completed because the "
1061  "service for requesting passwords (kpasswdserver) couldn't be contacted");
1062  solutions << i18n("Try restarting your session, or look in the logs for errors from kiod.");
1063  break;
1064 
1066  errorName = i18n("Cannot Initiate the %1 Protocol", protocol);
1067  techName = i18n("Unable to Create io-slave");
1068  description = i18n("The io-slave which provides access "
1069  "to the <strong>%1</strong> protocol could not be started. This is "
1070  "usually due to technical reasons.", protocol);
1071  causes << i18n("klauncher could not find or start the plugin which provides the protocol."
1072  "This means you may have an outdated version of the plugin.");
1073  solutions << sUpdate << sSysadmin;
1074  break;
1075 
1077  errorName = xi18nc("@info", "Cannot transfer <filename>%1</filename>", errorText);
1078  description = xi18nc("@info", "The file <filename>%1</filename> cannot be transferred,"
1079  " because the destination filesystem does not support files that large", errorText);
1080  solutions << i18n("Reformat the destination drive to use a filesystem that supports files that large.");
1081  break;
1082 
1083  default:
1084  // fall back to the plain error...
1085  errorName = i18n("Undocumented Error");
1086  description = buildErrorString(errorCode, errorText);
1087  }
1088 
1089  QByteArray ret;
1090  QDataStream stream(&ret, QIODevice::WriteOnly);
1091  stream << errorName << techName << description << causes << solutions;
1092  return ret;
1093 }
1094 
1096 {
1097  QFile::Permissions qPermissions;
1098 
1099  if (permissions > 0) {
1100  if (permissions & S_IRUSR) {
1101  qPermissions |= QFile::ReadOwner;
1102  }
1103  if (permissions & S_IWUSR) {
1104  qPermissions |= QFile::WriteOwner;
1105  }
1106  if (permissions & S_IXUSR) {
1107  qPermissions |= QFile::ExeOwner;
1108  }
1109 
1110  if (permissions & S_IRGRP) {
1111  qPermissions |= QFile::ReadGroup;
1112  }
1113  if (permissions & S_IWGRP) {
1114  qPermissions |= QFile::WriteGroup;
1115  }
1116  if (permissions & S_IXGRP) {
1117  qPermissions |= QFile::ExeGroup;
1118  }
1119 
1120  if (permissions & S_IROTH) {
1121  qPermissions |= QFile::ReadOther;
1122  }
1123  if (permissions & S_IWOTH) {
1124  qPermissions |= QFile::WriteOther;
1125  }
1126  if (permissions & S_IXOTH) {
1127  qPermissions |= QFile::ExeOther;
1128  }
1129  }
1130 
1131  return qPermissions;
1132 }
1133 
QString toDisplayString(QUrl::FormattingOptions options) const const
for slave specified errors that can be
Definition: global.h:253
QString toString(qlonglong i) const const
A transport upgrade is required to access this.
Definition: global.h:259
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
QString host(QUrl::ComponentFormattingOptions options) const const
used by file ioslave,
Definition: global.h:277
void description(KJob *job, const QString &title, const QPair< QString, QString > &field1=QPair< QString, QString >(), const QPair< QString, QString > &field2=QPair< QString, QString >())
QString join(const QString &separator) const const
bool isNull() const const
void clear()
KIOCORE_EXPORT QByteArray rawErrorDetail(int errorCode, const QString &errorText, const QUrl *reqUrl=nullptr, int method=-1)
Returns translated error details for errorCode using the additional error information provided by err...
Definition: job_error.cpp:311
static int responseTimeout()
Returns the preferred response timeout value for remote connecting in seconds.
QString errorString() const override
Converts an error code and a non-i18n error message into an error message in the current language...
Definition: job_error.cpp:22
QString i18nc(const char *context, const char *text, const TYPE &arg...)
bool isEmpty() const const
bool isEmpty() const const
used by Slave::createSlave,
Definition: global.h:274
... where a file was expected
Definition: global.h:153
QStringList detailedErrorStrings(const QUrl *reqUrl=nullptr, int method=-1) const
Converts an error code and a non-i18n error message into i18n strings suitable for presentation in a ...
Definition: job_error.cpp:256
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
KIOCORE_EXPORT QString buildErrorString(int errorCode, const QString &errorText)
Returns a translated error message for errorCode using the additional error information provided by e...
Definition: job_error.cpp:27
QString path(QUrl::ComponentFormattingOptions options) const const
returned by SlaveBase::openPasswordDialogV2,
Definition: global.h:273
KCOREADDONS_EXPORT QString csqueeze(const QString &str, int maxlen=40)
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
src==dest when moving/copying
Definition: global.h:252
static int connectTimeout()
Returns the preferred timeout value for remote connections in seconds.
QString scheme() const const
QString toHtmlEscaped() const const
emitted by KIO::move,
Definition: global.h:272
QString i18n(const char *text, const TYPE &arg...)
... where a directory was expected (e.g. listing)
Definition: global.h:154
QDateTime currentDateTime()
QString mid(int position, int n) const const
Action succeeded but no content will follow.
Definition: global.h:250
static int proxyConnectTimeout()
Returns the preferred timeout value for proxy connections in seconds.
from KIO::DropJob,
Definition: global.h:271
typedef Permissions
Action got aborted from application side.
Definition: global.h:237
Issued when trying to POST data to a certain Ports.
Definition: global.h:262
void result(KJob *job)
QString fileName(QUrl::ComponentFormattingOptions options) const const
QString errorText() const
KIOCORE_EXPORT QFile::Permissions convertPermissions(int permissions)
Converts KIO file permissions from mode_t to QFile::Permissions format.
Definition: job_error.cpp:1095
int error() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed Jan 20 2021 23:05:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.