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

List:       kde-commits
Subject:    KDE/kdelibs/kinit
From:       John Layt <john () layt ! net>
Date:       2009-12-01 15:23:29
Message-ID: 1259681009.431436.5243.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1057135 by jlayt:

krazy fixes


 M  +3 -3      kinit.cpp  
 M  +2 -2      kinit_win.cpp  
 M  +6 -6      klauncher.cpp  
 M  +1 -1      kwrapper_win.cpp  
 M  +1 -1      start_kdeinit_wrapper.c  


--- trunk/KDE/kdelibs/kinit/kinit.cpp #1057134:1057135
@@ -453,7 +453,7 @@
                     const char *cwd=0, int envc=0, const char *envs=0,
                     bool reset_env = false,
                     const char *tty=0, bool avoid_loops = false,
-                    const char* startup_id_str = "0" )
+                    const char* startup_id_str = "0" ) // krazy:exclude=doublequote_chars
 {
   QString lib;
   QByteArray name;
@@ -488,7 +488,7 @@
             }
             // Don't confuse the user with "Could not load libkdeinit4_foo.so" if it doesn't exist
             if (!QFile::exists(libpath)) {
-                libpath = QString();
+                libpath.clear();
             }
             execpath = exec;
         }
@@ -1113,7 +1113,7 @@
       const char *envs = 0;
       const char *tty = 0;
       int avoid_loops = 0;
-      const char *startup_id_str = "0";
+      const char *startup_id_str = "0"; // krazy:exclude=doublequote_chars
 
 #ifndef NDEBUG
      fprintf(stderr, "kdeinit4: Got %s '%s' from %s.\n",
--- trunk/KDE/kdelibs/kinit/kinit_win.cpp #1057134:1057135
@@ -280,7 +280,7 @@
     QDBusConnectionInterface *bus = connection.interface();
     const QStringList services = bus->registeredServiceNames();
     foreach(const QString &service, services) {
-        if (service.startsWith("org.freedesktop.DBus") || service.startsWith(':'))
+        if (service.startsWith(QLatin1String("org.freedesktop.DBus")) || service.startsWith(QLatin1String(':')))
             continue;
         fprintf(stderr, "%s \n", service.toLatin1().data());
     }
@@ -292,7 +292,7 @@
     QDBusConnectionInterface *bus = connection.interface();
     const QStringList services = bus->registeredServiceNames();
     foreach(const QString &service, services) {
-        if (service.startsWith("org.freedesktop.DBus") || service.startsWith(':'))
+        if (service.startsWith(QLatin1String("org.freedesktop.DBus")) || service.startsWith(QLatin1String(':')))
             continue;
         QDBusInterface *iface = new QDBusInterface(service,
                                QLatin1String("/MainApplication"),
--- trunk/KDE/kdelibs/kinit/klauncher.cpp #1057134:1057135
@@ -559,7 +559,7 @@
    else
    {
       requestResult.result = 1;
-      requestResult.dbusName = QString();
+      requestResult.dbusName.clear();
       requestResult.error = i18n("KDEInit could not launch '%1'.", request->name);
       if (!request->errorMsg.isEmpty())
           requestResult.error += QString::fromLatin1(":\n") + request->errorMsg;
@@ -595,7 +595,7 @@
    if (request->transaction.type() != QDBusMessage::InvalidMessage)
    {
       if ( requestResult.dbusName.isNull() ) // null strings can't be sent
-          requestResult.dbusName = QString();
+          requestResult.dbusName.clear();
       Q_ASSERT( !requestResult.error.isNull() );
       PIDType<sizeof(pid_t)>::PID_t stream_pid = requestResult.pid;
       QDBusConnection::sessionBus().send(request->transaction.createReply(QVariantList() << requestResult.result
@@ -820,7 +820,7 @@
          singleUrl.append(*it);
          QByteArray startup_id2 = startup_id;
          if( !startup_id2.isEmpty() && startup_id2 != "0" )
-             startup_id2 = "0"; // can't use the same startup_id several times
+             startup_id2 = "0"; // can't use the same startup_id several times // krazy:exclude=doublequote_chars
          start_service( service, singleUrl, envs, startup_id2, true, false, msg);
       }
       QString firstURL = *(urls.begin());
@@ -889,7 +889,7 @@
     const QStringList &envs )
 {
 #ifdef Q_WS_X11
-    request->startup_id = "0";
+    request->startup_id = "0";// krazy:exclude=doublequote_chars
     if (startup_id == "0")
         return;
     bool silent;
@@ -941,7 +941,7 @@
 {
 #ifdef Q_WS_X11
     if( request != NULL )
-        request->startup_id = "0";
+        request->startup_id = "0"; // krazy:exclude=doublequote_chars
     if( !startup_id.isEmpty() && startup_id != "0" )
     {
         QString dpy_str;
@@ -1170,7 +1170,7 @@
     request->dbus_startup_type = KService::DBusNone;
     request->pid = 0;
 #ifdef Q_WS_X11
-    request->startup_id = "0";
+    request->startup_id = "0"; // krazy:exclude=doublequote_chars
 #endif
     request->status = KLaunchRequest::Launching;
     requestStart(request);
--- trunk/KDE/kdelibs/kinit/kwrapper_win.cpp #1057134:1057135
@@ -95,7 +95,7 @@
     {
         if (!envPath.contains(a))
             envPath << a;
-        if (!a.endsWith("/lib") && !a.endsWith("/lib/") && !searchPath.contains(a))
+        if (!a.endsWith(QLatin1String("/lib")) && !a.endsWith(QLatin1String("/lib/")) && !searchPath.contains(a))
             searchPath << a;
     }
     
--- trunk/KDE/kdelibs/kinit/start_kdeinit_wrapper.c #1057134:1057135
@@ -33,7 +33,7 @@
  The start_kdeinit wrapper is setuid, which means some shell variables like LD_LIBRARY_PATH
  get unset before it's launched. However kdeinit is used to launch most of KDE, so such variables
  should not be dropped. Therefore this wrapper for the setuid wrapper read the environment
- and writes it to start_kdeinit's stdin, which after dropping priviledges reads it and uses it
+ and writes it to start_kdeinit's stdin, which after dropping privileges reads it and uses it
  for launching the real kdeinit.
 */
 int main(int argc, char **argv)
[prev in list] [next in list] [prev in thread] [next in thread] 

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