MCPcopy Create free account
hub / github.com/KDE/labplot / configureSpreadsheet

Method configureSpreadsheet

src/backend/datasources/DatasetHandler.cpp:141–158  ·  view source on GitHub ↗

* @brief Configures the spreadsheet based on the metadata file. */

Source from the content-addressed store, hash-verified

139 * @brief Configures the spreadsheet based on the metadata file.
140 */
141void DatasetHandler::configureSpreadsheet(const QString& description) {
142 DEBUG("Start preparing spreadsheet");
143 if (!m_object->isEmpty()) {
144 if (m_object->contains(QLatin1String("name")))
145 m_spreadsheet->setName(m_object->value(QStringLiteral("name")).toString());
146 else
147 markMetadataAsInvalid();
148
149 if (description.startsWith(QLatin1String("<!DOCTYPE html"))) {
150 // remove html-formatting
151 QTextEdit te;
152 te.setHtml(description);
153 m_spreadsheet->setComment(te.toPlainText());
154 } else
155 m_spreadsheet->setComment(description);
156 } else
157 markMetadataAsInvalid();
158}
159
160/**
161 * @brief Extracts the download URL of the dataset and initiates the process of download.

Callers

nothing calls this directly

Calls 7

setHtmlMethod · 0.80
setCommentMethod · 0.80
isEmptyMethod · 0.45
containsMethod · 0.45
setNameMethod · 0.45
toStringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected