[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kio] src: Use the new name for the error codes
From:       Alex Merry <alex.merry () kde ! org>
Date:       2014-03-31 22:29:06
Message-ID: E1WUkhW-0001py-B6 () scm ! kde ! org
[Download RAW message or body]

Git commit 173cdf21221c5dc91c0afe4205c6d3db28a76559 by Alex Merry.
Committed on 30/03/2014 at 22:37.
Pushed by alexmerry into branch 'master'.

Use the new name for the error codes

ERR_COULD_NOT_* has been replaced with ERR_CANNOT_*.

REVIEW: 117195

M  +30   -30   src/core/job_error.cpp
M  +1    -1    src/core/slavebase.h
M  +2    -2    src/core/tcpslavebase.cpp
M  +18   -18   src/ioslaves/file/file.cpp
M  +4    -4    src/ioslaves/file/file_unix.cpp
M  +20   -20   src/ioslaves/ftp/ftp.cpp
M  +1    -1    src/ioslaves/help/kio_help.cpp
M  +3    -3    src/ioslaves/http/http.cpp
M  +4    -4    src/widgets/accessmanagerreply_p.cpp

http://commits.kde.org/kio/173cdf21221c5dc91c0afe4205c6d3db28a76559

diff --git a/src/core/job_error.cpp b/src/core/job_error.cpp
index 1ec28c5..1551959 100644
--- a/src/core/job_error.cpp
+++ b/src/core/job_error.cpp
@@ -97,10 +97,10 @@ KIOCORE_EXPORT QString KIO::buildErrorString(int errorCode, const \
QString &error  case  KIO::ERR_CYCLIC_COPY:
         result = i18n("Found a cyclic link while copying %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_CREATE_SOCKET:
+    case  KIO::ERR_CANNOT_CREATE_SOCKET:
         result = i18n("Could not create socket for accessing %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_CONNECT:
+    case  KIO::ERR_CANNOT_CONNECT:
         result = i18n("Could not connect to host %1.",  errorText.isEmpty() ? \
QLatin1String("localhost") : errorText);  break;
     case  KIO::ERR_CONNECTION_BROKEN:
@@ -109,40 +109,40 @@ KIOCORE_EXPORT QString KIO::buildErrorString(int errorCode, \
const QString &error  case  KIO::ERR_NOT_FILTER_PROTOCOL:
         result = i18n("The protocol %1 is not a filter protocol.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_MOUNT:
+    case  KIO::ERR_CANNOT_MOUNT:
         result = i18n("Could not mount device.\nThe reported error was:\n%1",  \
errorText);  break;
-    case  KIO::ERR_COULD_NOT_UNMOUNT:
+    case  KIO::ERR_CANNOT_UNMOUNT:
         result = i18n("Could not unmount device.\nThe reported error was:\n%1",  \
errorText);  break;
-    case  KIO::ERR_COULD_NOT_READ:
+    case  KIO::ERR_CANNOT_READ:
         result = i18n("Could not read file %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_WRITE:
+    case  KIO::ERR_CANNOT_WRITE:
         result = i18n("Could not write to file %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_BIND:
+    case  KIO::ERR_CANNOT_BIND:
         result = i18n("Could not bind %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_LISTEN:
+    case  KIO::ERR_CANNOT_LISTEN:
         result = i18n("Could not listen %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_ACCEPT:
+    case  KIO::ERR_CANNOT_ACCEPT:
         result = i18n("Could not accept %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_LOGIN:
+    case  KIO::ERR_CANNOT_LOGIN:
         result = errorText;
         break;
-    case  KIO::ERR_COULD_NOT_STAT:
+    case  KIO::ERR_CANNOT_STAT:
         result = i18n("Could not access %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_CLOSEDIR:
+    case  KIO::ERR_CANNOT_CLOSEDIR:
         result = i18n("Could not terminate listing %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_MKDIR:
+    case  KIO::ERR_CANNOT_MKDIR:
         result = i18n("Could not make folder %1.",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_RMDIR:
+    case  KIO::ERR_CANNOT_RMDIR:
         result = i18n("Could not remove folder %1.",  errorText);
         break;
     case  KIO::ERR_CANNOT_RESUME:
@@ -169,7 +169,7 @@ KIOCORE_EXPORT QString KIO::buildErrorString(int errorCode, const \
QString &error  case  KIO::ERR_UNKNOWN_PROXY_HOST:
         result = i18n("Unknown proxy host\n%1",  errorText);
         break;
-    case  KIO::ERR_COULD_NOT_AUTHENTICATE:
+    case  KIO::ERR_CANNOT_AUTHENTICATE:
         result = i18n("Authorization failed, %1 authentication not supported",  \
errorText);  break;
     case  KIO::ERR_ABORTED:
@@ -594,7 +594,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
                const QString &erro
                           "cause an infinite loop, and try again.") << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_CREATE_SOCKET:
+    case  KIO::ERR_CANNOT_CREATE_SOCKET:
         errorName = i18n("Could Not Create Network Connection");
         techName = i18n("Could Not Create Socket");
         description = i18n("This is a fairly technical error in which a required "
@@ -604,7 +604,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  solutions << sNetwork << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_CONNECT:
+    case  KIO::ERR_CANNOT_CONNECT:
         errorName = i18n("Connection to Server Refused");
         description = i18n("The server <strong>%1</strong> refused to allow this "
                            "computer to make a connection.",  host);
@@ -643,7 +643,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  solutions << sTypo << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_MOUNT:
+    case  KIO::ERR_CANNOT_MOUNT:
         errorName = i18n("Unable to Initialize Input/Output Device");
         techName = i18n("Could Not Mount Device");
         description = i18n("The requested device could not be initialized "
@@ -662,7 +662,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  "on.; and try again.") << sAccess << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_UNMOUNT:
+    case  KIO::ERR_CANNOT_UNMOUNT:
         errorName = i18n("Unable to Uninitialize Input/Output Device");
         techName = i18n("Could Not Unmount Device");
         description = i18n("The requested device could not be uninitialized "
@@ -680,7 +680,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  "and try again.") << sAccess << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_READ:
+    case  KIO::ERR_CANNOT_READ:
         errorName = i18n("Cannot Read From Resource");
         description = i18n("This means that although the resource, "
                            "<strong>%1</strong>, was able to be opened, an error \
occurred while " @@ -697,7 +697,7 @@ KIOCORE_EXPORT QByteArray \
KIO::rawErrorDetail(int errorCode, const QString &erro  solutions << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_WRITE:
+    case  KIO::ERR_CANNOT_WRITE:
         errorName = i18n("Cannot Write to Resource");
         description = i18n("This means that although the resource, \
                <strong>%1</strong>"
                            ", was able to be opened, an error occurred while writing \
to the resource.", @@ -714,7 +714,7 @@ KIOCORE_EXPORT QByteArray \
KIO::rawErrorDetail(int errorCode, const QString &erro  solutions << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_BIND:
+    case  KIO::ERR_CANNOT_BIND:
         errorName = i18n("Could Not Listen for Network Connections");
         techName = i18n("Could Not Bind");
         description = i18n("This is a fairly technical error in which a required "
@@ -725,7 +725,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  solutions << sNetwork << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_LISTEN:
+    case  KIO::ERR_CANNOT_LISTEN:
         errorName = i18n("Could Not Listen for Network Connections");
         techName = i18n("Could Not Listen");
         description = i18n("This is a fairly technical error in which a required "
@@ -736,7 +736,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  solutions << sNetwork << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_ACCEPT:
+    case  KIO::ERR_CANNOT_ACCEPT:
         errorName = i18n("Could Not Accept Network Connection");
         description = i18n("This is a fairly technical error in which an error "
                            "occurred while attempting to accept an incoming network \
connection."); @@ -746,7 +746,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int \
errorCode, const QString &erro  solutions << sNetwork << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_LOGIN:
+    case  KIO::ERR_CANNOT_LOGIN:
         errorName = i18n("Could Not Login: %1",  errorText);
         description = i18n("An attempt to login to perform the requested "
                            "operation was unsuccessful.");
@@ -758,7 +758,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
                const QString &erro
                           "are entered correctly.") << sServeradmin << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_STAT:
+    case  KIO::ERR_CANNOT_STAT:
         errorName = i18n("Could Not Determine Resource Status");
         techName = i18n("Could Not Stat Resource");
         description = i18n("An attempt to determine information about the status "
@@ -770,13 +770,13 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  "are entered correctly.") << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_CLOSEDIR:
+    case  KIO::ERR_CANNOT_CLOSEDIR:
         //result = i18n( "Could not terminate listing %1" ).arg( errorText );
         errorName = i18n("Could Not Cancel Listing");
         techName = i18n("FIXME: Document this");
         break;
 
-    case  KIO::ERR_COULD_NOT_MKDIR:
+    case  KIO::ERR_CANNOT_MKDIR:
         errorName = i18n("Could Not Create Folder");
         description = i18n("An attempt to create the requested folder failed.");
         causes << cAccess << i18n("The location where the folder was to be created "
@@ -787,7 +787,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  solutions << i18n("Retry the request.") << sAccess;
         break;
 
-    case  KIO::ERR_COULD_NOT_RMDIR:
+    case  KIO::ERR_CANNOT_RMDIR:
         errorName = i18n("Could Not Remove Folder");
         description = i18n("An attempt to remove the specified folder, "
                            "<strong>%1</strong>, failed.", path);
@@ -879,7 +879,7 @@ KIOCORE_EXPORT QByteArray KIO::rawErrorDetail(int errorCode, \
const QString &erro  << sSysadmin;
         break;
 
-    case  KIO::ERR_COULD_NOT_AUTHENTICATE:
+    case  KIO::ERR_CANNOT_AUTHENTICATE:
         errorName = i18n("Authentication Failed: Method %1 Not Supported",
                          errorText);
         description = i18n("Although you may have supplied the correct "
diff --git a/src/core/slavebase.h b/src/core/slavebase.h
index 4726915..7417c5e 100644
--- a/src/core/slavebase.h
+++ b/src/core/slavebase.h
@@ -480,7 +480,7 @@ public:
      * @param url path to the directory to create
      * @param permissions the permissions to set after creating the directory
      * (-1 if no permissions to be set)
-     * The slave emits ERR_COULD_NOT_MKDIR if failure.
+     * The slave emits ERR_CANNOT_MKDIR if failure.
      */
     virtual void mkdir(const QUrl &url, int permissions);
 
diff --git a/src/core/tcpslavebase.cpp b/src/core/tcpslavebase.cpp
index ea0434e..07115ea 100644
--- a/src/core/tcpslavebase.cpp
+++ b/src/core/tcpslavebase.cpp
@@ -384,7 +384,7 @@ int TCPSlaveBase::connectToHost(const QString &host, quint16 \
port, QString *erro  case KTcpSocket::HostNotFoundError:
                 return ERR_UNKNOWN_HOST;
             default:
-                return ERR_COULD_NOT_CONNECT;
+                return ERR_CANNOT_CONNECT;
             }
         }
 
@@ -420,7 +420,7 @@ int TCPSlaveBase::connectToHost(const QString &host, quint16 \
port, QString *erro  if (errorString) {
                     *errorString = i18nc("%1 is a host name", "%1: SSL negotiation \
failed", host);  }
-                return ERR_COULD_NOT_CONNECT;
+                return ERR_CANNOT_CONNECT;
             }
         }
         // If the SSL handshake was done with anything protocol other than the \
                default,
diff --git a/src/ioslaves/file/file.cpp b/src/ioslaves/file/file.cpp
index 6387d7f..a642a52 100644
--- a/src/ioslaves/file/file.cpp
+++ b/src/ioslaves/file/file.cpp
@@ -271,7 +271,7 @@ void FileProtocol::mkdir(const QUrl &url, int permissions)
     if (QT_LSTAT(QFile::encodeName(path).constData(), &buff) == -1) {
         if (!QDir().mkdir(path)) {
             //TODO: add access denied & disk full (or another reasons) handling \
                (into Qt, possibly)
-            error(KIO::ERR_COULD_NOT_MKDIR, path);
+            error(KIO::ERR_CANNOT_MKDIR, path);
             return;
         } else {
             if (permissions != -1) {
@@ -367,7 +367,7 @@ void FileProtocol::get(const QUrl &url)
             if (errno == EINTR) {
                 continue;
             }
-            error(KIO::ERR_COULD_NOT_READ, path);
+            error(KIO::ERR_CANNOT_READ, path);
             f.close();
             return;
         }
@@ -459,7 +459,7 @@ void FileProtocol::read(KIO::filesize_t bytes)
             // empty array designates eof
             data(QByteArray());
             if (!mFile->atEnd()) {
-                error(KIO::ERR_COULD_NOT_READ, mFile->fileName());
+                error(KIO::ERR_CANNOT_READ, mFile->fileName());
                 close();
             }
             break;
@@ -481,7 +481,7 @@ void FileProtocol::write(const QByteArray &data)
             close();
         } else {
             qWarning() << "Couldn't write. Error:" << mFile->errorString();
-            error(KIO::ERR_COULD_NOT_WRITE, mFile->fileName());
+            error(KIO::ERR_CANNOT_WRITE, mFile->fileName());
             close();
         }
     } else {
@@ -497,7 +497,7 @@ void FileProtocol::seek(KIO::filesize_t offset)
     if (mFile->seek(offset)) {
         position(offset);
     } else {
-        error(KIO::ERR_COULD_NOT_SEEK, mFile->fileName());
+        error(KIO::ERR_CANNOT_SEEK, mFile->fileName());
         close();
     }
 }
@@ -618,7 +618,7 @@ void FileProtocol::put(const QUrl &url, int _mode, KIO::JobFlags \
_flags)  result = -2; // means: remove dest file
                 } else {
                     qWarning() << "Couldn't write. Error:" << f.errorString();
-                    error(KIO::ERR_COULD_NOT_WRITE, dest_orig);
+                    error(KIO::ERR_CANNOT_WRITE, dest_orig);
                     result = -1;
                 }
             }
@@ -653,7 +653,7 @@ void FileProtocol::put(const QUrl &url, int _mode, KIO::JobFlags \
_flags)  
     if (f.error() != QFile::NoError) {
         qWarning() << "Error when closing file descriptor:" << f.errorString();
-        error(KIO::ERR_COULD_NOT_WRITE, dest_orig);
+        error(KIO::ERR_CANNOT_WRITE, dest_orig);
         return;
     }
 
@@ -886,7 +886,7 @@ void FileProtocol::mount(bool _ro, const char *_fstype, const \
QString &_dev, con  if (volmgt_check(devname.data()) == 0) {
             // qDebug() << "VOLMGT: no media in " << devname.data();
             err = i18n("No Media inserted or Media not recognized.");
-            error(KIO::ERR_COULD_NOT_MOUNT, err);
+            error(KIO::ERR_CANNOT_MOUNT, err);
             return;
         } else {
             // qDebug() << "VOLMGT: " << devname.data() << ": media ok";
@@ -896,7 +896,7 @@ void FileProtocol::mount(bool _ro, const char *_fstype, const \
QString &_dev, con  } else {
         err = i18n("\"vold\" is not running.");
         // qDebug() << "VOLMGT: " << err;
-        error(KIO::ERR_COULD_NOT_MOUNT, err);
+        error(KIO::ERR_CANNOT_MOUNT, err);
         return;
     }
 #else
@@ -927,7 +927,7 @@ void FileProtocol::mount(bool _ro, const char *_fstype, const \
                QString &_dev, con
         mountProg = QStandardPaths::findExecutable(QLatin1String("mount"), \
fallbackSystemPath()).toLocal8Bit();  }
     if (mountProg.isEmpty()) {
-        error(KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\""));
+        error(KIO::ERR_CANNOT_MOUNT, i18n("Could not find program \"mount\""));
         return;
     }
 
@@ -987,7 +987,7 @@ void FileProtocol::mount(bool _ro, const char *_fstype, const \
QString &_dev, con  // different devices, well they shouldn't specify the
                     // mountpoint but just the device.
                 } else {
-                    error(KIO::ERR_COULD_NOT_MOUNT, err);
+                    error(KIO::ERR_CANNOT_MOUNT, err);
                     return;
                 }
             }
@@ -997,7 +997,7 @@ void FileProtocol::mount(bool _ro, const char *_fstype, const \
QString &_dev, con  #else
     QString err;
     err = i18n("mounting is not supported by wince.");
-    error(KIO::ERR_COULD_NOT_MOUNT, err);
+    error(KIO::ERR_CANNOT_MOUNT, err);
 #endif
 
 }
@@ -1029,7 +1029,7 @@ void FileProtocol::unmount(const QString &_point)
         if ((mnttab = QT_FOPEN(MNTTAB, "r")) == NULL) {
             err = QLatin1String("could not open mnttab");
             // qDebug() << "VOLMGT: " << err;
-            error(KIO::ERR_COULD_NOT_UNMOUNT, err);
+            error(KIO::ERR_CANNOT_UNMOUNT, err);
             return;
         }
 
@@ -1054,7 +1054,7 @@ void FileProtocol::unmount(const QString &_point)
             // qDebug() << "VOLMGT: "
                     << QFile::encodeName(_point).data()
                     << ": " << err;
-            error(KIO::ERR_COULD_NOT_UNMOUNT, err);
+            error(KIO::ERR_CANNOT_UNMOUNT, err);
             return;
         }
 
@@ -1092,7 +1092,7 @@ void FileProtocol::unmount(const QString &_point)
          */
         err = i18n("\"vold\" is not running.");
         // qDebug() << "VOLMGT: " << err;
-        error(KIO::ERR_COULD_NOT_UNMOUNT, err);
+        error(KIO::ERR_CANNOT_UNMOUNT, err);
         return;
     }
 #else
@@ -1101,7 +1101,7 @@ void FileProtocol::unmount(const QString &_point)
         umountProg = QStandardPaths::findExecutable(QLatin1String("umount"), \
fallbackSystemPath()).toLocal8Bit();  }
     if (umountProg.isEmpty()) {
-        error(KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \
\"umount\"")); +        error(KIO::ERR_CANNOT_UNMOUNT, i18n("Could not find program \
\"umount\""));  return;
     }
     buffer = umountProg + ' ' + QFile::encodeName(KShell::quoteArg(_point)) + " 2>" \
+ tmpFileName; @@ -1112,12 +1112,12 @@ void FileProtocol::unmount(const QString \
&_point)  if (err.isEmpty()) {
         finished();
     } else {
-        error(KIO::ERR_COULD_NOT_UNMOUNT, err);
+        error(KIO::ERR_CANNOT_UNMOUNT, err);
     }
 #else
     QString err;
     err = i18n("unmounting is not supported by wince.");
-    error(KIO::ERR_COULD_NOT_MOUNT, err);
+    error(KIO::ERR_CANNOT_MOUNT, err);
 #endif
 }
 
diff --git a/src/ioslaves/file/file_unix.cpp b/src/ioslaves/file/file_unix.cpp
index bb4d600..d405789 100644
--- a/src/ioslaves/file/file_unix.cpp
+++ b/src/ioslaves/file/file_unix.cpp
@@ -196,7 +196,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl,
                 }
             } else
 #endif
-                error(KIO::ERR_COULD_NOT_READ, src);
+                error(KIO::ERR_CANNOT_READ, src);
             src_file.close();
             dest_file.close();
 #if HAVE_POSIX_ACL
@@ -218,7 +218,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl,
                     remove(_dest.data());
                 } else {
                     qWarning() << "Couldn't write[2]. Error:" << \
                dest_file.errorString();
-                    error(KIO::ERR_COULD_NOT_WRITE, dest);
+                    error(KIO::ERR_CANNOT_WRITE, dest);
                 }
 #if HAVE_POSIX_ACL
                 if (acl) {
@@ -239,7 +239,7 @@ void FileProtocol::copy(const QUrl &srcUrl, const QUrl &destUrl,
 
     if (dest_file.error() != QFile::NoError) {
         qWarning() << "Error when closing file descriptor[2]:" << \
                dest_file.errorString();
-        error(KIO::ERR_COULD_NOT_WRITE, dest);
+        error(KIO::ERR_CANNOT_WRITE, dest);
 #if HAVE_POSIX_ACL
         if (acl) {
             acl_free(acl);
@@ -534,7 +534,7 @@ void FileProtocol::del(const QUrl &url, bool isfile)
                 error(KIO::ERR_ACCESS_DENIED, path);
             } else {
                 // qDebug() << "could not rmdir " << perror;
-                error(KIO::ERR_COULD_NOT_RMDIR, path);
+                error(KIO::ERR_CANNOT_RMDIR, path);
                 return;
             }
         }
diff --git a/src/ioslaves/ftp/ftp.cpp b/src/ioslaves/ftp/ftp.cpp
index 4903770..79f6144 100644
--- a/src/ioslaves/ftp/ftp.cpp
+++ b/src/ioslaves/ftp/ftp.cpp
@@ -134,7 +134,7 @@ static // JPF: in ftp.cc we make it static
  * This helper handles some special issues (blocking and interrupted
  * system call) when writing to a file handle.
  *
- * @return 0 on success or an error code on failure (ERR_COULD_NOT_WRITE,
+ * @return 0 on success or an error code on failure (ERR_CANNOT_WRITE,
  * ERR_DISK_FULL, ERR_CONNECTION_BROKEN).
  */
 int WriteToFile(int fd, const char *buf, size_t len)
@@ -151,7 +151,7 @@ int WriteToFile(int fd, const char *buf, size_t len)
         case EINTR:   continue;
         case EPIPE:   return ERR_CONNECTION_BROKEN;
         case ENOSPC:  return ERR_DISK_FULL;
-        default:      return ERR_COULD_NOT_WRITE;
+        default:      return ERR_CANNOT_WRITE;
         }
     }
     return 0;
@@ -419,7 +419,7 @@ bool Ftp::ftpOpenControlConnection()
 
         if (!supportedProxyScheme(scheme)) {
             // TODO: Need a new error code to indicate unsupported URL scheme.
-            errorCode = ERR_COULD_NOT_CONNECT;
+            errorCode = ERR_CANNOT_CONNECT;
             errorMessage = url.toString();
             continue;
         }
@@ -461,7 +461,7 @@ bool Ftp::ftpOpenControlConnection(const QString &host, int port)
     m_control = synchronousConnectToHost(host, port);
     connect(m_control, \
                SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
             this, SLOT(proxyAuthentication(QNetworkProxy,QAuthenticator*)));
-    int iErrorCode = m_control->state() == QAbstractSocket::ConnectedState ? 0 : \
ERR_COULD_NOT_CONNECT; +    int iErrorCode = m_control->state() == \
QAbstractSocket::ConnectedState ? 0 : ERR_CANNOT_CONNECT;  
     // on connect success try to read the server message...
     if (iErrorCode == 0) {
@@ -471,7 +471,7 @@ bool Ftp::ftpOpenControlConnection(const QString &host, int port)
             if (psz[0]) {
                 sErrorMsg = i18n("%1.\n\nReason: %2", host, psz);
             }
-            iErrorCode = ERR_COULD_NOT_CONNECT;
+            iErrorCode = ERR_CANNOT_CONNECT;
         }
     } else {
         if (m_control->error() == QAbstractSocket::HostNotFoundError) {
@@ -681,7 +681,7 @@ bool Ftp::ftpLogin(bool *userChanged)
     // qDebug() << "Searching for pwd";
     if (!ftpSendCmd("PWD") || (m_iRespType != 2)) {
         // qDebug() << "Couldn't issue pwd command";
-        error(ERR_COULD_NOT_LOGIN, i18n("Could not login to %1.", m_host));   // or \
anything better ? +        error(ERR_CANNOT_LOGIN, i18n("Could not login to %1.", \
m_host));   // or anything better ?  return false;
     }
 
@@ -803,7 +803,7 @@ bool Ftp::ftpSendCmd(const QByteArray &cmd, int maxretries)
                 if (!m_bLoggedOn) {
                     if (m_control != NULL) { // if openConnection succeeded ...
                         // qDebug() << "Login failure, aborting";
-                        error(ERR_COULD_NOT_LOGIN, m_host);
+                        error(ERR_CANNOT_LOGIN, m_host);
                         closeConnection();
                     }
                     return false;
@@ -1000,7 +1000,7 @@ int Ftp::ftpOpenPortDataConnection()
     if (!m_server->isListening()) {
         delete m_server;
         m_server = NULL;
-        return ERR_COULD_NOT_LISTEN;
+        return ERR_CANNOT_LISTEN;
     }
 
     m_server->setMaxPendingConnections(1);
@@ -1035,7 +1035,7 @@ bool Ftp::ftpOpenCommand(const char *_command, const QString \
&_path, char _mode,  {
     int errCode = 0;
     if (!ftpDataMode(ftpModeFromPath(_path, _mode))) {
-        errCode = ERR_COULD_NOT_CONNECT;
+        errCode = ERR_CANNOT_CONNECT;
     } else {
         errCode = ftpOpenDataConnection();
     }
@@ -1093,7 +1093,7 @@ bool Ftp::ftpOpenCommand(const char *_command, const QString \
&_path, char _mode,  }
 
         // qDebug() << "no connection received from remote.";
-        errorcode = ERR_COULD_NOT_ACCEPT;
+        errorcode = ERR_CANNOT_ACCEPT;
         errormessage = m_host;
         return false;
     }
@@ -1143,7 +1143,7 @@ void Ftp::mkdir(const QUrl &url, int permissions)
             return;
         }
 
-        error(ERR_COULD_NOT_MKDIR, path);
+        error(ERR_CANNOT_MKDIR, path);
         return;
     }
 
@@ -1932,7 +1932,7 @@ Ftp::StatusCode Ftp::ftpGet(int &iError, int iCopyFile, const \
QUrl &url, KIO::fi  break;
             }
             // unexpected eof. Happens when the daemon gets killed.
-            iError = ERR_COULD_NOT_READ;
+            iError = ERR_CANNOT_READ;
             return statusServerError;
         }
         processed_size += n;
@@ -2018,14 +2018,14 @@ void Ftp::ftpAbortTransfer()
     // qDebug() << "send ABOR";
     QCString buf = "ABOR\r\n";
     if (KSocks::self()->write(sControl, buf.data(), buf.length()) <= 0)  {
-        error(ERR_COULD_NOT_WRITE, QString());
+        error(ERR_CANNOT_WRITE, QString());
         return;
     }
 
     //
     // qDebug() << "read resp";
     if (readresp() != '2') {
-        error(ERR_COULD_NOT_READ, QString());
+        error(ERR_CANNOT_READ, QString());
         return;
     }
 
@@ -2141,7 +2141,7 @@ Ftp::StatusCode Ftp::ftpPut(int &iError, int iCopyFile, const \
QUrl &dest_url,  }
     }
 
-    if (! ftpOpenCommand("stor", dest, '?', ERR_COULD_NOT_WRITE, offset)) {
+    if (! ftpOpenCommand("stor", dest, '?', ERR_CANNOT_WRITE, offset)) {
         return statusServerError;
     }
 
@@ -2164,7 +2164,7 @@ Ftp::StatusCode Ftp::ftpPut(int &iError, int iCopyFile, const \
QUrl &dest_url,  buffer.resize(iBlockSize);
             result = QT_READ(iCopyFile, buffer.data(), buffer.size());
             if (result < 0) {
-                iError = ERR_COULD_NOT_WRITE;
+                iError = ERR_CANNOT_WRITE;
             } else {
                 buffer.resize(result);
             }
@@ -2194,7 +2194,7 @@ Ftp::StatusCode Ftp::ftpPut(int &iError, int iCopyFile, const \
QUrl &dest_url,  }
 
     if (!ftpCloseCommand()) {
-        iError = ERR_COULD_NOT_WRITE;
+        iError = ERR_CANNOT_WRITE;
         return statusServerError;
     }
 
@@ -2475,7 +2475,7 @@ Ftp::StatusCode Ftp::ftpCopyGet(int &iError, int &iCopyFile, \
const QString &sCop  // delegate the real work (iError gets status) ...
     StatusCode iRes = ftpGet(iError, iCopyFile, url, hCopyOffset);
     if (QT_CLOSE(iCopyFile) && iRes == statusSuccess) {
-        iError = ERR_COULD_NOT_WRITE;
+        iError = ERR_CANNOT_WRITE;
         iRes = statusClientError;
     }
     iCopyFile = -1;
@@ -2528,7 +2528,7 @@ Ftp::StatusCode Ftp::ftpSendMimeType(int &iError, const QUrl \
&url)  while (true) {
         // Wait for content to be available...
         if (m_data->bytesAvailable() == 0 && \
                !m_data->waitForReadyRead((readTimeout() * 1000))) {
-            iError = ERR_COULD_NOT_READ;
+            iError = ERR_CANNOT_READ;
             return statusServerError;
         }
 
@@ -2536,7 +2536,7 @@ Ftp::StatusCode Ftp::ftpSendMimeType(int &iError, const QUrl \
&url)  
         // If we got a -1, it must be an error so return an error.
         if (bytesRead == -1) {
-            iError = ERR_COULD_NOT_READ;
+            iError = ERR_CANNOT_READ;
             return statusServerError;
         }
 
diff --git a/src/ioslaves/help/kio_help.cpp b/src/ioslaves/help/kio_help.cpp
index df3e934..7cb8a95 100644
--- a/src/ioslaves/help/kio_help.cpp
+++ b/src/ioslaves/help/kio_help.cpp
@@ -391,7 +391,7 @@ void HelpProtocol::get_file(const QString &path)
     const qint64 n = f.read(array.data(), array.size());
         if (n == -1)
         {
-            error(KIO::ERR_COULD_NOT_READ, path);
+            error(KIO::ERR_CANNOT_READ, path);
             return;
         }
         if (n == 0)
diff --git a/src/ioslaves/http/http.cpp b/src/ioslaves/http/http.cpp
index 3158628..de1a1dd 100644
--- a/src/ioslaves/http/http.cpp
+++ b/src/ioslaves/http/http.cpp
@@ -2190,7 +2190,7 @@ bool HTTPProtocol::httpOpenConnection()
             const QUrl url(proxyUrl);
             const QString proxyScheme(url.scheme());
             if (!supportedProxyScheme(proxyScheme)) {
-                connectError = ERR_COULD_NOT_CONNECT;
+                connectError = ERR_CANNOT_CONNECT;
                 errorString = url.toDisplayString();
                 badProxyUrls << url;
                 continue;
@@ -2283,7 +2283,7 @@ bool HTTPProtocol::satisfyRequestFromCache(bool *cacheHasPage)
                 if (isCacheOnly) {
                     error(ERR_DOES_NOT_EXIST, m_request.url.toDisplayString());
                 } else if (offline) {
-                    error(ERR_COULD_NOT_CONNECT, m_request.url.toDisplayString());
+                    error(ERR_CANNOT_CONNECT, m_request.url.toDisplayString());
                 }
                 return true;
             }
@@ -4521,7 +4521,7 @@ void HTTPProtocol::error(int _err, const QString &_text)
 {
     // Close the connection only on connection errors. Otherwise, honor the
     // keep alive flag.
-    if (_err == ERR_CONNECTION_BROKEN || _err == ERR_COULD_NOT_CONNECT) {
+    if (_err == ERR_CONNECTION_BROKEN || _err == ERR_CANNOT_CONNECT) {
         httpClose(false);
     } else {
         httpClose(m_request.isKeepAlive);
diff --git a/src/widgets/accessmanagerreply_p.cpp \
b/src/widgets/accessmanagerreply_p.cpp index 4322e02..c7df260 100644
--- a/src/widgets/accessmanagerreply_p.cpp
+++ b/src/widgets/accessmanagerreply_p.cpp
@@ -333,9 +333,9 @@ int AccessManagerReply::jobError(KJob *kJob)
         setHeader(QNetworkRequest::ContentTypeHeader, "inode/directory");
         setError(QNetworkReply::NoError, kJob->errorText());
         break;
-    case KIO::ERR_COULD_NOT_CONNECT:
+    case KIO::ERR_CANNOT_CONNECT:
         setError(QNetworkReply::ConnectionRefusedError, kJob->errorText());
-        //qDebug() << "KIO::ERR_COULD_NOT_CONNECT -> \
QNetworkReply::ConnectionRefusedError"; +        //qDebug() << \
"KIO::ERR_CANNOT_CONNECT -> QNetworkReply::ConnectionRefusedError";  break;
     case KIO::ERR_UNKNOWN_HOST:
         setError(QNetworkReply::HostNotFoundError, kJob->errorText());
@@ -366,9 +366,9 @@ int AccessManagerReply::jobError(KJob *kJob)
         setError(QNetworkReply::ContentNotFoundError, kJob->errorText());
         //qDebug() << "KIO::ERR_DOES_NOT_EXIST -> \
QNetworkReply::ContentNotFoundError";  break;
-    case KIO::ERR_COULD_NOT_AUTHENTICATE:
+    case KIO::ERR_CANNOT_AUTHENTICATE:
         setError(QNetworkReply::AuthenticationRequiredError, kJob->errorText());
-        //qDebug() << "KIO::ERR_COULD_NOT_AUTHENTICATE -> \
QNetworkReply::AuthenticationRequiredError"; +        //qDebug() << \
"KIO::ERR_CANNOT_AUTHENTICATE -> QNetworkReply::AuthenticationRequiredError";  break;
     case KIO::ERR_UNSUPPORTED_PROTOCOL:
     case KIO::ERR_NO_SOURCE_PROTOCOL:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic