From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: TQt4 port kdevelop This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/grepview/grepviewwidget.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'parts/grepview/grepviewwidget.cpp') diff --git a/parts/grepview/grepviewwidget.cpp b/parts/grepview/grepviewwidget.cpp index 78aa4224..e565a7d8 100644 --- a/parts/grepview/grepviewwidget.cpp +++ b/parts/grepview/grepviewwidget.cpp @@ -55,11 +55,11 @@ private: GrepListBoxItem::GrepListBoxItem(const TQString &fileName, const TQString &lineNumber, const TQString &text, bool showFilename) - : ProcessListBoxItem( TQString::null, Normal), + : ProcessListBoxItem( TQString(), Normal), fileName(fileName), lineNumber(lineNumber), text(text.stripWhiteSpace()), show(showFilename) { - this->text.replace( TQChar('\t'), TQString(" ") ); + this->text.tqreplace( TQChar('\t'), TQString(" ") ); } @@ -73,7 +73,7 @@ void GrepListBoxItem::paint(TQPainter *p) { TQColor base, dim, result, bkground; if (listBox()) { - const TQColorGroup& group = listBox()->palette().active(); + const TQColorGroup& group = listBox()->tqpalette().active(); if (isSelected()) { bkground = group.button(); base = group.buttonText(); @@ -88,13 +88,13 @@ void GrepListBoxItem::paint(TQPainter *p) } else { - base = Qt::black; - dim = Qt::darkGreen; - result = Qt::blue; + base = TQt::black; + dim = TQt::darkGreen; + result = TQt::blue; if (isSelected()) - bkground = Qt::lightGray; + bkground = TQt::lightGray; else - bkground = Qt::white; + bkground = TQt::white; } TQFontMetrics fm = p->fontMetrics(); TQString stx = lineNumber + ": "; @@ -126,7 +126,7 @@ void GrepListBoxItem::paint(TQPainter *p) GrepViewWidget::GrepViewWidget(GrepViewPart *part) : TQWidget(0, "grepview widget") { - m_layout = new TQHBoxLayout(this, 0, -1, "greplayout"); + m_layout = new TQHBoxLayout(this, 0, -1, "greptqlayout"); m_tabWidget = new KTabWidget(this); @@ -174,7 +174,7 @@ void GrepViewWidget::showDialog() if(selectIface && selectIface->hasSelection()) { TQString selText = selectIface->selection(); - if(!selText.contains('\n')) + if(!selText.tqcontains('\n')) { grepdlg->setPattern(selText); } @@ -193,7 +193,7 @@ void GrepViewWidget::showDialog() grepdlg->show(); } -// @todo - put this somewhere common - or just use Qt if possible +// @todo - put this somewhere common - or just use TQt if possible static TQString escape(const TQString &str) { TQString escaped("[]{}()\\^$?.+-*|"); @@ -201,7 +201,7 @@ static TQString escape(const TQString &str) for (uint i=0; i < str.length(); ++i) { - if (escaped.find(str[i]) != -1) + if (escaped.tqfind(str[i]) != -1) res += "\\"; res += str[i]; } @@ -305,7 +305,7 @@ void GrepViewWidget::searchActivated() } command = "cat "; - command += tmpFilePath.replace(' ', "\\ "); + command += tmpFilePath.tqreplace(' ', "\\ "); } } else @@ -319,7 +319,7 @@ void GrepViewWidget::searchActivated() files += " -o -name " + KShellProcess::quote(*it); } - TQString filepattern = "find "; + TQString filepattern = "tqfind "; filepattern += KShellProcess::quote(grepdlg->directoryString()); if (!grepdlg->recursiveFlag()) filepattern += " -maxdepth 1"; @@ -366,9 +366,9 @@ void GrepViewWidget::searchActivated() m_lastPattern = grepdlg->patternString(); TQString pattern = grepdlg->templateString(); if (grepdlg->regexpFlag()) - pattern.replace(TQRegExp("%s"), grepdlg->patternString()); + pattern.tqreplace(TQRegExp("%s"), grepdlg->patternString()); else - pattern.replace(TQRegExp("%s"), escape( grepdlg->patternString() ) ); + pattern.tqreplace(TQRegExp("%s"), escape( grepdlg->patternString() ) ); command += KShellProcess::quote(pattern); m_curOutput->startJob("", command); @@ -402,11 +402,11 @@ void GrepViewProcessWidget::insertStdoutLine(const TQCString &line) { str = TQString::fromLocal8Bit( line ); } - if ( (pos = str.find(':')) != -1) + if ( (pos = str.tqfind(':')) != -1) { filename = str.left(pos); str.remove( 0, pos+1 ); - if ( ( pos = str.find(':') ) != -1) + if ( ( pos = str.tqfind(':') ) != -1) { linenumber = str.left(pos); str.remove( 0, pos+1 ); @@ -452,7 +452,7 @@ void GrepViewWidget::popupMenu(TQListBoxItem*, const TQPoint& p) void GrepViewWidget::slotKeepOutput( ) { - if ( m_lastPattern == TQString::null ) return; + if ( m_lastPattern == TQString() ) return; m_tabWidget->changeTab(m_curOutput, m_lastPattern); -- cgit v1.2.3