diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
commit | 716a5de8870d7c02bb4d0aed72f30291b17b763a (patch) | |
tree | 29e58b213ead28151ccf7eb33d12c968ea844120 /akregator/src/articleviewer.cpp | |
parent | 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (diff) | |
download | tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.tar.gz tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'akregator/src/articleviewer.cpp')
-rw-r--r-- | akregator/src/articleviewer.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp index f8ad74bc8..5f1870f97 100644 --- a/akregator/src/articleviewer.cpp +++ b/akregator/src/articleviewer.cpp @@ -72,9 +72,9 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor m_view->m_link = TQString(); TQString text; - text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").tqarg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); - text += TQString("<div class=\"headertitle\" dir=\"%1\">").tqarg(directionOf(Utils::stripTags(node->title()))); + text += TQString("<div class=\"headertitle\" dir=\"%1\">").arg(directionOf(Utils::stripTags(node->title()))); text += node->title(); if(node->unread() == 0) text += i18n(" (no unread articles)"); @@ -90,26 +90,26 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor TQString file = url.replace("/", "_").replace(":", "_"); KURL u(m_view->m_imageDir); u.setFileName(file); - text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").tqarg(node->htmlUrl()).tqarg(u.url()); + text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(node->htmlUrl()).arg(u.url()); } else text += "<div class=\"body\">"; if( !node->description().isEmpty() ) { - text += TQString("<div dir=\"%1\">").tqarg(Utils::stripTags(directionOf(node->description()))); - text += i18n("<b>Description:</b> %1<br><br>").tqarg(node->description()); + text += TQString("<div dir=\"%1\">").arg(Utils::stripTags(directionOf(node->description()))); + text += i18n("<b>Description:</b> %1<br><br>").arg(node->description()); text += "</div>\n"; // /description } if ( !node->htmlUrl().isEmpty() ) { - text += TQString("<div dir=\"%1\">").tqarg(directionOf(node->htmlUrl())); - text += i18n("<b>Homepage:</b> <a href=\"%1\">%2</a>").tqarg(node->htmlUrl()).tqarg(node->htmlUrl()); + text += TQString("<div dir=\"%1\">").arg(directionOf(node->htmlUrl())); + text += i18n("<b>Homepage:</b> <a href=\"%1\">%2</a>").arg(node->htmlUrl()).arg(node->htmlUrl()); text += "</div>\n"; // / link } - //text += i18n("<b>Unread articles:</b> %1").tqarg(node->unread()); + //text += i18n("<b>Unread articles:</b> %1").arg(node->unread()); text += "</div>"; // /body m_view->renderContent(text); @@ -121,8 +121,8 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor m_view->m_link = TQString(); TQString text; - text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").tqarg(TQApplication::reverseLayout() ? "rtl" : "ltr"); - text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").tqarg(directionOf(Utils::stripTags(node->title()))).tqarg(node->title()); + text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); if(node->unread() == 0) text += i18n(" (no unread articles)"); else @@ -139,8 +139,8 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor m_view->m_link = TQString(); TQString text; - text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").tqarg(TQApplication::reverseLayout() ? "rtl" : "ltr"); - text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").tqarg(directionOf(Utils::stripTags(node->title()))).tqarg(node->title()); + text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); if(node->unread() == 0) text += i18n(" (no unread articles)"); else @@ -198,10 +198,10 @@ void ArticleViewer::generateNormalModeCSS() " font-size: %2 ! important;\n" " color: %3 ! important;\n" " background: %4 ! important;\n" - "}\n\n").tqarg(Settings::standardFont()) - .tqarg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px") - .tqarg(cg.text().name()) - .tqarg(cg.base().name()); + "}\n\n").arg(Settings::standardFont()) + .arg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px") + .arg(cg.text().name()) + .arg(cg.base().name()); m_normalModeCSS += TQString( "a {\n" + TQString(" color: %1 ! important;\n") @@ -214,18 +214,18 @@ void ArticleViewer::generateNormalModeCSS() +" margin-bottom: 10pt;\n" // +" width: 99%;\n" + "}\n\n") - .tqarg(cg.link().name()) - .tqarg(cg.background().name()) - .tqarg(cg.text().name()); + .arg(cg.link().name()) + .arg(cg.background().name()) + .arg(cg.text().name()); m_normalModeCSS += TQString(".headertitle a:link { color: %1 ! important; }\n" ".headertitle a:visited { color: %2 ! important; }\n" ".headertitle a:hover{ color: %3 ! important; }\n" ".headertitle a:active { color: %4 ! important; }\n") - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()); + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()); m_normalModeCSS += TQString( ".headertitle {\n" @@ -244,8 +244,8 @@ void ArticleViewer::generateNormalModeCSS() ".headimage {\n" " float: right;\n" " margin-left: 5px;\n" - "}\n\n").tqarg(cg.highlight().name()) - .tqarg(cg.highlightedText().name()); + "}\n\n").arg(cg.highlight().name()) + .arg(cg.highlightedText().name()); m_normalModeCSS += TQString( "body { clear: none; }\n\n" @@ -278,10 +278,10 @@ void ArticleViewer::generateCombinedModeCSS() " font-size: %2 ! important;\n" " color: %3 ! important;\n" " background: %4 ! important;\n" - "}\n\n").tqarg(Settings::standardFont()) - .tqarg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px") - .tqarg(cg.text().name()) - .tqarg(cg.base().name()); + "}\n\n").arg(Settings::standardFont()) + .arg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px") + .arg(cg.text().name()) + .arg(cg.base().name()); m_combinedModeCSS += ( "a {\n" + TQString(" color: %1 ! important;\n") @@ -294,18 +294,18 @@ void ArticleViewer::generateCombinedModeCSS() +" margin-bottom: 10pt;\n" // +" width: 99%;\n" + "}\n\n") - .tqarg(cg.link().name()) - .tqarg(cg.background().name()) - .tqarg(cg.text().name()); + .arg(cg.link().name()) + .arg(cg.background().name()) + .arg(cg.text().name()); m_combinedModeCSS += TQString(".headertitle a:link { color: %1 ! important; }\n" ".headertitle a:visited { color: %2 ! important; }\n" ".headertitle a:hover{ color: %3 ! important; }\n" ".headertitle a:active { color: %4 ! important; }\n") - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()) - .tqarg(cg.highlightedText().name()); + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()) + .arg(cg.highlightedText().name()); m_combinedModeCSS += TQString( ".headertitle {\n" " background: %1 ! important;\n" @@ -323,8 +323,8 @@ void ArticleViewer::generateCombinedModeCSS() ".headimage {\n" " float: right;\n" " margin-left: 5px;\n" - "}\n\n").tqarg(cg.highlight().name()) - .tqarg(cg.highlightedText().name()); + "}\n\n").arg(cg.highlight().name()) + .arg(cg.highlightedText().name()); m_combinedModeCSS += TQString( "body { clear: none; }\n\n" @@ -368,11 +368,11 @@ void ArticleViewer::displayAboutPage() { TQString location = locate("data", "akregator/about/main.html"); TQString content = KPIM::kFileToString(location); - content = content.tqarg( locate( "data", "libtdepim/about/kde_infopage.css" ) ); + content = content.arg( locate( "data", "libtdepim/about/kde_infopage.css" ) ); if ( kapp->reverseLayout() ) - content = content.tqarg( "@import \"%1\";" ).tqarg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) ); + content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) ); else - content = content.tqarg( "" ); + content = content.arg( "" ); begin(KURL( location )); TQString info = @@ -389,25 +389,25 @@ void ArticleViewer::displayAboutPage() "<p>We hope that you will enjoy Akregator.</p>\n" "<p>Thank you,</p>\n" "<p style='margin-bottom: 0px'> The Akregator Team</p>\n") - .tqarg(AKREGATOR_VERSION) // Akregator version - .tqarg("http://akregator.kde.org/"); // Akregator homepage URL + .arg(AKREGATOR_VERSION) // Akregator version + .arg("http://akregator.kde.org/"); // Akregator homepage URL TQString fontSize = TQString::number( pointsToPixel( Settings::mediumFontSize() )); TQString appTitle = i18n("Akregator"); TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite"); TQString quickDescription = i18n("An RSS feed reader for the K Desktop Environment."); - write(content.tqarg(fontSize).tqarg(appTitle).tqarg(catchPhrase).tqarg(quickDescription).tqarg(info)); + write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info)); end(); } TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& article) { TQString text; - text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").tqarg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); if (!article.title().isEmpty()) { - text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").tqarg(directionOf(Utils::stripTags(article.title()))); + text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title()))); if (article.link().isValid()) text += "<a href=\""+article.link().url()+"\">"; text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser @@ -417,16 +417,16 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic } if (article.pubDate().isValid()) { - text += TQString("<span class=\"header\" dir=\"%1\">").tqarg(directionOf(i18n("Date"))); - text += TQString ("%1:").tqarg(i18n("Date")); + text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date"))); + text += TQString ("%1:").arg(i18n("Date")); text += "</span><span class=\"headertext\">"; text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL? } TQString author = article.author(); if (!author.isEmpty()) { - text += TQString("<br/><span class=\"header\" dir=\"%1\">").tqarg(directionOf(i18n("Author"))); - text += TQString ("%1:").tqarg(i18n("Author")); + text += TQString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author"))); + text += TQString ("%1:").arg(i18n("Author")); text += "</span><span class=\"headertext\">"; text += author+"</span>\n"; // TODO: might need RTL? } @@ -437,14 +437,14 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic TQString file = Utils::fileNameForUrl(feed->xmlUrl()); KURL u(m_imageDir); u.setFileName(file); - text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").tqarg(feed->htmlUrl()).tqarg(u.url()); + text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url()); } if (!article.description().isEmpty()) { - text += TQString("<div dir=\"%1\">").tqarg(directionOf(Utils::stripTags(article.description())) ); + text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) ); text += "<span class=\"content\">"+article.description()+"</span>"; text += "</div>"; } @@ -486,7 +486,7 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic //int length = article.enclosure().length(); //TQString lengthStr = KIO::convertSize(length); - //text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>").tqarg(url).tqarg(url).tqarg(lengthStr).tqarg(type); + //text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>").arg(url).arg(url).arg(lengthStr).arg(type); } //kdDebug() << text << endl; return text; @@ -496,13 +496,13 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& article) { TQString text; - text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").tqarg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); KURL link = article.link(); if (!article.title().isEmpty()) { - text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").tqarg(directionOf(Utils::stripTags(article.title()))); + text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title()))); if (link.isValid()) text += "<a href=\""+link.url()+"\">"; text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser @@ -512,8 +512,8 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art } if (article.pubDate().isValid()) { - text += TQString("<span class=\"header\" dir=\"%1\">").tqarg(directionOf(i18n("Date"))); - text += TQString ("%1:").tqarg(i18n("Date")); + text += TQString("<span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Date"))); + text += TQString ("%1:").arg(i18n("Date")); text += "</span><span class=\"headertext\">"; text += KGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL? } @@ -521,8 +521,8 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art TQString author = article.author(); if (!author.isEmpty()) { - text += TQString("<br/><span class=\"header\" dir=\"%1\">").tqarg(directionOf(i18n("Author"))); - text += TQString ("%1:").tqarg(i18n("Author")); + text += TQString("<br/><span class=\"header\" dir=\"%1\">").arg(directionOf(i18n("Author"))); + text += TQString ("%1:").arg(i18n("Author")); text += "</span><span class=\"headertext\">"; text += author+"</span>\n"; // TODO: might need RTL? } @@ -534,14 +534,14 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art TQString file = Utils::fileNameForUrl(feed->xmlUrl()); KURL u(m_imageDir); u.setFileName(file); - text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").tqarg(feed->htmlUrl()).tqarg(u.url()); + text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url()); } if (!article.description().isEmpty()) { - text += TQString("<div dir=\"%1\">").tqarg(directionOf(Utils::stripTags(article.description())) ); + text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) ); text += "<span class=\"content\">"+article.description()+"</span>"; text += "</div>"; } |