File indexing completed on 2024-04-28 17:06:10

0001 /*
0002     SPDX-FileCopyrightText: 2005 Dirk Eschler <deschler@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2005-2022 Krusader Krew <https://krusader.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #include "searchobject.h"
0009 
0010 #include "../krservices.h"
0011 
0012 SearchObject::SearchObject() = default;
0013 
0014 SearchObject::SearchObject(const QString &searchName, bool found, const QString &note)
0015     : _searchName(searchName)
0016     , _found(found)
0017     , _note(note)
0018 {
0019 }
0020 
0021 SearchObject::~SearchObject() = default;
0022 
0023 // -----------------------------------------------------------------------------
0024 // -----------------------------------------------------------------------------
0025 
0026 Application::Application() = default;
0027 
0028 Application::Application(const QString &searchName, bool found, const QString &appName, const QString &website, const QString &note)
0029     : SearchObject(searchName, found, note)
0030     , _appName(appName)
0031     , _website(website)
0032     , _path(KrServices::fullPathName(appName))
0033 {
0034 }
0035 
0036 Application::Application(const QString &searchName, const QString &website, bool found, const QString &note)
0037     : SearchObject(searchName, found, note)
0038     , _appName(searchName)
0039     , _website(website)
0040     , _path(KrServices::fullPathName(searchName))
0041 {
0042 }
0043 
0044 Application::~Application() = default;
0045 
0046 // -----------------------------------------------------------------------------
0047 // -----------------------------------------------------------------------------
0048 
0049 Archiver::Archiver()
0050     : Application()
0051 {
0052 }
0053 
0054 Archiver::Archiver(const QString &searchName, const QString &website, bool found, bool isPacker, bool isUnpacker, const QString &note)
0055     : Application(searchName, website, found, note)
0056     , _isPacker(isPacker)
0057     , _isUnpacker(isUnpacker)
0058 {
0059 }
0060 
0061 Archiver::~Archiver() = default;
0062 
0063 // -----------------------------------------------------------------------------
0064 // -----------------------------------------------------------------------------
0065 
0066 ApplicationGroup::ApplicationGroup(const QString &searchName, bool foundGroup, const QList<Application *> &apps, const QString &note)
0067     : SearchObject(searchName, foundGroup, note)
0068     , _apps(apps)
0069     , _foundGroup(foundGroup)
0070 {
0071 }
0072 
0073 ApplicationGroup::~ApplicationGroup() = default;