[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kstars/gsoc2012-spacetime] /: Minor documentation changes. Removed obsolete TODOs
From: Rishab Arora <ra.rishab () gmail ! com>
Date: 2012-09-01 0:00:50
Message-ID: 20120901000050.8B578A60CE () git ! kde ! org
[Download RAW message or body]
Git commit 85292cdb2d864dec9462462d721a37fe5486c045 by Rishab Arora.
Committed on 01/09/2012 at 00:27.
Pushed by rishabarora into branch 'gsoc2012-spacetime'.
Minor documentation changes. Removed obsolete TODOs
M +7 -10 Tests/testcsvparser.cpp
M +2 -4 Tests/testcsvparser.h
M +0 -2 datahandlers/catalogdb.cpp
M +1 -2 kstars/skycomponents/catalogcomponent.h
http://commits.kde.org/kstars/85292cdb2d864dec9462462d721a37fe5486c045
diff --git a/Tests/testcsvparser.cpp b/Tests/testcsvparser.cpp
index 32e6618..f6a8b54 100644
--- a/Tests/testcsvparser.cpp
+++ b/Tests/testcsvparser.cpp
@@ -31,8 +31,8 @@ TestCSVParser::TestCSVParser(): QObject() {
* To add/change tests, we'll need to modify 2 places. The file and this class.
* So we write the file from the class.
*/
- csv_test_cases_.append("\n");
- csv_test_cases_.append(QString(","
+ test_cases_.append("\n");
+ test_cases_.append(QString(","
"isn't,"
"it,"
"\"amusing\","
@@ -44,7 +44,7 @@ TestCSVParser::TestCSVParser(): QObject() {
"-3.141,"
"isn't,"
"either\n"));
- csv_test_cases_.append(QString(","
+ test_cases_.append(QString(","
"isn't,"
"it,"
"\"amusing\","
@@ -53,7 +53,7 @@ TestCSVParser::TestCSVParser(): QObject() {
"\"isn't, pi\","
"and,"
"\"\",")); // less than required fields
- csv_test_cases_.append(QString(","
+ test_cases_.append(QString(","
"isn't,"
"it,"
"\"amusing\","
@@ -65,8 +65,8 @@ TestCSVParser::TestCSVParser(): QObject() {
"-3.141,"
"isn't,"
"either\n"));
- csv_test_cases_.append(",,,,,,,,,,,\n");
- csv_test_cases_.append("\n");
+ test_cases_.append(",,,,,,,,,,,\n");
+ test_cases_.append("\n");
QString file_name("TestCSV.txt");
file_name = KStandardDirs::locateLocal("appdata", file_name);
if (!file_name.isNull()) {
@@ -76,7 +76,7 @@ TestCSVParser::TestCSVParser(): QObject() {
}
}
QTextStream out_stream(&test_csv_file_);
- foreach(const QString &test_case, csv_test_cases_)
+ foreach(const QString &test_case, test_cases_)
out_stream << test_case;
test_csv_file_.close();
@@ -132,7 +132,6 @@ void TestCSVParser::CSVMixedInputs() {
* 5. integer
* 6. float
*/
-// KSParser test_parser(QString("TestCSV.txt"), '#', sequence);
QHash<QString, QVariant> row_content = test_parser_->ReadNextRow();
qDebug() << row_content["field1"];
QVERIFY(row_content["field1"] == QString(""));
@@ -162,7 +161,6 @@ void TestCSVParser::CSVEmptyRow() {
* 2. missing float
* 3. missing string
*/
-// KSParser test_parser(QString("TestCSV.txt"), '#', sequence);
QHash<QString, QVariant> row_content = test_parser_->ReadNextRow();
qDebug() << row_content["field1"];
QVERIFY(row_content["field1"] == QString(""));
@@ -185,7 +183,6 @@ void TestCSVParser::CSVNoRow() {
* The parser is designed to skip an empty row so we can
* test this for a boundary case. i.e. newline at the end.
*/
-// KSParser test_parser(QString("TestCSV.txt"), '#', sequence);
QHash<QString, QVariant> row_content = test_parser_->ReadNextRow();
qDebug() << row_content["field1"];
QVERIFY(row_content["field1"] == QString("Null"));
diff --git a/Tests/testcsvparser.h b/Tests/testcsvparser.h
index f6493d5..fb05b58 100644
--- a/Tests/testcsvparser.h
+++ b/Tests/testcsvparser.h
@@ -23,7 +23,7 @@
#include "datahandlers/ksparser.h"
#include "kstars/ksfilereader.h"
-// TODO(spacetime): documentation
+
class TestCSVParser: public QObject {
Q_OBJECT
public:
@@ -37,9 +37,7 @@ class TestCSVParser: public QObject {
void CSVReadMissingFile();
private:
- QStringList csv_test_cases_;
- QStringList fw_test_cases_; // for fixed width test cases
- QList<int> fw_widths_;
+ QStringList test_cases_;
QList< QPair<QString, KSParser::DataTypes> > sequence_;
QFile test_csv_file_;
KSParser *test_parser_;
diff --git a/datahandlers/catalogdb.cpp b/datahandlers/catalogdb.cpp
index f2f018e..d36a921 100644
--- a/datahandlers/catalogdb.cpp
+++ b/datahandlers/catalogdb.cpp
@@ -20,7 +20,6 @@
bool CatalogDB::Initialize() {
- // TODO(spacetime): Shift db to user directory
skydb_ = QSqlDatabase::addDatabase("QSQLITE", "skydb");
QString dbfile = KStandardDirs::locateLocal("appdata",
QString("skycomponents.db"));
@@ -124,7 +123,6 @@ void CatalogDB::RefreshCatalogList() {
for (int i = 0; i < catalog.rowCount(); ++i) {
QSqlRecord record = catalog.record(i);
- // TODO(spacetime): complete list!
QString name = record.value("Name").toString();
catalog_list_.append(name);
// QString author = record.value("Author").toString();
diff --git a/kstars/skycomponents/catalogcomponent.h b/kstars/skycomponents/catalogcomponent.h
index 3bcb58d..d2f134a 100644
--- a/kstars/skycomponents/catalogcomponent.h
+++ b/kstars/skycomponents/catalogcomponent.h
@@ -24,13 +24,12 @@
#include "datahandlers/catalogdb.h"
struct stat;
-//JH: TODO: this class should only contain one custom catalog.
/**
*@class CatalogComponent
*Represents a custom user-defined catalog.
Code adapted from CustomCatalogComponent.cpp originally authored
-by Thomas Kabelmann
+by Thomas Kabelmann --spacetime
*@author Thomas Kabelmann
Rishab Arora (spacetime)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic