• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Stellarium / stellarium / 15291801018

28 May 2025 04:52AM UTC coverage: 11.931% (-0.02%) from 11.951%
15291801018

push

github

alex-w
Added new set of navigational stars (XIX century)

0 of 6 new or added lines in 2 files covered. (0.0%)

14124 existing lines in 74 files now uncovered.

14635 of 122664 relevant lines covered (11.93%)

18291.42 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/core/StelObjectModule.cpp
1
/*
2
 * Stellarium
3
 * Copyright (C) 2006 Fabien Chereau
4
 * Copyright (C) 2016 Marcos Cardinot
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
19
 */
20

21
#include "StelObjectModule.hpp"
22

23
StelObjectModule::StelObjectModule()
×
24
 : StelModule()
×
25
{
26
}
×
27

28
StelObjectModule::~StelObjectModule()
×
29
{
30
}
×
31

32
bool StelObjectModule::matchObjectName(const QString& objName, const QString& objPrefix, bool useStartOfWords) const
×
33
{
34
        if (useStartOfWords)
×
35
                return objName.startsWith(objPrefix, Qt::CaseInsensitive);
×
36
        else
37
                return objName.contains(objPrefix, Qt::CaseInsensitive);
×
38
}
39

40
QList<StelObjectP> StelObjectModule::searchAround(const Vec3d& v, double limitFov, const StelCore* core) const
×
41
{
42
        return QList<StelObjectP>();
×
43
}
44

UNCOV
45
QStringList StelObjectModule::listMatchingObjects(const QString &objPrefix, int maxNbItem, bool useStartOfWords) const
×
46
{
47
        QStringList result;
×
48
        if (maxNbItem <= 0)
×
49
                return result;
×
50

51
        QStringList names;
×
52
        names << listAllObjects(false) << listAllObjects(true);
×
UNCOV
53
        names.removeDuplicates();
×
54
        QString fullMatch = "";
×
55
        for (const auto& name : std::as_const(names))
×
56
        {
57
                if (!matchObjectName(name, objPrefix, useStartOfWords))
×
58
                        continue;
×
59

UNCOV
60
                if (name==objPrefix)
×
UNCOV
61
                        fullMatch = name;
×
62
                else
63
                        result.append(name);
×
64
                if (result.size() >= maxNbItem)
×
65
                        break;
×
66
        }
67

68
        result.sort();
×
UNCOV
69
        if (!fullMatch.isEmpty())
×
UNCOV
70
                result.prepend(fullMatch);
×
UNCOV
71
        return result;
×
72
}
×
73

UNCOV
74
QStringList StelObjectModule::listAllObjectsByType(const QString &objType, bool inEnglish) const
×
75
{
76
        Q_UNUSED(objType)
77
        Q_UNUSED(inEnglish)
UNCOV
78
        return QStringList();
×
79
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc