Skip to content
Snippets Groups Projects
Commit b47a54c4 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

corrections (PR review)

parent bcdd3734
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,8 @@ public: ...@@ -37,8 +37,8 @@ public:
//! Info about what this loader does. Is shown on the import dialog pane //! Info about what this loader does. Is shown on the import dialog pane
virtual QString info() const; virtual QString info() const;
//! Fills the widget on the import dialog pane. This base class does nothing (=> no editable //! Fills the widget on the import dialog pane. This base class' implementation does nothing
//! properties) //! (meaning "no editable properties")
virtual void populatePropertiesWidget(QWidget* parent); virtual void populatePropertiesWidget(QWidget* parent);
//! Read all values from the properties UI into the internal variables //! Read all values from the properties UI into the internal variables
......
...@@ -38,11 +38,10 @@ QString table(int nColumns, const QStringList& entries, const QString& attribute ...@@ -38,11 +38,10 @@ QString table(int nColumns, const QStringList& entries, const QString& attribute
int col = 0; int col = 0;
bool bShowAsHorizontalHeader = bHasHorizontalHeader; bool bShowAsHorizontalHeader = bHasHorizontalHeader;
for (QStringList::size_type i = 0; i < entries.size(); i++) { for (QStringList::size_type i = 0; i < entries.size(); i++) {
if (bShowAsHorizontalHeader) { if (bShowAsHorizontalHeader)
result += "<th>" + entries[i] + "</th>"; result += "<th>" + entries[i] + "</th>";
} else { else
result += "<td valign=\"top\">" + entries[i] + "</td>"; result += "<td valign=\"top\">" + entries[i] + "</td>";
}
col++; col++;
if ((col == nColumns) && (i < entries.size() - 1)) // start new line? if ((col == nColumns) && (i < entries.size() - 1)) // start new line?
...@@ -60,7 +59,7 @@ QString table(int nColumns, const QStringList& entries, const QString& attribute ...@@ -60,7 +59,7 @@ QString table(int nColumns, const QStringList& entries, const QString& attribute
QString AutomaticDataLoader1D::name() const QString AutomaticDataLoader1D::name() const
{ {
return "Automatic 1D import (BornAgain 1.18.0)"; return "Legacy from BornAgain 1.18";
} }
QString AutomaticDataLoader1D::info() const QString AutomaticDataLoader1D::info() const
......
...@@ -495,7 +495,7 @@ bool QREDataLoader::fillImportDetailsTable(QTableWidget* table, bool fileContent ...@@ -495,7 +495,7 @@ bool QREDataLoader::fillImportDetailsTable(QTableWidget* table, bool fileContent
return true; return true;
} }
void QREDataLoader::estimateSettings(const QString& filename) void QREDataLoader::guessSettings(const QString& filename)
{ {
// #baimport implement estimateSettings (separator) // #baimport implement estimateSettings (separator)
// search for lines which have start with numbers, then try the separators // search for lines which have start with numbers, then try the separators
...@@ -633,8 +633,7 @@ void QREDataLoader::calculateFromParseResult() const ...@@ -633,8 +633,7 @@ void QREDataLoader::calculateFromParseResult() const
continue; continue;
} }
const bool isDuplicateQ = foundQValues.contains(q); if (foundQValues.contains(q)) {
if (isDuplicateQ) {
m_importResult.calculationErrors[lineNr] = m_importResult.calculationErrors[lineNr] =
QString("The value %1 for Q is duplicate - line is discarded").arg(q); QString("The value %1 for Q is duplicate - line is discarded").arg(q);
continue; continue;
......
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
QStringList* warnings) const override; QStringList* warnings) const override;
virtual bool fillImportDetailsTable(QTableWidget* table, bool fileContent, bool rawContent, virtual bool fillImportDetailsTable(QTableWidget* table, bool fileContent, bool rawContent,
bool processedContent) const override; bool processedContent) const override;
void estimateSettings(const QString& filename); void guessSettings(const QString& filename);
private: private:
void parseFile(QString& fileContent) const; void parseFile(QString& fileContent) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment