From 1a9d66a32d31c97275ca7e18032aed79c6ad1868 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Thu, 2 Aug 2007 23:44:56 +0000 Subject: [PATCH] Adapt to new KWarning/kFatal/kDebug api svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=695800 --- extdate/extdatepicker.cpp | 10 +++++----- extdate/extdatetbl.cpp | 8 ++++---- extdate/extdatetime.cpp | 2 +- extdate/extdatetimeedit.cpp | 12 ++++++------ extdate/tests/edtedit_widget.cpp | 4 ++-- kdeeducore/keduvocdocument.cpp | 4 ++-- kdeeducore/keduvocexpression.cpp | 2 +- kdeeducore/keduvockvtmlreader.cpp | 10 +++++----- kdeeducore/keduvoctranslation.cpp | 6 +++--- kdeeducore/leitnersystemview.cpp | 2 +- kdeeducore/tests/converter.cpp | 4 ++-- kdeeduui/kdeeduglossary.cpp | 4 ++-- libscience/elementparser.cpp | 4 ++-- libscience/isotopeparser.cpp | 14 +++++++------- libscience/moleculeparser.cpp | 16 ++++++++-------- libscience/parser.cpp | 4 ++-- libscience/tests/isotopereadingtest.cpp | 6 +++--- libscience/tests/xmlreadingtest.cpp | 2 +- 18 files changed, 57 insertions(+), 57 deletions(-) diff --git a/extdate/extdatepicker.cpp b/extdate/extdatepicker.cpp index 6860dff..ee5da8a 100644 --- a/extdate/extdatepicker.cpp +++ b/extdate/extdatepicker.cpp @@ -234,7 +234,7 @@ ExtDatePicker::resizeEvent(QResizeEvent* e) void ExtDatePicker::dateChangedSlot(const ExtDate &date) { - kDebug(298) << "ExtDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl; + kDebug(298) << "ExtDatePicker::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")."; //must remain commented unless ExtDate gets added to kdelibs @@ -257,7 +257,7 @@ ExtDatePicker::dateChangedSlot(const ExtDate &date) void ExtDatePicker::tableClickedSlot() { - kDebug(298) << "ExtDatePicker::tableClickedSlot: table clicked." << endl; + kDebug(298) << "ExtDatePicker::tableClickedSlot: table clicked."; emit(dateSelected(table->getDate())); emit(tableClicked()); } @@ -278,7 +278,7 @@ ExtDatePicker::setDate(const ExtDate& date) } else { - kDebug(298) << "ExtDatePicker::setDate: refusing to set invalid date." << endl; + kDebug(298) << "ExtDatePicker::setDate: refusing to set invalid date."; return false; } } @@ -434,12 +434,12 @@ ExtDatePicker::lineEnterPressed() // ----- if(val->date(line->text(), temp)==QValidator::Acceptable) { - kDebug(298) << "ExtDatePicker::lineEnterPressed: valid date entered." << endl; + kDebug(298) << "ExtDatePicker::lineEnterPressed: valid date entered."; emit(dateEntered(temp)); setDate(temp); } else { KNotification::beep(); - kDebug(298) << "ExtDatePicker::lineEnterPressed: invalid date entered." << endl; + kDebug(298) << "ExtDatePicker::lineEnterPressed: invalid date entered."; } } diff --git a/extdate/extdatetbl.cpp b/extdate/extdatetbl.cpp index 2735553..b68f9c3 100644 --- a/extdate/extdatetbl.cpp +++ b/extdate/extdatetbl.cpp @@ -130,7 +130,7 @@ ExtDateTable::ExtDateTable(QWidget *parent, ExtDate date_, const char* name, Qt: setFontSize(10); if(!date_.isValid()) { - kDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date." << endl; + kDebug() << "ExtDateTable ctor: WARNING: Given date is invalid, using current date."; date_=ExtDate::currentDate(); } setFocusPolicy( Qt::StrongFocus ); @@ -481,7 +481,7 @@ ExtDateTable::setDate(const ExtDate& date_) // ----- if(!date_.isValid()) { - kDebug() << "ExtDateTable::setDate: refusing to set invalid date." << endl; + kDebug() << "ExtDateTable::setDate: refusing to set invalid date."; return false; } if(date!=date_) @@ -497,7 +497,7 @@ ExtDateTable::setDate(const ExtDate& date_) d->calendar->setYMD(temp, d->calendar->year(date), d->calendar->month(date), 1); //temp.setYMD(date.year(), date.month(), 1); - //kDebug() << "firstDayInWeek: " << temp.toString() << endl; + //kDebug() << "firstDayInWeek: " << temp.toString(); firstday=temp.dayOfWeek(); numdays=d->calendar->daysInMonth(date); @@ -537,7 +537,7 @@ ExtDateTable::sizeHint() const return QSize(maxCell.width()*numCols()+2*frameWidth(), (maxCell.height()+2)*numRows()+2*frameWidth()); } else { - kDebug() << "ExtDateTable::sizeHint: obscure failure - " << endl; + kDebug() << "ExtDateTable::sizeHint: obscure failure - "; return QSize(-1, -1); } } diff --git a/extdate/extdatetime.cpp b/extdate/extdatetime.cpp index 9bd194d..94fe052 100644 --- a/extdate/extdatetime.cpp +++ b/extdate/extdatetime.cpp @@ -945,7 +945,7 @@ int ExtDateTime::daysTo( const ExtDateTime &dt ) const \code ExtDateTime dt = ExtDateTime::currentDateTime(); ExtDateTime xmas( ExtDate(dt.date().year(),12,24), QTime(17,00) ); - kDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas" << endl; + kDebug( ) << "There are " << dt.secsTo(xmas) << " seconds to Christmas"; \endcode \sa addSecs(), daysTo(), QTime::secsTo() diff --git a/extdate/extdatetimeedit.cpp b/extdate/extdatetimeedit.cpp index 67e7a49..ae87497 100644 --- a/extdate/extdatetimeedit.cpp +++ b/extdate/extdatetimeedit.cpp @@ -141,7 +141,7 @@ void ExtDateEdit::highlightActiveField() { lineEdit()->setSelection( iStart, iLength ); // //DEBUG -// kDebug() << "selected text: " << lineEdit()->selectedText() << endl; +// kDebug() << "selected text: " << lineEdit()->selectedText(); } @@ -231,7 +231,7 @@ bool ExtDateEdit::focusNextPrevChild( bool next ) { if ( c == 'Y' ) NewField = 2; // //DEBUG -// kDebug() << pos << " " << c << " " << NewField << endl; +// kDebug() << pos << " " << c << " " << NewField; } @@ -247,7 +247,7 @@ void ExtDateEdit::invokeKey( Qt::Key k ) { void ExtDateEdit::focusInEvent( QFocusEvent *e ) { // //DEBUG -// kDebug() << "focusInEvent()" << endl; +// kDebug() << "focusInEvent()"; QSpinBox::focusInEvent(e); highlightActiveField(); @@ -342,7 +342,7 @@ edLineEdit::edLineEdit( ExtDateEdit *parent ) : QLineEdit( parent ) { void edLineEdit::mouseReleaseEvent( QMouseEvent * ) { // //DEBUG -// kDebug() << "mousePressEvent()" << endl; +// kDebug() << "mousePressEvent()"; //assumes no prefix/suffix! QString sdf = edParent->simpleDateFormat(); @@ -357,14 +357,14 @@ void edLineEdit::mouseReleaseEvent( QMouseEvent * ) { else if ( c == 'Y' ) edParent->setActiveField( 2 ); // //DEBUG -// kDebug() << "ActiveField = " << edParent->activeField() << endl; +// kDebug() << "ActiveField = " << edParent->activeField(); edParent->highlightActiveField(); } void edLineEdit::keyPressEvent( QKeyEvent *e ) { // //DEBUG -// kDebug() << "keyPressEvent()" << endl; +// kDebug() << "keyPressEvent()"; switch ( e->key() ) { case Qt::Key_Up: diff --git a/extdate/tests/edtedit_widget.cpp b/extdate/tests/edtedit_widget.cpp index e74133d..4da9a22 100644 --- a/extdate/tests/edtedit_widget.cpp +++ b/extdate/tests/edtedit_widget.cpp @@ -40,8 +40,8 @@ EDTEdit::EDTEdit( QWidget *p=0 ) : KXmlGuiWindow( p ) { EDTEdit::~EDTEdit() { //Output current date setting on exit - kDebug() << "ExDateEdit: " << ed->date().toString() << endl; - kDebug() << "ExDateTimeEdit: " << edt->date().toString() << endl; + kDebug() << "ExDateEdit: " << ed->date().toString(); + kDebug() << "ExDateTimeEdit: " << edt->date().toString(); } #include "edtedit_widget.moc" diff --git a/kdeeducore/keduvocdocument.cpp b/kdeeducore/keduvocdocument.cpp index 8e56a5c..0a421ed 100644 --- a/kdeeducore/keduvocdocument.cpp +++ b/kdeeducore/keduvocdocument.cpp @@ -375,7 +375,7 @@ bool KEduVocDocument::saveAs(const KUrl & url, FileType ft, const QString & gene void KEduVocDocument::merge(KEduVocDocument *docToMerge, bool matchIdentifiers) { - kDebug() << "Merging of docs is not implemented" << endl; /// @todo IMPLEMENT ME + kDebug() << "Merging of docs is not implemented"; /// @todo IMPLEMENT ME /* if (docToMerge) { QApplication::setOverrideCursor(Qt::WaitCursor); @@ -961,7 +961,7 @@ int KEduVocDocument::identifierCount() const int KEduVocDocument::appendIdentifier(const QString & id) { d->m_identifiers.append(id); - kDebug() << "appending identifier" << id << endl; + kDebug() << "appending identifier" << id; return d->m_identifiers.size() - 1; } diff --git a/kdeeducore/keduvocexpression.cpp b/kdeeducore/keduvocexpression.cpp index 9d4f113..9ae8590 100644 --- a/kdeeducore/keduvocexpression.cpp +++ b/kdeeducore/keduvocexpression.cpp @@ -528,7 +528,7 @@ void KEduVocExpression::removeTranslation(int index) return; if (index == 0) { - kDebug() << "Warning - attempting to use removeTranslation(0) to remove the first translation!" << endl; + kDebug() << "Warning - attempting to use removeTranslation(0) to remove the first translation!"; // This will only work when we get everything moved into a translation class. d->m_translations[0] = ""; return; diff --git a/kdeeducore/keduvockvtmlreader.cpp b/kdeeducore/keduvockvtmlreader.cpp index e07dd82..0086e06 100644 --- a/kdeeducore/keduvockvtmlreader.cpp +++ b/kdeeducore/keduvockvtmlreader.cpp @@ -279,7 +279,7 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent) for (int i = 0; i < entryList.count(); ++i) { -//kDebug() << "KEduVocKvtmlReader::readArticle() read " << entryList.count() << " articles. " << endl; +//kDebug() << "KEduVocKvtmlReader::readArticle() read " << entryList.count() << " articles. "; currentElement = entryList.item(i).toElement(); if (currentElement.parentNode() == domElementParent) { QString lang; @@ -293,7 +293,7 @@ bool KEduVocKvtmlReader::readArticle(QDomElement &domElementParent) else lang = "original"; m_doc->appendIdentifier(lang); -//kDebug() << " Identifier " << i << " is " << lang << endl; +//kDebug() << " Identifier " << i << " is " << lang; } else { @@ -1157,9 +1157,9 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent) q_trans = lang; } -//kDebug() << " TranslationList.count(): " << translationList.count() << " Entry count: " << m_doc->entryCount() << endl; +//kDebug() << " TranslationList.count(): " << translationList.count() << " Entry count: " << m_doc->entryCount(); if (m_doc->entryCount() == 0) { // this is because in kvtml the languages are saved in the FIRST ENTRY ONLY. -//kDebug() << " Read Expression with identifiers: " << lang << endl; +//kDebug() << " Read Expression with identifiers: " << lang; // new translation if (lang.isEmpty()) { if (i == 0) { @@ -1268,7 +1268,7 @@ bool KEduVocKvtmlReader::readExpression(QDomElement &domElementParent) expr.translation(i).gradeFrom(0).setQueryDate(qdate); expr.translation(0).gradeFrom(i).setQueryDate(r_qdate); } -//kDebug() << "KEduVocKvtmlReader::readExpression(): id: " << i << " translation: " << textstr << endl; +//kDebug() << "KEduVocKvtmlReader::readExpression(): id: " << i << " translation: " << textstr; // Next translation currentElement = currentElement.nextSiblingElement(KV_TRANS); diff --git a/kdeeducore/keduvoctranslation.cpp b/kdeeducore/keduvoctranslation.cpp index 0cbb9d5..0da254a 100644 --- a/kdeeducore/keduvoctranslation.cpp +++ b/kdeeducore/keduvoctranslation.cpp @@ -25,7 +25,7 @@ public: KEduVocTranslationPrivate () // ( KEduVocTranslation* qq ) //: q ( qq ) { - kDebug() << "KEduVocTranslationPrivate()" <y() > d->m_imageY && e->y() < d->m_imageY + 64 && e->x() < width() ) { diff --git a/kdeeducore/tests/converter.cpp b/kdeeducore/tests/converter.cpp index f68b2ee..364d1c0 100644 --- a/kdeeducore/tests/converter.cpp +++ b/kdeeducore/tests/converter.cpp @@ -54,9 +54,9 @@ int main (int argc, char ** argv) KUrl outfile(arguments->url(1)); KEduVocDocument document; - kDebug() << "Reading " << infile << endl; + kDebug() << "Reading " << infile; document.open(infile); - kDebug() << "Writing to " << outfile << endl; + kDebug() << "Writing to " << outfile; document.saveAs(outfile, KEduVocDocument::kvtml, "converter"); } } diff --git a/kdeeduui/kdeeduglossary.cpp b/kdeeduui/kdeeduglossary.cpp index eb50f83..561edca 100644 --- a/kdeeduui/kdeeduglossary.cpp +++ b/kdeeduui/kdeeduglossary.cpp @@ -160,7 +160,7 @@ bool Glossary::loadLayout( QDomDocument &Document, const KUrl& url ) if ( !layoutFile.exists() ) { - kDebug() << "no such file: " << layoutFile.fileName() << endl; + kDebug() << "no such file: " << layoutFile.fileName(); return false; } @@ -170,7 +170,7 @@ bool Glossary::loadLayout( QDomDocument &Document, const KUrl& url ) // check if document is well-formed if ( !Document.setContent( &layoutFile ) ) { - kDebug() << "wrong xml of " << layoutFile.fileName() << endl; + kDebug() << "wrong xml of " << layoutFile.fileName(); layoutFile.close(); return false; } diff --git a/libscience/elementparser.cpp b/libscience/elementparser.cpp index 6da22c6..19e08cd 100644 --- a/libscience/elementparser.cpp +++ b/libscience/elementparser.cpp @@ -117,9 +117,9 @@ bool ElementSaxParser::startElement(const QString&, const QString &localName, co { if ( attrs.localName( i ) == "units" ) { - //kDebug() << "value of the unit: " << attrs.value(i) << endl; + //kDebug() << "value of the unit: " << attrs.value(i); d->currentUnit = ChemicalDataObject::unit( attrs.value( i ) ); - //kDebug() << "Took " << d->currentUnit << endl; + //kDebug() << "Took " << d->currentUnit; continue; } diff --git a/libscience/isotopeparser.cpp b/libscience/isotopeparser.cpp index 0c5e35c..e082065 100644 --- a/libscience/isotopeparser.cpp +++ b/libscience/isotopeparser.cpp @@ -88,7 +88,7 @@ IsotopeParser::~IsotopeParser() bool IsotopeParser::startElement(const QString&, const QString &localName, const QString&, const QXmlAttributes &attrs) { -//X kDebug() << "IsotopeParser::startElement()" << endl; +//X kDebug() << "IsotopeParser::startElement()"; if (localName == "isotopeList") { d->inElement = true; @@ -99,11 +99,11 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const if ( attrs.localName( i ) == "id" ) d->currentElementSymbol = attrs.value( i ); -//X kDebug() << "Symbol of the current Element: " << attrs.value( i ) << endl; +//X kDebug() << "Symbol of the current Element: " << attrs.value( i ); } } else if ( d->inElement && localName == "isotope") { -//X kDebug() << "setting inIsotope true!" << endl; +//X kDebug() << "setting inIsotope true!"; d->currentIsotope = new Isotope(); d->currentIsotope->addData( ChemicalDataObject( QVariant( d->currentElementSymbol ), ChemicalDataObject::symbol ) ); d->inIsotope = true; @@ -112,7 +112,7 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const if ( attrs.localName( i ) == "number" ) { d->currentIsotope->setNucleons( attrs.value( i ).toInt() ); -//X kDebug() << attrs.value( i ).toInt() << endl; +//X kDebug() << attrs.value( i ).toInt(); } } } else if (d->inIsotope && localName == "scalar") @@ -172,7 +172,7 @@ bool IsotopeParser::startElement(const QString&, const QString &localName, const bool IsotopeParser::endElement( const QString&, const QString& localName, const QString& ) { -//X kDebug() << "IsotopeParser::endElement()" << endl; +//X kDebug() << "IsotopeParser::endElement()"; if ( localName == "isotope" ) { d->isotopes.append(d->currentIsotope); @@ -182,7 +182,7 @@ bool IsotopeParser::endElement( const QString&, const QString& localName, const } else if ( localName == "isotopeList" ) {//a new list of isotopes start... -//X kDebug() << "setting d->inElement FALSE" << endl; +//X kDebug() << "setting d->inElement FALSE"; d->inElement = false; } @@ -191,7 +191,7 @@ bool IsotopeParser::endElement( const QString&, const QString& localName, const bool IsotopeParser::characters(const QString &ch) { -//X kDebug() << "IsotopeParser::characters() with ch: " << ch << endl; +//X kDebug() << "IsotopeParser::characters() with ch: " << ch; d->currentDataObject = ChemicalDataObject(); ChemicalDataObject::BlueObelisk type; QVariant value; diff --git a/libscience/moleculeparser.cpp b/libscience/moleculeparser.cpp index 45c0db1..2b163a6 100644 --- a/libscience/moleculeparser.cpp +++ b/libscience/moleculeparser.cpp @@ -165,7 +165,7 @@ MoleculeParser::parseSubmolecule(double *_resultMass, *_resultMass = 0.0; _resultMap->clear(); while (parseTerm(&subMass, &subMap)) { - //kDebug() << "Parsed a term, weight = " << subresult << endl; + //kDebug() << "Parsed a term, weight = " << subresult; // Add the mass and composition of the submolecule to the total. *_resultMass += subMass; @@ -194,7 +194,7 @@ MoleculeParser::parseTerm(double *_resultMass, _resultMap->clear(); if (nextToken() == ELEMENT_TOKEN) { - //kDebug() << "Parsed an element: " << m_elementVal->symbol() << endl; + //kDebug() << "Parsed an element: " << m_elementVal->symbol(); *_resultMass = m_elementVal->dataAsVariant( ChemicalDataObject::mass ).toDouble(); _resultMap->add(m_elementVal, 1); @@ -209,7 +209,7 @@ MoleculeParser::parseTerm(double *_resultMass, // Must end in a ")". if (nextToken() == ')') { - //kDebug() << "Parsed a submolecule. weight = " << *_result << endl; + //kDebug() << "Parsed a submolecule. weight = " << *_result; getNextToken(); } else @@ -221,7 +221,7 @@ MoleculeParser::parseTerm(double *_resultMass, // Optional number. if (nextToken() == INT_TOKEN) { - //kDebug() << "Parsed a number: " << intVal() << endl; + //kDebug() << "Parsed a number: " << intVal(); *_resultMass *= intVal(); _resultMap->multiply(intVal()); @@ -229,7 +229,7 @@ MoleculeParser::parseTerm(double *_resultMass, getNextToken(); } - kDebug() << "Weight of term = " << *_resultMass << endl; + kDebug() << "Weight of term = " << *_resultMass; return true; } @@ -283,11 +283,11 @@ MoleculeParser::getNextToken() Element * MoleculeParser::lookupElement( const QString& _name ) { - kDebug() << "looking up " << _name << endl; + kDebug() << "looking up " << _name; foreach( Element* e, m_elementList ){ if ( e->dataAsVariant(ChemicalDataObject::symbol) == _name ) { - kDebug() << "Found element " << _name << endl; + kDebug() << "Found element " << _name; return e; } } @@ -295,7 +295,7 @@ MoleculeParser::lookupElement( const QString& _name ) //if there is an error make m_error true. m_error = true; - kDebug() << k_funcinfo << "no such element, parsing error!: " << _name << endl; + kDebug() << k_funcinfo << "no such element, parsing error!: " << _name; return NULL; } diff --git a/libscience/parser.cpp b/libscience/parser.cpp index f6633c6..223463b 100644 --- a/libscience/parser.cpp +++ b/libscience/parser.cpp @@ -138,8 +138,8 @@ Parser::parseSimpleFloat(double *_result) int Parser::getNextChar() { -// kDebug() << "Parser::getNextChar(): char = " << m_nextChar << endl; -// kDebug() << "m_str.size() " << m_str.size() << " with m_str: " << m_str << " and m_index: " << m_index << endl; +// kDebug() << "Parser::getNextChar(): char = " << m_nextChar; +// kDebug() << "m_str.size() " << m_str.size() << " with m_str: " << m_str << " and m_index: " << m_index; m_index++; diff --git a/libscience/tests/isotopereadingtest.cpp b/libscience/tests/isotopereadingtest.cpp index 24f8034..cba651f 100644 --- a/libscience/tests/isotopereadingtest.cpp +++ b/libscience/tests/isotopereadingtest.cpp @@ -40,15 +40,15 @@ int main(int argc, char *argv[]) QList v = parser->getIsotopes(); - kDebug() << "Found " << v.count() << " isotopes." << endl;; + kDebug() << "Found " << v.count() << " isotopes.";; - kDebug() << "As a test I am now issuing all isotopes with 50 nuclueons: " << endl; + kDebug() << "As a test I am now issuing all isotopes with 50 nuclueons: "; foreach( Isotope* i, v ){ if ( i ) { if (i->nucleons() == 50 ) - kDebug() << " Isotope of " << i->parentElementSymbol() << " with a mass of " << i->mass() << endl; + kDebug() << " Isotope of " << i->parentElementSymbol() << " with a mass of " << i->mass(); } } diff --git a/libscience/tests/xmlreadingtest.cpp b/libscience/tests/xmlreadingtest.cpp index 93dea5d..8221d4b 100644 --- a/libscience/tests/xmlreadingtest.cpp +++ b/libscience/tests/xmlreadingtest.cpp @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) QString unit = o.unitAsString(); if ( unit == "bo:noUnit" ) unit = ""; - kDebug() << "Name: " << o.dictRef() << " " << o.valueAsString() <<" " << unit << endl; + kDebug() << "Name: " << o.dictRef() << " " << o.valueAsString() <<" " << unit; } } } -- 2.47.3