modernize: Reformat ALL the source... again!
[quassel.git] / src / core / oidentdconfiggenerator.cpp
index 7e75871..e69f76f 100644 (file)
@@ -19,8 +19,8 @@
  ***************************************************************************/
 
 #ifdef HAVE_UMASK
-#  include <sys/types.h>
-#  include <sys/stat.h>
+#    include <sys/stat.h>
+#    include <sys/types.h>
 #endif /* HAVE_UMASK */
 
 #include <QString>
 #include "corenetwork.h"
 #include "oidentdconfiggenerator.h"
 
-OidentdConfigGenerator::OidentdConfigGenerator(QObject *parent) :
-    QObject(parent)
+OidentdConfigGenerator::OidentdConfigGenerator(QObject* parent)
+    QObject(parent)
 {
     if (!_initialized)
         init();
 }
 
-
 OidentdConfigGenerator::~OidentdConfigGenerator()
 {
     _quasselConfig.clear();
@@ -43,7 +42,6 @@ OidentdConfigGenerator::~OidentdConfigGenerator()
     _configFile->deleteLater();
 }
 
-
 bool OidentdConfigGenerator::init()
 {
     _configDir = QDir::homePath();
@@ -72,17 +70,18 @@ bool OidentdConfigGenerator::init()
     return _initialized;
 }
 
-
-QString OidentdConfigGenerator::sysIdentForIdentity(const CoreIdentity *identity) const {
+QString OidentdConfigGenerator::sysIdentForIdentity(const CoreIdentity* identity) const
+{
     // Make sure the identity's ident complies with strict mode if enabled
-    const CoreNetwork *network = qobject_cast<CoreNetwork *>(sender());
+    const CoreNetwork* network = qobject_cast<CoreNetwork*>(sender());
     return network->coreSession()->strictCompliantIdent(identity);
 }
 
-
-bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity,
-                                       const QHostAddress &localAddress, quint16 localPort,
-                                       const QHostAddress &peerAddress, quint16 peerPort,
+bool OidentdConfigGenerator::addSocket(const CoreIdentity* identity,
+                                       const QHostAddress& localAddress,
+                                       quint16 localPort,
+                                       const QHostAddress& peerAddress,
+                                       quint16 peerPort,
                                        qint64 socketId)
 {
     Q_UNUSED(localAddress)
@@ -99,11 +98,12 @@ bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity,
     return ret;
 }
 
-
 //! not yet implemented
-bool OidentdConfigGenerator::removeSocket(const CoreIdentity *identity,
-                                          const QHostAddress &localAddress, quint16 localPort,
-                                          const QHostAddress &peerAddress, quint16 peerPort,
+bool OidentdConfigGenerator::removeSocket(const CoreIdentity* identity,
+                                          const QHostAddress& localAddress,
+                                          quint16 localPort,
+                                          const QHostAddress& peerAddress,
+                                          quint16 peerPort,
                                           qint64 socketId)
 {
     Q_UNUSED(identity)
@@ -116,7 +116,6 @@ bool OidentdConfigGenerator::removeSocket(const CoreIdentity *identity,
     return true;
 }
 
-
 bool OidentdConfigGenerator::parseConfig(bool readQuasselStanzas)
 {
     if (!_configFile->exists())
@@ -142,11 +141,10 @@ bool OidentdConfigGenerator::parseConfig(bool readQuasselStanzas)
     return true;
 }
 
-
 bool OidentdConfigGenerator::writeConfig()
 {
 #ifdef HAVE_UMASK
-    mode_t prev_umask = umask(S_IXUSR | S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH); // == 0133, rw-r--r--
+    mode_t prev_umask = umask(S_IXUSR | S_IWGRP | S_IXGRP | S_IWOTH | S_IXOTH);  // == 0133, rw-r--r--
 #endif
     bool not_open = (!_configFile->isOpen() && !_configFile->open(QIODevice::ReadWrite | QIODevice::Text));
 #ifdef HAVE_UMASK
@@ -168,8 +166,7 @@ bool OidentdConfigGenerator::writeConfig()
     return true;
 }
 
-
-bool OidentdConfigGenerator::lineByUs(const QByteArray &line)
+bool OidentdConfigGenerator::lineByUs(const QByteArray& line)
 {
     return _quasselStanzaRx.exactMatch(line);
 }