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

List:       kde-commits
Subject:    KDE/kdebase/runtime/kioslave
From:       John Layt <john () layt ! net>
Date:       2009-12-28 20:56:56
Message-ID: 1262033816.358114.15924.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1067073 by jlayt:

krazy fixes


 M  +3 -3      archive/kio_archive.h  
 M  +3 -3      fish/fish.cpp  
 M  +3 -3      floppy/kio_floppy.cpp  
 M  +3 -3      man/kio_man.cpp  
 M  +8 -8      man/man2html.cpp  
 M  +1 -1      network/network/builder/slp/slpservicebrowser.cpp  
 M  +2 -2      nfs/kio_nfs.cpp  
 M  +2 -0      nfs/kio_nfs.h  
 M  +3 -3      sftp/kio_sftp.cpp  
 M  +2 -2      smb/kio_smb.h  
 M  +1 -1      smb/kio_smb_auth.cpp  
 M  +1 -1      smb/kio_smb_browse.cpp  
 M  +1 -1      smb/kio_smb_mount.cpp  
 M  +1 -1      smb/kio_smb_win.cpp  
 M  +1 -1      thumbnail/djvucreator.cpp  
 M  +1 -1      thumbnail/icoutils.cpp  
 M  +2 -2      trash/discspaceutil.cpp  
 M  +3 -3      trash/kcmtrash.h  
 M  +5 -5      trash/trashimpl.cpp  


--- trunk/KDE/kdebase/runtime/kioslave/archive/kio_archive.h #1067072:1067073
@@ -17,8 +17,8 @@
     Boston, MA 02110-1301, USA.
 */
 
-#ifndef ARCHIVEPROTOCOL_H
-#define ARCHIVEPROTOCOL_H
+#ifndef KIO_ARCHIVE_H
+#define KIO_ARCHIVE_H
 
 #include <sys/types.h>
 
@@ -57,4 +57,4 @@
     time_t m_mtime;
 };
 
-#endif
+#endif // KIO_ARCHIVE_H
--- trunk/KDE/kdebase/runtime/kioslave/fish/fish.cpp #1067072:1067073
@@ -691,7 +691,7 @@
             myDebug( << "unmatched case in initial handling! should not happen!" << \
endl);  }
 #ifdef Q_WS_WIN
-        if (buf.endsWith("(y/n)")) {
+        if (buf.endsWith(QLatin1String("(y/n)"))) {
             int rc = messageBox(QuestionYesNo,thisFn+buf);
             if (rc == KMessageBox::Yes) {
                 writeChild("y\n",2);
@@ -823,7 +823,7 @@
 */
 int fishProtocol::handleResponse(const QString &str){
     myDebug( << "handling: " << str << endl);
-    if (str.startsWith("### ")) {
+    if (str.startsWith(QLatin1String("### "))) {
         bool isOk = false;
         int result = str.mid(4,3).toInt(&isOk);
         if (!isOk) result = 500;
@@ -881,7 +881,7 @@
     if (!rc) {
         switch (fishCommand) {
         case FISH_VER:
-            if (line.startsWith("VER 0.0.3")) {
+            if (line.startsWith(QLatin1String("VER 0.0.3"))) {
                 line.append(" ");
                 hasAppend = line.contains(" append ");
             } else {
--- trunk/KDE/kdebase/runtime/kioslave/floppy/kio_floppy.cpp #1067072:1067073
@@ -67,9 +67,9 @@
 
 void getDriveAndPath(const QString& path, QString& drive, QString& rest)
 {
-   drive=QString();
-   rest=QString();
-   const QStringList list=path.split("/");
+   drive.clear();
+   rest.clear();
+   const QStringList list=path.split('/');
    for (QStringList::const_iterator it=list.constBegin(); it!=list.constEnd(); ++it)
    {
       if (it==list.begin())
--- trunk/KDE/kdebase/runtime/kioslave/man/kio_man.cpp #1067072:1067073
@@ -336,7 +336,7 @@
             while ( (ep = ::readdir( dp )) != 0L ) {
 
                 const QString file = QFile::decodeName( ep->d_name );
-                QString sect = QString();
+                QString sect;
 
                 if ( file.startsWith( man ) )
                     sect = file.mid(3);
@@ -937,7 +937,7 @@
 
     if ( ::getenv("PATH") ) {
         const QStringList path =
-              QString::fromLocal8Bit( ::getenv("PATH") ).split( ":", \
QString::SkipEmptyParts ); +              QString::fromLocal8Bit( ::getenv("PATH") \
).split( ':', QString::SkipEmptyParts );  
         for ( QStringList::const_iterator it = path.constBegin();
               it != path.constEnd();
@@ -1517,7 +1517,7 @@
         for (QStringList::ConstIterator it = section_names.constBegin(); it != \
section_names.constEnd(); ++it) {  UDSEntry     uds_entry;
 
-            QString name = "man:/(" + *it + ")";
+            QString name = "man:/(" + *it + ')';
             uds_entry.insert( KIO::UDSEntry::UDS_NAME, sectionName( *it ) );
             uds_entry.insert( KIO::UDSEntry::UDS_URL, name );
             uds_entry.insert( KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR );
--- trunk/KDE/kdebase/runtime/kioslave/man/man2html.cpp #1067072:1067073
@@ -1097,7 +1097,7 @@
     if (fontok)
         current_font = name;
     else
-        current_font = "R"; // Still nothing, then it is 'R' (Regular)
+        current_font = "R"; // Still nothing, then it is 'R' (Regular) // \
krazy:exclude=doublequote_chars  return markup;
 }
 
@@ -1616,13 +1616,13 @@
         else
         {
             kDebug(7107) << "EXCEPTION: font has too big number: " << BYTEARRAY( \
                name ) << " => " << number;
-            name = "R"; // Let assume Regular
+            name = "R"; // Let assume Regular // krazy:exclude=doublequote_chars
         }
     }
     else if ( name.isEmpty() )
     {
         kDebug(7107) << "EXCEPTION: font has no name: " << BYTEARRAY( name );
-        name = "R"; // Let assume Regular
+        name = "R"; // Let assume Regular // krazy:exclude=doublequote_chars
     }
     if ( !skip_escape )
         return set_font( name );
@@ -1818,9 +1818,9 @@
         break;
     }
      case '\'': cstr = "&acute;";curpos++; break; // groff(7) ### TODO verify
-     case '`': cstr = "`";curpos++; break; // groff(7)
-     case '-': cstr = "-";curpos++; break; // groff(7)
-     case '.': cstr = ".";curpos++; break; // groff(7)
+     case '`': cstr = "`";curpos++; break; // groff(7) // \
krazy:exclude=doublequote_chars +     case '-': cstr = "-";curpos++; break; // \
groff(7) // krazy:exclude=doublequote_chars +     case '.': cstr = ".";curpos++; \
break; // groff(7) // krazy:exclude=doublequote_chars  default: cstr = QByteArray( c, \
1 ); curpos++; break;  }
     if (cplusplus)
@@ -4300,7 +4300,7 @@
                     }
                     else
                     {
-                        endmacro=".";
+                        endmacro="."; // krazy:exclude=doublequote_chars
                         c = wordlist[1];
                         while (*c && (*c != ' ') && (*c != '\n'))
                             endmacro+=*c++;
@@ -5664,7 +5664,7 @@
 #ifndef KIO_MAN_TEST
 int main(int argc, char **argv)
 {
-    cssPath = ".";
+    cssPath = "."; // krazy:exclude=doublequote_chars
     if (argc < 2) {
         std::cerr << "call: " << argv[0] << " <filename>\n";
         return 1;
--- trunk/KDE/kdebase/runtime/kioslave/network/network/builder/slp/slpservicebrowser.cpp \
#1067072:1067073 @@ -39,7 +39,7 @@
 {
 
 static const char DefaultScope[] =         "";
-static const char AllNamingAuthorities[] = "*";
+static const char AllNamingAuthorities[] = '*';
 static const char AllServiceFilter[] =     "";
 static const char AllAttributesFilter[] =  "";
 static const int updateIntervalMSecs = 7000;
--- trunk/KDE/kdebase/runtime/kioslave/nfs/kio_nfs.cpp #1067072:1067073
@@ -18,6 +18,8 @@
     Boston, MA 02110-1301, USA.
 */
 
+#include "kio_nfs.h"
+
 #include <config-runtime.h>
 
 #include <sys/types.h>
@@ -55,10 +57,8 @@
 #include <kio/global.h>
 #include <iostream>
 
-#include "nfs_prot.h"
 #define fhandle _fhandle
 #include "mount.h"
-#include "kio_nfs.h"
 
 #define MAXHOSTLEN 256
 
--- trunk/KDE/kdebase/runtime/kioslave/nfs/kio_nfs.h #1067072:1067073
@@ -35,6 +35,8 @@
 #include <netinet/in.h>
 #include <sys/time.h>
 
+#include "nfs_prot.h"
+
 class NFSFileHandle
 {
    public:
--- trunk/KDE/kdebase/runtime/kioslave/sftp/kio_sftp.cpp #1067072:1067073
@@ -215,7 +215,7 @@
         }
 
         if (ssh_userauth_kbdint_setanswer(mSession, i, answer) < 0) {
-          kDebug(KIO_SFTP_DB) << "An error occured setting the answer: "
+          kDebug(KIO_SFTP_DB) << "An error occurred setting the answer: "
             << ssh_get_error(mSession);
           return SSH_AUTH_ERROR;
         }
@@ -235,7 +235,7 @@
         }
 
         if (ssh_userauth_kbdint_setanswer(mSession, i, answer) < 0) {
-          kDebug(KIO_SFTP_DB) << "An error occured setting the answer: "
+          kDebug(KIO_SFTP_DB) << "An error occurred setting the answer: "
             << ssh_get_error(mSession);
           return SSH_AUTH_ERROR;
         }
@@ -1392,7 +1392,7 @@
 
     for (; it != end; ++it) {
       entry.clear();
-      if (createUDSEntry(QFile::decodeName(*it), QByteArray(path + "/" + \
*it).constData(), entry, details)) { +      if \
(createUDSEntry(QFile::decodeName(*it), QByteArray(path + '/' + *it).constData(), \
entry, details)) {  listEntry(entry, false);
       }
     }
--- trunk/KDE/kdebase/runtime/kioslave/smb/kio_smb.h #1067072:1067073
@@ -104,7 +104,7 @@
 
     /**
      * we store the current url, it's needed for
-     * callback authorisation method
+     * callback authorization method
      */
     SMBUrl   m_current_url;
 
@@ -128,7 +128,7 @@
 
 
     /**
-     * Description :   Initilizes the libsmbclient
+     * Description :   Initializes the libsmbclient
      * Return :        true on success false with errno set on error
      */
     bool auth_initialize_smbc();
--- trunk/KDE/kdebase/runtime/kioslave/smb/kio_smb_auth.cpp #1067072:1067073
@@ -161,7 +161,7 @@
 }
 
 //--------------------------------------------------------------------------
-// Initalizes the smbclient library
+// Initializes the smbclient library
 //
 // Returns: 0 on success -1 with errno set on error
 bool SMBSlave::auth_initialize_smbc()
--- trunk/KDE/kdebase/runtime/kioslave/smb/kio_smb_browse.cpp #1067072:1067073
@@ -174,7 +174,7 @@
 {
     kDebug(KIO_SMB) << "checkURL " << kurl;
     QString surl = kurl.url();
-    if (surl.startsWith("smb:/")) {
+    if (surl.startsWith(QLatin1String("smb:/"))) {
         if (surl.length() == 5) // just the above
             return kurl; // unchanged
 
--- trunk/KDE/kdebase/runtime/kioslave/smb/kio_smb_mount.cpp #1067072:1067073
@@ -50,7 +50,7 @@
          QString remotePath, mountPoint, user;
          stream >> remotePath >> mountPoint;
 
-         QStringList sl=remotePath.split( "/");
+         QStringList sl=remotePath.split('/');
          QString share,host;
          if (sl.count()>=2)
          {
--- trunk/KDE/kdebase/runtime/kioslave/smb/kio_smb_win.cpp #1067072:1067073
@@ -56,7 +56,7 @@
     memset((void*)&nr, '\0', sizeof(NETRESOURCE));
     nr.dwType=RESOURCETYPE_DISK;
     nr.lpLocalName=NULL;
-    QString str = "\\\\" + url.host()+url.path().replace("/", "\\");
+    QString str = "\\\\" + url.host()+url.path().replace('/', "\\");
     nr.lpRemoteName = (LPWSTR)str.utf16();
     nr.lpProvider=NULL;
 
--- trunk/KDE/kdebase/runtime/kioslave/thumbnail/djvucreator.cpp #1067072:1067073
@@ -65,7 +65,7 @@
   fnamearg = QFile::encodeName( path );
   argv[0] = "ddjvu";
   argv[1] = "-page";
-  argv[2] = "1";
+  argv[2] = "1"; // krazy:exclude=doublequote_chars
   argv[3] = "-size";
   argv[4] = sizearg.data(); 
   argv[5] = fnamearg.data(); 
--- trunk/KDE/kdebase/runtime/kioslave/thumbnail/icoutils.cpp #1067072:1067073
@@ -106,7 +106,7 @@
 	int max_d = 0;
 	int index = -1;
 
-	foreach ( Icon icon, icons ) {
+	foreach ( const Icon &icon, icons ) {
 		int i_width = icon.first;
 		int i_height = icon.second.first;
 		int i_depth = icon.second.second.first;
--- trunk/KDE/kdebase/runtime/kioslave/trash/discspaceutil.cpp #1067072:1067073
@@ -19,14 +19,14 @@
    Boston, MA 02110-1301, USA.
 */
 
+#include "discspaceutil.h"
+
 #include <QtCore/QDirIterator>
 #include <QtCore/QFileInfo>
 
 #include <kdiskfreespaceinfo.h>
 #include <kdebug.h>
 
-#include "discspaceutil.h"
-
 DiscSpaceUtil::DiscSpaceUtil( const QString &directory )
     : mDirectory( directory ),
       mFullSize( 0 )
--- trunk/KDE/kdebase/runtime/kioslave/trash/kcmtrash.h #1067072:1067073
@@ -17,8 +17,8 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
-#ifndef TRASHCONFIGMODULE_H
-#define TRASHCONFIGMODULE_H
+#ifndef KCMTRASH_H
+#define KCMTRASH_H
 
 #include <kcmodule.h>
 
@@ -79,4 +79,4 @@
         ConfigMap mConfigMap;
 };
 
-#endif
+#endif // KCMTRASH_H
--- trunk/KDE/kdebase/runtime/kioslave/trash/trashimpl.cpp #1067072:1067073
@@ -1132,17 +1132,17 @@
                 // some other files from the trash
 
                 QDir dir(trashPath + QString::fromLatin1("/files"));
-                QFileInfoList infos;
+                QFileInfoList infoList;
                 if ( actionType == 1 )  // delete oldest files first
-                    infos = dir.entryInfoList( QDir::Files | QDir::AllDirs | \
QDir::NoDotAndDotDot, QDir::Time | QDir::Reversed ); +                    infoList = \
dir.entryInfoList( QDir::Files | QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Time | \
QDir::Reversed );  else if ( actionType == 2 ) // delete biggest files first
-                    infos = dir.entryInfoList( QDir::Files | QDir::AllDirs | \
QDir::NoDotAndDotDot, QDir::Size ); +                    infoList = \
dir.entryInfoList( QDir::Files | QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Size );  \
else  qWarning( "Should never happen!" );
 
                 bool deleteFurther = true;
-                for ( int i = 0; (i < infos.count()) && deleteFurther; ++i ) {
-                    const QFileInfo info = infos.at( i );
+                for ( int i = 0; (i < infoList.count()) && deleteFurther; ++i ) {
+                    const QFileInfo info = infoList.at( i );
 
                     del( trashId, info.fileName() ); // delete trashed file
 


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

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