From a4b232606e4c9f5778c2f1cec713a1e85fafe5de Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 13 Nov 2023 09:47:26 +0100 Subject: [PATCH] rm namespace prefix --- GUI/View/FitObjective/FitParameterDelegate.cpp | 6 +++--- GUI/View/PropertyEditor/PropertyEditorFactory.cpp | 6 +++--- GUI/View/PropertyEditor/PropertyEditorFactory.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/GUI/View/FitObjective/FitParameterDelegate.cpp b/GUI/View/FitObjective/FitParameterDelegate.cpp index 4c79969f0db..e4d39740b25 100644 --- a/GUI/View/FitObjective/FitParameterDelegate.cpp +++ b/GUI/View/FitObjective/FitParameterDelegate.cpp @@ -27,8 +27,8 @@ FitParameterDelegate::FitParameterDelegate(QObject* parent) void FitParameterDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const { - if (GUI::View::PropertyEditorFactory::hasStringRepresentation(index)) { - QString text = GUI::View::PropertyEditorFactory::toString(index); + if (PropertyEditorFactory::hasStringRepresentation(index)) { + QString text = PropertyEditorFactory::toString(index); paintCustomLabel(painter, option, index, text); } else QStyledItemDelegate::paint(painter, option, index); @@ -105,7 +105,7 @@ QWidget* FitParameterDelegate::createEditorFromIndex(const QModelIndex& index, { if (index.internalPointer()) { auto* item = static_cast<QObject*>(index.internalPointer()); - return GUI::View::PropertyEditorFactory::CreateEditor(item, parent); + return PropertyEditorFactory::CreateEditor(item, parent); } return nullptr; } diff --git a/GUI/View/PropertyEditor/PropertyEditorFactory.cpp b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp index dfed89c1b92..cd4ae7fa5ac 100644 --- a/GUI/View/PropertyEditor/PropertyEditorFactory.cpp +++ b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp @@ -41,7 +41,7 @@ bool isComboProperty(const QVariant& variant) } // namespace -bool GUI::View::PropertyEditorFactory::hasStringRepresentation(const QModelIndex& index) +bool PropertyEditorFactory::hasStringRepresentation(const QModelIndex& index) { auto variant = index.data(); if (isComboProperty(variant)) @@ -52,7 +52,7 @@ bool GUI::View::PropertyEditorFactory::hasStringRepresentation(const QModelIndex return false; } -QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index) +QString PropertyEditorFactory::toString(const QModelIndex& index) { auto variant = index.data(); if (isComboProperty(variant)) @@ -67,7 +67,7 @@ QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index) return ""; } -QWidget* GUI::View::PropertyEditorFactory::CreateEditor(QObject* item, QWidget* parent) +QWidget* PropertyEditorFactory::CreateEditor(QObject* item, QWidget* parent) { CustomEditor* result(nullptr); diff --git a/GUI/View/PropertyEditor/PropertyEditorFactory.h b/GUI/View/PropertyEditor/PropertyEditorFactory.h index 61461436d3c..ed6cb1b86f6 100644 --- a/GUI/View/PropertyEditor/PropertyEditorFactory.h +++ b/GUI/View/PropertyEditor/PropertyEditorFactory.h @@ -3,7 +3,7 @@ // BornAgain: simulate and fit reflection and scattering // //! @file GUI/View/PropertyEditor/PropertyEditorFactory.h -//! @brief Defines namespace GUI::View::PropertyEditorFactory +//! @brief Defines namespace PropertyEditorFactory //! //! @homepage http://www.bornagainproject.org //! @license GNU General Public License v3 or higher (see COPYING) @@ -19,7 +19,7 @@ //! Creates editors for SessionItems. -namespace GUI::View::PropertyEditorFactory { +namespace PropertyEditorFactory { //! Returns true if the index data has known (custom) conversion to string. bool hasStringRepresentation(const QModelIndex& index); @@ -30,6 +30,6 @@ QString toString(const QModelIndex& index); //! Creates an editor suitable for editing of item.value() QWidget* CreateEditor(QObject* item, QWidget* parent = nullptr); -} // namespace GUI::View::PropertyEditorFactory +} // namespace PropertyEditorFactory #endif // BORNAGAIN_GUI_VIEW_PROPERTYEDITOR_PROPERTYEDITORFACTORY_H -- GitLab