diff --git a/src/core/feedsmodelstandardfeed.cpp b/src/core/feedsmodelstandardfeed.cpp index 86d143bdd..646baea46 100755 --- a/src/core/feedsmodelstandardfeed.cpp +++ b/src/core/feedsmodelstandardfeed.cpp @@ -81,7 +81,8 @@ QPair FeedsModelStandardFe if (encoding_rexp.indexIn(feed_contents) != -1 && !(xml_schema_encoding = encoding_rexp.cap(0)).isEmpty()) { - // Some "encoding" attribute was found. + // Some "encoding" attribute was found get the encoding + // out of it. encoding_rexp.setPattern("[^\"]\\S+[^\"]"); encoding_rexp.indexIn(xml_schema_encoding, 9); xml_schema_encoding = encoding_rexp.cap(0); @@ -107,10 +108,18 @@ QPair FeedsModelStandardFe // Feed XML was obtained, guess it now. QDomDocument xml_document; + QString error_msg; + int error_line, error_column; - if (!xml_document.setContent(xml_contents_encoded)) { - qDebug("XML of feed '%s' is not valid and cannot be loaded.", - qPrintable(url)); + if (!xml_document.setContent(xml_contents_encoded, + &error_msg, + &error_line, + &error_column)) { + qDebug("XML of feed '%s' is not valid and cannot be loaded. Error: '%s' " + "(line %d, column %d).", + qPrintable(url), + qPrintable(error_msg), + error_line, error_column); result.second = QNetworkReply::UnknownContentError; @@ -368,17 +377,6 @@ void FeedsModelStandardFeed::updateMessages(const QList &messages) { query_select.finish(); - // TODO: potreba opravit nacitani URL - // pro http://forum.tea-earth.net/feed.php - // a taky vyresit problem v situaci - // kdy nastane situace ze message_id == -1 - // tedy zprava s danym nazvem, autorem, url a casem - // neexistuje, ale existuje ta sama starsi s - // datem ktery se neziskalo z kanalu ale vygenerovalo - // a ja tam ted vkladam tu samou zpravu s opet novym - // vygenerovanym datem, takze se ty zpravy duplikujou a - // duplikujou - if (datetime_stamps.size() == 0 || (message.m_createdFromFeed && !datetime_stamps.contains(message.m_created.toMSecsSinceEpoch()))) { diff --git a/src/core/textfactory.h b/src/core/textfactory.h index 1b229ba94..416b5fa4e 100644 --- a/src/core/textfactory.h +++ b/src/core/textfactory.h @@ -28,10 +28,6 @@ class TextFactory { // NOTE: On Windows UTC is known to be broken. static QDateTime parseDateTime(qint64 milis_from_epoch); - // TODO: ocekovat stripovani tagu a escapovani - // http://harmattan-dev.nokia.com/docs/library/html/qt4/qtextdocumentfragment.html - // mozna by to bylo lepsi, meotda ::fromHtml - // Strips "<....>" (HTML, XML) tags from given text. static QString stripTags(QString text); diff --git a/src/gui/formupdate.cpp b/src/gui/formupdate.cpp index b693593c9..95374139a 100755 --- a/src/gui/formupdate.cpp +++ b/src/gui/formupdate.cpp @@ -59,7 +59,9 @@ void FormUpdate::checkForUpdates() { m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok, tr("New release available."), tr("This is new version which can be\ndownloaded and installed.")); - // TODO: Display "update" button. + // TODO: Display "update" button if + // URL of file for current platform + // is available. #else m_ui->m_lblStatus->setStatus(WidgetWithStatus::Ok, tr("New release available."), @@ -68,8 +70,8 @@ void FormUpdate::checkForUpdates() { } else { m_ui->m_lblStatus->setStatus(WidgetWithStatus::Warning, - tr("No new releases available."), - tr("This release is not newer than\ncurrently installed one..")); + tr("No new release available."), + tr("This release is not newer than\ncurrently installed one.")); } } }