diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /cervisia/logplainview.cpp | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cervisia/logplainview.cpp')
-rw-r--r-- | cervisia/logplainview.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/cervisia/logplainview.cpp b/cervisia/logplainview.cpp index 413180af..2f965baf 100644 --- a/cervisia/logplainview.cpp +++ b/cervisia/logplainview.cpp @@ -31,9 +31,9 @@ using namespace Cervisia; -LogPlainView::LogPlainView(TQWidget* parent, const char* name) - : KTextBrowser(parent, name) - , m_find(0) +LogPlainView::LogPlainView(TQWidget* tqparent, const char* name) + : KTextBrowser(tqparent, name) + , m_tqfind(0) , m_findPos(0) { setNotifyClick(false); @@ -42,7 +42,7 @@ LogPlainView::LogPlainView(TQWidget* parent, const char* name) LogPlainView::~LogPlainView() { - delete m_find; m_find = 0; + delete m_tqfind; m_tqfind = 0; } @@ -53,7 +53,7 @@ void LogPlainView::addRevision(const LogInfo& logInfo) // assemble revision information lines TQString logEntry; - logEntry += "<b>" + i18n("revision %1").arg(TQStyleSheet::escape(logInfo.m_revision)) + + logEntry += "<b>" + i18n("revision %1").tqarg(TQStyleSheet::escape(logInfo.m_revision)) + "</b>"; logEntry += " [<a href=\"revA#" + TQStyleSheet::escape(logInfo.m_revision) + "\">" + i18n("Select for revision A") + @@ -62,8 +62,8 @@ void LogPlainView::addRevision(const LogInfo& logInfo) i18n("Select for revision B") + "</a>]<br>"; logEntry += "<i>" + - i18n("date: %1; author: %2").arg(TQStyleSheet::escape(logInfo.dateTimeToString())) - .arg(TQStyleSheet::escape(logInfo.m_author)) + + i18n("date: %1; author: %2").tqarg(TQStyleSheet::escape(logInfo.dateTimeToString())) + .tqarg(TQStyleSheet::escape(logInfo.m_author)) + "</i>"; append(logEntry); @@ -107,11 +107,11 @@ void LogPlainView::addRevision(const LogInfo& logInfo) void LogPlainView::searchText(int options, const TQString& pattern) { - m_find = new KFind(pattern, options, this); + m_tqfind = new KFind(pattern, options, this); - connect(m_find, TQT_SIGNAL(highlight(const TQString&, int, int)), + connect(m_tqfind, TQT_SIGNAL(highlight(const TQString&, int, int)), this, TQT_SLOT(searchHighlight(const TQString&, int, int))); - connect(m_find, TQT_SIGNAL(findNext()), + connect(m_tqfind, TQT_SIGNAL(findNext()), this, TQT_SLOT(findNext())); m_findPos = 0; @@ -140,24 +140,24 @@ void LogPlainView::findNext() while( res == KFind::NoMatch && m_findPos < paragraphs() && m_findPos >= 0 ) { - if( m_find->needData() ) + if( m_tqfind->needData() ) { TQString richText = text(m_findPos); - // replace <br/> with '\n' - richText.replace(breakLineTag, "\n"); + // tqreplace <br/> with '\n' + richText.tqreplace(breakLineTag, "\n"); // remove html tags from text - richText.replace(htmlTags, ""); + richText.tqreplace(htmlTags, ""); - m_find->setData(richText); + m_tqfind->setData(richText); } - res = m_find->find(); + res = m_tqfind->find(); if( res == KFind::NoMatch ) { - if( m_find->options() & KFindDialog::FindBackwards ) + if( m_tqfind->options() & KFindDialog::FindBackwards ) --m_findPos; else ++m_findPos; @@ -167,15 +167,15 @@ void LogPlainView::findNext() // reached the end? if( res == KFind::NoMatch ) { - if( m_find->shouldRestart() ) + if( m_tqfind->shouldRestart() ) { m_findPos = 0; findNext(); } else { - delete m_find; - m_find = 0; + delete m_tqfind; + m_tqfind = 0; } } } |