From 7e70e4c1377c78f12e9d55652e23f36d44d03cf7 Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 19 Jun 2015 22:50:48 +0200 Subject: [PATCH] TextTreeItem is no more. --- src/calamares/CMakeLists.txt | 1 - .../progresstree/ProgressTreeModel.cpp | 1 - src/calamares/progresstree/TextTreeItem.cpp | 39 ------------------- src/calamares/progresstree/TextTreeItem.h | 39 ------------------- 4 files changed, 80 deletions(-) delete mode 100644 src/calamares/progresstree/TextTreeItem.cpp delete mode 100644 src/calamares/progresstree/TextTreeItem.h diff --git a/src/calamares/CMakeLists.txt b/src/calamares/CMakeLists.txt index 3b91b7ec2..d1ae11b82 100644 --- a/src/calamares/CMakeLists.txt +++ b/src/calamares/CMakeLists.txt @@ -15,7 +15,6 @@ set( calamaresSources progresstree/ProgressTreeItem.cpp progresstree/ProgressTreeModel.cpp progresstree/ProgressTreeView.cpp - progresstree/TextTreeItem.cpp progresstree/ViewStepItem.cpp ) diff --git a/src/calamares/progresstree/ProgressTreeModel.cpp b/src/calamares/progresstree/ProgressTreeModel.cpp index 76190069d..03432328a 100644 --- a/src/calamares/progresstree/ProgressTreeModel.cpp +++ b/src/calamares/progresstree/ProgressTreeModel.cpp @@ -18,7 +18,6 @@ #include "ProgressTreeModel.h" -#include "progresstree/TextTreeItem.h" #include "progresstree/ViewStepItem.h" #include "ViewManager.h" diff --git a/src/calamares/progresstree/TextTreeItem.cpp b/src/calamares/progresstree/TextTreeItem.cpp deleted file mode 100644 index 8e5c1c6e4..000000000 --- a/src/calamares/progresstree/TextTreeItem.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014-2015, Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#include "TextTreeItem.h" - -#include "ProgressTreeModel.h" - -TextTreeItem::TextTreeItem( std::function< QString() > textReturner, - ProgressTreeItem* parent ) - : ProgressTreeItem( parent ) -{ - m_textReturner = textReturner; -} - - -QVariant -TextTreeItem::data( int role ) const -{ - if ( role == ProgressTreeModel::ProgressTreeItemRole ) - return this; - if ( role == Qt::DisplayRole ) - return m_textReturner(); - return QVariant(); -} diff --git a/src/calamares/progresstree/TextTreeItem.h b/src/calamares/progresstree/TextTreeItem.h deleted file mode 100644 index fb5890082..000000000 --- a/src/calamares/progresstree/TextTreeItem.h +++ /dev/null @@ -1,39 +0,0 @@ -/* === This file is part of Calamares - === - * - * Copyright 2014-2015, Teo Mrnjavac - * - * Calamares is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Calamares is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Calamares. If not, see . - */ - -#ifndef TEXTTREEITEM_H -#define TEXTTREEITEM_H - -#include "ProgressTreeItem.h" - -#include - - -class TextTreeItem : public ProgressTreeItem -{ -public: - explicit TextTreeItem( std::function< QString() > textReturner, - ProgressTreeItem* parent = nullptr ); - - virtual QVariant data( int role ) const override; - -private: - std::function< QString() > m_textReturner; -}; - -#endif // TEXTTREEITEM_H