"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/backend/lib/XmlStreamReader.cpp" between
labplot-2.8.1.tar.gz and labplot-2.8.2.tar.gz

About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.

XmlStreamReader.cpp  (labplot-2.8.1):XmlStreamReader.cpp  (labplot-2.8.2)
skipping to change at line 51 skipping to change at line 51
XmlStreamReader::XmlStreamReader(const QByteArray& data) : QXmlStreamReader(data ) { XmlStreamReader::XmlStreamReader(const QByteArray& data) : QXmlStreamReader(data ) {
} }
XmlStreamReader::XmlStreamReader(const QString& data) : QXmlStreamReader(data) { XmlStreamReader::XmlStreamReader(const QString& data) : QXmlStreamReader(data) {
} }
XmlStreamReader::XmlStreamReader(const char* data) : QXmlStreamReader(data) { XmlStreamReader::XmlStreamReader(const char* data) : QXmlStreamReader(data) {
} }
QStringList XmlStreamReader::warningStrings() const { const QStringList& XmlStreamReader::warningStrings() const {
return m_warnings; return m_warnings;
} }
/*
* returns the human readable string for the missing CAS plugins in case
* the project has some CAS content but the application was either not compiled
with
* CAS/Cantor support or the correspongind plugins for the required backends are
missing.
*
* The returned text is in the form "Octave" or "Octave and Maxima" or "Octave,
Maxima and Python", etc.
*/
QString XmlStreamReader::missingCASWarning() const {
const int count = m_missingCASPlugins.count();
if (count == 1)
return m_missingCASPlugins.constFirst();
else {
QString msg;
for (int i = 0; i < count; ++ i) {
if (!msg.isEmpty()) {
if (i == count - 1)
msg += QLatin1Char(' ') + i18n("and") + Q
Latin1Char(' ');
else
msg += QLatin1String(", ");
}
msg += m_missingCASPlugins.at(i);
}
return msg;
}
}
bool XmlStreamReader::hasWarnings() const { bool XmlStreamReader::hasWarnings() const {
return !(m_warnings.isEmpty()); return !m_warnings.isEmpty();
}
bool XmlStreamReader::hasMissingCASWarnings() const {
return !m_missingCASPlugins.isEmpty();
}
void XmlStreamReader::setFailedCASMissing(bool value) {
m_failedCASMissing = value;
}
/*!
* returns \c true if the loading of an project object failed because
* of the missing CAS functionality (no CAS support or missing CAS plugin).
* returns \c false if the loadign failed because of other reasons
* like broken XML or missing important and required attributes.
*/
bool XmlStreamReader::failedCASMissing() const {
return m_failedCASMissing;
} }
void XmlStreamReader::raiseError(const QString & message) { void XmlStreamReader::raiseError(const QString & message) {
QXmlStreamReader::raiseError(i18n("line %1, column %2: %3", lineNumber(), columnNumber(), message)); QXmlStreamReader::raiseError(i18n("line %1, column %2: %3", lineNumber(), columnNumber(), message));
} }
void XmlStreamReader::raiseWarning(const QString & message) { void XmlStreamReader::raiseWarning(const QString & message) {
m_warnings.append(i18n("line %1, column %2: %3", lineNumber(), columnNumb er(), message)); m_warnings.append(i18n("line %1, column %2: %3", lineNumber(), columnNumb er(), message));
} }
void XmlStreamReader::raiseMissingCASWarning(const QString& name) {
m_missingCASPlugins.append(name);
}
/*! /*!
* Go to the next start or end element tag * Go to the next start or end element tag
* If the end of the document is reached, an error is raised. * If the end of the document is reached, an error is raised.
* \return false if end of document reached, otherwise true * \return false if end of document reached, otherwise true
*/ */
bool XmlStreamReader::skipToNextTag() { bool XmlStreamReader::skipToNextTag() {
if (atEnd()) { if (atEnd()) {
raiseError(i18n("unexpected end of document")); raiseError(i18n("unexpected end of document"));
return false; return false;
} }
 End of changes. 4 change blocks. 
2 lines changed or deleted 54 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)