From f0d36ec714727535898d613b47796c131433c03b Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 22 Apr 2021 13:41:19 +0200
Subject: [PATCH] format comments; make fct local

---
 .../ImportDataWidgets/ImportDataUtils.cpp      |  6 ++++--
 .../Views/ImportDataWidgets/ImportDataUtils.h  | 18 +++++++++---------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp b/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
index c01fe266cea..bb72fbcc45a 100644
--- a/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
+++ b/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.cpp
@@ -33,6 +33,7 @@
 #include <QMessageBox>
 
 namespace {
+
 const QString filter_string_ba = "Intensity File (*.int *.gz *.tif *.tiff *.txt *.csv);;"
                                  "Other (*.*)";
 const QString filter_string_ascii = "Intensity File (*.int *.int.gz *.txt *.csv *.dat *.ascii);;"
@@ -48,8 +49,6 @@ int rank(const InstrumentItem& item)
     return static_cast<int>(item.shape().size());
 }
 
-} // namespace
-
 std::unique_ptr<OutputData<double>>
 ImportDataUtils::ImportKnownData(const QString& fileName,
                                  IntensityDataIOFactory::LoaderSelector loader)
@@ -69,6 +68,9 @@ ImportDataUtils::ImportKnownData(const QString& fileName,
     return result;
 }
 
+} // namespace
+
+
 std::unique_ptr<OutputData<double>>
 ImportDataUtils::ImportReflectometryData(const QString& fileName)
 {
diff --git a/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h b/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
index 88d97c95975..060924abe99 100644
--- a/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
+++ b/GUI/coregui/Views/ImportDataWidgets/ImportDataUtils.h
@@ -31,19 +31,19 @@ class AbstractDataLoader;
 
 namespace ImportDataUtils {
 
+//! Imports 2D data, stores them as OutputData, and returns owning pointer.
 std::unique_ptr<OutputData<double>> Import2dData(const QString& fileName,
                                                  IntensityDataIOFactory::LoaderSelector loader);
 
-//! Import 1D data into the given item.
-//! Returns an error text if a fatal error occurred (discard item). "Empty string" means "no fatal
-//! error" => imported item should be kept. The imported item still can have errors, but they might
-//! be solvable by different import settings or by using a different data loader.
-//! selectedLoader is the one which was selected in the open-file-dialog (or null if none selected).
-QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
+//! Imports 1D data into the given item.
 
-std::unique_ptr<OutputData<double>>
-ImportKnownData(const QString& fileName,
-                IntensityDataIOFactory::LoaderSelector loader = IntensityDataIOFactory::automatic);
+//! Returns an error text if a fatal error occurred (discard item).
+//! "Empty string" means "no fatal error" => imported item should be kept.
+//! The imported item still can have errors, but they might be solvable
+//! by different import settings or by using a different data loader.
+//! Argument selectedLoader is the one which was selected in the open-file-dialog
+//! (or null if none selected).
+QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
 
 std::unique_ptr<OutputData<double>> ImportReflectometryData(const QString& fileName);
 
-- 
GitLab