Browse Source

Rename old tq methods that no longer need a unique name

tags/r14.0.0
Timothy Pearson 8 years ago
parent
commit
0e00c0a86a
100 changed files with 565 additions and 565 deletions
  1. +2
    -2
      NewsLog.txt
  2. +4
    -4
      akregator/src/addfeedwidgetbase.ui
  3. +3
    -3
      akregator/src/akregator_part.cpp
  4. +7
    -7
      akregator/src/akregator_view.cpp
  5. +12
    -12
      akregator/src/article.cpp
  6. +2
    -2
      akregator/src/article.h
  7. +73
    -73
      akregator/src/articlefilter.cpp
  8. +2
    -2
      akregator/src/articlefilter.h
  9. +2
    -2
      akregator/src/articlelistview.cpp
  10. +3
    -3
      akregator/src/dragobjects.cpp
  11. +1
    -1
      akregator/src/dragobjects.h
  12. +17
    -17
      akregator/src/feed.cpp
  13. +4
    -4
      akregator/src/feed.h
  14. +1
    -1
      akregator/src/feedstorage.h
  15. +2
    -2
      akregator/src/feedstoragedummyimpl.cpp
  16. +1
    -1
      akregator/src/feedstoragedummyimpl.h
  17. +3
    -3
      akregator/src/folder.cpp
  18. +3
    -3
      akregator/src/frame.cpp
  19. +1
    -1
      akregator/src/kcursorsaver.h
  20. +22
    -22
      akregator/src/librss/article.cpp
  21. +2
    -2
      akregator/src/librss/category.cpp
  22. +152
    -152
      akregator/src/librss/document.cpp
  23. +10
    -10
      akregator/src/librss/enclosure.cpp
  24. +1
    -1
      akregator/src/librss/global.h
  25. +6
    -6
      akregator/src/librss/image.cpp
  26. +2
    -2
      akregator/src/librss/loader.cpp
  27. +5
    -5
      akregator/src/librss/loader.h
  28. +3
    -3
      akregator/src/librss/testlibrss.cpp
  29. +2
    -2
      akregator/src/librss/testlibrss.h
  30. +4
    -4
      akregator/src/librss/textinput.cpp
  31. +5
    -5
      akregator/src/librss/tools_p.cpp
  32. +1
    -1
      akregator/src/mainwindow.cpp
  33. +2
    -2
      akregator/src/mk4storage/feedstoragemk4impl.cpp
  34. +1
    -1
      akregator/src/mk4storage/feedstoragemk4impl.h
  35. +1
    -1
      akregator/src/mk4storage/mk4confwidgetbase.ui
  36. +3
    -3
      akregator/src/pageviewer.cpp
  37. +3
    -3
      akregator/src/progressmanager.cpp
  38. +4
    -4
      akregator/src/propertieswidgetbase.ui
  39. +5
    -5
      akregator/src/searchbar.cpp
  40. +1
    -1
      akregator/src/searchbar.h
  41. +2
    -2
      akregator/src/settings_advancedbase.ui
  42. +1
    -1
      akregator/src/settings_appearance.ui
  43. +1
    -1
      akregator/src/settings_archive.ui
  44. +1
    -1
      akregator/src/settings_browser.ui
  45. +1
    -1
      akregator/src/settings_general.ui
  46. +3
    -3
      akregator/src/tabwidget.cpp
  47. +1
    -1
      akregator/src/tagaction.cpp
  48. +1
    -1
      akregator/src/tagnode.cpp
  49. +3
    -3
      akregator/src/tagpropertieswidgetbase.ui
  50. +8
    -8
      akregator/src/tagset.cpp
  51. +2
    -2
      certmanager/certificateinfowidget.ui
  52. +10
    -10
      certmanager/certificatewizard.ui
  53. +1
    -1
      certmanager/certificatewizardimpl.cpp
  54. +2
    -2
      certmanager/certmanager.cpp
  55. +1
    -1
      certmanager/conf/appearanceconfigwidgetbase.ui
  56. +4
    -4
      certmanager/kwatchgnupg/kwatchgnupgmainwin.cpp
  57. +6
    -6
      certmanager/lib/backends/chiasmus/chiasmusbackend.cpp
  58. +6
    -6
      certmanager/lib/backends/qgpgme/gnupgprocessbase.cpp
  59. +3
    -3
      certmanager/lib/backends/qgpgme/gnupgprocessbase.h
  60. +1
    -1
      certmanager/lib/backends/qgpgme/qgpgmecryptoconfig.cpp
  61. +1
    -1
      certmanager/lib/backends/qgpgme/qgpgmeprogresstokenmapper.cpp
  62. +2
    -2
      certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.cpp
  63. +1
    -1
      certmanager/lib/backends/qgpgme/qgpgmerefreshkeysjob.h
  64. +2
    -2
      certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.cpp
  65. +1
    -1
      certmanager/lib/backends/qgpgme/qgpgmesecretkeyexportjob.h
  66. +5
    -5
      certmanager/lib/cryptplug.cpp
  67. +12
    -12
      certmanager/lib/cryptplugwrapper.cpp
  68. +16
    -16
      certmanager/lib/cryptplugwrapper.h
  69. +2
    -2
      certmanager/lib/tests/gnupgviewer.h
  70. +3
    -3
      certmanager/lib/tests/test_gnupgprocessbase.cpp
  71. +2
    -2
      certmanager/lib/ui/adddirectoryservicedialog.ui
  72. +1
    -1
      certmanager/lib/ui/backendconfigwidget.cpp
  73. +4
    -4
      certmanager/lib/ui/cryptoconfigmodule.cpp
  74. +1
    -1
      certmanager/lib/ui/directoryserviceswidget.cpp
  75. +5
    -5
      certmanager/lib/ui/directoryserviceswidgetbase.ui
  76. +1
    -1
      certmanager/lib/ui/dnattributeorderconfigwidget.cpp
  77. +8
    -8
      certmanager/lib/ui/kdhorizontalline.cpp
  78. +2
    -2
      certmanager/lib/ui/kdhorizontalline.h
  79. +5
    -5
      certmanager/lib/ui/keyapprovaldialog.cpp
  80. +4
    -4
      certmanager/lib/ui/keylistview.cpp
  81. +2
    -2
      certmanager/lib/ui/keyrequester.cpp
  82. +4
    -4
      certmanager/lib/ui/keyselectiondialog.cpp
  83. +4
    -4
      kabc/frontend/mainWindow.ui
  84. +2
    -2
      kaddressbook/addresseditwidget.cpp
  85. +2
    -2
      kaddressbook/addresseeeditorwidget.cpp
  86. +1
    -1
      kaddressbook/addviewdialog.cpp
  87. +2
    -2
      kaddressbook/common/kabprefs.h
  88. +5
    -5
      kaddressbook/customfieldswidget.cpp
  89. +2
    -2
      kaddressbook/distributionlisteditor.cpp
  90. +3
    -3
      kaddressbook/distributionlistentryview.cpp
  91. +2
    -2
      kaddressbook/editors/imeditorbase.ui
  92. +5
    -5
      kaddressbook/editors/imeditorwidget.cpp
  93. +1
    -1
      kaddressbook/emaileditwidget.cpp
  94. +1
    -1
      kaddressbook/features/distributionlistngwidget.cpp
  95. +1
    -1
      kaddressbook/geowidget.cpp
  96. +4
    -4
      kaddressbook/incsearchwidget.cpp
  97. +2
    -2
      kaddressbook/jumpbuttonbar.cpp
  98. +4
    -4
      kaddressbook/kabcore.cpp
  99. +3
    -3
      kaddressbook/kcmconfigs/kabconfigwidget.cpp
  100. +1
    -1
      kaddressbook/kcmconfigs/ldapoptionswidget.cpp

+ 2
- 2
NewsLog.txt View File

@@ -1108,7 +1108,7 @@ Friday, November 21st 2008
Problems addressed
------------------

* kolab/issue2627 tqStatus line for audit log shown, even when it is not implemented.
* kolab/issue2627 Status line for audit log shown, even when it is not implemented.
* kolab/issue2617 Kleopatra: After importing a p7c or p12 file the user is informed, that he has imported 0 certifictes.
* kolab/issue2620 Kleopatra throws an error message, if no .gnupg exists and no agent is running.

@@ -1125,7 +1125,7 @@ Sunday, November 9th 2008
Problems addressed
------------------

* kolab/issue2627 tqStatus line for audit log shown, even when it is not implemented.
* kolab/issue2627 Status line for audit log shown, even when it is not implemented.
*Support the /vendor/cmu/cyrus-imapd/sharedseen annotation available in Cyrus IMAP server 2.3.9 or higher which allows to share the seen flags between all users that have access to a folder.
* Detect if the server supports shared seen flags. Also preserve the IMAP server capabilities in kmailrc so that detection also works without a prior sync.

+ 4
- 4
akregator/src/addfeedwidgetbase.ui View File

@@ -56,7 +56,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -75,7 +75,7 @@
<property name="name">
<cstring>urlEdit</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
@@ -115,7 +115,7 @@
<cstring>statusLabel</cstring>
</property>
<property name="text">
<string>tqStatus</string>
<string>Status</string>
</property>
</widget>
<spacer>
@@ -128,7 +128,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>50</height>

+ 3
- 3
akregator/src/akregator_part.cpp View File

@@ -428,7 +428,7 @@ bool Part::openFile()

if (file.size() > 0) // don't backup empty files
{
TQString backup = m_file + "-backup." + TQString::number(TQDateTime::tqcurrentDateTime().toTime_t());
TQString backup = m_file + "-backup." + TQString::number(TQDateTime::currentDateTime().toTime_t());
copyFile(backup);
@@ -444,7 +444,7 @@ bool Part::openFile()
{
if (file.size() > 0) // don't backup empty files
{
TQString backup = m_file + "-backup." + TQString::number(TQDateTime::tqcurrentDateTime().toTime_t());
TQString backup = m_file + "-backup." + TQString::number(TQDateTime::currentDateTime().toTime_t());
copyFile(backup);

KMessageBox::error(m_view, i18n("<qt>The standard feed list is corrupted (no valid OPML). A backup was created:<p><b>%2</b></p></qt>").tqarg(backup), i18n("OPML Parsing Error") );
@@ -538,7 +538,7 @@ TQWidget* Part::getMainWindow()
{
// this is a dirty fix to get the main window used for the tray icon
TQWidgetList *l = kapp->tqtopLevelWidgets();
TQWidgetList *l = kapp->topLevelWidgets();
TQWidgetListIt it( *l );
TQWidget *wid;


+ 7
- 7
akregator/src/akregator_view.cpp View File

@@ -366,7 +366,7 @@ View::View( Part *part, TQWidget *parent, ActionManagerImpl* actionManager, cons

if (!Settings::resetQuickFilterOnNodeChange())
{
m_searchBar->slotSetqStatus(Settings::statusFilter());
m_searchBar->slotSeStatus(Settings::statusFilter());
m_searchBar->slotSetText(Settings::textFilter());
}

@@ -1186,7 +1186,7 @@ void View::slotArticleSelected(const Article& article)
if (delay > 0)
m_markReadTimer->start( delay*1000, true );
else
a.setqStatus(Article::Read);
a.seStatus(Article::Read);
}
}

@@ -1370,7 +1370,7 @@ void View::slotSetSelectedArticleRead()
return;

for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setqStatus(Article::Read);
(*it).seStatus(Article::Read);
}

void View::slotTextToSpeechRequest()
@@ -1408,7 +1408,7 @@ void View::slotSetSelectedArticleUnread()
return;

for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setqStatus(Article::Unread);
(*it).seStatus(Article::Unread);
}

void View::slotSetSelectedArticleNew()
@@ -1419,7 +1419,7 @@ void View::slotSetSelectedArticleNew()
return;

for (TQValueList<Article>::Iterator it = articles.begin(); it != articles.end(); ++it)
(*it).setqStatus(Article::New);
(*it).seStatus(Article::New);
}

void View::slotSetCurrentArticleReadDelayed()
@@ -1429,7 +1429,7 @@ void View::slotSetCurrentArticleReadDelayed()
if (article.isNull())
return;

article.setqStatus(Article::Read);
article.seStatus(Article::Read);
}

void View::slotMouseOverInfo(const KFileItem *kifi)
@@ -1453,7 +1453,7 @@ void View::readProperties(KConfig* config)
m_searchBar->slotSetText(config->readEntry("searchLine"));
int statusfilter = config->readNumEntry("searchCombo", -1);
if (statusfilter != -1)
m_searchBar->slotSetqStatus(statusfilter);
m_searchBar->slotSeStatus(statusfilter);
}

int selectedID = config->readNumEntry("selectedNodeID", -1);

+ 12
- 12
akregator/src/article.cpp View File

@@ -55,7 +55,7 @@ struct Article::Private : public Shared
0001 0000 Keep
*/

enum tqStatus {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10};
enum Status {Deleted=0x01, Trash=0x02, New=0x04, Read=0x08, Keep=0x10};

TQString guid;
Backend::FeedStorage* archive;
@@ -109,7 +109,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
if (article.meta("deleted") == "true")
{ // if article is in deleted state, we just add the status and omit the rest
d->status = Private::Read | Private::Deleted;
d->archive->setqStatus(d->guid, d->status);
d->archive->seStatus(d->guid, d->status);
}
else
{ // article is not deleted, let's add it to the archive
@@ -123,7 +123,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
d->archive->setCommentsLink(d->guid, article.commentsLink().url());
d->archive->setGuidIsPermaLink(d->guid, article.guidIsPermaLink());
d->archive->setGuidIsHash(d->guid, article.meta("guidIsHash") == "true");
d->pubDate = article.pubDate().isValid() ? article.pubDate() : TQDateTime::tqcurrentDateTime();
d->pubDate = article.pubDate().isValid() ? article.pubDate() : TQDateTime::currentDateTime();
d->archive->setPubDate(d->guid, d->pubDate.toTime_t());
d->archive->setAuthor(d->guid, article.author());
@@ -157,7 +157,7 @@ void Article::initialize(RSS::Article article, Backend::FeedStorage* archive)
int statusInt = status.toInt();
if (statusInt == New)
statusInt = Unread;
setqStatus(statusInt);
seStatus(statusInt);
}
setKeep(article.meta("keep") == "true");
}
@@ -210,9 +210,9 @@ void Article::setDeleted()
if (isDeleted())
return;
setqStatus(Read);
seStatus(Read);
d->status = Private::Deleted | Private::Read;
d->archive->setqStatus(d->guid, d->status);
d->archive->seStatus(d->guid, d->status);
d->archive->setDeleted(d->guid);

if (d->feed)
@@ -299,13 +299,13 @@ int Article::status() const
return Unread;
}

void Article::setqStatus(int stat)
void Article::seStatus(int stat)
{
// use status() rather than statusBits() here to filter out status flags that we are not
// interested in
int oldtqStatus = status();
int oldStatus = status();

if (oldtqStatus != stat)
if (oldStatus != stat)
{
switch (stat)
{
@@ -319,9 +319,9 @@ void Article::setqStatus(int stat)
d->status = ( d->status | Private::New) & ~Private::Read;
break;
}
d->archive->setqStatus(d->guid, d->status);
d->archive->seStatus(d->guid, d->status);
if (d->feed)
d->feed->setArticleChanged(*this, oldtqStatus);
d->feed->setArticleChanged(*this, oldStatus);
}
}

@@ -404,7 +404,7 @@ RSS::Enclosure Article::enclosure() const
void Article::setKeep(bool keep)
{
d->status = keep ? ( statusBits() | Private::Keep) : ( statusBits() & ~Private::Keep);
d->archive->setqStatus(d->guid, d->status);
d->archive->seStatus(d->guid, d->status);
if (d->feed)
d->feed->setArticleChanged(*this);
}

+ 2
- 2
akregator/src/article.h View File

@@ -57,7 +57,7 @@ namespace Akregator
class Article
{
public:
enum tqStatus { Unread=0, Read, New };
enum Status { Unread=0, Read, New };
typedef TQValueList<Article> List;

Article();
@@ -80,7 +80,7 @@ namespace Akregator
bool isNull() const;
int status() const;
void setqStatus(int s);
void seStatus(int s);

void offsetPubDate(int secs);


+ 73
- 73
akregator/src/articlefilter.cpp View File

@@ -43,35 +43,35 @@ TQString Criterion::subjectToString(Subject subj)
switch (subj)
{
case Title:
return TQString::tqfromLatin1("Title");
return TQString::fromLatin1("Title");
case Link:
return TQString::tqfromLatin1("Link");
return TQString::fromLatin1("Link");
case Author:
return TQString::tqfromLatin1("Author");
return TQString::fromLatin1("Author");
case Description:
return TQString::tqfromLatin1("Description");
case tqStatus:
return TQString::tqfromLatin1("Status");
return TQString::fromLatin1("Description");
case Status:
return TQString::fromLatin1("Status");
case KeepFlag:
return TQString::tqfromLatin1("KeepFlag");
return TQString::fromLatin1("KeepFlag");
default: // should never happen (TM)
return TQString::tqfromLatin1("Description");
return TQString::fromLatin1("Description");
}
}

Criterion::Subject Criterion::stringToSubject(const TQString& subjStr)
{
if (subjStr == TQString::tqfromLatin1("Title"))
if (subjStr == TQString::fromLatin1("Title"))
return Title;
else if (subjStr == TQString::tqfromLatin1("Link"))
else if (subjStr == TQString::fromLatin1("Link"))
return Link;
else if (subjStr == TQString::tqfromLatin1("Description"))
else if (subjStr == TQString::fromLatin1("Description"))
return Description;
else if (subjStr == TQString::tqfromLatin1("Author"))
else if (subjStr == TQString::fromLatin1("Author"))
return Author;
else if (subjStr == TQString::tqfromLatin1("Status"))
return tqStatus;
else if (subjStr == TQString::tqfromLatin1("KeepFlag"))
else if (subjStr == TQString::fromLatin1("Status"))
return Status;
else if (subjStr == TQString::fromLatin1("KeepFlag"))
return KeepFlag;

// hopefully never reached
@@ -83,27 +83,27 @@ TQString Criterion::predicateToString(Predicate pred)
switch (pred)
{
case Contains:
return TQString::tqfromLatin1("Contains");
return TQString::fromLatin1("Contains");
case Equals:
return TQString::tqfromLatin1("Equals");
return TQString::fromLatin1("Equals");
case Matches:
return TQString::tqfromLatin1("Matches");
return TQString::fromLatin1("Matches");
case Negation:
return TQString::tqfromLatin1("Negation");
return TQString::fromLatin1("Negation");
default:// hopefully never reached
return TQString::tqfromLatin1("Contains");
return TQString::fromLatin1("Contains");
}
}

Criterion::Predicate Criterion::stringToPredicate(const TQString& predStr)
{
if (predStr == TQString::tqfromLatin1("Contains"))
if (predStr == TQString::fromLatin1("Contains"))
return Contains;
else if (predStr == TQString::tqfromLatin1("Equals"))
else if (predStr == TQString::fromLatin1("Equals"))
return Equals;
else if (predStr == TQString::tqfromLatin1("Matches"))
else if (predStr == TQString::fromLatin1("Matches"))
return Matches;
else if (predStr == TQString::tqfromLatin1("Negation"))
else if (predStr == TQString::fromLatin1("Negation"))
return Negation;
// hopefully never reached
@@ -124,24 +124,24 @@ Criterion::Criterion( Subject subject, Predicate predicate, const TQVariant &obj

void Criterion::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("subject"), subjectToString(m_subject));
config->writeEntry(TQString::fromLatin1("subject"), subjectToString(m_subject));

config->writeEntry(TQString::tqfromLatin1("predicate"), predicateToString(m_predicate));
config->writeEntry(TQString::fromLatin1("predicate"), predicateToString(m_predicate));

config->writeEntry(TQString::tqfromLatin1("objectType"), TQString(m_object.typeName()));
config->writeEntry(TQString::fromLatin1("objectType"), TQString(m_object.typeName()));

config->writeEntry(TQString::tqfromLatin1("objectValue"), m_object);
config->writeEntry(TQString::fromLatin1("objectValue"), m_object);
}

void Criterion::readConfig(KConfig* config)
{
m_subject = stringToSubject(config->readEntry(TQString::tqfromLatin1("subject")));
m_predicate = stringToPredicate(config->readEntry(TQString::tqfromLatin1("predicate")));
TQVariant::Type type = TQVariant::nameToType(config->readEntry(TQString::tqfromLatin1("objType")).ascii());
m_subject = stringToSubject(config->readEntry(TQString::fromLatin1("subject")));
m_predicate = stringToPredicate(config->readEntry(TQString::fromLatin1("predicate")));
TQVariant::Type type = TQVariant::nameToType(config->readEntry(TQString::fromLatin1("objType")).ascii());

if (type != TQVariant::Invalid)
{
m_object = config->readPropertyEntry(TQString::tqfromLatin1("objectValue"), type);
m_object = config->readPropertyEntry(TQString::fromLatin1("objectValue"), type);
}
}

@@ -163,7 +163,7 @@ bool Criterion::satisfiedBy( const Article &article ) const
// ### Maybe use prettyURL here?
concreteSubject = TQVariant(article.link().url());
break;
case tqStatus:
case Status:
concreteSubject = TQVariant(article.status());
break;
case KeepFlag:
@@ -269,15 +269,15 @@ bool ArticleMatcher::matches( const Article &a ) const

void ArticleMatcher::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("matcherAssociation"), associationToString(m_association));
config->writeEntry(TQString::fromLatin1("matcherAssociation"), associationToString(m_association));
config->writeEntry(TQString::tqfromLatin1("matcherCriteriaCount"), m_criteria.count());
config->writeEntry(TQString::fromLatin1("matcherCriteriaCount"), m_criteria.count());

int index = 0;

for (TQValueList<Criterion>::ConstIterator it = m_criteria.begin(); it != m_criteria.end(); ++it)
{
config->setGroup(config->group()+TQString::tqfromLatin1("_Criterion")+TQString::number(index));
config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(index));
(*it).writeConfig(config);
++index;
}
@@ -286,14 +286,14 @@ void ArticleMatcher::writeConfig(KConfig* config) const
void ArticleMatcher::readConfig(KConfig* config)
{
m_criteria.clear();
m_association = stringToAssociation(config->readEntry(TQString::tqfromLatin1("matcherAssociation")));
m_association = stringToAssociation(config->readEntry(TQString::fromLatin1("matcherAssociation")));

int count = config->readNumEntry(TQString::tqfromLatin1("matcherCriteriaCount"), 0);
int count = config->readNumEntry(TQString::fromLatin1("matcherCriteriaCount"), 0);
for (int i = 0; i < count; ++i)
{
Criterion c;
config->setGroup(config->group()+TQString::tqfromLatin1("_Criterion")+TQString::number(i));
config->setGroup(config->group()+TQString::fromLatin1("_Criterion")+TQString::number(i));
c.readConfig(config);
m_criteria.append(c);
}
@@ -343,9 +343,9 @@ bool ArticleMatcher::allCriteriaMatch( const Article &a ) const

ArticleMatcher::Association ArticleMatcher::stringToAssociation(const TQString& assocStr)
{
if (assocStr == TQString::tqfromLatin1("LogicalAnd"))
if (assocStr == TQString::fromLatin1("LogicalAnd"))
return LogicalAnd;
else if (assocStr == TQString::tqfromLatin1("LogicalOr"))
else if (assocStr == TQString::fromLatin1("LogicalOr"))
return LogicalOr;
else
return None;
@@ -356,11 +356,11 @@ TQString ArticleMatcher::associationToString(Association association)
switch (association)
{
case LogicalAnd:
return TQString::tqfromLatin1("LogicalAnd");
return TQString::fromLatin1("LogicalAnd");
case LogicalOr:
return TQString::tqfromLatin1("LogicalOr");
return TQString::fromLatin1("LogicalOr");
default:
return TQString::tqfromLatin1("None");
return TQString::fromLatin1("None");
}
}

@@ -408,13 +408,13 @@ TagMatcher::TagMatcher(const TagMatcher& other) : AbstractMatcher(other), d(0)

void TagMatcher::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("matcherType"), TQString::tqfromLatin1("TagMatcher"));
config->writeEntry(TQString::tqfromLatin1("matcherParams"), d->tagID);
config->writeEntry(TQString::fromLatin1("matcherType"), TQString::fromLatin1("TagMatcher"));
config->writeEntry(TQString::fromLatin1("matcherParams"), d->tagID);
}

void TagMatcher::readConfig(KConfig* config)
{
d->tagID = config->readEntry(TQString::tqfromLatin1("matcherParams"));
d->tagID = config->readEntry(TQString::fromLatin1("matcherParams"));
}

bool TagMatcher::operator==(const AbstractMatcher& other) const
@@ -449,7 +449,7 @@ SeStatusAction::SeStatusAction(int status) : m_status(status)
void SeStatusAction::exec(Article& article)
{
if (!article.isNull())
article.setqStatus(m_status);
article.seStatus(m_status);
}

int SeStatusAction::status() const
@@ -457,20 +457,20 @@ int SeStatusAction::status() const
return m_status;
}

void SeStatusAction::setqStatus(int status)
void SeStatusAction::seStatus(int status)
{
m_status = status;
}

void SeStatusAction::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("SeStatusAction"));
config->writeEntry(TQString::tqfromLatin1("actionParams"), m_status);
config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("SeStatusAction"));
config->writeEntry(TQString::fromLatin1("actionParams"), m_status);
}

void SeStatusAction::readConfig(KConfig* config)
{
m_status = config->readNumEntry(TQString::tqfromLatin1("actionParams"), Article::Read);
m_status = config->readNumEntry(TQString::fromLatin1("actionParams"), Article::Read);
}

bool SeStatusAction::operator==(const AbstractAction& other)
@@ -581,12 +581,12 @@ bool ArticleFilter::operator==(const ArticleFilter& other) const

void ArticleFilterList::writeConfig(KConfig* config) const
{
config->setGroup(TQString::tqfromLatin1("Filters"));
config->writeEntry(TQString::tqfromLatin1("count"), count());
config->setGroup(TQString::fromLatin1("Filters"));
config->writeEntry(TQString::fromLatin1("count"), count());
int index = 0;
for (ArticleFilterList::ConstIterator it = begin(); it != end(); ++it)
{
config->setGroup(TQString::tqfromLatin1("Filters_")+TQString::number(index));
config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(index));
(*it).writeConfig(config);
++index;
}
@@ -595,11 +595,11 @@ void ArticleFilterList::writeConfig(KConfig* config) const
void ArticleFilterList::readConfig(KConfig* config)
{
clear();
config->setGroup(TQString::tqfromLatin1("Filters"));
int count = config->readNumEntry(TQString::tqfromLatin1("count"), 0);
config->setGroup(TQString::fromLatin1("Filters"));
int count = config->readNumEntry(TQString::fromLatin1("count"), 0);
for (int i = 0; i < count; ++i)
{
config->setGroup(TQString::tqfromLatin1("Filters_")+TQString::number(i));
config->setGroup(TQString::fromLatin1("Filters_")+TQString::number(i));
ArticleFilter filter;
filter.readConfig(config);
append(filter);
@@ -609,13 +609,13 @@ void ArticleFilterList::readConfig(KConfig* config)

void AssignTagAction::readConfig(KConfig* config)
{
m_tagID = config->readEntry(TQString::tqfromLatin1("actionParams"));
m_tagID = config->readEntry(TQString::fromLatin1("actionParams"));
}

void AssignTagAction::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("AssignTagAction"));
config->writeEntry(TQString::tqfromLatin1("actionParams"), m_tagID);
config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("AssignTagAction"));
config->writeEntry(TQString::fromLatin1("actionParams"), m_tagID);
}

bool AssignTagAction::operator==(const AbstractAction& other)
@@ -644,7 +644,7 @@ void DeleteAction::readConfig(KConfig* /*config*/)

void DeleteAction::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("actionType"), TQString::tqfromLatin1("DeleteAction"));
config->writeEntry(TQString::fromLatin1("actionType"), TQString::fromLatin1("DeleteAction"));
}

bool DeleteAction::operator==(const AbstractAction& other)
@@ -661,27 +661,27 @@ void ArticleFilter::readConfig(KConfig* config)
delete d->action;
d->action = 0;

d->name = config->readEntry(TQString::tqfromLatin1("name"));
d->id = config->readNumEntry(TQString::tqfromLatin1("id"), 0);
d->name = config->readEntry(TQString::fromLatin1("name"));
d->id = config->readNumEntry(TQString::fromLatin1("id"), 0);

TQString matcherType = config->readEntry(TQString::tqfromLatin1("matcherType"));
TQString matcherType = config->readEntry(TQString::fromLatin1("matcherType"));

if (matcherType == TQString::tqfromLatin1("TagMatcher"))
if (matcherType == TQString::fromLatin1("TagMatcher"))
d->matcher = new TagMatcher();
else if (matcherType == TQString::tqfromLatin1("ArticleMatcher"))
else if (matcherType == TQString::fromLatin1("ArticleMatcher"))
d->matcher = new ArticleMatcher();

if (d->matcher)
d->matcher->readConfig(config);


TQString actionType = config->readEntry(TQString::tqfromLatin1("actionType"));
TQString actionType = config->readEntry(TQString::fromLatin1("actionType"));

if (actionType == TQString::tqfromLatin1("AssignTagAction"))
if (actionType == TQString::fromLatin1("AssignTagAction"))
d->action = new AssignTagAction();
else if (actionType == TQString::tqfromLatin1("DeleteAction"))
else if (actionType == TQString::fromLatin1("DeleteAction"))
d->action = new DeleteAction();
else if (actionType == TQString::tqfromLatin1("SeStatusAction"))
else if (actionType == TQString::fromLatin1("SeStatusAction"))
d->action = new SeStatusAction();

if (d->action)
@@ -690,8 +690,8 @@ void ArticleFilter::readConfig(KConfig* config)

void ArticleFilter::writeConfig(KConfig* config) const
{
config->writeEntry(TQString::tqfromLatin1("name"), d->name);
config->writeEntry(TQString::tqfromLatin1("id"), d->id);
config->writeEntry(TQString::fromLatin1("name"), d->name);
config->writeEntry(TQString::fromLatin1("id"), d->id);
d->matcher->writeConfig(config);
d->action->writeConfig(config);
}

+ 2
- 2
akregator/src/articlefilter.h View File

@@ -174,7 +174,7 @@ class SeStatusAction : public AbstractAction
virtual void exec(Article& article);
int status() const;
void setqStatus(int status);
void seStatus(int status);

virtual void writeConfig(KConfig* config) const;
virtual void readConfig(KConfig* config);
@@ -259,7 +259,7 @@ class Criterion
public:

enum Subject {
Title, Description, Author, Link, tqStatus, KeepFlag
Title, Description, Author, Link, Status, KeepFlag
};

static TQString subjectToString(Subject subj);

+ 2
- 2
akregator/src/articlelistview.cpp View File

@@ -564,9 +564,9 @@ void ArticleListView::paintInfoBox(const TQString &message)
const uint x = (viewport()->width() - w - 30) / 2 ;
const uint y = (viewport()->height() - h - 30) / 2 ;

p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h );
t.draw( &p, x+15, y+15, TQRect(), tqcolorGroup() );
t.draw( &p, x+15, y+15, TQRect(), colorGroup() );
}

void ArticleListView::viewportPaintEvent(TQPaintEvent *e)

+ 3
- 3
akregator/src/dragobjects.cpp View File

@@ -43,7 +43,7 @@ bool ArticleDrag::canDecode(const TQMimeSource* e)
bool ArticleDrag::decode(const TQMimeSource* e, TQValueList<ArticleDragItem>& articles)
{
articles.clear();
TQByteArray array = e->tqencodedData("akregator/articles");
TQByteArray array = e->encodedData("akregator/articles");
TQDataStream stream(array, IO_ReadOnly);

@@ -68,7 +68,7 @@ const char* ArticleDrag::format(int i) const
return 0;
}

TQByteArray ArticleDrag::tqencodedData(const char* mime) const
TQByteArray ArticleDrag::encodedData(const char* mime) const
{
TQCString mimetype(mime);
if (mimetype == "akregator/articles")
@@ -86,7 +86,7 @@ TQByteArray ArticleDrag::tqencodedData(const char* mime) const
}
else
{
return KURLDrag::tqencodedData(mime);
return KURLDrag::encodedData(mime);
}
}


+ 1
- 1
akregator/src/dragobjects.h View File

@@ -57,7 +57,7 @@ public:

protected:

virtual TQByteArray tqencodedData(const char* mime) const;
virtual TQByteArray encodedData(const char* mime) const;
virtual const char* format(int i) const;

private:

+ 17
- 17
akregator/src/feed.cpp View File

@@ -402,7 +402,7 @@ void Feed::slotMarkAllArticlesAsRead()
TQValueList<Article>::Iterator en = tarticles.end();

for (it = tarticles.begin(); it != en; ++it)
(*it).setqStatus(Article::Read);
(*it).seStatus(Article::Read);
setNotificationMode(true, true);
}
}
@@ -412,7 +412,7 @@ void Feed::slotAddToFetchQueue(FetchQueue* queue, bool intervalFetchOnly)
queue->addFeed(this);
else
{
uint now = TQDateTime::tqcurrentDateTime().toTime_t();
uint now = TQDateTime::currentDateTime().toTime_t();

// workaround for 3.5.x: if the last fetch went wrong, try again after 30 minutes
// this fixes annoying behaviour of akregator, especially when the host is reachable
@@ -464,9 +464,9 @@ void Feed::appendArticles(const RSS::Document &doc)
d->addedArticlesNotify.append(mya);
if (!mya.isDeleted() && !markImmediatelyAsRead())
mya.setqStatus(Article::New);
mya.seStatus(Article::New);
else
mya.setqStatus(Article::Read);
mya.seStatus(Article::Read);
changed = true;
}
@@ -479,12 +479,12 @@ void Feed::appendArticles(const RSS::Document &doc)
{
mya.setKeep(old.keep());
int oldstatus = old.status();
old.setqStatus(Article::Read);
old.seStatus(Article::Read);

d->articles.remove(old.guid());
appendArticle(mya);

mya.setqStatus(oldstatus);
mya.seStatus(oldstatus);

d->updatedArticlesNotify.append(mya);
changed = true;
@@ -519,7 +519,7 @@ bool Feed::usesExpiryByAge() const

bool Feed::isExpired(const Article& a) const
{
TQDateTime now = TQDateTime::tqcurrentDateTime();
TQDateTime now = TQDateTime::currentDateTime();
int expiryAge = -1;
// check whether the feed uses the global default and the default is limitArticleAge
if ( d->archiveMode == globalDefault && Settings::archiveMode() == Settings::EnumArchiveMode::limitArticleAge)
@@ -558,7 +558,7 @@ void Feed::fetch(bool followDiscovery)
{
if ((*it).status() == Article::New)
{
(*it).setqStatus(Article::Unread);
(*it).seStatus(Article::Unread);
}
}

@@ -579,7 +579,7 @@ void Feed::tryFetch()
{
d->fetchError = false;

d->loader = RSS::Loader::create( this, TQT_SLOT(fetchCompleted(Loader *, Document, tqStatus)) );
d->loader = RSS::Loader::create( this, TQT_SLOT(fetchCompleted(Loader *, Document, Status)) );
//connect(d->loader, TQT_SIGNAL(progress(unsigned long)), this, TQT_SLOT(slotSetProgress(unsigned long)));
d->loader->loadFrom( d->xmlUrl, new RSS::FileRetriever );
}
@@ -595,7 +595,7 @@ void Feed::slotImageFetched(const TQPixmap& image)
nodeModified();
}

void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::tqStatus status)
void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::Status status)
{
// Note that loader instances delete themselves
d->loader = 0;
@@ -618,7 +618,7 @@ void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::tqStatus statu
else
{
d->fetchError = true;
d->lastErrorFetch = TQDateTime::tqcurrentDateTime().toTime_t();
d->lastErrorFetch = TQDateTime::currentDateTime().toTime_t();
emit fetchError(this);
}
return;
@@ -647,7 +647,7 @@ void Feed::fetchCompleted(RSS::Loader *l, RSS::Document doc, RSS::tqStatus statu

appendArticles(doc);

d->archive->setLastFetch( TQDateTime::tqcurrentDateTime().toTime_t());
d->archive->setLastFetch( TQDateTime::currentDateTime().toTime_t());
emit fetched(this);
}

@@ -735,14 +735,14 @@ void Feed::setArticleDeleted(Article& a)
articlesModified();
}

void Feed::setArticleChanged(Article& a, int oldtqStatus)
void Feed::setArticleChanged(Article& a, int oldStatus)
{
if (oldtqStatus != -1)
if (oldStatus != -1)
{
int newtqStatus = a.status();
if (oldtqStatus == Article::Read && newtqStatus != Article::Read)
int newStatus = a.status();
if (oldStatus == Article::Read && newStatus != Article::Read)
setUnread(unread()+1);
else if (oldtqStatus != Article::Read && newtqStatus == Article::Read)
else if (oldStatus != Article::Read && newStatus == Article::Read)
setUnread(unread()-1);
}
d->updatedArticlesNotify.append(a);

+ 4
- 4
akregator/src/feed.h View File

@@ -43,7 +43,7 @@ namespace KPIM {
// needed for slot fetchCompleted()
using RSS::Document;
using RSS::Loader;
using RSS::tqStatus;
using RSS::Status;

namespace Akregator
{
@@ -254,7 +254,7 @@ namespace Akregator
private slots:

void fetchCompleted(Loader *loader, Document doc, tqStatus status);
void fetchCompleted(Loader *loader, Document doc, Status status);
void slotImageFetched(const TQPixmap& image);

private:
@@ -265,10 +265,10 @@ namespace Akregator
void setArticleDeleted(Article& a);

/** notifies that article @c mya was changed
@param oldtqStatus if the status was changed, it contains the old status, -1 otherwise
@param oldStatus if the status was changed, it contains the old status, -1 otherwise
To be called by @ref Article
*/
void setArticleChanged(Article& a, int oldtqStatus=-1);
void setArticleChanged(Article& a, int oldStatus=-1);
void enforceLimitArticleNumber();


+ 1
- 1
akregator/src/feedstorage.h View File

@@ -111,7 +111,7 @@ class AKREGATOR_EXPORT FeedStorage : public TQObject
virtual uint pubDate(const TQString& guid) = 0;
virtual void setPubDate(const TQString& guid, uint pubdate) = 0;
virtual int status(const TQString& guid) = 0;
virtual void setqStatus(const TQString& guid, int status) = 0;
virtual void seStatus(const TQString& guid, int status) = 0;
virtual TQString title(const TQString& guid) = 0;
virtual void setTitle(const TQString& guid, const TQString& title) = 0;
virtual TQString description(const TQString& guid) = 0;

+ 2
- 2
akregator/src/feedstoragedummyimpl.cpp View File

@@ -246,7 +246,7 @@ int FeedStorageDummyImpl::status(const TQString& guid)
return contains(guid) ? d->entries[guid].status : 0;
}

void FeedStorageDummyImpl::setqStatus(const TQString& guid, int status)
void FeedStorageDummyImpl::seStatus(const TQString& guid, int status)
{
if (contains(guid))
d->entries[guid].status = status;
@@ -407,7 +407,7 @@ void FeedStorageDummyImpl::copyArticle(const TQString& guid, FeedStorage* source
setHash(guid, source->hash(guid));
setLink(guid, source->link(guid));
setPubDate(guid, source->pubDate(guid));
setqStatus(guid, source->status(guid));
seStatus(guid, source->status(guid));
setTitle(guid, source->title(guid));
TQStringList tags = source->tags(guid);

+ 1
- 1
akregator/src/feedstoragedummyimpl.h View File

@@ -69,7 +69,7 @@ class FeedStorageDummyImpl : public FeedStorage
virtual uint pubDate(const TQString& guid);
virtual void setPubDate(const TQString& guid, uint pubdate);
virtual int status(const TQString& guid);
virtual void setqStatus(const TQString& guid, int status);
virtual void seStatus(const TQString& guid, int status);
virtual TQString title(const TQString& guid);
virtual void setTitle(const TQString& guid, const TQString& title);
virtual TQString description(const TQString& guid);

+ 3
- 3
akregator/src/folder.cpp View File

@@ -62,9 +62,9 @@ bool Folder::accept(TreeNodeVisitor* visitor)

Folder* Folder::fromOPML(TQDomElement e)
{
Folder* fg = new Folder(e.hasAttribute(TQString::tqfromLatin1("text")) ? e.attribute(TQString::tqfromLatin1("text")) : e.attribute(TQString::tqfromLatin1("title")));
fg->setOpen( e.attribute(TQString::tqfromLatin1("isOpen")) != TQString::tqfromLatin1(("false")));
fg->setId( e.attribute(TQString::tqfromLatin1("id")).toUInt() );
Folder* fg = new Folder(e.hasAttribute(TQString::fromLatin1("text")) ? e.attribute(TQString::fromLatin1("text")) : e.attribute(TQString::fromLatin1("title")));
fg->setOpen( e.attribute(TQString::fromLatin1("isOpen")) != TQString::fromLatin1(("false")));
fg->setId( e.attribute(TQString::fromLatin1("id")).toUInt() );
return fg;
}


+ 3
- 3
akregator/src/frame.cpp View File

@@ -175,7 +175,7 @@ void Frame::setStarted()
{
if(m_progressId.isNull() || m_progressId.isEmpty()) m_progressId = KPIM::ProgressManager::getUniqueID();
m_progressItem = KPIM::ProgressManager::createProgressItem(m_progressId, TQStyleSheet::escape( title() ), TQString(), false);
m_progressItem->setqStatus(i18n("Loading..."));
m_progressItem->seStatus(i18n("Loading..."));
//connect(m_progressItem, TQT_SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), TQT_SLOT(slotAbortFetch()));
m_state=Started;
emit started();
@@ -184,7 +184,7 @@ void Frame::setStarted()
void Frame::setCanceled(const TQString &s)
{
if(m_progressItem) {
m_progressItem->setqStatus(i18n("Loading canceled"));
m_progressItem->seStatus(i18n("Loading canceled"));
m_progressItem->setComplete();
m_progressItem = 0;
}
@@ -195,7 +195,7 @@ void Frame::setCanceled(const TQString &s)
void Frame::setCompleted()
{
if(m_progressItem) {
m_progressItem->setqStatus(i18n("Loading completed"));
m_progressItem->seStatus(i18n("Loading completed"));
m_progressItem->setComplete();
m_progressItem = 0;
}

+ 1
- 1
akregator/src/kcursorsaver.h View File

@@ -18,7 +18,7 @@ class KCursorSaver : public TQt
{
public:
/// constructor taking TQCursor tqshapes
KCursorSaver(TQt::tqCursorShape tqshape) {
KCursorSaver(TQt::CursorShape tqshape) {
TQApplication::setOverrideCursor( TQCursor(tqshape) );
inited = true;
}

+ 22
- 22
akregator/src/librss/article.cpp View File

@@ -78,35 +78,35 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
TQDomNode n;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
const TQDomElement e = n.toElement();
if ( (e.tagName()==TQString::tqfromLatin1("link")) &&
(e.attribute(TQString::tqfromLatin1("rel"), TQString::tqfromLatin1("alternate")) == TQString::tqfromLatin1("alternate")))
if ( (e.tagName()==TQString::fromLatin1("link")) &&
(e.attribute(TQString::fromLatin1("rel"), TQString::fromLatin1("alternate")) == TQString::fromLatin1("alternate")))
{
d->link=n.toElement().attribute(TQString::tqfromLatin1("href"));
d->link=n.toElement().attribute(TQString::fromLatin1("href"));
break;
}
}
}
else
{
if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
}


// prefer content/content:encoded over summary/description for feeds that provide it
TQString tagName=(format==AtomFeed)? TQString::tqfromLatin1("content"): TQString::tqfromLatin1("content:encoded");
TQString tagName=(format==AtomFeed)? TQString::fromLatin1("content"): TQString::fromLatin1("content:encoded");
if (!(elemText = extractNode(node, tagName, false)).isNull())
d->description = elemText;
if (d->description.isEmpty())
{
if (!(elemText = extractNode(node, TQString::tqfromLatin1("body"), false)).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("body"), false)).isNull())
d->description = elemText;
if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html
{
if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
d->description = elemText;
}
}
@@ -116,21 +116,21 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
if (format == AtomFeed)
{
if (version == vAtom_1_0)
elemText = extractNode(node, TQString::tqfromLatin1("updated"));
elemText = extractNode(node, TQString::fromLatin1("updated"));
else
elemText = extractNode(node, TQString::tqfromLatin1("issued"));
elemText = extractNode(node, TQString::fromLatin1("issued"));

if (!elemText.isNull())
time = parseISO8601Date(elemText);
}
else
{
elemText = extractNode(node, TQString::tqfromLatin1("pubDate"));
elemText = extractNode(node, TQString::fromLatin1("pubDate"));
if (!elemText.isNull())
time = KRFCDate::parseDate(elemText);
}
if (!(elemText = extractNode(node, TQString::tqfromLatin1("dc:date"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull())
{
time = parseISO8601Date(elemText);
}
@@ -139,11 +139,11 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
if (time != 0)
d->pubDate.setTime_t(time);

if (!(elemText = extractNode(node, TQString::tqfromLatin1("wfw:comment"))).isNull()) {
if (!(elemText = extractNode(node, TQString::fromLatin1("wfw:comment"))).isNull()) {
d->commentsLink = elemText;
}

if (!(elemText = extractNode(node, TQString::tqfromLatin1("slash:comments"))).isNull()) {
if (!(elemText = extractNode(node, TQString::fromLatin1("slash:comments"))).isNull()) {
d->numComments = elemText.toInt();
}

@@ -152,19 +152,19 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
// in RSS 1.0, we use <item about> attribute as ID
// FIXME: pass format version instead of checking for attribute

if (!element.isNull() && element.hasAttribute(TQString::tqfromLatin1("rdf:about")))
if (!element.isNull() && element.hasAttribute(TQString::fromLatin1("rdf:about")))
{
d->guid = element.attribute(TQString::tqfromLatin1("rdf:about")); // HACK: using ns properly did not work
d->guid = element.attribute(TQString::fromLatin1("rdf:about")); // HACK: using ns properly did not work
d->guidIsPermaLink = false;
}
else
{
tagName=(format==AtomFeed)? TQString::tqfromLatin1("id"): TQString::tqfromLatin1("guid");
tagName=(format==AtomFeed)? TQString::fromLatin1("id"): TQString::fromLatin1("guid");
TQDomNode n = node.namedItem(tagName);
if (!n.isNull())
{
d->guidIsPermaLink = (format==AtomFeed)? false : true;
if (n.toElement().attribute(TQString::tqfromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
if (!(elemText = extractNode(node, tagName)).isNull())
d->guid = elemText;
}
@@ -178,10 +178,10 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
md5Machine.update(d->title.utf8());
md5Machine.update(d->description.utf8());
d->guid = TQString(md5Machine.hexDigest().data());
d->meta[TQString::tqfromLatin1("guidIsHash")] = TQString::tqfromLatin1("true");
d->meta[TQString::fromLatin1("guidIsHash")] = TQString::fromLatin1("true");
}

TQDomNode enclosure = element.namedItem(TQString::tqfromLatin1("enclosure"));
TQDomNode enclosure = element.namedItem(TQString::fromLatin1("enclosure"));
if (enclosure.isElement())
d->enclosure = Enclosure::fromXML(enclosure.toElement());

@@ -191,12 +191,12 @@ Article::Article(const TQDomNode &node, Format format, Version version) : d(new
{
if (i.isElement())
{
if (i.toElement().tagName() == TQString::tqfromLatin1("metaInfo:meta"))
if (i.toElement().tagName() == TQString::fromLatin1("metaInfo:meta"))
{
TQString type = i.toElement().attribute(TQString::tqfromLatin1("type"));
TQString type = i.toElement().attribute(TQString::fromLatin1("type"));
d->meta[type] = i.toElement().text();
}
else if (i.toElement().tagName() == TQString::tqfromLatin1("category"))
else if (i.toElement().tagName() == TQString::fromLatin1("category"))
{
d->categories.append(Category::fromXML(i.toElement()));
}

+ 2
- 2
akregator/src/librss/category.cpp View File

@@ -64,8 +64,8 @@ bool Category::isNull() const
Category Category::fromXML(const TQDomElement& e)
{
Category obj;
if (e.hasAttribute(TQString::tqfromLatin1("domain")))
obj.d->domain = e.attribute(TQString::tqfromLatin1("domain"));
if (e.hasAttribute(TQString::fromLatin1("domain")))
obj.d->domain = e.attribute(TQString::fromLatin1("domain"));
obj.d->category = e.text();
obj.d->isNull = false;
return obj;

+ 152
- 152
akregator/src/librss/document.cpp View File

@@ -79,15 +79,15 @@ static TQString extractLink(const TQDomNode& node, Format format)
TQDomNode n;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
const TQDomElement e = n.toElement();
if ( (e.tagName() == TQString::tqfromLatin1("link"))
&& (e.attribute(TQString::tqfromLatin1("rel"), TQString::tqfromLatin1("alternate")) == TQString::tqfromLatin1("alternate")))
if ( (e.tagName() == TQString::fromLatin1("link"))
&& (e.attribute(TQString::fromLatin1("rel"), TQString::fromLatin1("alternate")) == TQString::fromLatin1("alternate")))
{
return n.toElement().attribute(TQString::tqfromLatin1("href"));
return n.toElement().attribute(TQString::fromLatin1("href"));
}
}
}

return extractNode(node, TQString::tqfromLatin1("link"));
return extractNode(node, TQString::fromLatin1("link"));
}

@@ -100,20 +100,20 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
TQString attr;

// we should probably check that it ISN'T feed or rss, rather than check if it is xhtml
if (rootNode.toElement().tagName()==TQString::tqfromLatin1("html"))
if (rootNode.toElement().tagName()==TQString::fromLatin1("html"))
d->valid=false;
else
d->valid=true;
attr = rootNode.toElement().attribute(TQString::tqfromLatin1("version"), TQString());
if (rootNode.toElement().tagName()==TQString::tqfromLatin1("feed"))
attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString());
if (rootNode.toElement().tagName()==TQString::fromLatin1("feed"))
{
d->format=AtomFeed;
if (attr == TQString::tqfromLatin1("0.3"))
if (attr == TQString::fromLatin1("0.3"))
d->version = vAtom_0_3;
else if (attr == TQString::tqfromLatin1("0.2")) /* smt -> review */
else if (attr == TQString::fromLatin1("0.2")) /* smt -> review */
d->version = vAtom_0_2;
else if (attr == TQString::tqfromLatin1("0.1")) /* smt -> review */
else if (attr == TQString::fromLatin1("0.1")) /* smt -> review */
d->version = vAtom_0_1;
else
d->version = vAtom_1_0;
@@ -121,13 +121,13 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
else
{
d->format=RSSFeed;
if (attr == TQString::tqfromLatin1("0.91"))
if (attr == TQString::fromLatin1("0.91"))
d->version = v0_91;
else if (attr == TQString::tqfromLatin1("0.92"))
else if (attr == TQString::fromLatin1("0.92"))
d->version = v0_92;
else if (attr == TQString::tqfromLatin1("0.93"))
else if (attr == TQString::fromLatin1("0.93"))
d->version = v0_93;
else if (attr == TQString::tqfromLatin1("0.94"))
else if (attr == TQString::fromLatin1("0.94"))
d->version = v0_94;
else // otherwise, we just assume a RSS2 compatible feed. As rss2 is generally
// backward-compatible, this should work
@@ -137,7 +137,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
if (d->format==UnknownFormat)
{
attr = rootNode.toElement().attribute(TQString::tqfromLatin1("xmlns"), TQString());
attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString());
if (!attr.isNull()) {
/*
* Hardcoding these URLs is actually a bad idea, since the DTD doesn't
@@ -147,11 +147,11 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
* distinguish the RSS versions by analyzing the relationship between
* the nodes.
*/
if (attr == TQString::tqfromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
d->format=RSSFeed;
d->version = v0_90;
}
else if (attr == TQString::tqfromLatin1("http://purl.org/rss/1.0/")) {
else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) {
d->format=RSSFeed;
d->version = v1_0;
}
@@ -163,7 +163,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
if (d->format == AtomFeed)
channelNode=rootNode;
else
channelNode=rootNode.namedItem(TQString::tqfromLatin1("channel"));
channelNode=rootNode.namedItem(TQString::fromLatin1("channel"));

if (!(elemText = extractTitle(channelNode)).isNull())
d->title = elemText;
@@ -192,27 +192,27 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
else
{
// following is a HACK for broken 0.91 feeds like xanga.com's
if (!rootNode.namedItem(TQString::tqfromLatin1("item")).isNull())
if (!rootNode.namedItem(TQString::fromLatin1("item")).isNull())
parentNode = rootNode;
else
parentNode = channelNode;
}
// image and textinput aren't supported by Atom.. handle in case feed provides
TQDomNode n = parentNode.namedItem(TQString::tqfromLatin1("image"));
TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image"));
if (!n.isNull())
d->image = new Image(n);

n = parentNode.namedItem(TQString::tqfromLatin1("textinput"));
n = parentNode.namedItem(TQString::fromLatin1("textinput"));
if (!n.isNull())
d->textInput = new TextInput(n);

// Our (hopefully faster) version of elementsByTagName()
TQString tagName;
if (d->format == AtomFeed)
tagName=TQString::tqfromLatin1("entry");
tagName=TQString::fromLatin1("entry");
else
tagName=TQString::tqfromLatin1("item");
tagName=TQString::fromLatin1("item");

for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
const TQDomElement e = n.toElement();
@@ -220,212 +220,212 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
d->articles.append(Article(e, d->format, d->version));
}

if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("copyright"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull())
d->copyright = elemText;

if (d->format == AtomFeed)
elemText = rootNode.toElement().attribute(TQString::tqfromLatin1("xml:lang"), TQString());
elemText = rootNode.toElement().attribute(TQString::fromLatin1("xml:lang"), TQString());
else
elemText = extractNode(channelNode, TQString::tqfromLatin1("language"));
elemText = extractNode(channelNode, TQString::fromLatin1("language"));

if (!elemText.isNull()){
if (elemText == TQString::tqfromLatin1("af"))
if (elemText == TQString::fromLatin1("af"))
d->language = af;
else if (elemText == TQString::tqfromLatin1("sq"))
else if (elemText == TQString::fromLatin1("sq"))
d->language = sq;
else if (elemText == TQString::tqfromLatin1("eu"))
else if (elemText == TQString::fromLatin1("eu"))
d->language = eu;
else if (elemText == TQString::tqfromLatin1("be"))
else if (elemText == TQString::fromLatin1("be"))
d->language = be;
else if (elemText == TQString::tqfromLatin1("bg"))
else if (elemText == TQString::fromLatin1("bg"))
d->language = bg;
else if (elemText == TQString::tqfromLatin1("ca"))
else if (elemText == TQString::fromLatin1("ca"))
d->language = ca;
else if (elemText == TQString::tqfromLatin1("zh-cn"))
else if (elemText == TQString::fromLatin1("zh-cn"))
d->language = zh_cn;
else if (elemText == TQString::tqfromLatin1("zh-tw"))
else if (elemText == TQString::fromLatin1("zh-tw"))
d->language = zh_tw;
else if (elemText == TQString::tqfromLatin1("hr"))
else if (elemText == TQString::fromLatin1("hr"))
d->language = hr;
else if (elemText == TQString::tqfromLatin1("cs"))
else if (elemText == TQString::fromLatin1("cs"))
d->language = cs;
else if (elemText == TQString::tqfromLatin1("da"))
else if (elemText == TQString::fromLatin1("da"))
d->language = da;
else if (elemText == TQString::tqfromLatin1("nl"))
else if (elemText == TQString::fromLatin1("nl"))
d->language = nl;
else if (elemText == TQString::tqfromLatin1("nl-be"))
else if (elemText == TQString::fromLatin1("nl-be"))
d->language = nl_be;
else if (elemText == TQString::tqfromLatin1("nl-nl"))
else if (elemText == TQString::fromLatin1("nl-nl"))
d->language = nl_nl;
else if (elemText == TQString::tqfromLatin1("en"))
else if (elemText == TQString::fromLatin1("en"))
d->language = en;
else if (elemText == TQString::tqfromLatin1("en-au"))
else if (elemText == TQString::fromLatin1("en-au"))
d->language = en_au;
else if (elemText == TQString::tqfromLatin1("en-bz"))
else if (elemText == TQString::fromLatin1("en-bz"))
d->language = en_bz;
else if (elemText == TQString::tqfromLatin1("en-ca"))
else if (elemText == TQString::fromLatin1("en-ca"))
d->language = en_ca;
else if (elemText == TQString::tqfromLatin1("en-ie"))
else if (elemText == TQString::fromLatin1("en-ie"))
d->language = en_ie;
else if (elemText == TQString::tqfromLatin1("en-jm"))
else if (elemText == TQString::fromLatin1("en-jm"))
d->language = en_jm;
else if (elemText == TQString::tqfromLatin1("en-nz"))
else if (elemText == TQString::fromLatin1("en-nz"))
d->language = en_nz;
else if (elemText == TQString::tqfromLatin1("en-ph"))
else if (elemText == TQString::fromLatin1("en-ph"))
d->language = en_ph;
else if (elemText == TQString::tqfromLatin1("en-za"))
else if (elemText == TQString::fromLatin1("en-za"))
d->language = en_za;
else if (elemText == TQString::tqfromLatin1("en-tt"))
else if (elemText == TQString::fromLatin1("en-tt"))
d->language = en_tt;
else if (elemText == TQString::tqfromLatin1("en-gb"))
else if (elemText == TQString::fromLatin1("en-gb"))
d->language = en_gb;
else if (elemText == TQString::tqfromLatin1("en-us"))
else if (elemText == TQString::fromLatin1("en-us"))
d->language = en_us;
else if (elemText == TQString::tqfromLatin1("en-zw"))
else if (elemText == TQString::fromLatin1("en-zw"))
d->language = en_zw;
else if (elemText == TQString::tqfromLatin1("fo"))
else if (elemText == TQString::fromLatin1("fo"))
d->language = fo;
else if (elemText == TQString::tqfromLatin1("fi"))
else if (elemText == TQString::fromLatin1("fi"))
d->language = fi;
else if (elemText == TQString::tqfromLatin1("fr"))
else if (elemText == TQString::fromLatin1("fr"))
d->language = fr;
else if (elemText == TQString::tqfromLatin1("fr-be"))
else if (elemText == TQString::fromLatin1("fr-be"))
d->language = fr_be;
else if (elemText == TQString::tqfromLatin1("fr-ca"))
else if (elemText == TQString::fromLatin1("fr-ca"))
d->language = fr_ca;
else if (elemText == TQString::tqfromLatin1("fr-fr"))
else if (elemText == TQString::fromLatin1("fr-fr"))
d->language = fr_fr;
else if (elemText == TQString::tqfromLatin1("fr-lu"))
else if (elemText == TQString::fromLatin1("fr-lu"))
d->language = fr_lu;
else if (elemText == TQString::tqfromLatin1("fr-mc"))
else if (elemText == TQString::fromLatin1("fr-mc"))
d->language = fr_mc;
else if (elemText == TQString::tqfromLatin1("fr-ch"))
else if (elemText == TQString::fromLatin1("fr-ch"))
d->language = fr_ch;
else if (elemText == TQString::tqfromLatin1("gl"))
else if (elemText == TQString::fromLatin1("gl"))
d->language = gl;
else if (elemText == TQString::tqfromLatin1("gd"))
else if (elemText == TQString::fromLatin1("gd"))
d->language = gd;
else if (elemText == TQString::tqfromLatin1("de"))
else if (elemText == TQString::fromLatin1("de"))
d->language = de;
else if (elemText == TQString::tqfromLatin1("de-at"))
else if (elemText == TQString::fromLatin1("de-at"))
d->language = de_at;
else if (elemText == TQString::tqfromLatin1("de-de"))
else if (elemText == TQString::fromLatin1("de-de"))
d->language = de_de;
else if (elemText == TQString::tqfromLatin1("de-li"))
else if (elemText == TQString::fromLatin1("de-li"))
d->language = de_li;
else if (elemText == TQString::tqfromLatin1("de-lu"))
else if (elemText == TQString::fromLatin1("de-lu"))
d->language = de_lu;
else if (elemText == TQString::tqfromLatin1("de-ch"))
else if (elemText == TQString::fromLatin1("de-ch"))
d->language = de_ch;
else if (elemText == TQString::tqfromLatin1("el"))
else if (elemText == TQString::fromLatin1("el"))
d->language = el;
else if (elemText == TQString::tqfromLatin1("hu"))
else if (elemText == TQString::fromLatin1("hu"))
d->language = hu;
else if (elemText == TQString::tqfromLatin1("is"))
else if (elemText == TQString::fromLatin1("is"))
d->language = is;
else if (elemText == TQString::tqfromLatin1("id"))
else if (elemText == TQString::fromLatin1("id"))
d->language = id;
else if (elemText == TQString::tqfromLatin1("ga"))
else if (elemText == TQString::fromLatin1("ga"))
d->language = ga;
else if (elemText == TQString::tqfromLatin1("it"))
else if (elemText == TQString::fromLatin1("it"))
d->language = it;
else if (elemText == TQString::tqfromLatin1("it-it"))
else if (elemText == TQString::fromLatin1("it-it"))
d->language = it_it;
else if (elemText == TQString::tqfromLatin1("it-ch"))
else if (elemText == TQString::fromLatin1("it-ch"))
d->language = it_ch;
else if (elemText == TQString::tqfromLatin1("ja"))
else if (elemText == TQString::fromLatin1("ja"))
d->language = ja;
else if (elemText == TQString::tqfromLatin1("ko"))
else if (elemText == TQString::fromLatin1("ko"))
d->language = ko;
else if (elemText == TQString::tqfromLatin1("mk"))
else if (elemText == TQString::fromLatin1("mk"))
d->language = mk;
else if (elemText == TQString::tqfromLatin1("no"))
else if (elemText == TQString::fromLatin1("no"))
d->language = no;
else if (elemText == TQString::tqfromLatin1("pl"))
else if (elemText == TQString::fromLatin1("pl"))
d->language = pl;
else if (elemText == TQString::tqfromLatin1("pt"))
else if (elemText == TQString::fromLatin1("pt"))
d->language = pt;
else if (elemText == TQString::tqfromLatin1("pt-br"))
else if (elemText == TQString::fromLatin1("pt-br"))
d->language = pt_br;
else if (elemText == TQString::tqfromLatin1("pt-pt"))
else if (elemText == TQString::fromLatin1("pt-pt"))
d->language = pt_pt;
else if (elemText == TQString::tqfromLatin1("ro"))
else if (elemText == TQString::fromLatin1("ro"))
d->language = ro;
else if (elemText == TQString::tqfromLatin1("ro-mo"))
else if (elemText == TQString::fromLatin1("ro-mo"))
d->language = ro_mo;
else if (elemText == TQString::tqfromLatin1("ro-ro"))
else if (elemText == TQString::fromLatin1("ro-ro"))
d->language = ro_ro;
else if (elemText == TQString::tqfromLatin1("ru"))
else if (elemText == TQString::fromLatin1("ru"))
d->language = ru;
else if (elemText == TQString::tqfromLatin1("ru-mo"))
else if (elemText == TQString::fromLatin1("ru-mo"))
d->language = ru_mo;
else if (elemText == TQString::tqfromLatin1("ru-ru"))
else if (elemText == TQString::fromLatin1("ru-ru"))
d->language = ru_ru;
else if (elemText == TQString::tqfromLatin1("sr"))
else if (elemText == TQString::fromLatin1("sr"))
d->language = sr;
else if (elemText == TQString::tqfromLatin1("sk"))
else if (elemText == TQString::fromLatin1("sk"))
d->language = sk;
else if (elemText == TQString::tqfromLatin1("sl"))
else if (elemText == TQString::fromLatin1("sl"))
d->language = sl;
else if (elemText == TQString::tqfromLatin1("es"))
else if (elemText == TQString::fromLatin1("es"))
d->language = es;
else if (elemText == TQString::tqfromLatin1("es-ar"))
else if (elemText == TQString::fromLatin1("es-ar"))
d->language = es_ar;
else if (elemText == TQString::tqfromLatin1("es-bo"))
else if (elemText == TQString::fromLatin1("es-bo"))
d->language = es_bo;
else if (elemText == TQString::tqfromLatin1("es-cl"))
else if (elemText == TQString::fromLatin1("es-cl"))
d->language = es_cl;
else if (elemText == TQString::tqfromLatin1("es-co"))
else if (elemText == TQString::fromLatin1("es-co"))
d->language = es_co;
else if (elemText == TQString::tqfromLatin1("es-cr"))
else if (elemText == TQString::fromLatin1("es-cr"))
d->language = es_cr;
else if (elemText == TQString::tqfromLatin1("es-do"))
else if (elemText == TQString::fromLatin1("es-do"))
d->language = es_do;
else if (elemText == TQString::tqfromLatin1("es-ec"))
else if (elemText == TQString::fromLatin1("es-ec"))
d->language = es_ec;
else if (elemText == TQString::tqfromLatin1("es-sv"))
else if (elemText == TQString::fromLatin1("es-sv"))
d->language = es_sv;
else if (elemText == TQString::tqfromLatin1("es-gt"))
else if (elemText == TQString::fromLatin1("es-gt"))
d->language = es_gt;
else if (elemText == TQString::tqfromLatin1("es-hn"))
else if (elemText == TQString::fromLatin1("es-hn"))
d->language = es_hn;
else if (elemText == TQString::tqfromLatin1("es-mx"))
else if (elemText == TQString::fromLatin1("es-mx"))
d->language = es_mx;
else if (elemText == TQString::tqfromLatin1("es-ni"))
else if (elemText == TQString::fromLatin1("es-ni"))
d->language = es_ni;
else if (elemText == TQString::tqfromLatin1("es-pa"))
else if (elemText == TQString::fromLatin1("es-pa"))
d->language = es_pa;
else if (elemText == TQString::tqfromLatin1("es-py"))
else if (elemText == TQString::fromLatin1("es-py"))
d->language = es_py;
else if (elemText == TQString::tqfromLatin1("es-pe"))
else if (elemText == TQString::fromLatin1("es-pe"))
d->language = es_pe;
else if (elemText == TQString::tqfromLatin1("es-pr"))
else if (elemText == TQString::fromLatin1("es-pr"))
d->language = es_pr;
else if (elemText == TQString::tqfromLatin1("es-es"))
else if (elemText == TQString::fromLatin1("es-es"))
d->language = es_es;
else if (elemText == TQString::tqfromLatin1("es-uy"))
else if (elemText == TQString::fromLatin1("es-uy"))
d->language = es_uy;
else if (elemText == TQString::tqfromLatin1("es-ve"))
else if (elemText == TQString::fromLatin1("es-ve"))
d->language = es_ve;
else if (elemText == TQString::tqfromLatin1("sv"))
else if (elemText == TQString::fromLatin1("sv"))
d->language = sv;
else if (elemText == TQString::tqfromLatin1("sv-fi"))
else if (elemText == TQString::fromLatin1("sv-fi"))
d->language = sv_fi;
else if (elemText == TQString::tqfromLatin1("sv-se"))
else if (elemText == TQString::fromLatin1("sv-se"))
d->language = sv_se;
else if (elemText == TQString::tqfromLatin1("tr"))
else if (elemText == TQString::fromLatin1("tr"))
d->language = tr;
else if (elemText == TQString::tqfromLatin1("uk"))
else if (elemText == TQString::fromLatin1("uk"))
d->language = uk;
else
d->language = UndefinedLanguage;
}

if (d->format == AtomFeed)
tagName=TQString::tqfromLatin1("issued"); // atom doesn't specify this for feeds
tagName=TQString::fromLatin1("issued"); // atom doesn't specify this for feeds
// but some broken feeds do this
else
tagName=TQString::tqfromLatin1("pubDate");
tagName=TQString::fromLatin1("pubDate");

if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
@@ -441,7 +441,7 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}

if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("dc:date"))).isNull()) {
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) {
time_t _time = parseISO8601Date(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -451,9 +451,9 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
}

if (d->format == AtomFeed)
tagName=TQString::tqfromLatin1("modified");
tagName=TQString::fromLatin1("modified");
else
tagName=TQString::tqfromLatin1("lastBuildDate");
tagName=TQString::fromLatin1("lastBuildDate");
if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
if (d->format == AtomFeed)
@@ -463,44 +463,44 @@ Document::Document(const TQDomDocument &doc) : d(new Private)
d->lastBuildDate.setTime_t(_time);
}

if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("rating"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull())
d->rating = elemText;
if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("docs"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull())
d->docs = elemText;
if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
d->managingEditor = elemText;
if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("webMaster"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull())
d->webMaster = elemText;

if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("ttl"))).isNull())
if (!(elemText = extractNode(channelNode, TQString::fromLatin1("ttl"))).isNull())
d->ttl = elemText.toUInt();

n = channelNode.namedItem(TQString::tqfromLatin1("skipHours"));
n = channelNode.namedItem(TQString::fromLatin1("skipHours"));
if (!n.isNull())
for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
if (e.tagName() == TQString::tqfromLatin1("hour"))
if (e.tagName() == TQString::fromLatin1("hour"))
d->skipHours.append(e.text().toUInt());

n = channelNode.namedItem(TQString::tqfromLatin1("skipDays"));
n = channelNode.namedItem(TQString::fromLatin1("skipDays"));
if (!n.isNull()) {
Day day;
TQString elemText;
for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
if (e.tagName() == TQString::tqfromLatin1("day")) {
if (e.tagName() == TQString::fromLatin1("day")) {
elemText = e.text().lower();
if (elemText == TQString::tqfromLatin1("monday"))
if (elemText == TQString::fromLatin1("monday"))
day = Monday;
else if (elemText == TQString::tqfromLatin1("tuesday"))
else if (elemText == TQString::fromLatin1("tuesday"))
day = Tuesday;
else if (elemText == TQString::tqfromLatin1("wednesday"))
else if (elemText == TQString::fromLatin1("wednesday"))
day = Wednesday;
else if (elemText == TQString::tqfromLatin1("thursday"))
else if (elemText == TQString::fromLatin1("thursday"))
day = Thursday;
else if (elemText == TQString::tqfromLatin1("friday"))
else if (elemText == TQString::fromLatin1("friday"))
day = Friday;
else if (elemText == TQString::tqfromLatin1("saturday"))
else if (elemText == TQString::fromLatin1("saturday"))
day = Saturday;
else if (elemText == TQString::tqfromLatin1("sunday"))
else if (elemText == TQString::fromLatin1("sunday"))
day = Sunday;
else
day = UndefinedDay;
@@ -529,17 +529,17 @@ Version Document::version() const
TQString Document::verbVersion() const
{
switch (d->version) {
case v0_90: return TQString::tqfromLatin1("0.90");
case v0_91: return TQString::tqfromLatin1("0.91");
case v0_92: return TQString::tqfromLatin1("0.92");
case v0_93: return TQString::tqfromLatin1("0.93");
case v0_94: return TQString::tqfromLatin1("0.94");
case v1_0: return TQString::tqfromLatin1("1.0");
case v2_0: return TQString::tqfromLatin1("2.0");
case vAtom_0_3: return TQString::tqfromLatin1("0.3");
case vAtom_0_2: return TQString::tqfromLatin1("0.2");
case vAtom_0_1: return TQString::tqfromLatin1("0.1");
case vAtom_1_0: return TQString::tqfromLatin1("1.0");
case v0_90: return TQString::fromLatin1("0.90");
case v0_91: return TQString::fromLatin1("0.91");
case v0_92: return TQString::fromLatin1("0.92");
case v0_93: return TQString::fromLatin1("0.93");
case v0_94: return TQString::fromLatin1("0.94");
case v1_0: return TQString::fromLatin1("1.0");
case v2_0: return TQString::fromLatin1("2.0");
case vAtom_0_3: return TQString::fromLatin1("0.3");
case vAtom_0_2: return TQString::fromLatin1("0.2");
case vAtom_0_1: return TQString::fromLatin1("0.1");
case vAtom_1_0: return TQString::fromLatin1("1.0");
}
return TQString();
}

+ 10
- 10
akregator/src/librss/enclosure.cpp View File

@@ -57,30 +57,30 @@ Enclosure Enclosure::fromXML(const TQDomElement& e)
TQString url, type;
int length = -1;

if (e.hasAttribute(TQString::tqfromLatin1("url")))
url = e.attribute(TQString::tqfromLatin1("url"));
if (e.hasAttribute(TQString::fromLatin1("url")))
url = e.attribute(TQString::fromLatin1("url"));
if (e.hasAttribute(TQString::tqfromLatin1("length")))
if (e.hasAttribute(TQString::fromLatin1("length")))
{
bool ok;
int c = e.attribute(TQString::tqfromLatin1("length")).toInt(&ok);
int c = e.attribute(TQString::fromLatin1("length")).toInt(&ok);
length = ok ? c : -1;
}
if (e.hasAttribute(TQString::tqfromLatin1("type")))
type = e.attribute(TQString::tqfromLatin1("type"));
if (e.hasAttribute(TQString::fromLatin1("type")))
type = e.attribute(TQString::fromLatin1("type"));

return Enclosure(url, length, type);
}

TQDomElement Enclosure::toXML(TQDomDocument document) const
{
TQDomElement e = document.createElement(TQString::tqfromLatin1("enclosure"));
TQDomElement e = document.createElement(TQString::fromLatin1("enclosure"));
if (!d->url.isNull())
e.setAttribute(TQString::tqfromLatin1("url"), d->url);
e.setAttribute(TQString::fromLatin1("url"), d->url);
if (d->length != -1)
e.setAttribute(TQString::tqfromLatin1("length"), TQString::number(d->length));
e.setAttribute(TQString::fromLatin1("length"), TQString::number(d->length));
if (!d->type.isNull())
e.setAttribute(TQString::tqfromLatin1("type"), d->type);
e.setAttribute(TQString::fromLatin1("type"), d->type);

return e;
}

+ 1
- 1
akregator/src/librss/global.h View File

@@ -42,7 +42,7 @@ namespace RSS
* Possible status values returned by the signal
* Loader::loadingComplete().
*/
enum tqStatus {
enum Status {
Success, /**
* Nothing went wrong so far, but you still have to check
* what values are returned by the classes since it's not

+ 6
- 6
akregator/src/librss/image.cpp View File

@@ -48,17 +48,17 @@ Image::Image(const TQDomNode &node) : TQObject(), d(new Private)
{
TQString elemText;

if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("url"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull())
d->url = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("height"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull())
d->height = elemText.toUInt();
if (!(elemText = extractNode(node, TQString::tqfromLatin1("width"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull())
d->width = elemText.toUInt();
}


+ 2
- 2
akregator/src/librss/loader.cpp View File

@@ -268,7 +268,7 @@ Loader *Loader::create()
Loader *Loader::create(TQObject *object, const char *slot)
{
Loader *loader = create();
connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
object, slot);
return loader;
}
@@ -326,7 +326,7 @@ void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
d->retriever = NULL;

Document rssDoc;
tqStatus status = Success;
Status status = Success;

if (success) {
TQDomDocument doc;

+ 5
- 5
akregator/src/librss/loader.h View File

@@ -211,8 +211,8 @@ namespace RSS
*
* \code
* Loader *loader = Loader::create();
* connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
* this, TQT_SLOT(slotLoadingComplete(Loader *, Document, tqStatus)));
* connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
* this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status)));
* loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever);
* \endcode
*
@@ -236,7 +236,7 @@ namespace RSS
* 'slotLoadingComplete' method might look like this:
*
* \code
* void MyClass::slotLoadingComplete(Loader *loader, Document doc, tqStatus status)
* void MyClass::slotLoadingComplete(Loader *loader, Document doc, Status status)
* {
* // Note that Loader::~Loader() is private, so you cannot delete Loader instances.
* // You don't need to do that anyway since Loader instances delete themselves.
@@ -322,9 +322,9 @@ namespace RSS
* the case if you intend to call getPixmap() on Document::image()!
* @param status A status byte telling whether there were any problems
* while retrieving or parsing the data.
* @see Document, tqStatus
* @see Document, Status
*/
void loadingComplete(Loader *loader, Document doc, tqStatus status);
void loadingComplete(Loader *loader, Document doc, Status status);

private slots:
void slotRetrieverDone(const TQByteArray &data, bool success);

+ 3
- 3
akregator/src/librss/testlibrss.cpp View File

@@ -19,12 +19,12 @@ static const KCmdLineOptions options[] =
void Tester::test( const TQString &url )
{
Loader *loader = Loader::create();
connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ),
this, TQT_SLOT( slotLoadingComplete( Loader *, Document, tqStatus ) ) );
connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ),
this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
loader->loadFrom( url, new FileRetriever );
}

void Tester::slotLoadingComplete( Loader *loader, Document doc, tqStatus status )
void Tester::slotLoadingComplete( Loader *loader, Document doc, Status status )
{
if ( status == Success )
{

+ 2
- 2
akregator/src/librss/testlibrss.h View File

@@ -10,7 +10,7 @@

using RSS::Loader;
using RSS::Document;
using RSS::tqStatus;
using RSS::Status;

class Tester : public TQObject
{
@@ -20,7 +20,7 @@ class Tester : public TQObject
void test( const TQString &url );

private slots:
void slotLoadingComplete( Loader *loader, Document doc, tqStatus status );
void slotLoadingComplete( Loader *loader, Document doc, Status status );
};

#endif

+ 4
- 4
akregator/src/librss/textinput.cpp View File

@@ -38,13 +38,13 @@ TextInput::TextInput(const TQDomNode &node) : d(new Private)
{
TQString elemText;

if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull())
d->title = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull())
d->description = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("name"))))
if (!(elemText = extractNode(node, TQString::fromLatin1("name"))))
d->name = elemText;
if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull())
d->link = elemText;
}


+ 5
- 5
akregator/src/librss/tools_p.cpp View File

@@ -69,8 +69,8 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type
return HTML;
if (type == TQString::fromUtf8("text")
|| (type.tqstartsWith(TQString::fromUtf8("text/"), false)
&& !type.tqstartsWith(TQString::fromUtf8("text/xml"), false))
|| (type.startsWith(TQString::fromUtf8("text/"), false)
&& !type.startsWith(TQString::fromUtf8("text/xml"), false))
)
return Text;
@@ -85,8 +85,8 @@ static ContentFormat mapTypeToFormat(const TQString& modep, const TQString& type
if (xmltypes.contains(type)
|| type.tqendsWith(TQString::fromUtf8("+xml"), false)
|| type.tqendsWith(TQString::fromUtf8("/xml"), false))
|| type.endsWith(TQString::fromUtf8("+xml"), false)
|| type.endsWith(TQString::fromUtf8("/xml"), false))
return XML;
return Binary;
@@ -145,7 +145,7 @@ TQString extractNode(const TQDomNode &parent, const TQString &elemName, bool isI

TQString extractTitle(const TQDomNode & parent)
{
TQDomNode node = parent.namedItem(TQString::tqfromLatin1("title"));
TQDomNode node = parent.namedItem(TQString::fromLatin1("title"));
if (node.isNull())
return TQString();


+ 1
- 1
akregator/src/mainwindow.cpp View File

@@ -85,7 +85,7 @@ MainWindow::MainWindow()
int statH=fontMetrics().height()+2;
m_statusLabel = new KSqueezedTextLabel(this);
m_statusLabel->setTextFormat(TQt::RichText);
m_statusLabel->tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Fixed ));
m_statusLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Fixed ));
m_statusLabel->setMinimumWidth( 0 );
m_statusLabel->setFixedHeight( statH );
statusBar()->addWidget (m_statusLabel, 1, false);

+ 2
- 2
akregator/src/mk4storage/feedstoragemk4impl.cpp View File

@@ -401,7 +401,7 @@ int FeedStorageMK4Impl::status(const TQString& guid)
return findidx != -1 ? d->pstatus(d->archiveView.GetAt(findidx)) : 0;
}

void FeedStorageMK4Impl::setqStatus(const TQString& guid, int status)
void FeedStorageMK4Impl::seStatus(const TQString& guid, int status)
{
int findidx = findArticle(guid);
if (findidx == -1)
@@ -799,7 +799,7 @@ void FeedStorageMK4Impl::copyArticle(const TQString& guid, FeedStorage* source)
setHash(guid, source->hash(guid));
setLink(guid, source->link(guid));
setPubDate(guid, source->pubDate(guid));
setqStatus(guid, source->status(guid));
seStatus(guid, source->status(guid));
setTitle(guid, source->title(guid));
setAuthor(guid, source->author(guid));


+ 1
- 1
akregator/src/mk4storage/feedstoragemk4impl.h View File

@@ -69,7 +69,7 @@ class FeedStorageMK4Impl : public FeedStorage
virtual uint pubDate(const TQString& guid);
virtual void setPubDate(const TQString& guid, uint pubdate);
virtual int status(const TQString& guid);
virtual void setqStatus(const TQString& guid, int status);
virtual void seStatus(const TQString& guid, int status);
virtual TQString title(const TQString& guid);
virtual void setTitle(const TQString& guid, const TQString& title);
virtual TQString description(const TQString& guid);

+ 1
- 1
akregator/src/mk4storage/mk4confwidgetbase.ui View File

@@ -90,7 +90,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>