9 #include "kioglobal_p.h"
10 #include <KLocalizedString>
11 #include <KStringHandler>
12 #include <kprotocolmanager.h>
14 #include <QDataStream>
20 static const int s_maxFilePathLength = 80;
32 case KIO::ERR_CANNOT_OPEN_FOR_READING:
33 result =
i18n(
"Could not read %1.", errorText);
35 case KIO::ERR_CANNOT_OPEN_FOR_WRITING:
38 case KIO::ERR_CANNOT_LAUNCH_PROCESS:
39 result =
i18n(
"Could not start process %1.", errorText);
41 case KIO::ERR_INTERNAL:
42 result =
i18n(
"Internal Error\nPlease send a full bug report at https://bugs.kde.org\n%1", errorText);
44 case KIO::ERR_MALFORMED_URL:
45 result =
i18n(
"Malformed URL %1.", errorText);
47 case KIO::ERR_UNSUPPORTED_PROTOCOL:
48 result =
i18n(
"The protocol %1 is not supported.", errorText);
50 case KIO::ERR_NO_SOURCE_PROTOCOL:
51 result =
i18n(
"The protocol %1 is only a filter protocol.", errorText);
53 case KIO::ERR_UNSUPPORTED_ACTION:
58 result =
i18n(
"%1 is a folder, but a file was expected.", errorText);
61 result =
i18n(
"%1 is a file, but a folder was expected.", errorText);
63 case KIO::ERR_DOES_NOT_EXIST:
64 result =
i18n(
"The file or folder %1 does not exist.", errorText);
66 case KIO::ERR_FILE_ALREADY_EXIST:
67 result =
i18n(
"A file named %1 already exists.", errorText);
69 case KIO::ERR_DIR_ALREADY_EXIST:
70 result =
i18n(
"A folder named %1 already exists.", errorText);
72 case KIO::ERR_UNKNOWN_HOST:
73 result = errorText.
isEmpty() ?
i18n(
"No hostname specified.") :
i18n(
"Unknown host %1", errorText);
75 case KIO::ERR_ACCESS_DENIED:
76 result =
i18n(
"Access denied to %1.", errorText);
78 case KIO::ERR_WRITE_ACCESS_DENIED:
79 result =
i18n(
"Access denied.\nCould not write to %1.", errorText);
81 case KIO::ERR_CANNOT_ENTER_DIRECTORY:
82 result =
i18n(
"Could not enter folder %1.", errorText);
84 case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM:
85 result =
i18n(
"The protocol %1 does not implement a folder service.", errorText);
87 case KIO::ERR_CYCLIC_LINK:
88 result =
i18n(
"Found a cyclic link in %1.", errorText);
90 case KIO::ERR_CYCLIC_COPY:
91 result =
i18n(
"Found a cyclic link while copying %1.", errorText);
93 case KIO::ERR_CANNOT_CREATE_SOCKET:
94 result =
i18n(
"Could not create socket for accessing %1.", errorText);
96 case KIO::ERR_CANNOT_CONNECT:
97 result =
i18n(
"Could not connect to host %1.", errorText.
isEmpty() ? QStringLiteral(
"localhost") : errorText);
99 case KIO::ERR_CONNECTION_BROKEN:
100 result =
i18n(
"Connection to host %1 is broken.", errorText);
102 case KIO::ERR_NOT_FILTER_PROTOCOL:
103 result =
i18n(
"The protocol %1 is not a filter protocol.", errorText);
105 case KIO::ERR_CANNOT_MOUNT:
106 result =
i18n(
"Could not mount device.\nThe reported error was:\n%1", errorText);
108 case KIO::ERR_CANNOT_UNMOUNT:
109 result =
i18n(
"Could not unmount device.\nThe reported error was:\n%1", errorText);
111 case KIO::ERR_CANNOT_READ:
112 result =
i18n(
"Could not read file %1.", errorText);
114 case KIO::ERR_CANNOT_WRITE:
115 result =
i18n(
"Could not write to file %1.", errorText);
117 case KIO::ERR_CANNOT_BIND:
118 result =
i18n(
"Could not bind %1.", errorText);
120 case KIO::ERR_CANNOT_LISTEN:
121 result =
i18n(
"Could not listen %1.", errorText);
123 case KIO::ERR_CANNOT_ACCEPT:
124 result =
i18n(
"Could not accept %1.", errorText);
126 case KIO::ERR_CANNOT_LOGIN:
129 case KIO::ERR_CANNOT_STAT:
130 result =
i18n(
"Could not access %1.", errorText);
132 case KIO::ERR_CANNOT_CLOSEDIR:
133 result =
i18n(
"Could not terminate listing %1.", errorText);
135 case KIO::ERR_CANNOT_MKDIR:
138 case KIO::ERR_CANNOT_RMDIR:
139 result =
i18n(
"Could not remove folder %1.", errorText);
141 case KIO::ERR_CANNOT_RESUME:
142 result =
i18n(
"Could not resume file %1.", errorText);
144 case KIO::ERR_CANNOT_RENAME:
147 case KIO::ERR_CANNOT_CHMOD:
148 result =
i18n(
"Could not change permissions for %1.", errorText);
150 case KIO::ERR_CANNOT_CHOWN:
151 result =
i18n(
"Could not change ownership for %1.", errorText);
153 case KIO::ERR_CANNOT_DELETE:
154 result =
i18n(
"Could not delete file %1.", errorText);
157 result =
i18n(
"The process for the %1 protocol died unexpectedly.", errorText);
159 case KIO::ERR_OUT_OF_MEMORY:
160 result =
i18n(
"Error. Out of memory.\n%1", errorText);
162 case KIO::ERR_UNKNOWN_PROXY_HOST:
163 result =
i18n(
"Unknown proxy host\n%1", errorText);
165 case KIO::ERR_CANNOT_AUTHENTICATE:
166 result =
i18n(
"Authorization failed, %1 authentication not supported", errorText);
168 case KIO::ERR_USER_CANCELED:
172 result =
i18n(
"User canceled action\n%1", errorText);
174 case KIO::ERR_INTERNAL_SERVER:
175 result =
i18n(
"Internal error in server\n%1", errorText);
177 case KIO::ERR_SERVER_TIMEOUT:
178 result =
i18n(
"Timeout on server\n%1", errorText);
180 case KIO::ERR_UNKNOWN:
181 result =
i18n(
"Unknown error\n%1", errorText);
183 case KIO::ERR_UNKNOWN_INTERRUPT:
184 result =
i18n(
"Unknown interrupt\n%1", errorText);
194 case KIO::ERR_CANNOT_DELETE_ORIGINAL:
195 result =
i18n(
"Could not delete original file %1.\nPlease check permissions.", errorText);
197 case KIO::ERR_CANNOT_DELETE_PARTIAL:
198 result =
i18n(
"Could not delete partial file %1.\nPlease check permissions.", errorText);
200 case KIO::ERR_CANNOT_RENAME_ORIGINAL:
201 result =
i18n(
"Could not rename original file %1.\nPlease check permissions.", errorText);
203 case KIO::ERR_CANNOT_RENAME_PARTIAL:
204 result =
i18n(
"Could not rename partial file %1.\nPlease check permissions.", errorText);
206 case KIO::ERR_CANNOT_SYMLINK:
207 result =
i18n(
"Could not create symlink %1.\nPlease check permissions.", errorText);
210 result =
i18n(
"Cannot create symlinks at %1.\nThe destination filesystem doesn't support symlinks.", errorText);
215 case KIO::ERR_DISK_FULL:
216 result =
i18n(
"There is not enough space on the disk to write %1.", errorText);
219 result =
i18n(
"The source and destination are the same file.\n%1", errorText);
223 case KJob::UserDefinedError:
227 result =
i18n(
"%1 is required by the server, but is not available.", errorText);
230 result =
i18n(
"Access to restricted port in POST denied.");
232 case KIO::ERR_POST_NO_SIZE:
233 result =
i18n(
"The required content size information was not provided for a POST operation.");
236 result =
i18n(
"A file or folder cannot be dropped onto itself");
239 result =
i18n(
"A folder cannot be moved into itself");
242 result =
i18n(
"Communication with the local password server failed");
245 result =
i18n(
"Unable to create KIO worker. %1", errorText);
249 "Cannot transfer <filename>%1</filename> because it is too large. The destination filesystem only supports files up to 4GiB",
254 i18n(
"Privilege escalation is not necessary because \n'%1' is owned by the current user.\nPlease retry after changing permissions.", errorText);
257 result =
i18n(
"File is too large to be trashed.");
260 result =
i18n(
"Unknown error code %1\n%2\nPlease send a full bug report at https://bugs.kde.org.", errorCode, errorText);
280 stream >> errorName >> techName >> description >> causes >> solutions;
289 protocol = reqUrl->
scheme();
291 url =
i18nc(
"@info url",
"(unknown)");
297 ret <<
i18nc(
"@info %1 error name, %2 description",
"<qt><p><b>%1</b></p><p>%2</p></qt>", errorName, description);
299 ret2 = QStringLiteral(
"<qt>");
305 ret2 +=
i18n(
"<li>Protocol: %1</li>", protocol);
307 ret2 +=
i18n(
"<li>Date and time: %1</li>", datetime) +
i18n(
"<li>Additional information: %1</li>", errorText()) +
QLatin1String(
"</ul>");
312 if (!solutions.isEmpty()) {
331 bool isWorkerNetwork =
false;
335 protocol = reqUrl->
scheme();
338 if (
host.startsWith(web)) {
345 path = reqUrl->
path();
353 url =
host = domain = path = filename = errorText;
357 protocol =
i18nc(
"@info protocol",
"(unknown)");
370 "Contact your appropriate computer support system, "
371 "whether the system administrator, or technical support group for further "
374 "Contact the administrator of the server "
375 "for further assistance.");
377 QString sAccess =
i18n(
"Check your access permissions on this resource.");
379 "Your access permissions may be inadequate to "
380 "perform the requested operation on this resource.");
382 "The file may be in use (and thus locked) by "
383 "another user or application.");
385 "Check to make sure that no other "
386 "application or user is using the file or has locked the file.");
388 "Although unlikely, a hardware error may have "
390 QString cBug =
i18n(
"You may have encountered a bug in the program.");
392 "This is most likely to be caused by a bug in the "
393 "program. Please consider submitting a full bug report as detailed below.");
395 "Update your software to the latest version. "
396 "Your distribution should provide tools to update your software.");
398 "When all else fails, please consider helping the "
399 "KDE team or the third party maintainer of this software by submitting a "
400 "high quality bug report. If the software is provided by a third party, "
401 "please contact them directly. Otherwise, first look to see if "
402 "the same bug has been submitted by someone else by searching at the "
403 "<a href=\"https://bugs.kde.org/\">KDE bug reporting website</a>. If not, take "
404 "note of the details given above, and include them in your bug report, along "
405 "with as many other details as you think might help.");
407 "There may have been a problem with your network "
411 "There may have been a problem with your network "
412 "configuration. If you have been accessing the Internet with no problems "
413 "recently, this is unlikely.");
415 "There may have been a problem at some point along "
416 "the network path between the server and this computer.");
417 QString sTryagain =
i18n(
"Try again, either now or at a later time.");
418 QString cProtocol =
i18n(
"A protocol error or incompatibility may have occurred.");
419 QString sExists =
i18n(
"Ensure that the resource exists, and try again.");
420 QString cExists =
i18n(
"The specified resource may not exist.");
422 "Double-check that you have entered the correct location "
424 QString sNetwork =
i18n(
"Check your network connection status.");
427 case KIO::ERR_CANNOT_OPEN_FOR_READING:
428 errorName =
i18n(
"Cannot Open Resource For Reading");
430 "This means that the contents of the requested file "
431 "or folder <strong>%1</strong> could not be retrieved, as read "
432 "access could not be obtained.",
435 "You may not have permissions to read the file or open "
437 << cLocked << cHardware;
438 solutions << sAccess << sQuerylock << sSysadmin;
441 case KIO::ERR_CANNOT_OPEN_FOR_WRITING:
442 errorName =
i18n(
"Cannot Open Resource For Writing");
444 "This means that the file, <strong>%1</strong>, could "
445 "not be written to as requested, because access with permission to "
446 "write could not be obtained.",
448 causes << cAccess << cLocked << cHardware;
449 solutions << sAccess << sQuerylock << sSysadmin;
452 case KIO::ERR_CANNOT_LAUNCH_PROCESS:
453 errorName =
i18n(
"Cannot Launch Process required by the %1 Protocol", protocol);
454 techName =
i18n(
"Unable to Launch Process");
456 "The program on your computer which provides access "
457 "to the <strong>%1</strong> protocol could not be found or started. This is "
458 "usually due to technical reasons.",
461 "The program which provides compatibility with this "
462 "protocol may not have been updated with your last update of KDE. "
463 "This can cause the program to be incompatible with the current version "
464 "and thus not start.")
466 solutions << sUpdate << sSysadmin;
469 case KIO::ERR_INTERNAL:
470 errorName =
i18n(
"Internal Error");
472 "The program on your computer which provides access "
473 "to the <strong>%1</strong> protocol has reported an internal error.",
475 causes << cBuglikely;
476 solutions << sUpdate << sBugreport;
479 case KIO::ERR_MALFORMED_URL:
480 errorName =
i18n(
"Improperly Formatted URL");
482 "The <strong>U</strong>niform <strong>R</strong>esource "
483 "<strong>L</strong>ocator (URL) that you entered was not properly "
484 "formatted. The format of a URL is generally as follows:"
486 "filename.extension?query=value</strong></blockquote>");
490 case KIO::ERR_UNSUPPORTED_PROTOCOL:
491 errorName =
i18n(
"Unsupported Protocol %1", protocol);
493 "The protocol <strong>%1</strong> is not supported "
494 "by the KDE programs currently installed on this computer.",
496 causes <<
i18n(
"The requested protocol may not be supported.")
498 "The versions of the %1 protocol supported by this computer and "
499 "the server may be incompatible.",
502 "You may perform a search on the Internet for a software "
503 "plugin (called a \"KIO worker\") which supports this protocol. "
504 "Places to search include <a href=\"https://store.kde.org/\">"
505 "https://store.kde.org</a>.")
506 << sUpdate << sSysadmin;
509 case KIO::ERR_NO_SOURCE_PROTOCOL:
510 errorName =
i18n(
"URL Does Not Refer to a Resource.");
511 techName =
i18n(
"Protocol is a Filter Protocol");
513 "The <strong>U</strong>niform <strong>R</strong>esource "
514 "<strong>L</strong>ocator (URL) that you entered did not refer to a "
515 "specific resource.");
517 "KDE is able to communicate through a protocol within a "
518 "protocol; the protocol specified is only for use in such situations, "
519 "however this is not one of these situations. This is a rare event, and "
520 "is likely to indicate a programming error.");
524 case KIO::ERR_UNSUPPORTED_ACTION:
525 errorName =
i18n(
"Unsupported Action: %1", errorText);
527 "The requested action is not supported by the KDE "
528 "program which is implementing the <strong>%1</strong> protocol.",
531 "This error is very much dependent on the KDE program. The "
532 "additional information should give you more information than is available "
533 "to the KDE input/output architecture.");
535 "Attempt to find another way to accomplish the same "
540 errorName =
i18n(
"File Expected");
542 "The request expected a file, however the "
543 "folder <strong>%1</strong> was found instead.",
545 causes <<
i18n(
"This may be an error on the server side.") << cBug;
546 solutions << sUpdate << sSysadmin;
550 errorName =
i18n(
"Folder Expected");
552 "The request expected a folder, however "
553 "the file <strong>%1</strong> was found instead.",
556 solutions << sUpdate << sSysadmin;
559 case KIO::ERR_DOES_NOT_EXIST:
560 errorName =
i18n(
"File or Folder Does Not Exist");
562 "The specified file or folder <strong>%1</strong> "
566 solutions << sExists;
569 case KIO::ERR_FILE_ALREADY_EXIST:
570 errorName =
i18n(
"File Already Exists");
572 "The requested file could not be created because a "
573 "file with the same name already exists.");
575 "Try moving the current file out of the way first, "
576 "and then try again.")
577 <<
i18n(
"Delete the current file and try again.") <<
i18n(
"Choose an alternate filename for the new file.");
580 case KIO::ERR_DIR_ALREADY_EXIST:
581 errorName =
i18n(
"Folder Already Exists");
583 "The requested folder could not be created because "
584 "a folder with the same name already exists.");
586 "Try moving the current folder out of the way first, "
587 "and then try again.")
588 <<
i18n(
"Delete the current folder and try again.") <<
i18n(
"Choose an alternate name for the new folder.");
591 case KIO::ERR_UNKNOWN_HOST:
592 errorName =
i18n(
"Unknown Host");
594 "An unknown host error indicates that the server with "
595 "the requested name, <strong>%1</strong>, could not be "
596 "located on the Internet.",
599 "The name that you typed, %1, may not exist: it may be "
600 "incorrectly typed.",
602 << cNetwork << cNetconf;
603 solutions << sNetwork << sSysadmin;
606 case KIO::ERR_ACCESS_DENIED:
607 errorName =
i18n(
"Access Denied");
609 "Access was denied to the specified resource, "
610 "<strong>%1</strong>.",
613 "You may have supplied incorrect authentication details or "
616 "Your account may not have permission to access the "
617 "specified resource.");
619 "Retry the request and ensure your authentication details "
620 "are entered correctly.")
622 if (!isWorkerNetwork) {
623 solutions << sServeradmin;
627 case KIO::ERR_WRITE_ACCESS_DENIED:
628 errorName =
i18n(
"Write Access Denied");
630 "This means that an attempt to write to the file "
631 "<strong>%1</strong> was rejected.",
633 causes << cAccess << cLocked << cHardware;
634 solutions << sAccess << sQuerylock << sSysadmin;
637 case KIO::ERR_CANNOT_ENTER_DIRECTORY:
638 errorName =
i18n(
"Unable to Enter Folder");
640 "This means that an attempt to enter (in other words, "
641 "to open) the requested folder <strong>%1</strong> was rejected.",
643 causes << cAccess << cLocked;
644 solutions << sAccess << sQuerylock << sSysadmin;
647 case KIO::ERR_PROTOCOL_IS_NOT_A_FILESYSTEM:
648 errorName =
i18n(
"Folder Listing Unavailable");
649 techName =
i18n(
"Protocol %1 is not a Filesystem", protocol);
651 "This means that a request was made which requires "
652 "determining the contents of the folder, and the KDE program supporting "
653 "this protocol is unable to do so.");
655 solutions << sUpdate << sBugreport;
658 case KIO::ERR_CYCLIC_LINK:
659 errorName =
i18n(
"Cyclic Link Detected");
661 "UNIX environments are commonly able to link a file or "
662 "folder to a separate name and/or location. KDE detected a link or "
663 "series of links that results in an infinite loop - i.e. the file was "
664 "(perhaps in a roundabout way) linked to itself.");
666 "Delete one part of the loop in order that it does not "
667 "cause an infinite loop, and try again.")
671 case KIO::ERR_USER_CANCELED:
676 errorName =
i18n(
"Request Aborted By User");
678 "The request was not completed because it was "
680 solutions <<
i18n(
"Retry the request.");
683 case KIO::ERR_CYCLIC_COPY:
684 errorName =
i18n(
"Cyclic Link Detected During Copy");
686 "UNIX environments are commonly able to link a file or "
687 "folder to a separate name and/or location. During the requested copy "
688 "operation, KDE detected a link or series of links that results in an "
689 "infinite loop - i.e. the file was (perhaps in a roundabout way) linked "
692 "Delete one part of the loop in order that it does not "
693 "cause an infinite loop, and try again.")
697 case KIO::ERR_CANNOT_CREATE_SOCKET:
698 errorName =
i18n(
"Could Not Create Network Connection");
699 techName =
i18n(
"Could Not Create Socket");
701 "This is a fairly technical error in which a required "
702 "device for network communications (a socket) could not be created.");
704 "The network connection may be incorrectly configured, or "
705 "the network interface may not be enabled.");
706 solutions << sNetwork << sSysadmin;
709 case KIO::ERR_CANNOT_CONNECT:
710 errorName =
i18n(
"Connection to Server Refused");
712 "The server <strong>%1</strong> refused to allow this "
713 "computer to make a connection.",
716 "The server, while currently connected to the Internet, "
717 "may not be configured to allow requests.")
719 "The server, while currently connected to the Internet, "
720 "may not be running the requested service (%1).",
723 "A network firewall (a device which restricts Internet "
724 "requests), either protecting your network or the network of the server, "
725 "may have intervened, preventing this request.");
726 solutions << sTryagain << sServeradmin << sSysadmin;
729 case KIO::ERR_CONNECTION_BROKEN:
730 errorName =
i18n(
"Connection to Server Closed Unexpectedly");
732 "Although a connection was established to "
733 "<strong>%1</strong>, the connection was closed at an unexpected point "
734 "in the communication.",
736 causes << cNetwork << cNetpath
738 "A protocol error may have occurred, "
739 "causing the server to close the connection as a response to the error.");
740 solutions << sTryagain << sServeradmin << sSysadmin;
743 case KIO::ERR_NOT_FILTER_PROTOCOL:
744 errorName =
i18n(
"URL Resource Invalid");
745 techName =
i18n(
"Protocol %1 is not a Filter Protocol", protocol);
747 "The <strong>U</strong>niform <strong>R</strong>esource "
748 "<strong>L</strong>ocator (URL) that you entered did not refer to "
749 "a valid mechanism of accessing the specific resource, "
750 "<strong>%1%2</strong>.",
754 "KDE is able to communicate through a protocol within a "
755 "protocol. This request specified a protocol be used as such, however "
756 "this protocol is not capable of such an action. This is a rare event, "
757 "and is likely to indicate a programming error.");
758 solutions << sTypo << sSysadmin;
761 case KIO::ERR_CANNOT_MOUNT:
762 errorName =
i18n(
"Unable to Initialize Input/Output Device");
763 techName =
i18n(
"Could Not Mount Device");
765 "The requested device could not be initialized "
766 "(\"mounted\"). The reported error was: <strong>%1</strong>",
769 "The device may not be ready, for example there may be "
770 "no media in a removable media device (i.e. no CD-ROM in a CD drive), "
771 "or in the case of a peripheral/portable device, the device may not "
772 "be correctly connected.")
774 "You may not have permissions to initialize (\"mount\") the "
775 "device. On UNIX systems, often system administrator privileges are "
776 "required to initialize a device.")
779 "Check that the device is ready; removable drives "
780 "must contain media, and portable devices must be connected and powered "
781 "on.; and try again.")
782 << sAccess << sSysadmin;
785 case KIO::ERR_CANNOT_UNMOUNT:
786 errorName =
i18n(
"Unable to Uninitialize Input/Output Device");
787 techName =
i18n(
"Could Not Unmount Device");
789 "The requested device could not be uninitialized "
790 "(\"unmounted\"). The reported error was: <strong>%1</strong>",
793 "The device may be busy, that is, still in use by "
794 "another application or user. Even such things as having an open "
795 "browser window on a location on this device may cause the device to "
798 "You may not have permissions to uninitialize (\"unmount\") "
799 "the device. On UNIX systems, system administrator privileges are "
800 "often required to uninitialize a device.")
803 "Check that no applications are accessing the device, "
805 << sAccess << sSysadmin;
808 case KIO::ERR_CANNOT_READ:
809 errorName =
i18n(
"Cannot Read From Resource");
811 "This means that although the resource, "
812 "<strong>%1</strong>, was able to be opened, an error occurred while "
813 "reading the contents of the resource.",
815 causes <<
i18n(
"You may not have permissions to read from the resource.");
816 if (!isWorkerNetwork) {
820 solutions << sAccess;
821 if (!isWorkerNetwork) {
822 solutions << sNetwork;
824 solutions << sSysadmin;
827 case KIO::ERR_CANNOT_WRITE:
828 errorName =
i18n(
"Cannot Write to Resource");
830 "This means that although the resource, <strong>%1</strong>"
831 ", was able to be opened, an error occurred while writing to the resource.",
833 causes <<
i18n(
"You may not have permissions to write to the resource.");
834 if (!isWorkerNetwork) {
838 solutions << sAccess;
839 if (!isWorkerNetwork) {
840 solutions << sNetwork;
842 solutions << sSysadmin;
845 case KIO::ERR_CANNOT_BIND:
846 errorName =
i18n(
"Could Not Listen for Network Connections");
847 techName =
i18n(
"Could Not Bind");
849 "This is a fairly technical error in which a required "
850 "device for network communications (a socket) could not be established "
851 "to listen for incoming network connections.");
853 "The network connection may be incorrectly configured, or "
854 "the network interface may not be enabled.");
855 solutions << sNetwork << sSysadmin;
858 case KIO::ERR_CANNOT_LISTEN:
859 errorName =
i18n(
"Could Not Listen for Network Connections");
860 techName =
i18n(
"Could Not Listen");
862 "This is a fairly technical error in which a required "
863 "device for network communications (a socket) could not be established "
864 "to listen for incoming network connections.");
866 "The network connection may be incorrectly configured, or "
867 "the network interface may not be enabled.");
868 solutions << sNetwork << sSysadmin;
871 case KIO::ERR_CANNOT_ACCEPT:
872 errorName =
i18n(
"Could Not Accept Network Connection");
874 "This is a fairly technical error in which an error "
875 "occurred while attempting to accept an incoming network connection.");
877 "The network connection may be incorrectly configured, or "
878 "the network interface may not be enabled.")
879 <<
i18n(
"You may not have permissions to accept the connection.");
880 solutions << sNetwork << sSysadmin;
883 case KIO::ERR_CANNOT_LOGIN:
884 errorName =
i18n(
"Could Not Login: %1", errorText);
886 "An attempt to login to perform the requested "
887 "operation was unsuccessful.");
889 "You may have supplied incorrect authentication details or "
892 "Your account may not have permission to access the "
893 "specified resource.")
896 "Retry the request and ensure your authentication details "
897 "are entered correctly.")
898 << sServeradmin << sSysadmin;
901 case KIO::ERR_CANNOT_STAT:
902 errorName =
i18n(
"Could Not Determine Resource Status");
903 techName =
i18n(
"Could Not Stat Resource");
905 "An attempt to determine information about the status "
906 "of the resource <strong>%1</strong>, such as the resource name, type, "
907 "size, etc., was unsuccessful.",
910 "The specified resource may not have existed or may "
911 "not be accessible.")
912 << cProtocol << cHardware;
914 "Retry the request and ensure your authentication details "
915 "are entered correctly.")
919 case KIO::ERR_CANNOT_CLOSEDIR:
921 errorName =
i18n(
"Could Not Cancel Listing");
922 techName =
i18n(
"FIXME: Document this");
925 case KIO::ERR_CANNOT_MKDIR:
926 errorName =
i18n(
"Could Not Create Folder");
927 description =
i18n(
"An attempt to create the requested folder failed.");
930 "The location where the folder was to be created "
932 if (!isWorkerNetwork) {
935 solutions <<
i18n(
"Retry the request.") << sAccess;
938 case KIO::ERR_CANNOT_RMDIR:
939 errorName =
i18n(
"Could Not Remove Folder");
941 "An attempt to remove the specified folder, "
942 "<strong>%1</strong>, failed.",
944 causes <<
i18n(
"The specified folder may not exist.") <<
i18n(
"The specified folder may not be empty.") << cAccess;
945 if (!isWorkerNetwork) {
949 "Ensure that the folder exists and is empty, and try "
954 case KIO::ERR_CANNOT_RESUME:
955 errorName =
i18n(
"Could Not Resume File Transfer");
957 "The specified request asked that the transfer of "
958 "file <strong>%1</strong> be resumed at a certain point of the "
959 "transfer. This was not possible.",
962 "The protocol, or the server, may not support file "
965 "Retry the request without attempting to resume "
969 case KIO::ERR_CANNOT_RENAME:
970 errorName =
i18n(
"Could Not Rename Resource");
972 "An attempt to rename the specified resource "
973 "<strong>%1</strong> failed.",
975 causes << cAccess << cExists;
976 if (!isWorkerNetwork) {
979 solutions << sAccess << sExists;
982 case KIO::ERR_CANNOT_CHMOD:
983 errorName =
i18n(
"Could Not Alter Permissions of Resource");
985 "An attempt to alter the permissions on the specified "
986 "resource <strong>%1</strong> failed.",
988 causes << cAccess << cExists;
989 solutions << sAccess << sExists;
992 case KIO::ERR_CANNOT_CHOWN:
993 errorName =
i18n(
"Could Not Change Ownership of Resource");
995 "An attempt to change the ownership of the specified "
996 "resource <strong>%1</strong> failed.",
998 causes << cAccess << cExists;
999 solutions << sAccess << sExists;
1002 case KIO::ERR_CANNOT_DELETE:
1003 errorName =
i18n(
"Could Not Delete Resource");
1005 "An attempt to delete the specified resource "
1006 "<strong>%1</strong> failed.",
1008 causes << cAccess << cExists;
1009 solutions << sAccess << sExists;
1013 errorName =
i18n(
"Unexpected Program Termination");
1015 "The program on your computer which provides access "
1016 "to the <strong>%1</strong> protocol has unexpectedly terminated.",
1018 causes << cBuglikely;
1019 solutions << sUpdate << sBugreport;
1022 case KIO::ERR_OUT_OF_MEMORY:
1023 errorName =
i18n(
"Out of Memory");
1025 "The program on your computer which provides access "
1026 "to the <strong>%1</strong> protocol could not obtain the memory "
1027 "required to continue.",
1029 causes << cBuglikely;
1030 solutions << sUpdate << sBugreport;
1033 case KIO::ERR_UNKNOWN_PROXY_HOST:
1034 errorName =
i18n(
"Unknown Proxy Host");
1036 "While retrieving information about the specified "
1037 "proxy host, <strong>%1</strong>, an Unknown Host error was encountered. "
1038 "An unknown host error indicates that the requested name could not be "
1039 "located on the Internet.",
1042 "There may have been a problem with your network "
1043 "configuration, specifically your proxy's hostname. If you have been "
1044 "accessing the Internet with no problems recently, this is unlikely.")
1046 solutions <<
i18n(
"Double-check your proxy settings and try again.") << sSysadmin;
1049 case KIO::ERR_CANNOT_AUTHENTICATE:
1050 errorName =
i18n(
"Authentication Failed: Method %1 Not Supported", errorText);
1052 "Although you may have supplied the correct "
1053 "authentication details, the authentication failed because the "
1054 "method that the server is using is not supported by the KDE "
1055 "program implementing the protocol %1.",
1058 "Please file a bug at <a href=\"https://bugs.kde.org/\">"
1059 "https://bugs.kde.org/</a> to inform the KDE team of the unsupported "
1060 "authentication method.")
1065 errorName =
i18n(
"Request Aborted");
1067 "The request was not completed because it was "
1069 solutions <<
i18n(
"Retry the request.");
1072 case KIO::ERR_INTERNAL_SERVER:
1073 errorName =
i18n(
"Internal Error in Server");
1075 "The program on the server which provides access "
1076 "to the <strong>%1</strong> protocol has reported an internal error: "
1081 "This is most likely to be caused by a bug in the "
1082 "server program. Please consider submitting a full bug report as "
1085 "Contact the administrator of the server "
1086 "to advise them of the problem.")
1088 "If you know who the authors of the server software are, "
1089 "submit the bug report directly to them.");
1092 case KIO::ERR_SERVER_TIMEOUT:
1093 errorName =
i18n(
"Timeout Error");
1095 "Although contact was made with the server, a "
1096 "response was not received within the amount of time allocated for "
1097 "the request as follows:<ul>"
1098 "<li>Timeout for establishing a connection: %1 seconds</li>"
1099 "<li>Timeout for receiving a response: %2 seconds</li>"
1100 "<li>Timeout for accessing proxy servers: %3 seconds</li></ul>"
1101 "Please note that you can alter these timeout settings in the KDE "
1102 "System Settings, by selecting Network Settings -> Connection Preferences.",
1108 "The server was too busy responding to other "
1109 "requests to respond.");
1110 solutions << sTryagain << sServeradmin;
1113 case KIO::ERR_UNKNOWN:
1114 errorName =
i18n(
"Unknown Error");
1116 "The program on your computer which provides access "
1117 "to the <strong>%1</strong> protocol has reported an unknown error: "
1122 solutions << sUpdate << sBugreport;
1125 case KIO::ERR_UNKNOWN_INTERRUPT:
1126 errorName =
i18n(
"Unknown Interruption");
1128 "The program on your computer which provides access "
1129 "to the <strong>%1</strong> protocol has reported an interruption of "
1130 "an unknown type: %2.",
1134 solutions << sUpdate << sBugreport;
1137 case KIO::ERR_CANNOT_DELETE_ORIGINAL:
1138 errorName =
i18n(
"Could Not Delete Original File");
1140 "The requested operation required the deleting of "
1141 "the original file, most likely at the end of a file move operation. "
1142 "The original file <strong>%1</strong> could not be deleted.",
1145 solutions << sAccess;
1148 case KIO::ERR_CANNOT_DELETE_PARTIAL:
1149 errorName =
i18n(
"Could Not Delete Temporary File");
1151 "The requested operation required the creation of "
1152 "a temporary file in which to save the new file while being "
1153 "downloaded. This temporary file <strong>%1</strong> could not be "
1157 solutions << sAccess;
1160 case KIO::ERR_CANNOT_RENAME_ORIGINAL:
1161 errorName =
i18n(
"Could Not Rename Original File");
1163 "The requested operation required the renaming of "
1164 "the original file <strong>%1</strong>, however it could not be "
1168 solutions << sAccess;
1171 case KIO::ERR_CANNOT_RENAME_PARTIAL:
1172 errorName =
i18n(
"Could Not Rename Temporary File");
1174 "The requested operation required the creation of "
1175 "a temporary file <strong>%1</strong>, however it could not be "
1179 solutions << sAccess;
1182 case KIO::ERR_CANNOT_SYMLINK:
1183 errorName =
i18n(
"Could Not Create Link");
1184 techName =
i18n(
"Could Not Create Symbolic Link");
1185 description =
i18n(
"The requested symbolic link %1 could not be created.", errorText);
1187 solutions << sAccess;
1191 errorName =
i18n(
"No Content");
1192 description = errorText;
1195 case KIO::ERR_DISK_FULL:
1196 errorName =
i18n(
"Disk Full");
1198 "The requested file <strong>%1</strong> could not be "
1199 "written to as there is inadequate disk space.",
1202 "Free up enough disk space by 1) deleting unwanted and "
1203 "temporary files; 2) archiving files to removable media storage such as "
1204 "CD-Recordable discs; or 3) obtain more storage capacity.")
1209 errorName =
i18n(
"Source and Destination Files Identical");
1211 "The operation could not be completed because the "
1212 "source and destination files are the same file.");
1213 solutions <<
i18n(
"Choose a different filename for the destination file.");
1217 errorName =
i18n(
"File or Folder dropped onto itself");
1219 "The operation could not be completed because the "
1220 "source and destination file or folder are the same.");
1221 solutions <<
i18n(
"Drop the item into a different file or folder.");
1227 description = errorText;
1231 errorName =
i18n(
"Folder moved into itself");
1233 "The operation could not be completed because the "
1234 "source can not be moved into itself.");
1235 solutions <<
i18n(
"Move the item into a different folder.");
1239 errorName =
i18n(
"Could not communicate with password server");
1241 "The operation could not be completed because the "
1242 "service for requesting passwords (kpasswdserver) couldn't be contacted");
1243 solutions <<
i18n(
"Try restarting your session, or look in the logs for errors from kiod.");
1247 errorName =
i18n(
"Cannot Initiate the %1 Protocol", protocol);
1248 techName =
i18n(
"Unable to Create KIO Worker");
1250 "The KIO worker which provides access "
1251 "to the <strong>%1</strong> protocol could not be started. This is "
1252 "usually due to technical reasons.",
1255 "klauncher could not find or start the plugin which provides the protocol. "
1256 "This means you may have an outdated version of the plugin.");
1257 solutions << sUpdate << sSysadmin;
1261 errorName =
xi18nc(
"@info",
"Cannot transfer <filename>%1</filename>", errorText);
1262 description =
xi18nc(
"@info",
1263 "The file <filename>%1</filename> cannot be transferred,"
1264 " because the destination filesystem does not support files that large",
1266 solutions <<
i18n(
"Reformat the destination drive to use a filesystem that supports files that large.");
1271 errorName =
i18n(
"Undocumented Error");
1277 stream << errorName << techName << description << causes << solutions;
1285 if (permissions > 0) {
1286 if (permissions & S_IRUSR) {
1289 if (permissions & S_IWUSR) {
1292 if (permissions & S_IXUSR) {
1296 if (permissions & S_IRGRP) {
1299 if (permissions & S_IWGRP) {
1302 if (permissions & S_IXGRP) {
1306 if (permissions & S_IROTH) {
1309 if (permissions & S_IWOTH) {
1312 if (permissions & S_IXOTH) {
1317 return qPermissions;