From ac3959a116d105c933d3f458b6a8c890e4ca031b Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (l)" <j.wuttke@fz-juelich.de>
Date: Fri, 5 Nov 2021 10:04:32 +0100
Subject: [PATCH] code layout

---
 GUI/Models/Data/ApplicationModels.cpp | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/GUI/Models/Data/ApplicationModels.cpp b/GUI/Models/Data/ApplicationModels.cpp
index c34aa35cc98..73a18a4f750 100644
--- a/GUI/Models/Data/ApplicationModels.cpp
+++ b/GUI/Models/Data/ApplicationModels.cpp
@@ -111,7 +111,6 @@ void ApplicationModels::writeTo(QXmlStreamWriter* writer)
 void ApplicationModels::readFrom(QXmlStreamReader* reader, MessageService* messageService)
 {
     try {
-
         for (auto model : modelList()) {
             if (model->getModelTag() == reader->name()) {
                 model->readFrom(reader, messageService);
@@ -147,12 +146,12 @@ QVector<SessionItem*> ApplicationModels::nonXMLItems() const
 
 void ApplicationModels::connectModel(SessionModel* model) const
 {
-    if (model) {
-        connect(model, &SessionModel::dataChanged, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-        connect(model, &SessionModel::rowsRemoved, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-        connect(model, &SessionModel::rowsInserted, this, &ApplicationModels::modelChanged,
-                Qt::UniqueConnection);
-    }
+    if (!model)
+        return;
+    connect(model, &SessionModel::dataChanged, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
+    connect(model, &SessionModel::rowsRemoved, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
+    connect(model, &SessionModel::rowsInserted, this, &ApplicationModels::modelChanged,
+            Qt::UniqueConnection);
 }
-- 
GitLab