mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
From 9efc735bb708cd6f9a6e867f4db265602d548ccb Mon Sep 17 00:00:00 2001
|
|
From: Georg Zotti <Georg.Zotti@univie.ac.at>
|
|
Date: Tue, 2 Oct 2022 23:33:49 +1000
|
|
Subject: Use QString instead of QByteArray (Fix #2709)
|
|
|
|
|
|
diff --git a/plugins/Satellites/src/Satellite.cpp b/plugins/Satellites/src/Satellite.cpp
|
|
index ff97eb2..589fd5f 100644
|
|
--- a/plugins/Satellites/src/Satellite.cpp
|
|
+++ b/plugins/Satellites/src/Satellite.cpp
|
|
@@ -251,8 +251,8 @@ QVariantMap Satellite::getMap(void)
|
|
map["stdMag"] = stdMag;
|
|
map["rcs"] = RCS;
|
|
map["status"] = status;
|
|
- map["tle1"] = tleElements.first.data();
|
|
- map["tle2"] = tleElements.second.data();
|
|
+ map["tle1"] = tleElements.first;
|
|
+ map["tle2"] = tleElements.second;
|
|
|
|
if (!description.isEmpty())
|
|
map["description"] = description;
|
|
@@ -544,8 +544,8 @@ QVariantMap Satellite::getInfoMap(const StelCore *core) const
|
|
|
|
map.insert("description", QString(description).replace("\n", " - "));
|
|
map.insert("catalog", id);
|
|
- map.insert("tle1", tleElements.first.data());
|
|
- map.insert("tle2", tleElements.second.data());
|
|
+ map.insert("tle1", tleElements.first);
|
|
+ map.insert("tle2", tleElements.second);
|
|
map.insert("tle-epoch", tleEpoch);
|
|
|
|
if (!internationalDesignator.isEmpty())
|
|
@@ -788,8 +788,8 @@ void Satellite::setNewTleElements(const QString& tle1, const QString& tle2)
|
|
delete old;
|
|
}
|
|
|
|
- tleElements.first = tle1.toUtf8();
|
|
- tleElements.second = tle2.toUtf8();
|
|
+ tleElements.first = tle1;
|
|
+ tleElements.second = tle2;
|
|
|
|
pSatWrapper = new gSatWrapper(id, tle1, tle2);
|
|
orbitPoints.clear();
|
|
@@ -802,8 +802,8 @@ void Satellite::setNewTleElements(const QString& tle1, const QString& tle2)
|
|
|
|
void Satellite::recomputeSatData()
|
|
{
|
|
- calculateEpochFromLine1(tleElements.first.data());
|
|
- calculateSatDataFromLine2(tleElements.second.data());
|
|
+ calculateEpochFromLine1(tleElements.first);
|
|
+ calculateSatDataFromLine2(tleElements.second);
|
|
}
|
|
|
|
void Satellite::update(double)
|
|
diff --git a/plugins/Satellites/src/Satellite.hpp b/plugins/Satellites/src/Satellite.hpp
|
|
index f612099..af7aed6 100644
|
|
--- a/plugins/Satellites/src/Satellite.hpp
|
|
+++ b/plugins/Satellites/src/Satellite.hpp
|
|
@@ -313,7 +313,7 @@ private:
|
|
int status;
|
|
//! Contains the J2000 position.
|
|
Vec3d XYZ;
|
|
- QPair< QByteArray, QByteArray > tleElements;
|
|
+ QPair< QString, QString > tleElements;
|
|
double height, range, rangeRate;
|
|
QList<CommLink> comms;
|
|
Vec3f hintColor;
|
|
--
|
|
2.36.1
|
|
|