diff options
Diffstat (limited to 'kcachegrind')
74 files changed, 1258 insertions, 1249 deletions
diff --git a/kcachegrind/converters/hotshot2calltree b/kcachegrind/converters/hotshot2calltree index 4eb8f7de..e5c886a2 100644 --- a/kcachegrind/converters/hotshot2calltree +++ b/kcachegrind/converters/hotshot2calltree @@ -136,7 +136,7 @@ def return_from_call(caller_stack, call_dict, cost_now): call_dict[called[0]] = per_file_dict -def updateStatus(filecount): +def updatetqStatus(filecount): sys.stdout.write("reading File #%d \r" % filecount) sys.stdout.flush() def convertProfFiles(output, inputfilenames): @@ -153,7 +153,7 @@ def convertProfFiles(output, inputfilenames): filecount = 1 number_of_files = len(inputfilenames) for inputfilename in inputfilenames: - updateStatus(filecount) + updatetqStatus(filecount) cost, filecount = convertHandleFilename(inputfilename, caller_stack, call_dict, cost_per_pos, cost_per_function, filecount) total_cost += cost if (file_limit > 0) and (filecount > file_limit): @@ -164,7 +164,7 @@ def convertProfFiles(output, inputfilenames): dumpResults(output, call_dict, total_cost, cost_per_pos, cost_per_function) def convertHandleFilename(inputfilename, caller_stack, call_dict, cost_per_pos, cost_per_function, filecount): - updateStatus(filecount) + updatetqStatus(filecount) if not ((file_limit > 0) and (filecount > file_limit)): if os.path.isdir(inputfilename): cost, filecount = convertProfDir(inputfilename, caller_stack, call_dict, cost_per_pos, cost_per_function, filecount) diff --git a/kcachegrind/converters/memprof2calltree b/kcachegrind/converters/memprof2calltree index e82d6e85..a04eaa38 100755 --- a/kcachegrind/converters/memprof2calltree +++ b/kcachegrind/converters/memprof2calltree @@ -13,8 +13,8 @@ while(<>) { print "\nfn=$1\n"; next; } - if (/^ children:/) { - $next = 1; #children + if (/^ tqchildren:/) { + $next = 1; #tqchildren next; } if (/^ inherited:/) { diff --git a/kcachegrind/kcachegrind.spec.in b/kcachegrind/kcachegrind.spec.in index 060dd28e..5c786a47 100644 --- a/kcachegrind/kcachegrind.spec.in +++ b/kcachegrind/kcachegrind.spec.in @@ -42,9 +42,9 @@ make -j$numprocs make install-strip DESTDIR=$RPM_BUILD_ROOT cd $RPM_BUILD_ROOT -find . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.kcachegrind -find . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind -find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind +tqfind . -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > $RPM_BUILD_DIR/file.list.kcachegrind +tqfind . -type f | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind +tqfind . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> $RPM_BUILD_DIR/file.list.kcachegrind %clean rm -rf $RPM_BUILD_ROOT/* diff --git a/kcachegrind/kcachegrind/cachegrindloader.cpp b/kcachegrind/kcachegrind/cachegrindloader.cpp index 0a146de0..41bfa89e 100644 --- a/kcachegrind/kcachegrind/cachegrindloader.cpp +++ b/kcachegrind/kcachegrind/cachegrindloader.cpp @@ -149,7 +149,7 @@ bool CachegrindLoader::canLoadTrace(TQFile* file) if (!file->isOpen()) { if (!file->open( IO_ReadOnly ) ) { - kdDebug() << TQFile::encodeName(_filename) << ": " + kdDebug() << TQFile::encodeName(_filename).data() << ": " << strerror( errno ) << endl; return false; } @@ -167,7 +167,7 @@ bool CachegrindLoader::canLoadTrace(TQFile* file) TQCString s; s.setRawData(buf, read+1); - int pos = s.find("events:"); + int pos = s.tqfind("events:"); if (pos>0 && buf[pos-1] != '\n') pos = -1; s.resetRawData(buf, read+1); return (pos>=0); @@ -181,8 +181,8 @@ bool CachegrindLoader::loadTrace(TracePart* p) CachegrindLoader l; /* emit progress signals via the singleton loader */ - connect(&l, TQT_SIGNAL(updateStatus(TQString, int)), - this, TQT_SIGNAL(updateStatus(TQString, int))); + connect(&l, TQT_SIGNAL(updatetqStatus(TQString, int)), + this, TQT_SIGNAL(updatetqStatus(TQString, int))); return l.loadTraceInternal(p); } @@ -346,7 +346,7 @@ TraceObject* CachegrindLoader::compressedObject(const TQString& name) if ((name[0] != '(') || !name[1].isDigit()) return _data->object(checkUnknown(name)); // compressed format using _objectVector - int p = name.find(')'); + int p = name.tqfind(')'); if (p<2) { kdError() << _filename << ":" << _lineNo << " - Invalid compressed ELF object ('" @@ -400,7 +400,7 @@ TraceFile* CachegrindLoader::compressedFile(const TQString& name) if ((name[0] != '(') || !name[1].isDigit()) return _data->file(checkUnknown(name)); // compressed format using _fileVector - int p = name.find(')'); + int p = name.tqfind(')'); if (p<2) { kdError() << _filename << ":" << _lineNo << " - Invalid compressed file ('" @@ -457,7 +457,7 @@ TraceFunction* CachegrindLoader::compressedFunction(const TQString& name, return _data->function(checkUnknown(name), file, object); // compressed format using _functionVector - int p = name.find(')'); + int p = name.tqfind(')'); if (p<2) { kdError() << _filename << ":" << _lineNo << " - Invalid compressed function ('" @@ -735,9 +735,9 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part) return false; } kdDebug() << "Loading " << _filename << " ..." << endl; - TQString statusMsg = i18n("Loading %1").arg(_filename); + TQString statusMsg = i18n("Loading %1").tqarg(_filename); int statusProgress = 0; - emit updateStatus(statusMsg,statusProgress); + emit updatetqStatus(statusMsg,statusProgress); #if USE_FIXCOST @@ -815,7 +815,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part) * "long operations" (like file loading) are in progress, * this can temporarly switch to another operation. */ - emit updateStatus(statusMsg,statusProgress); + emit updatetqStatus(statusMsg,statusProgress); } continue; @@ -1030,8 +1030,8 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part) // positions: if (line.stripPrefix("ositions:")) { TQString positions(line); - hasLineInfo = (positions.find("line")>=0); - hasAddrInfo = (positions.find("instr")>=0); + hasLineInfo = (positions.tqfind("line")>=0); + hasAddrInfo = (positions.tqfind("instr")>=0); continue; } break; @@ -1308,9 +1308,9 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part) } - emit updateStatus(statusMsg,100); + emit updatetqStatus(statusMsg,100); - _part->invalidate(); + _part->tqinvalidate(); if (!totalsSet) { _part->totals()->clear(); _part->totals()->addCost(_part); diff --git a/kcachegrind/kcachegrind/callgraphview.cpp b/kcachegrind/kcachegrind/callgraphview.cpp index 990d4014..c66c5809 100644 --- a/kcachegrind/kcachegrind/callgraphview.cpp +++ b/kcachegrind/kcachegrind/callgraphview.cpp @@ -174,13 +174,13 @@ TraceCall* GraphNode::visibleCalling() void GraphNode::setCalling(GraphEdge* e) { - _lastCallingIndex = callings.findRef(e); + _lastCallingIndex = callings.tqfindRef(e); _lastFromCaller = false; } void GraphNode::setCaller(GraphEdge* e) { - _lastCallerIndex = callers.findRef(e); + _lastCallerIndex = callers.tqfindRef(e); _lastFromCaller = true; } @@ -303,8 +303,8 @@ GraphEdge::GraphEdge() TQString GraphEdge::prettyName() { if (_c) return _c->prettyName(); - if (_from) return i18n("Call(s) from %1").arg(_from->prettyName()); - if (_to) return i18n("Call(s) to %1").arg(_to->prettyName()); + if (_from) return i18n("Call(s) from %1").tqarg(_from->prettyName()); + if (_to) return i18n("Call(s) to %1").tqarg(_to->prettyName()); return i18n("(unknown call)"); } @@ -369,14 +369,14 @@ TraceCall* GraphEdge::priorVisible() // GraphOptions // -TQString GraphOptions::layoutString(Layout l) +TQString GraphOptions::tqlayoutString(Layout l) { if (l == Circular) return TQString("Circular"); if (l == LeftRight) return TQString("LeftRight"); return TQString("TopDown"); } -GraphOptions::Layout GraphOptions::layout(TQString s) +GraphOptions::Layout GraphOptions::tqlayout(TQString s) { if (s == TQString("Circular")) return Circular; if (s == TQString("LeftRight")) return LeftRight; @@ -413,7 +413,7 @@ GraphExporter::GraphExporter() _go = this; _tmpFile = 0; _item = 0; - reset(0, 0, 0, TraceItem::NoCostType, TQString::null); + reset(0, 0, 0, TraceItem::NoCostType, TQString()); } @@ -467,7 +467,7 @@ void GraphExporter::reset(TraceData*, TraceItem* i, TraceCostType* ct, if (!i) return; if (filename.isEmpty()) { - _tmpFile = new KTempFile(TQString::null, ".dot"); + _tmpFile = new KTempFile(TQString(), ".dot"); _dotName = _tmpFile->name(); _useBox = true; } @@ -519,7 +519,7 @@ void GraphExporter::createGraph() TraceFunction *caller, *called; caller = c->caller(false); called = c->called(false); - QPair<TraceFunction*,TraceFunction*> p(caller, called); + TQPair<TraceFunction*,TraceFunction*> p(caller, called); GraphEdge& e = _edgeMap[p]; e.setCall(c); e.setCaller(p.first); @@ -562,10 +562,10 @@ void GraphExporter::writeDot() *stream << "digraph \"callgraph\" {\n"; - if (_go->layout() == LeftRight) { + if (_go->tqlayout() == LeftRight) { *stream << TQString(" rankdir=LR;\n"); } - else if (_go->layout() == Circular) { + else if (_go->tqlayout() == Circular) { TraceFunction *f = 0; switch(_item->type()) { case TraceItem::Function: @@ -579,7 +579,7 @@ void GraphExporter::writeDot() break; } if (f) - *stream << TQString(" center=F%1;\n").arg((long)f, 0, 16); + *stream << TQString(" center=F%1;\n").tqarg((long)f, 0, 16); *stream << TQString(" overlap=false;\n splines=true;\n"); } @@ -619,7 +619,7 @@ void GraphExporter::writeDot() iabr = iabr.left(Configuration::maxSymbolLength()) + "..."; *stream << TQString("subgraph \"cluster%1\" { label=\"%2\";\n") - .arg(cluster).arg(iabr); + .tqarg(cluster).tqarg(iabr); } GraphNode* np; @@ -630,17 +630,17 @@ void GraphExporter::writeDot() if ((int)abr.length() > Configuration::maxSymbolLength()) abr = abr.left(Configuration::maxSymbolLength()) + "..."; - *stream << TQString(" F%1 [").arg((long)f, 0, 16); + *stream << TQString(" F%1 [").tqarg((long)f, 0, 16); if (_useBox) { // make label 3 lines for CallGraphView - *stream << TQString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n") - .arg(abr) - .arg(SubCost(np->incl).pretty()); + *stream << TQString("tqshape=box,label=\"** %1 **\\n**\\n%2\"];\n") + .tqarg(abr) + .tqarg(SubCost(np->incl).pretty()); } else *stream << TQString("label=\"%1\\n%2\"];\n") - .arg(abr) - .arg(SubCost(np->incl).pretty()); + .tqarg(abr) + .tqarg(SubCost(np->incl).pretty()); } if (_go->clusterGroups() && i) @@ -675,17 +675,17 @@ void GraphExporter::writeDot() to.callerSet.remove(&e); *stream << TQString(" F%1 -> F%2 [weight=%3") - .arg((long)e.from(), 0, 16) - .arg((long)e.to(), 0, 16) - .arg((long)log(log(e.cost))); + .tqarg((long)e.from(), 0, 16) + .tqarg((long)e.to(), 0, 16) + .tqarg((long)log(log(e.cost))); if (_go->detailLevel() ==1) *stream << TQString(",label=\"%1\"") - .arg(SubCost(e.cost).pretty()); + .tqarg(SubCost(e.cost).pretty()); else if (_go->detailLevel() ==2) *stream << TQString(",label=\"%3\\n%4 x\"") - .arg(SubCost(e.cost).pretty()) - .arg(SubCost(e.count).pretty()); + .tqarg(SubCost(e.cost).pretty()) + .tqarg(SubCost(e.count).pretty()); *stream << TQString("];\n"); } @@ -707,20 +707,20 @@ void GraphExporter::writeDot() } if (costSum > _realCallLimit) { - QPair<TraceFunction*,TraceFunction*> p(0, n.function()); + TQPair<TraceFunction*,TraceFunction*> p(0, n.function()); e = &(_edgeMap[p]); e->setCalling(p.second); e->cost = costSum; e->count = countSum; - *stream << TQString(" R%1 [shape=point,label=\"\"];\n") - .arg((long)n.function(), 0, 16); + *stream << TQString(" R%1 [tqshape=point,label=\"\"];\n") + .tqarg((long)n.function(), 0, 16); *stream << TQString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n") - .arg((long)n.function(), 0, 16) - .arg((long)n.function(), 0, 16) - .arg(SubCost(costSum).pretty()) - .arg(SubCost(countSum).pretty()) - .arg((int)log(costSum)); + .tqarg((long)n.function(), 0, 16) + .tqarg((long)n.function(), 0, 16) + .tqarg(SubCost(costSum).pretty()) + .tqarg(SubCost(countSum).pretty()) + .tqarg((int)log(costSum)); } costSum = countSum = 0.0; @@ -730,20 +730,20 @@ void GraphExporter::writeDot() } if (costSum > _realCallLimit) { - QPair<TraceFunction*,TraceFunction*> p(n.function(), 0); + TQPair<TraceFunction*,TraceFunction*> p(n.function(), 0); e = &(_edgeMap[p]); e->setCaller(p.first); e->cost = costSum; e->count = countSum; - *stream << TQString(" S%1 [shape=point,label=\"\"];\n") - .arg((long)n.function(), 0, 16); + *stream << TQString(" S%1 [tqshape=point,label=\"\"];\n") + .tqarg((long)n.function(), 0, 16); *stream << TQString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n") - .arg((long)n.function(), 0, 16) - .arg((long)n.function(), 0, 16) - .arg(SubCost(costSum).pretty()) - .arg(SubCost(countSum).pretty()) - .arg((int)log(costSum)); + .tqarg((long)n.function(), 0, 16) + .tqarg((long)n.function(), 0, 16) + .tqarg(SubCost(costSum).pretty()) + .tqarg(SubCost(countSum).pretty()) + .tqarg((int)log(costSum)); } } } @@ -797,7 +797,7 @@ GraphNode* GraphExporter::node(TraceFunction* f) { if (!f) return 0; - GraphNodeMap::Iterator it = _nodeMap.find(f); + GraphNodeMap::Iterator it = _nodeMap.tqfind(f); if (it == _nodeMap.end()) return 0; return &(*it); @@ -805,7 +805,7 @@ GraphNode* GraphExporter::node(TraceFunction* f) GraphEdge* GraphExporter::edge(TraceFunction* f1, TraceFunction* f2) { - GraphEdgeMap::Iterator it = _edgeMap.find(qMakePair(f1, f2)); + GraphEdgeMap::Iterator it = _edgeMap.tqfind(tqMakePair(f1, f2)); if (it == _edgeMap.end()) return 0; return &(*it); @@ -890,7 +890,7 @@ void GraphExporter::buildGraph(TraceFunction* f, int d, // if (count>0.0 && (cost/count < 3)) continue; double oldCost = 0.0; - QPair<TraceFunction*,TraceFunction*> p(toCallings ? f:f2, + TQPair<TraceFunction*,TraceFunction*> p(toCallings ? f:f2, toCallings ? f2:f); GraphEdge& e = _edgeMap[p]; if (e.call() == 0) { @@ -910,7 +910,7 @@ void GraphExporter::buildGraph(TraceFunction* f, int d, if (f2->cycle() == f2) { TraceFunction* realF; realF = toCallings ? call->called(true) : call->caller(true); - QPair<TraceFunction*,TraceFunction*> realP(toCallings ? f:realF, + TQPair<TraceFunction*,TraceFunction*> realP(toCallings ? f:realF, toCallings ? realF:f); GraphEdge& e = _edgeMap[realP]; if (e.call() == 0) { @@ -927,14 +927,14 @@ void GraphExporter::buildGraph(TraceFunction* f, int d, if (call->isRecursion()) continue; if (toCallings) { - GraphEdgeSet::Iterator it = n.callingSet.find(&e); + GraphEdgeSet::Iterator it = n.callingSet.tqfind(&e); if (it == n.callingSet.end()) { n.callings.append(&e); n.callingSet.insert(&e, 1 ); } } else { - GraphEdgeSet::Iterator it = n.callerSet.find(&e); + GraphEdgeSet::Iterator it = n.callerSet.tqfind(&e); if (it == n.callerSet.end()) { n.callers.append(&e); n.callerSet.insert(&e, 1 ); @@ -963,14 +963,14 @@ void GraphExporter::buildGraph(TraceFunction* f, int d, // // PannerView // -PannerView::PannerView(TQWidget * parent, const char * name) - : TQCanvasView(parent, name, WNoAutoErase | WStaticContents) +PannerView::PannerView(TQWidget * tqparent, const char * name) + : TQCanvasView(tqparent, name, WNoAutoErase | WStaticContents) { _movingZoomRect = false; // why doesn't this avoid flicker ? - viewport()->setBackgroundMode(Qt::NoBackground); - setBackgroundMode(Qt::NoBackground); + viewport()->setBackgroundMode(TQt::NoBackground); + setBackgroundMode(TQt::NoBackground); } void PannerView::setZoomRect(TQRect r) @@ -1000,7 +1000,7 @@ void PannerView::drawContents(TQPainter * p, int clipx, int clipy, int clipw, in void PannerView::contentsMousePressEvent(TQMouseEvent* e) { if (_zoomRect.isValid()) { - if (!_zoomRect.contains(e->pos())) + if (!_zoomRect.tqcontains(e->pos())) emit zoomRectMoved(e->pos().x() - _zoomRect.center().x(), e->pos().y() - _zoomRect.center().y()); @@ -1057,15 +1057,15 @@ CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n, totalCost = (TraceCost*) _view->activeItem(); } else - totalCost = _view->data(); + totalCost = _view->TraceItemView::data(); double total = totalCost->subCost(_view->costType()); double inclP = 100.0 * n->incl / total; if (_view->topLevel()->showPercentage()) setText(1, TQString("%1 %") - .arg(inclP, 0, 'f', Configuration::percentPrecision())); + .tqarg(inclP, 0, 'f', Configuration::percentPrecision())); else setText(1, SubCost(n->incl).pretty()); - setPixmap(1, percentagePixmap(25,10,(int)(inclP+.5), Qt::blue, true)); + setPixmap(1, percentagePixmap(25,10,(int)(inclP+.5), TQt::blue, true)); } void CanvasNode::setSelected(bool s) @@ -1095,8 +1095,8 @@ void CanvasNode::drawShape(TQPainter& p) r.setRect(r.x()+2, r.y()+2, r.width()-4, r.height()-4); if (StoredDrawParams::selected() && _view->hasFocus()) { - _view->style().drawPrimitive( TQStyle::PE_FocusRect, &p, r, - _view->colorGroup()); + _view->tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, + _view->tqcolorGroup()); } // draw afterwards to always get a frame even when zoomed @@ -1121,7 +1121,7 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce, if (!e) return; setPosition(1, DrawParams::TopCenter); - setText(1, TQString("%1 x").arg(SubCost(e->count).pretty())); + setText(1, TQString("%1 x").tqarg(SubCost(e->count).pretty())); setPosition(0, DrawParams::BottomCenter); @@ -1137,15 +1137,15 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce, totalCost = (TraceCost*) _view->activeItem(); } else - totalCost = _view->data(); + totalCost = _view->TraceItemView::data(); double total = totalCost->subCost(_view->costType()); double inclP = 100.0 * e->cost / total; if (_view->topLevel()->showPercentage()) setText(0, TQString("%1 %") - .arg(inclP, 0, 'f', Configuration::percentPrecision())); + .tqarg(inclP, 0, 'f', Configuration::percentPrecision())); else setText(0, SubCost(e->cost).pretty()); - setPixmap(0, percentagePixmap(25,10,(int)(inclP+.5), Qt::blue, true)); + setPixmap(0, percentagePixmap(25,10,(int)(inclP+.5), TQt::blue, true)); if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) { TQString icon = "undo"; @@ -1175,7 +1175,7 @@ CanvasEdgeArrow::CanvasEdgeArrow(CanvasEdge* ce, TQCanvas* c) void CanvasEdgeArrow::drawShape(TQPainter& p) { - if (_ce->isSelected()) p.setBrush(Qt::red); + if (_ce->isSelected()) p.setBrush(TQt::red); TQCanvasPolygon::drawShape(p); } @@ -1237,7 +1237,7 @@ TQPointArray CanvasEdge::areaPoints() const void CanvasEdge::drawShape(TQPainter& p) { - if (isSelected()) p.setPen(Qt::red); + if (isSelected()) p.setPen(TQt::red); p.drawPolyline(poly); } @@ -1265,9 +1265,9 @@ CanvasFrame::CanvasFrame(CanvasNode* n, TQCanvas* c) } _p = new TQPixmap(r.size()); - _p->fill(Qt::white); + _p->fill(TQt::white); TQPainter p(_p); - p.setPen(Qt::NoPen); + p.setPen(TQt::NoPen); r.moveBy(-r.x(), -r.y()); @@ -1302,7 +1302,7 @@ void CanvasFrame::drawShape(TQPainter& p) // Tooltips for CallGraphView // -class CallGraphTip: public QToolTip +class CallGraphTip: public TQToolTip { public: CallGraphTip( TQWidget* p ):TQToolTip(p) {} @@ -1313,8 +1313,8 @@ protected: void CallGraphTip::maybeTip( const TQPoint& pos ) { - if (!parentWidget()->inherits( "CallGraphView" )) return; - CallGraphView* cgv = (CallGraphView*)parentWidget(); + if (!tqparentWidget()->inherits( "CallGraphView" )) return; + CallGraphView* cgv = (CallGraphView*)tqparentWidget(); TQPoint cPos = cgv->viewportToContents(pos); @@ -1331,7 +1331,7 @@ void CallGraphTip::maybeTip( const TQPoint& pos ) if (0) qDebug("CallGraphTip: Mouse on Node '%s'", n->function()->prettyName().ascii()); - TQString tipStr = TQString("%1 (%2)").arg(cn->text(0)).arg(cn->text(1)); + TQString tipStr = TQString("%1 (%2)").tqarg(cn->text(0)).tqarg(cn->text(1)); TQPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft()); TQPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight()); tip(TQRect(vPosTL, vPosBR), tipStr); @@ -1356,7 +1356,7 @@ void CallGraphTip::maybeTip( const TQPoint& pos ) tipStr = e->prettyName(); else tipStr = TQString("%1 (%2)") - .arg(ce->label()->text(0)).arg(ce->label()->text(1)); + .tqarg(ce->label()->text(0)).tqarg(ce->label()->text(1)); tip(TQRect(pos.x()-5,pos.y()-5,pos.x()+5,pos.y()+5), tipStr); } } @@ -1367,9 +1367,9 @@ void CallGraphTip::maybeTip( const TQPoint& pos ) // // CallGraphView // -CallGraphView::CallGraphView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQCanvasView(parent, name), TraceItemView(parentView) +CallGraphView::CallGraphView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQCanvasView(tqparent, name), TraceItemView(tqparentView) { _zoomPosition = DEFAULT_ZOOMPOS; _lastAutoPosition = TopLeft; @@ -1388,8 +1388,8 @@ CallGraphView::CallGraphView(TraceItemView* parentView, _completeView->raise(); _completeView->hide(); - setFocusPolicy(TQWidget::StrongFocus); - setBackgroundMode(Qt::NoBackground); + setFocusPolicy(TQ_StrongFocus); + setBackgroundMode(TQt::NoBackground); connect(this, TQT_SIGNAL(contentsMoving(int,int)), this, TQT_SLOT(contentsMovingSlot(int,int))); @@ -1589,7 +1589,7 @@ void CallGraphView::keyPressEvent(TQKeyEvent* e) TraceFunction* f = 0; TraceCall* c = 0; - // rotate arrow key meaning for LeftRight layout + // rotate arrow key meaning for LeftRight tqlayout int key = e->key(); if (_layout == LeftRight) { switch(key) { @@ -1745,7 +1745,7 @@ void CallGraphView::doUpdate(int changeType) } if (changeType & dataChanged) { - // invalidate old selection and graph part + // tqinvalidate old selection and graph part _exporter.reset(_data, _activeItem, _costType, _groupType); _selectedNode = 0; _selectedEdge = 0; @@ -1786,14 +1786,14 @@ void CallGraphView::showRenderWarning() TQString s; if (_renderProcess) - s =i18n("Warning: a long lasting graph layouting is in progress.\n" + s =i18n("Warning: a long lasting graph tqlayouting is in progress.\n" "Reduce node/edge limits for speedup.\n"); else s = i18n("Layouting stopped.\n"); s.append(i18n("The call graph has %1 nodes and %2 edges.\n") - .arg(_exporter.nodeCount()) - .arg(_exporter.edgeCount())); + .tqarg(_exporter.nodeCount()) + .tqarg(_exporter.edgeCount())); showText(s); } @@ -1805,7 +1805,7 @@ void CallGraphView::stopRendering() _renderProcess->kill(); delete _renderProcess; _renderProcess = 0; - _unparsedOutput = TQString::null; + _unparsedOutput = TQString(); _renderTimer.start(200, true); } @@ -1846,7 +1846,7 @@ void CallGraphView::refresh() _exporter.reset(_data, _activeItem, _costType, _groupType); _exporter.writeDot(); - _renderProcess = new TQProcess(this); + _renderProcess = new TQProcess(TQT_TQOBJECT(this)); if (_layout == GraphOptions::Circular) _renderProcess->addArgument( "twopi" ); else @@ -1866,7 +1866,7 @@ void CallGraphView::refresh() if ( !_renderProcess->start() ) { TQString e = i18n("No call graph is available because the following\n" "command cannot be run:\n'%1'\n") - .arg(_renderProcess->arguments().join(" ")); + .tqarg(_renderProcess->arguments().join(" ")); e += i18n("Please check that 'dot' is installed (package GraphViz)."); showText(e); @@ -1876,9 +1876,9 @@ void CallGraphView::refresh() return; } - _unparsedOutput = TQString::null; + _unparsedOutput = TQString(); - // layouting of more than seconds is dubious + // tqlayouting of more than seconds is dubious _renderTimer.start(1000, true); } @@ -2003,7 +2003,7 @@ void CallGraphView::dotExited() w = 10, h = 10; eItem = new TQCanvasEllipse(w, h, _canvas); eItem->move(xx, yy); - eItem->setBrush(Qt::gray); + eItem->setBrush(TQt::gray); eItem->setZ(1.0); eItem->show(); continue; @@ -2074,11 +2074,11 @@ void CallGraphView::dotExited() } // calls into/out of cycles are special: make them blue - TQColor arrowColor = Qt::black; + TQColor arrowColor = TQt::black; TraceFunction* caller = e->fromNode() ? e->fromNode()->function() : 0; TraceFunction* called = e->toNode() ? e->toNode()->function() : 0; if ( (caller && (caller->cycle() == caller)) || - (called && (called->cycle() == called)) ) arrowColor = Qt::blue; + (called && (called->cycle() == called)) ) arrowColor = TQt::blue; sItem = new CanvasEdge(e, _canvas); e->setCanvasEdge(sItem); @@ -2195,7 +2195,7 @@ void CallGraphView::dotExited() if (!_canvas) { _canvas = new TQCanvas(size().width(),size().height()); - TQString s = i18n("Error running the graph layouting tool.\n"); + TQString s = i18n("Error running the graph tqlayouting tool.\n"); s += i18n("Please check that 'dot' is installed (package GraphViz)."); TQCanvasText* t = new TQCanvasText(s, _canvas); t->move(5, 5); @@ -2206,8 +2206,8 @@ void CallGraphView::dotExited() TQString s = i18n("There is no call graph available for function\n" "\t'%1'\n" "because it has no cost of the selected event type."); - TQCanvasText* t = new TQCanvasText(s.arg(_activeItem->name()), _canvas); - // t->setTextFlags(Qt::AlignHCenter | Qt::AlignVCenter); + TQCanvasText* t = new TQCanvasText(s.tqarg(_activeItem->name()), _canvas); + // t->setTextFlags(TQt::AlignHCenter | TQt::AlignVCenter); t->move(5,5); t->show(); center(0,0); @@ -2394,10 +2394,10 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) TQString name = f->prettyName(); popup.insertItem(i18n("Go to '%1'") - .arg(Configuration::shortenSymbol(name)), 93); + .tqarg(Configuration::shortenSymbol(name)), 93); if (cycle && (cycle != f)) { name = Configuration::shortenSymbol(cycle->prettyName()); - popup.insertItem(i18n("Go to '%1'").arg(name), 94); + popup.insertItem(i18n("Go to '%1'").tqarg(name), 94); } popup.insertSeparator(); } @@ -2416,7 +2416,7 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) if (c) { TQString name = c->prettyName(); popup.insertItem(i18n("Go to '%1'") - .arg(Configuration::shortenSymbol(name)), 95); + .tqarg(Configuration::shortenSymbol(name)), 95); popup.insertSeparator(); } @@ -2457,7 +2457,7 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) case 10: gpopup1.setItemChecked(104,true); break; case 15: gpopup1.setItemChecked(105,true); break; default: - gpopup1.insertItem(i18n("< %1").arg(_maxCallerDepth), 106); + gpopup1.insertItem(i18n("< %1").tqarg(_maxCallerDepth), 106); gpopup1.setItemChecked(106,true); break; } @@ -2480,7 +2480,7 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) case 10: gpopup2.setItemChecked(114,true); break; case 15: gpopup2.setItemChecked(115,true); break; default: - gpopup2.insertItem(i18n("< %1").arg(_maxCallingDepth), 116); + gpopup2.insertItem(i18n("< %1").tqarg(_maxCallingDepth), 116); gpopup2.setItemChecked(116,true); break; } @@ -2584,7 +2584,7 @@ void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e) TraceFunction* f = activeFunction(); if (!f) break; - GraphExporter ge(data(), f, costType(), groupType(), + GraphExporter ge(TraceItemView::data(), f, costType(), groupType(), TQString("callgraph.dot")); ge.setGraphOptions(this); ge.writeDot(); @@ -2701,8 +2701,8 @@ void CallGraphView::readViewConfig(KConfig* c, _clusterGroups = g->readBoolEntry("ClusterGroups", DEFAULT_CLUSTERGROUPS); _detailLevel = g->readNumEntry("DetailLevel", DEFAULT_DETAILLEVEL); - _layout = GraphOptions::layout(g->readEntry("Layout", - layoutString(DEFAULT_LAYOUT))); + _layout = GraphOptions::tqlayout(g->readEntry("Layout", + tqlayoutString(DEFAULT_LAYOUT))); _zoomPosition = zoomPos(g->readEntry("ZoomPosition", zoomPosString(DEFAULT_ZOOMPOS))); @@ -2724,7 +2724,7 @@ void CallGraphView::saveViewConfig(KConfig* c, DEFAULT_CLUSTERGROUPS); writeConfigEntry(&g, "DetailLevel", _detailLevel, DEFAULT_DETAILLEVEL); writeConfigEntry(&g, "Layout", - layoutString(_layout), layoutString(DEFAULT_LAYOUT).utf8().data()); + tqlayoutString(_layout), tqlayoutString(DEFAULT_LAYOUT).utf8().data()); writeConfigEntry(&g, "ZoomPosition", zoomPosString(_zoomPosition), zoomPosString(DEFAULT_ZOOMPOS).utf8().data()); diff --git a/kcachegrind/kcachegrind/callgraphview.h b/kcachegrind/kcachegrind/callgraphview.h index 47fee79b..2e15022d 100644 --- a/kcachegrind/kcachegrind/callgraphview.h +++ b/kcachegrind/kcachegrind/callgraphview.h @@ -150,7 +150,7 @@ public: typedef TQMap<TraceFunction*, GraphNode> GraphNodeMap; -typedef TQMap<QPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap; +typedef TQMap<TQPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap; /* Abstract Interface for graph options */ @@ -167,10 +167,10 @@ class GraphOptions virtual bool expandCycles() = 0; virtual bool clusterGroups() = 0; virtual int detailLevel() = 0; - virtual Layout layout() = 0; + virtual Layout tqlayout() = 0; - static TQString layoutString(Layout); - static Layout layout(TQString); + static TQString tqlayoutString(Layout); + static Layout tqlayout(TQString); }; /* Graph Options Storage */ @@ -188,7 +188,7 @@ class StorableGraphOptions: public GraphOptions virtual bool expandCycles() { return _expandCycles; } virtual bool clusterGroups() { return _clusterGroups; } virtual int detailLevel() { return _detailLevel; } - virtual Layout layout() { return _layout; } + virtual Layout tqlayout() { return _layout; } // setters void setMaxCallerDepth(int d) { _maxCallerDepth = d; } @@ -220,11 +220,11 @@ class GraphExporter: public StorableGraphOptions public: GraphExporter(); GraphExporter(TraceData*, TraceFunction*, TraceCostType*, - TraceItem::CostType, TQString filename = TQString::null); + TraceItem::CostType, TQString filename = TQString()); virtual ~GraphExporter(); void reset(TraceData*, TraceItem*, TraceCostType*, - TraceItem::CostType, TQString filename = TQString::null); + TraceItem::CostType, TQString filename = TQString()); TQString filename() { return _dotName; } int edgeCount() { return _edgeMap.count(); } @@ -240,7 +240,7 @@ public: // calls createGraph before dumping of not already created void writeDot(); - // to map back to structures when parsing a layouted graph + // to map back to structures when parsing a tqlayouted graph /* <toFunc> is a helper for node() and edge(). * Don't use the returned pointer directly, but only with @@ -279,14 +279,15 @@ private: }; /** - * A panner layed over a QCanvas + * A panner layed over a TQCanvas */ -class PannerView: public QCanvasView +class PannerView: public TQCanvasView { Q_OBJECT + TQ_OBJECT public: - PannerView(TQWidget * parent = 0, const char * name = 0); + PannerView(TQWidget * tqparent = 0, const char * name = 0); void setZoomRect(TQRect r); @@ -353,7 +354,7 @@ private: CallGraphView* _view; }; -class CanvasEdgeArrow: public QCanvasPolygon +class CanvasEdgeArrow: public TQCanvasPolygon { public: CanvasEdgeArrow(CanvasEdge*, TQCanvas*); @@ -368,7 +369,7 @@ private: }; -class CanvasEdge: public QCanvasSpline +class CanvasEdge: public TQCanvasSpline { public: CanvasEdge(GraphEdge*, TQCanvas*); @@ -392,7 +393,7 @@ private: }; -class CanvasFrame: public QCanvasRectangle +class CanvasFrame: public TQCanvasRectangle { public: CanvasFrame( CanvasNode*, TQCanvas *canvas ); @@ -416,12 +417,13 @@ class CallGraphView: public TQCanvasView, public TraceItemView, public StorableGraphOptions { Q_OBJECT + TQ_OBJECT public: enum ZoomPosition { TopLeft, TopRight, BottomLeft, BottomRight, Auto }; - CallGraphView(TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + CallGraphView(TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); ~CallGraphView(); void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool); diff --git a/kcachegrind/kcachegrind/callitem.cpp b/kcachegrind/kcachegrind/callitem.cpp index ebca4903..3667f668 100644 --- a/kcachegrind/kcachegrind/callitem.cpp +++ b/kcachegrind/kcachegrind/callitem.cpp @@ -34,8 +34,8 @@ // CallItem -CallItem::CallItem(CallView* view, TQListView* parent, TraceCall* c) - : TQListViewItem(parent) +CallItem::CallItem(CallView* view, TQListView* tqparent, TraceCall* c) + : TQListViewItem(tqparent) { _call = c; _view = view; @@ -110,7 +110,7 @@ void CallItem::updateCost() if (_view->topLevel()->showPercentage()) setText(0, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); else setText(0, _call->prettySubCost(ct)); @@ -134,7 +134,7 @@ void CallItem::updateCost() if (_view->topLevel()->showPercentage()) setText(1, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); else setText(1, _call->prettySubCost(ct2)); diff --git a/kcachegrind/kcachegrind/callitem.h b/kcachegrind/kcachegrind/callitem.h index 4eb0ebb0..94191b8f 100644 --- a/kcachegrind/kcachegrind/callitem.h +++ b/kcachegrind/kcachegrind/callitem.h @@ -28,7 +28,7 @@ class CallView; -class CallItem: public QListViewItem +class CallItem: public TQListViewItem { public: CallItem(CallView*, TQListView*, TraceCall* c); diff --git a/kcachegrind/kcachegrind/callmapview.cpp b/kcachegrind/kcachegrind/callmapview.cpp index 95930afe..53727a2d 100644 --- a/kcachegrind/kcachegrind/callmapview.cpp +++ b/kcachegrind/kcachegrind/callmapview.cpp @@ -50,9 +50,9 @@ #define DEFAULT_MAXAREA 100 -CallMapView::CallMapView(bool showCallers, TraceItemView* parentView, - TQWidget* parent, const char* name) - : TreeMapWidget(new CallMapBaseItem(), parent, name), TraceItemView(parentView) +CallMapView::CallMapView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TreeMapWidget(new CallMapBaseItem(), tqparent, name), TraceItemView(tqparentView) { _showCallers = showCallers; @@ -115,12 +115,12 @@ TQString CallMapView::whatsThis() const "choose 'Hide incorrect borders'. As this mode can be " "<em>very</em> time consuming, you may want to limit " "the maximum drawn nesting level before. " - "'Best' determinates the split direction for children " - "from the aspect ratio of the parent. " + "'Best' determinates the split direction for tqchildren " + "from the aspect ratio of the tqparent. " "'Always Best' decides on remaining space for each " "sibling. " "'Ignore Proportions' takes space for function name " - "drawing <em>before</em> drawing children. Note that " + "drawing <em>before</em> drawing tqchildren. Note that " "size proportions can get <em>heavily</em> wrong.</p>" "<p>This is a <em>TreeMap</em> widget. " @@ -171,7 +171,7 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) if ((int)name.length()>Configuration::maxSymbolLength()) name = name.left(Configuration::maxSymbolLength()) + "..."; fpopup.insertItem(name, 101+count); - item = item->parent(); + item = item->tqparent(); count++; } popup.insertSeparator(); @@ -196,13 +196,13 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) if (i) { l1popup.insertSeparator(); l1popup.insertItem(i18n("Depth of '%1' (%2)") - .arg(shortCurrentName).arg(i->depth()), 55); + .tqarg(shortCurrentName).tqarg(i->depth()), 55); l1popup.setItemChecked(55, maxDepth == i->depth()); } if (maxDepth>0) { l1popup.insertSeparator(); - l1popup.insertItem(i18n("Decrement Depth (to %1)").arg(maxDepth-1), 56); - l1popup.insertItem(i18n("Increment Depth (to %1)").arg(maxDepth+1), 57); + l1popup.insertItem(i18n("Decrement Depth (to %1)").tqarg(maxDepth-1), 56); + l1popup.insertItem(i18n("Increment Depth (to %1)").tqarg(maxDepth+1), 57); } l2popup.setCheckable(true); @@ -223,7 +223,7 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) l2popup.setItemChecked(201+count, true); foundStopName = true; } - item = item->parent(); + item = item->tqparent(); count++; } } @@ -256,15 +256,15 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) currentArea = i->width() * i->height(); l3popup.insertSeparator(); l3popup.insertItem(i18n("Area of '%1' (%2)") - .arg(shortCurrentName).arg(currentArea), 67); + .tqarg(shortCurrentName).tqarg(currentArea), 67); l3popup.setItemChecked(67, mArea == currentArea); } if (mArea>0) { l3popup.insertSeparator(); l3popup.insertItem(i18n("Double Area Limit (to %1)") - .arg(mArea*2), 68); + .tqarg(mArea*2), 68); l3popup.insertItem(i18n("Half Area Limit (to %1)") - .arg(mArea/2), 69); + .tqarg(mArea/2), 69); } popup.insertSeparator(); @@ -326,7 +326,7 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) if (r>100 && r<150) { r -= 100; while (i && (r>1)) { - i=i->parent(); + i=i->tqparent(); r--; } activatedSlot(i); @@ -336,7 +336,7 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) if (r>200 && r<250) { r -= 200; while (i && (r>1)) { - i=i->parent(); + i=i->tqparent(); r--; } if (i) @@ -389,7 +389,7 @@ void CallMapView::context(TreeMapItem* i,const TQPoint & p) case 56: setMaxDrawingDepth(maxDepth-1); break; case 57: setMaxDrawingDepth(maxDepth+1); break; - case 200: setFieldStop(0, TQString::null); break; + case 200: setFieldStop(0, TQString()); break; case 60: setMinimalArea(-1); break; case 61: setMinimalArea(10); break; @@ -428,7 +428,7 @@ void CallMapView::selectedSlot(TreeMapItem* item, bool kbd) if (item->text(0).isEmpty()) return; if (kbd) { - TQString msg = i18n("Call Map: Current is '%1'").arg(item->text(0)); + TQString msg = i18n("Call Map: Current is '%1'").tqarg(item->text(0)); if (_topLevel) _topLevel->showMessage(msg, 5000); } @@ -531,7 +531,7 @@ void CallMapView::doUpdate(int changeType) TQColor CallMapView::groupColor(TraceFunction* f) const { if (!f) - return colorGroup().button(); + return tqcolorGroup().button(); return Configuration::functionColor(_groupType, f); } @@ -556,7 +556,7 @@ TQString CallMapView::tipString(TreeMapItem* i) const if (!tip.isEmpty()) tip += "\n"; tip += itemTip; - i = i->parent(); + i = i->tqparent(); count++; } if (count == Configuration::maxSymbolCount()) tip += "\n..."; @@ -601,11 +601,11 @@ TQString CallMapBaseItem::text(int textNo) const return _f->prettyName(); } - if (!_f) return TQString::null; + if (!_f) return TQString(); if (textNo == 2) return _f->prettyLocation(); if (textNo == 3) return _f->calledCount().pretty(); - if (textNo != 1) return TQString::null; + if (textNo != 1) return TQString(); TraceCostType* ct = ((CallMapView*)widget())->costType(); TraceCost* t = ((CallMapView*)widget())->totalCost(); @@ -618,7 +618,7 @@ TQString CallMapBaseItem::text(int textNo) const sum = 100.0 * _f->inclusive()->subCost(ct) / total; return TQString("%1 %") - .arg(sum, 0, 'f', Configuration::percentPrecision()); + .tqarg(sum, 0, 'f', Configuration::percentPrecision()); } return _f->inclusive()->prettySubCost(ct); } @@ -663,7 +663,7 @@ bool CallMapBaseItem::isMarked(int) const return ((CallMapView*)widget())->selectedItem() == _f; } -TreeMapItemList* CallMapBaseItem::children() +TreeMapItemList* CallMapBaseItem::tqchildren() { if (_f && !initialized()) { CallMapView* w = (CallMapView*)widget(); @@ -706,7 +706,7 @@ TreeMapItemList* CallMapBaseItem::children() setSorting(-2, false); } - return _children; + return _tqchildren; } TQColor CallMapBaseItem::backColor() const @@ -745,7 +745,7 @@ TQString CallMapCallingItem::text(int textNo) const if (textNo == 2) return _c->called()->prettyLocation(); if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty(); - if (textNo != 1) return TQString::null; + if (textNo != 1) return TQString(); TraceCostType* ct; ct = ((CallMapView*)widget())->costType(); @@ -756,7 +756,7 @@ TQString CallMapCallingItem::text(int textNo) const TraceCost* t = ((CallMapView*)widget())->totalCost(); double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct); return TQString("%1 %") - .arg(p, 0, 'f', Configuration::percentPrecision()); + .tqarg(p, 0, 'f', Configuration::percentPrecision()); } return val.pretty(); } @@ -792,7 +792,7 @@ bool CallMapCallingItem::isMarked(int) const } -TreeMapItemList* CallMapCallingItem::children() +TreeMapItemList* CallMapCallingItem::tqchildren() { if (!initialized()) { if (0) qDebug("Create Calling subitems (%s)", path(0).join("/").ascii()); @@ -832,7 +832,7 @@ TreeMapItemList* CallMapCallingItem::children() setSorting(-2, false); } - return _children; + return _tqchildren; } @@ -862,7 +862,7 @@ TQString CallMapCallerItem::text(int textNo) const if (textNo == 2) return _c->caller()->prettyLocation(); if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty(); - if (textNo != 1) return TQString::null; + if (textNo != 1) return TQString(); TraceCostType* ct; ct = ((CallMapView*)widget())->costType(); @@ -872,7 +872,7 @@ TQString CallMapCallerItem::text(int textNo) const TraceCost* t = ((CallMapView*)widget())->totalCost(); double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct); return TQString("%1 %") - .arg(p, 0, 'f', Configuration::percentPrecision()); + .tqarg(p, 0, 'f', Configuration::percentPrecision()); } return val.pretty(); } @@ -904,7 +904,7 @@ bool CallMapCallerItem::isMarked(int) const } -TreeMapItemList* CallMapCallerItem::children() +TreeMapItemList* CallMapCallerItem::tqchildren() { if (!initialized()) { //qDebug("Create Caller subitems (%s)", name().ascii()); @@ -939,7 +939,7 @@ TreeMapItemList* CallMapCallerItem::children() setSorting(-2, false); } - return _children; + return _tqchildren; } TQColor CallMapCallerItem::backColor() const diff --git a/kcachegrind/kcachegrind/callmapview.h b/kcachegrind/kcachegrind/callmapview.h index e0af71f4..4bff8857 100644 --- a/kcachegrind/kcachegrind/callmapview.h +++ b/kcachegrind/kcachegrind/callmapview.h @@ -30,11 +30,12 @@ class CallMapView: public TreeMapWidget, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - CallMapView(bool showCallers, TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + CallMapView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); TQWidget* widget() { return this; } TQString whatsThis() const; @@ -77,7 +78,7 @@ public: bool isMarked(int) const; TQString text(int) const; TQPixmap pixmap(int) const; - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: @@ -98,7 +99,7 @@ public: bool isMarked(int) const; TQString text(int) const; TQPixmap pixmap(int) const; - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: @@ -117,7 +118,7 @@ public: bool isMarked(int) const; TQString text(int) const; TQPixmap pixmap(int) const; - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: diff --git a/kcachegrind/kcachegrind/callview.cpp b/kcachegrind/kcachegrind/callview.cpp index 4f22b4e9..0329fefe 100644 --- a/kcachegrind/kcachegrind/callview.cpp +++ b/kcachegrind/kcachegrind/callview.cpp @@ -35,9 +35,9 @@ // -CallView::CallView(bool showCallers, TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +CallView::CallView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { _showCallers = showCallers; @@ -53,9 +53,9 @@ CallView::CallView(bool showCallers, TraceItemView* parentView, } setSorting(0,false); - setColumnAlignment(0, Qt::AlignRight); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); + setColumnAlignment(0, TQt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); setAllColumnsShowFocus(true); setResizeMode(TQListView::LastColumn); setMinimumHeight(50); @@ -121,11 +121,11 @@ void CallView::context(TQListViewItem* i, const TQPoint & p, int col) cycle = f->cycle(); popup.insertItem(i18n("Go to '%1'") - .arg(Configuration::shortenSymbol(name)), 93); + .tqarg(Configuration::shortenSymbol(name)), 93); if (cycle) { name = Configuration::shortenSymbol(cycle->prettyName()); - popup.insertItem(i18n("Go to '%1'").arg(name), 94); + popup.insertItem(i18n("Go to '%1'").tqarg(name), 94); } popup.insertSeparator(); diff --git a/kcachegrind/kcachegrind/callview.h b/kcachegrind/kcachegrind/callview.h index e8d09050..9d20d95f 100644 --- a/kcachegrind/kcachegrind/callview.h +++ b/kcachegrind/kcachegrind/callview.h @@ -30,10 +30,11 @@ class CallView: public TQListView, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - CallView(bool showCallers, TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + CallView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); virtual TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/configdlg.cpp b/kcachegrind/kcachegrind/configdlg.cpp index 79b8b79c..b401c8be 100644 --- a/kcachegrind/kcachegrind/configdlg.cpp +++ b/kcachegrind/kcachegrind/configdlg.cpp @@ -38,8 +38,8 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data, - TQWidget* parent, const char* name) - :ConfigDlgBase(parent, name) + TQWidget* tqparent, const char* name) + :ConfigDlgBase(tqparent, name) { _config = c; _data = data; @@ -127,15 +127,15 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data, TQString n = it.currentKey(); if (n.startsWith(objectPrefix)) { n = n.remove(0, objectPrefix.length()+1); - if (oList.findIndex(n) == -1) oList.append(n); + if (oList.tqfindIndex(n) == -1) oList.append(n); } else if (n.startsWith(classPrefix)) { n = n.remove(0, classPrefix.length()+1); - if (cList.findIndex(n) == -1) cList.append(n); + if (cList.tqfindIndex(n) == -1) cList.append(n); } else if (n.startsWith(filePrefix)) { n = n.remove(0, filePrefix.length()+1); - if (fList.findIndex(n) == -1) fList.append(n); + if (fList.tqfindIndex(n) == -1) fList.append(n); } } @@ -210,7 +210,7 @@ bool ConfigDlg::configure(Configuration* c, TraceData* d, TQWidget* p) TQMessageBox::warning(p, i18n("KCachegrind Configuration"), i18n("The Maximum Number of List Items should be below 500." "The previous set value (%1) will still be used.") - .arg(TQString::number(c->_maxListCount)), + .tqarg(TQString::number(c->_maxListCount)), TQMessageBox::Ok, 0); c->_maxSymbolCount = dlg.symbolCount->text().toInt(); @@ -340,7 +340,7 @@ void ConfigDlg::dirsItemChanged(TQListViewItem* i) void ConfigDlg::dirsDeletePressed() { if (!_dirItem || (_dirItem->depth() == 0)) return; - TQListViewItem* p = _dirItem->parent(); + TQListViewItem* p = _dirItem->tqparent(); if (!p) return; Configuration* c = Configuration::config(); @@ -379,7 +379,7 @@ void ConfigDlg::dirsAddPressed() } TQString newDir; - newDir = KFileDialog::getExistingDirectory(TQString::null, + newDir = KFileDialog::getExistingDirectory(TQString(), this, i18n("Choose Source Folder")); if (newDir.isEmpty()) return; @@ -388,7 +388,7 @@ void ConfigDlg::dirsAddPressed() if (newDir.endsWith("/")) newDir = newDir.left(newDir.length()-1); - if (dirs->findIndex(newDir)>=0) return; + if (dirs->tqfindIndex(newDir)>=0) return; dirs->append(newDir); if (newDir.isEmpty()) newDir = TQString("/"); diff --git a/kcachegrind/kcachegrind/configdlg.h b/kcachegrind/kcachegrind/configdlg.h index 521caf15..58c9b80d 100644 --- a/kcachegrind/kcachegrind/configdlg.h +++ b/kcachegrind/kcachegrind/configdlg.h @@ -31,10 +31,11 @@ class TraceData; class ConfigDlg : public ConfigDlgBase { Q_OBJECT + TQ_OBJECT public: ConfigDlg(Configuration*, TraceData*, - TQWidget* parent = 0, const char* name = 0); + TQWidget* tqparent = 0, const char* name = 0); ~ConfigDlg(); static bool configure(Configuration*, TraceData*, TQWidget*); diff --git a/kcachegrind/kcachegrind/configdlgbase.ui b/kcachegrind/kcachegrind/configdlgbase.ui index bf2c1bd8..d6546b28 100644 --- a/kcachegrind/kcachegrind/configdlgbase.ui +++ b/kcachegrind/kcachegrind/configdlgbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>ConfigDlgBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>configDlgBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,11 +25,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -40,15 +40,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit" row="3" column="2" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="3" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>precisionEdit</cstring> </property> @@ -61,7 +61,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -69,7 +69,7 @@ <string>Truncated when more/longer than:</string> </property> </widget> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>TextLabel4_3</cstring> </property> @@ -77,7 +77,7 @@ <string>Precision of percentage values:</string> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -85,7 +85,7 @@ <string>Symbols in tooltips and context menus</string> </property> </widget> - <widget class="QLineEdit" row="2" column="3"> + <widget class="TQLineEdit" row="2" column="3"> <property name="name"> <cstring>symbolLength</cstring> </property> @@ -108,19 +108,19 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLineEdit" row="0" column="2" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="0" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>maxListEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="2"> + <widget class="TQLineEdit" row="2" column="2"> <property name="name"> <cstring>symbolCount</cstring> </property> @@ -133,7 +133,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -143,7 +143,7 @@ </widget> </grid> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -162,7 +162,7 @@ <string>Cost Item Colors</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -186,7 +186,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -203,14 +203,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -224,11 +224,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>classCombo</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>300</width> <height>32767</height> @@ -238,7 +238,7 @@ <bool>true</bool> </property> </widget> - <widget class="QCheckBox" row="2" column="2"> + <widget class="TQCheckBox" row="2" column="2"> <property name="name"> <cstring>fileCheck</cstring> </property> @@ -246,7 +246,7 @@ <string>Automatic</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -254,7 +254,7 @@ <string>Object:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4_2_2</cstring> </property> @@ -278,7 +278,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="1" column="2"> + <widget class="TQCheckBox" row="1" column="2"> <property name="name"> <cstring>classCheck</cstring> </property> @@ -294,7 +294,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="0" column="2"> + <widget class="TQCheckBox" row="0" column="2"> <property name="name"> <cstring>objectCheck</cstring> </property> @@ -302,7 +302,7 @@ <string>Automatic</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> @@ -326,11 +326,11 @@ <string></string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <property name="name"> <cstring>fileCombo</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>300</width> <height>32767</height> @@ -340,7 +340,7 @@ <bool>true</bool> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>objectCombo</cstring> </property> @@ -352,7 +352,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>300</width> <height>32767</height> @@ -368,7 +368,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -379,15 +379,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_3_2</cstring> </property> @@ -395,7 +395,7 @@ <string>Context lines in annotations:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>contextEdit</cstring> </property> @@ -410,7 +410,7 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -423,9 +423,9 @@ <string>Source Folders</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> @@ -441,14 +441,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QListView" row="0" column="1"> + <widget class="TQListView" row="0" column="1"> <column> <property name="text"> <string>Object / Related Source Base</string> @@ -467,15 +467,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="0" column="2"> + <widget class="TQLayoutWidget" row="0" column="2"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>addDirButton</cstring> </property> @@ -493,14 +493,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>49</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>deleteDirButton</cstring> </property> @@ -520,7 +520,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -546,7 +546,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -570,14 +570,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PushButton2</cstring> </property> @@ -588,7 +588,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PushButton1</cstring> </property> @@ -649,5 +649,5 @@ <include location="global" impldecl="in implementation">kcolorbutton.h</include> </includes> <pixmapinproject/> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcachegrind/kcachegrind/configuration.cpp b/kcachegrind/kcachegrind/configuration.cpp index 1a6c4d58..66abd563 100644 --- a/kcachegrind/kcachegrind/configuration.cpp +++ b/kcachegrind/kcachegrind/configuration.cpp @@ -55,7 +55,7 @@ static TQString knownFormula(TQString name) if (name =="L2m") return TQString("I2mr + D2mr + D2mw"); if (name =="CEst") return TQString("Ir + 10 L1m + 100 L2m"); - return TQString::null; + return TQString(); } static TQString knownLongName(TQString name) @@ -76,7 +76,7 @@ static TQString knownLongName(TQString name) if (name =="L2m") return i18n("L2 Miss Sum"); if (name =="CEst") return i18n("Cycle Estimation"); - return TQString::null; + return TQString(); } @@ -132,9 +132,9 @@ void Configuration::saveOptions(KConfig* kconfig) int count = 1; for( ; it.current(); ++it ) { if ( !(*it)->automatic ) { - colorConfig.writeEntry( TQString("Name%1").arg(count), + colorConfig.writeEntry( TQString("Name%1").tqarg(count), it.currentKey()); - colorConfig.writeEntry( TQString("Color%1").arg(count), + colorConfig.writeEntry( TQString("Color%1").tqarg(count), (*it)->color); //qDebug("Written Color %s (%d)", it.currentKey().ascii(), count); @@ -149,9 +149,9 @@ void Configuration::saveOptions(KConfig* kconfig) TQDictIterator<TQStringList> it2( c->_objectSourceDirs ); count = 1; for( ; it2.current(); ++it2 ) { - sourceConfig.writeEntry( TQString("Object%1").arg(count), + sourceConfig.writeEntry( TQString("Object%1").tqarg(count), it2.currentKey()); - sourceConfig.writeEntry( TQString("Dirs%1").arg(count), + sourceConfig.writeEntry( TQString("Dirs%1").tqarg(count), *(*it2), ':'); count++; } @@ -176,15 +176,15 @@ void Configuration::saveOptions(KConfig* kconfig) ctConfig.writeEntry( "Count", ctCount); for (int i=0; i<ctCount; i++) { TraceCostType* t = TraceCostType::knownType(i); - ctConfig.writeEntry( TQString("Name%1").arg(i+1), t->name()); + ctConfig.writeEntry( TQString("Name%1").tqarg(i+1), t->name()); // Use localized key TraceItemView::writeConfigEntry(&ctConfig, - TQString("Longname%1").arg(i+1).ascii(), + TQString("Longname%1").tqarg(i+1).ascii(), t->longName(), knownLongName(t->name()).utf8().data() /*, true */ ); TraceItemView::writeConfigEntry(&ctConfig, - TQString("Formula%1").arg(i+1).ascii(), + TQString("Formula%1").tqarg(i+1).ascii(), t->formula(), knownFormula(t->name()).utf8().data()); } } @@ -217,8 +217,8 @@ void Configuration::readOptions(KConfig* kconfig) KConfigGroup colorConfig(kconfig, TQCString("CostColors")); count = colorConfig.readNumEntry("Count", 0); for (i=1;i<=count;i++) { - TQString n = colorConfig.readEntry(TQString("Name%1").arg(i)); - TQColor color = colorConfig.readColorEntry(TQString("Color%1").arg(i)); + TQString n = colorConfig.readEntry(TQString("Name%1").tqarg(i)); + TQColor color = colorConfig.readColorEntry(TQString("Color%1").tqarg(i)); if (n.isEmpty()) continue; @@ -241,8 +241,8 @@ void Configuration::readOptions(KConfig* kconfig) c->_objectSourceDirs.clear(); if (count>17) c->_objectSourceDirs.resize(count); for (i=1;i<=count;i++) { - TQString n = sourceConfig.readEntry(TQString("Object%1").arg(i)); - dirs = sourceConfig.readListEntry(TQString("Dirs%1").arg(i), ':'); + TQString n = sourceConfig.readEntry(TQString("Object%1").tqarg(i)); + dirs = sourceConfig.readListEntry(TQString("Dirs%1").tqarg(i), ':'); if (n.isEmpty() || (dirs.count()==0)) continue; @@ -271,10 +271,10 @@ void Configuration::readOptions(KConfig* kconfig) int ctCount = ctConfig.readNumEntry("Count", 0); if (ctCount>0) { for (int i=1;i<=ctCount;i++) { - TQString n = ctConfig.readEntry(TQString("Name%1").arg(i)); - TQString l = ctConfig.readEntry(TQString("Longname%1").arg(i)); + TQString n = ctConfig.readEntry(TQString("Name%1").tqarg(i)); + TQString l = ctConfig.readEntry(TQString("Longname%1").tqarg(i)); if (l.isEmpty()) l = knownLongName(n); - TQString f = ctConfig.readEntry(TQString("Formula%1").arg(i)); + TQString f = ctConfig.readEntry(TQString("Formula%1").tqarg(i)); if (f.isEmpty()) f = knownFormula(n); TraceCostType::add(new TraceCostType(n, l, f)); @@ -316,7 +316,7 @@ TQColor Configuration::costTypeColor(TraceCostType* t) if (!t) n = TQString("CostType-default"); else - n = TQString("CostType-%1").arg(t->name()); + n = TQString("CostType-%1").tqarg(t->name()); return color(n)->color; } diff --git a/kcachegrind/kcachegrind/costlistitem.cpp b/kcachegrind/kcachegrind/costlistitem.cpp index 1e777b05..91caea4b 100644 --- a/kcachegrind/kcachegrind/costlistitem.cpp +++ b/kcachegrind/kcachegrind/costlistitem.cpp @@ -33,9 +33,9 @@ // CostListItem -CostListItem::CostListItem(TQListView* parent, TraceCostItem* costItem, +CostListItem::CostListItem(TQListView* tqparent, TraceCostItem* costItem, TraceCostType* ct, int size) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { _groupSize = size; _skipped = 0; @@ -49,9 +49,9 @@ CostListItem::CostListItem(TQListView* parent, TraceCostItem* costItem, } } -CostListItem::CostListItem(TQListView* parent, int skipped, +CostListItem::CostListItem(TQListView* tqparent, int skipped, TraceCostItem* costItem, TraceCostType* ct) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { _skipped = skipped; _costItem = costItem; @@ -71,7 +71,7 @@ void CostListItem::updateName() if (!_costItem) return; TQString n = _costItem->prettyName(); - if (_groupSize>=0) n += TQString(" (%1)").arg(_groupSize); + if (_groupSize>=0) n += TQString(" (%1)").tqarg(_groupSize); setText(1, n); } @@ -98,13 +98,13 @@ void CostListItem::update() double pure = 100.0 * _pure / total; TQString str; if (Configuration::showPercentage()) - str = TQString("%1").arg(pure, 0, 'f', Configuration::percentPrecision()); + str = TQString("%1").tqarg(pure, 0, 'f', Configuration::percentPrecision()); else str = _costItem->prettySubCost(_costType); if (_skipped) { // special handling for skip entries... - setText(0, TQString("< %1").arg(str)); + setText(0, TQString("< %1").tqarg(str)); return; } diff --git a/kcachegrind/kcachegrind/costlistitem.h b/kcachegrind/kcachegrind/costlistitem.h index 6c1ccbc8..b5607ce6 100644 --- a/kcachegrind/kcachegrind/costlistitem.h +++ b/kcachegrind/kcachegrind/costlistitem.h @@ -22,13 +22,13 @@ #include <tqlistview.h> #include "tracedata.h" -class CostListItem: public QListViewItem +class CostListItem: public TQListViewItem { public: - CostListItem(TQListView* parent, TraceCostItem* cost, + CostListItem(TQListView* tqparent, TraceCostItem* cost, TraceCostType* ct, int size = -1); // entry with multiple skipped items - CostListItem(TQListView* parent, int skipped, TraceCostItem* cost, + CostListItem(TQListView* tqparent, int skipped, TraceCostItem* cost, TraceCostType* ct); int compare(TQListViewItem * i, int col, bool ascending ) const; @@ -45,7 +45,7 @@ private: TraceCostItem* _costItem; // >0 only for last item in list, if items are skipped int _skipped; - // number of items in group, is put in parenthesis after name + // number of items in group, is put in tqparenthesis after name int _groupSize; }; diff --git a/kcachegrind/kcachegrind/costtypeitem.cpp b/kcachegrind/kcachegrind/costtypeitem.cpp index dc35cb2b..cf71a3a9 100644 --- a/kcachegrind/kcachegrind/costtypeitem.cpp +++ b/kcachegrind/kcachegrind/costtypeitem.cpp @@ -31,9 +31,9 @@ // CostTypeItem -CostTypeItem::CostTypeItem(TQListView* parent, TraceCostItem* costItem, +CostTypeItem::CostTypeItem(TQListView* tqparent, TraceCostItem* costItem, TraceCostType* ct, TraceCost::CostType gt) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { _costItem = costItem; _costType = ct; @@ -104,7 +104,7 @@ void CostTypeItem::update() double pure = 100.0 * _pure / selfTotal; if (Configuration::showPercentage()) { setText(2, TQString("%1") - .arg(pure, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure, 0, 'f', Configuration::percentPrecision())); } else setText(2, _costItem->prettySubCost(_costType)); @@ -121,7 +121,7 @@ void CostTypeItem::update() double sum = 100.0 * _sum / total; if (Configuration::showPercentage()) { setText(1, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); } else setText(1, _sum.pretty()); diff --git a/kcachegrind/kcachegrind/costtypeitem.h b/kcachegrind/kcachegrind/costtypeitem.h index 7593151e..6bf60fa8 100644 --- a/kcachegrind/kcachegrind/costtypeitem.h +++ b/kcachegrind/kcachegrind/costtypeitem.h @@ -27,10 +27,10 @@ #include "tracedata.h" -class CostTypeItem: public QListViewItem +class CostTypeItem: public TQListViewItem { public: - CostTypeItem(TQListView* parent, TraceCostItem* costItem, + CostTypeItem(TQListView* tqparent, TraceCostItem* costItem, TraceCostType* ct, TraceCost::CostType gt); int compare(TQListViewItem * i, int col, bool ascending ) const; diff --git a/kcachegrind/kcachegrind/costtypeview.cpp b/kcachegrind/kcachegrind/costtypeview.cpp index 6642e7af..28558f6c 100644 --- a/kcachegrind/kcachegrind/costtypeview.cpp +++ b/kcachegrind/kcachegrind/costtypeview.cpp @@ -35,22 +35,22 @@ // -CostTypeView::CostTypeView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +CostTypeView::CostTypeView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { addColumn( i18n( "Event Type" ) ); addColumn( i18n( "Incl." ) ); addColumn( i18n( "Self" ) ); addColumn( i18n( "Short" ) ); - addColumn( TQString::null ); + addColumn( TQString() ); addColumn( i18n( "Formula" ) ); setSorting(-1); setAllColumnsShowFocus(true); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); - setColumnAlignment(3, Qt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); + setColumnAlignment(3, TQt::AlignRight); setMinimumHeight(50); connect( this, @@ -146,13 +146,13 @@ void CostTypeView::context(TQListViewItem* i, const TQPoint & p, int) else if (r == 97) { int i = 1; while(1) { - if (!TraceCostType::knownVirtualType(i18n("New%1").arg(i))) + if (!TraceCostType::knownVirtualType(i18n("New%1").tqarg(i))) break; i++; } // add same new cost type to this mapping and to known types - TQString shortName = i18n("New%1").arg(i); - TQString longName = i18n("New Cost Type %1").arg(i); + TQString shortName = i18n("New%1").tqarg(i); + TQString longName = i18n("New Cost Type %1").tqarg(i); TraceCostType::add(new TraceCostType(shortName, longName, "0")); _data->mapping()->add(new TraceCostType(shortName, longName, "0")); refresh(); diff --git a/kcachegrind/kcachegrind/costtypeview.h b/kcachegrind/kcachegrind/costtypeview.h index 63d95ea7..3a68a6c7 100644 --- a/kcachegrind/kcachegrind/costtypeview.h +++ b/kcachegrind/kcachegrind/costtypeview.h @@ -30,10 +30,11 @@ class CostTypeView: public TQListView, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - CostTypeView(TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + CostTypeView(TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); virtual TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/coverage.cpp b/kcachegrind/kcachegrind/coverage.cpp index 86e6f7ff..dc4a9764 100644 --- a/kcachegrind/kcachegrind/coverage.cpp +++ b/kcachegrind/kcachegrind/coverage.cpp @@ -81,7 +81,7 @@ int Coverage::selfMedian() TraceFunctionList Coverage::coverage(TraceFunction* f, CoverageMode m, TraceCostType* ct) { - invalidate(f->data(), Coverage::Rtti); + tqinvalidate(f->data(), Coverage::Rtti); _costType = ct; diff --git a/kcachegrind/kcachegrind/coverageitem.cpp b/kcachegrind/kcachegrind/coverageitem.cpp index 3c93a88e..ab872f71 100644 --- a/kcachegrind/kcachegrind/coverageitem.cpp +++ b/kcachegrind/kcachegrind/coverageitem.cpp @@ -32,11 +32,11 @@ // CallerCoverageItem -CallerCoverageItem::CallerCoverageItem(TQListView* parent, Coverage* c, +CallerCoverageItem::CallerCoverageItem(TQListView* tqparent, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _skipped = 0; _coverage = c; @@ -50,11 +50,11 @@ CallerCoverageItem::CallerCoverageItem(TQListView* parent, Coverage* c, setGroupType(gt); } -CallerCoverageItem::CallerCoverageItem(TQListView* parent, int skipped, Coverage* c, +CallerCoverageItem::CallerCoverageItem(TQListView* tqparent, int skipped, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _skipped = skipped; _coverage = c; @@ -87,8 +87,8 @@ void CallerCoverageItem::setCostType(TraceCostType* ct) void CallerCoverageItem::update() { if (!_coverage) { - setText(0, TQString::null); - setText(1, TQString::null); + setText(0, TQString()); + setText(1, TQString()); return; } @@ -97,12 +97,12 @@ void CallerCoverageItem::update() _sum = SubCost(realSum * _coverage->inclusive()); TQString str; if (Configuration::showPercentage()) - str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision()); + str = TQString("%1").tqarg(_pSum, 0, 'f', Configuration::percentPrecision()); else str = _sum.pretty(); if (_skipped) { - setText(0, TQString("< %1").arg(str)); + setText(0, TQString("< %1").tqarg(str)); return; } @@ -121,9 +121,9 @@ void CallerCoverageItem::update() distString = TQString::number(_distance); else distString = TQString("%1-%2 (%3)") - .arg(_coverage->minDistance()) - .arg(_coverage->maxDistance()) - .arg(_distance); + .tqarg(_coverage->minDistance()) + .tqarg(_coverage->maxDistance()) + .tqarg(_distance); setText(1, distString); } @@ -172,11 +172,11 @@ int CallerCoverageItem::compare(TQListViewItem * i, // CalleeCoverageItem -CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, Coverage* c, +CalleeCoverageItem::CalleeCoverageItem(TQListView* tqparent, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _skipped = 0; _coverage = c; @@ -190,11 +190,11 @@ CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, Coverage* c, setGroupType(gt); } -CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c, +CalleeCoverageItem::CalleeCoverageItem(TQListView* tqparent, int skipped, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _skipped = skipped; _coverage = c; @@ -227,9 +227,9 @@ void CalleeCoverageItem::setCostType(TraceCostType* ct) void CalleeCoverageItem::update() { if (!_coverage) { - setText(0, TQString::null); - setText(1, TQString::null); - setText(2, TQString::null); + setText(0, TQString()); + setText(1, TQString()); + setText(2, TQString()); return; } @@ -242,12 +242,12 @@ void CalleeCoverageItem::update() TQString str; if (Configuration::showPercentage()) - str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision()); + str = TQString("%1").tqarg(_pSum, 0, 'f', Configuration::percentPrecision()); else str = _sum.pretty(); if (_skipped) { - str = TQString("< %1").arg(str); + str = TQString("< %1").tqarg(str); setText(0, str); setText(1, str); return; @@ -259,7 +259,7 @@ void CalleeCoverageItem::update() if (Configuration::showPercentage()) { setText(1, TQString("%1") - .arg(_pSelf, 0, 'f', Configuration::percentPrecision())); + .tqarg(_pSelf, 0, 'f', Configuration::percentPrecision())); } else { setText(1, _self.pretty()); @@ -285,12 +285,12 @@ void CalleeCoverageItem::update() if (_distance == sMed) med = TQString::number(_distance); else - med = TQString("%1/%2").arg(_distance).arg(sMed); + med = TQString("%1/%2").tqarg(_distance).tqarg(sMed); distString = TQString("%1-%2 (%3)") - .arg(_coverage->minDistance()) - .arg(_coverage->maxDistance()) - .arg(med); + .tqarg(_coverage->minDistance()) + .tqarg(_coverage->maxDistance()) + .tqarg(med); } setText(2, distString); } diff --git a/kcachegrind/kcachegrind/coverageitem.h b/kcachegrind/kcachegrind/coverageitem.h index 29666890..04da4305 100644 --- a/kcachegrind/kcachegrind/coverageitem.h +++ b/kcachegrind/kcachegrind/coverageitem.h @@ -28,12 +28,12 @@ class Coverage; -class CallerCoverageItem: public QListViewItem +class CallerCoverageItem: public TQListViewItem { public: - CallerCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base, + CallerCoverageItem(TQListView* tqparent, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt); - CallerCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base, + CallerCoverageItem(TQListView* tqparent, int skipped, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt); int compare(TQListViewItem * i, int col, bool ascending ) const; @@ -54,12 +54,12 @@ private: }; -class CalleeCoverageItem: public QListViewItem +class CalleeCoverageItem: public TQListViewItem { public: - CalleeCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base, + CalleeCoverageItem(TQListView* tqparent, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt); - CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base, + CalleeCoverageItem(TQListView* tqparent, int skipped, Coverage* c, TraceFunction* base, TraceCostType* ct, TraceCost::CostType gt); int compare(TQListViewItem * i, int col, bool ascending ) const; diff --git a/kcachegrind/kcachegrind/coverageview.cpp b/kcachegrind/kcachegrind/coverageview.cpp index 4452efca..460a4969 100644 --- a/kcachegrind/kcachegrind/coverageview.cpp +++ b/kcachegrind/kcachegrind/coverageview.cpp @@ -36,9 +36,9 @@ // -CoverageView::CoverageView(bool showCallers, TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +CoverageView::CoverageView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { _showCallers = showCallers; @@ -54,13 +54,13 @@ CoverageView::CoverageView(bool showCallers, TraceItemView* parentView, addColumn( i18n( "Distance" ) ); addColumn( i18n( "Calling" ) ); addColumn( i18n( "Callee" ) ); - setColumnAlignment(3, Qt::AlignRight); + setColumnAlignment(3, TQt::AlignRight); } setSorting(0,false); - setColumnAlignment(0, Qt::AlignRight); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); + setColumnAlignment(0, TQt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); setAllColumnsShowFocus(true); setResizeMode(TQListView::LastColumn); setMinimumHeight(50); @@ -108,7 +108,7 @@ TQString CoverageView::whatsThis() const "<p>As there can be many calls from the same function, " "the distance column sometimes shows " "the range of distances for all " - "calls happening; then, in parentheses, there is the " + "calls happening; then, in tqparentheses, there is the " "medium distance, i.e. the distance where most of the " "call costs happened.</p>" @@ -138,7 +138,7 @@ TQString CoverageView::whatsThis() const "<p>As there can be many calls to the same function, " "the distance column sometimes shows " "the range of distances for all " - "calls happening; then, in parentheses, there is the " + "calls happening; then, in tqparentheses, there is the " "medium distance, i.e. the distance where most of the " "call costs happened.</p>" @@ -163,7 +163,7 @@ void CoverageView::context(TQListViewItem* i, const TQPoint & p, int c) TQString name = f->name(); if ((int)name.length()>Configuration::maxSymbolLength()) name = name.left(Configuration::maxSymbolLength()) + "..."; - popup.insertItem(i18n("Go to '%1'").arg(name), 93); + popup.insertItem(i18n("Go to '%1'").tqarg(name), 93); popup.insertSeparator(); } diff --git a/kcachegrind/kcachegrind/coverageview.h b/kcachegrind/kcachegrind/coverageview.h index e0edeea5..64b56c4a 100644 --- a/kcachegrind/kcachegrind/coverageview.h +++ b/kcachegrind/kcachegrind/coverageview.h @@ -31,10 +31,11 @@ class CoverageView: public TQListView, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - CoverageView(bool showCallers, TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + CoverageView(bool showCallers, TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); virtual TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/dumpselection.cpp b/kcachegrind/kcachegrind/dumpselection.cpp index 4d812ef9..15027325 100644 --- a/kcachegrind/kcachegrind/dumpselection.cpp +++ b/kcachegrind/kcachegrind/dumpselection.cpp @@ -20,8 +20,8 @@ DumpSelection::DumpSelection( TopLevel* top, - TQWidget* parent, const char* name) - : DumpSelectionBase(parent, name), TraceItemView(0, top) + TQWidget* tqparent, const char* name) + : DumpSelectionBase(tqparent, name), TraceItemView(0, top) { } diff --git a/kcachegrind/kcachegrind/dumpselection.h b/kcachegrind/kcachegrind/dumpselection.h index 3bec46ae..b6bcddce 100644 --- a/kcachegrind/kcachegrind/dumpselection.h +++ b/kcachegrind/kcachegrind/dumpselection.h @@ -18,9 +18,10 @@ class DumpSelection : public DumpSelectionBase, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - DumpSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0); + DumpSelection( TopLevel*, TQWidget* tqparent = 0, const char* name = 0); virtual ~DumpSelection(); TQWidget* widget() { return this; } diff --git a/kcachegrind/kcachegrind/dumpselectionbase.ui b/kcachegrind/kcachegrind/dumpselectionbase.ui index 37bc1c46..a78b52ce 100644 --- a/kcachegrind/kcachegrind/dumpselectionbase.ui +++ b/kcachegrind/kcachegrind/dumpselectionbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>DumpSelectionBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DumpSelectionBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -19,14 +19,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter1</cstring> </property> <property name="orientation"> <enum>Vertical</enum> </property> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Target</string> @@ -75,11 +75,11 @@ <cstring>listView1</cstring> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -90,7 +90,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -106,12 +106,12 @@ <string>Target command:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineEdit1</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -119,7 +119,7 @@ <string>Profiler options:</string> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Option</string> @@ -454,7 +454,7 @@ <cstring>listView3</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -470,14 +470,14 @@ <string>Custom profiler options:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineEdit1_2</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -493,14 +493,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton2</cstring> </property> @@ -512,7 +512,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -523,7 +523,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -531,12 +531,12 @@ <string>Dump reason:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineEdit3</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -544,7 +544,7 @@ <string>Event summary:</string> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Name</string> @@ -571,7 +571,7 @@ <cstring>listView4</cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -579,14 +579,14 @@ <string>Miscellaneous:</string> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>textEdit2</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -602,14 +602,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton6</cstring> </property> @@ -617,7 +617,7 @@ <string>Show</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton5</cstring> </property> @@ -629,7 +629,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -640,15 +640,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -656,7 +656,7 @@ <string>Update</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkBox1</cstring> </property> @@ -664,14 +664,14 @@ <string>Every [s]:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineEdit3_2</cstring> </property> </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Counter</string> @@ -866,15 +866,15 @@ <cstring>listView4_3</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -890,7 +890,7 @@ <string>Stack trace:</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkBox2</cstring> </property> @@ -900,7 +900,7 @@ </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>#</string> @@ -960,15 +960,15 @@ <cstring>listView7</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton7</cstring> </property> @@ -986,14 +986,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton6_2</cstring> </property> @@ -1001,7 +1001,7 @@ <string>Zero</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton4</cstring> </property> @@ -1013,7 +1013,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1024,20 +1024,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>textEdit2_2</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton9</cstring> </property> @@ -1055,14 +1055,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushButton8</cstring> </property> @@ -1078,5 +1078,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcachegrind/kcachegrind/functionitem.cpp b/kcachegrind/kcachegrind/functionitem.cpp index 3b694ddf..5b70fd2e 100644 --- a/kcachegrind/kcachegrind/functionitem.cpp +++ b/kcachegrind/kcachegrind/functionitem.cpp @@ -37,9 +37,9 @@ // FunctionItem -FunctionItem::FunctionItem(TQListView* parent, TraceFunction* f, +FunctionItem::FunctionItem(TQListView* tqparent, TraceFunction* f, TraceCostType* ct, TraceCost::CostType gt) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { #if 0 _costPixValid = false; @@ -56,9 +56,9 @@ FunctionItem::FunctionItem(TQListView* parent, TraceFunction* f, setText(4, f->prettyLocation()); } -FunctionItem::FunctionItem(TQListView* parent, int skipped, +FunctionItem::FunctionItem(TQListView* tqparent, int skipped, TraceFunction* f, TraceCostType* ct) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { #if 0 _costPixValid = false; @@ -103,7 +103,7 @@ void FunctionItem::setGroupType(TraceCost::CostType gt) #if 0 _groupPixValid = false; - viewList()->repaint(); + viewList()->tqrepaint(); #else TQColor c = Configuration::functionColor(_groupType, _function); setPixmap(3, colorPixmap(10, 10, c)); @@ -141,7 +141,7 @@ void FunctionItem::update() _sum = _function->inclusive()->subCost(_costType); double incl = 100.0 * _sum / inclTotal; if (Configuration::showPercentage()) - str = TQString("%1").arg(incl, 0, 'f', Configuration::percentPrecision()); + str = TQString("%1").tqarg(incl, 0, 'f', Configuration::percentPrecision()); else str = _function->inclusive()->prettySubCost(_costType); str = "< " + str; @@ -171,7 +171,7 @@ void FunctionItem::update() double incl = 100.0 * _sum / inclTotal; if (Configuration::showPercentage()) setText(0, TQString("%1") - .arg(incl, 0, 'f', Configuration::percentPrecision())); + .tqarg(incl, 0, 'f', Configuration::percentPrecision())); else setText(0, _function->inclusive()->prettySubCost(_costType)); @@ -189,7 +189,7 @@ void FunctionItem::update() if (Configuration::showPercentage()) setText(1, TQString("%1") - .arg(self, 0, 'f', Configuration::percentPrecision())); + .tqarg(self, 0, 'f', Configuration::percentPrecision())); else setText(1, _function->prettySubCost(_costType)); diff --git a/kcachegrind/kcachegrind/functionitem.h b/kcachegrind/kcachegrind/functionitem.h index 1c49e1be..fcf24123 100644 --- a/kcachegrind/kcachegrind/functionitem.h +++ b/kcachegrind/kcachegrind/functionitem.h @@ -26,13 +26,13 @@ #include <tqlistview.h> #include "tracedata.h" -class FunctionItem: public QListViewItem +class FunctionItem: public TQListViewItem { public: - FunctionItem(TQListView* parent, TraceFunction* function, + FunctionItem(TQListView* tqparent, TraceFunction* function, TraceCostType* ct, TraceCost::CostType gt); // constructor for a "Skipped ... " entry - FunctionItem(TQListView* parent, int skipped, + FunctionItem(TQListView* tqparent, int skipped, TraceFunction* function, TraceCostType* ct); int compare(TQListViewItem * i, int col, bool ascending ) const; @@ -44,7 +44,7 @@ public: #if 0 const TQPixmap* pixmap (int column) const; bool _costPixValid, _groupPixValid; - QPixMap _costPix, _groupPix; + TQPixMap _costPix, _groupPix; #endif private: diff --git a/kcachegrind/kcachegrind/functionselection.cpp b/kcachegrind/kcachegrind/functionselection.cpp index 212637ec..41390248 100644 --- a/kcachegrind/kcachegrind/functionselection.cpp +++ b/kcachegrind/kcachegrind/functionselection.cpp @@ -17,7 +17,7 @@ */ /* - * For function selection, to be put into a QDockWindow + * For function selection, to be put into a TQDockWindow */ #include <tqtimer.h> @@ -41,8 +41,8 @@ #include "toplevel.h" FunctionSelection::FunctionSelection( TopLevel* top, - TQWidget* parent, const char* name) - : FunctionSelectionBase(parent, name), TraceItemView(0, top) + TQWidget* tqparent, const char* name) + : FunctionSelectionBase(tqparent, name), TraceItemView(0, top) { _group = 0; _inSetGroup = false; @@ -72,9 +72,9 @@ FunctionSelection::FunctionSelection( TopLevel* top, // we start with desending cost sorting functionList->setSorting(0,false); - functionList->setColumnAlignment(0, Qt::AlignRight); - functionList->setColumnAlignment(1, Qt::AlignRight); - functionList->setColumnAlignment(2, Qt::AlignRight); + functionList->setColumnAlignment(0, TQt::AlignRight); + functionList->setColumnAlignment(1, TQt::AlignRight); + functionList->setColumnAlignment(2, TQt::AlignRight); functionList->setAllColumnsShowFocus(true); // functionList->setShowSortIndicator(true); // we can have very long function and location names @@ -84,7 +84,7 @@ FunctionSelection::FunctionSelection( TopLevel* top, functionList->setColumnWidth(4, 200); groupList->setSorting(0,false); - groupList->setColumnAlignment(0, Qt::AlignRight); + groupList->setColumnAlignment(0, TQt::AlignRight); groupList->setAllColumnsShowFocus(true); // groupList->setShowSortIndicator(true); groupList->setResizeMode(TQListView::LastColumn); @@ -173,7 +173,7 @@ void FunctionSelection::functionContext(TQListViewItem* i, if (i) { f = ((FunctionItem*) i)->function(); if (f) { - popup.insertItem(i18n("Go to %1").arg(f->prettyName()), 93); + popup.insertItem(i18n("Go to %1").tqarg(f->prettyName()), 93); popup.insertSeparator(); } } @@ -305,8 +305,8 @@ void FunctionSelection::doUpdate(int changeType) } // reset searchEdit (as not activated from this view) - _searchString = TQString::null; - query(TQString::null); + _searchString = TQString(); + query(TQString()); // select cost item group of function switch(_groupType) { @@ -368,8 +368,8 @@ void FunctionSelection::doUpdate(int changeType) } // reset searchEdit - _searchString = TQString::null; - query(TQString::null); + _searchString = TQString(); + query(TQString()); refresh(); } @@ -417,7 +417,7 @@ void FunctionSelection::refresh() if (!_data || _data->parts().count()==0) { functionList->clear(); groupList->setUpdatesEnabled(true); - groupList->repaint(); + groupList->tqrepaint(); // this clears all other lists functionList->setSelected(functionList->firstChild(), true); @@ -547,9 +547,9 @@ void FunctionSelection::refresh() functionList->clearSelection(); //functionList->setUpdatesEnabled(true); - //functionList->repaint(); + //functionList->tqrepaint(); groupList->setUpdatesEnabled(true); - groupList->repaint(); + groupList->tqrepaint(); return; } } @@ -581,7 +581,7 @@ void FunctionSelection::refresh() groupList->clearSelection(); groupList->setUpdatesEnabled(true); - groupList->repaint(); + groupList->tqrepaint(); } @@ -628,7 +628,7 @@ void FunctionSelection::groupSelected(TQListViewItem* i) #if 0 if (total == 0.0) { functionList->setUpdatesEnabled(true); - functionList->repaint(); + functionList->tqrepaint(); return; } #endif @@ -668,7 +668,7 @@ void FunctionSelection::groupSelected(TQListViewItem* i) } //functionList->setUpdatesEnabled(true); - //functionList->repaint(); + //functionList->tqrepaint(); // Don't emit signal if cost item was changed programatically if (!_inSetGroup) { @@ -738,7 +738,7 @@ void FunctionSelection::updateGroupSizes(bool hideEmpty) TQListViewItem* item = groupList->firstChild(); for (;item;item = item->nextSibling()) { CostListItem* i = (CostListItem*)item; - int size = (_groupSize.contains(i->costItem())) ? + int size = (_groupSize.tqcontains(i->costItem())) ? _groupSize[i->costItem()] : -1; i->setSize(size); i->setVisible(!hideEmpty || (size>0)); @@ -774,28 +774,28 @@ void FunctionSelection::query(TQString query) if (re.search(f->prettyName())>=0) { if (_group) { if (_groupType==TraceItem::Object) { - if (_groupSize.contains(f->object())) + if (_groupSize.tqcontains(f->object())) _groupSize[f->object()]++; else _groupSize[f->object()] = 1; if (f->object() != _group) continue; } else if (_groupType==TraceItem::Class) { - if (_groupSize.contains(f->cls())) + if (_groupSize.tqcontains(f->cls())) _groupSize[f->cls()]++; else _groupSize[f->cls()] = 1; if (f->cls() != _group) continue; } else if (_groupType==TraceItem::File) { - if (_groupSize.contains(f->file())) + if (_groupSize.tqcontains(f->file())) _groupSize[f->file()]++; else _groupSize[f->file()] = 1; if (f->file() != _group) continue; } else if (_groupType==TraceItem::FunctionCycle) { - if (_groupSize.contains(f->cycle())) + if (_groupSize.tqcontains(f->cycle())) _groupSize[f->cycle()]++; else _groupSize[f->cycle()] = 1; diff --git a/kcachegrind/kcachegrind/functionselection.h b/kcachegrind/kcachegrind/functionselection.h index c1c815d6..2aacbeba 100644 --- a/kcachegrind/kcachegrind/functionselection.h +++ b/kcachegrind/kcachegrind/functionselection.h @@ -17,7 +17,7 @@ */ /* - * For function selection, to be put into a QDockWindow + * For function selection, to be put into a TQDockWindow */ #ifndef FUNCTIONSELECTION_H @@ -38,9 +38,10 @@ class NestedAreaItem; class FunctionSelection : public FunctionSelectionBase, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - FunctionSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0); + FunctionSelection( TopLevel*, TQWidget* tqparent = 0, const char* name = 0); ~FunctionSelection(); TraceCostItem* group(TQString); diff --git a/kcachegrind/kcachegrind/functionselectionbase.ui b/kcachegrind/kcachegrind/functionselectionbase.ui index e59dc26c..5fbc7f96 100644 --- a/kcachegrind/kcachegrind/functionselectionbase.ui +++ b/kcachegrind/kcachegrind/functionselectionbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>FunctionSelectionBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>FunctionSelectionBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,15 +25,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>searchLabel</cstring> </property> @@ -44,19 +44,19 @@ <cstring>searchEdit</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>searchEdit</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>groupBox</cstring> </property> </widget> </hbox> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Self</string> @@ -90,14 +90,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>150</height> </size> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Incl.</string> @@ -159,5 +159,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcachegrind/kcachegrind/instritem.cpp b/kcachegrind/kcachegrind/instritem.cpp index 97c09661..3aa7d22d 100644 --- a/kcachegrind/kcachegrind/instritem.cpp +++ b/kcachegrind/kcachegrind/instritem.cpp @@ -37,9 +37,9 @@ // InstrItem // for messages -InstrItem::InstrItem(InstrView* iv, TQListView* parent, +InstrItem::InstrItem(InstrView* iv, TQListView* tqparent, Addr addr, const TQString& msg) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = iv; _addr = addr; @@ -56,11 +56,11 @@ InstrItem::InstrItem(InstrView* iv, TQListView* parent, } // for code lines -InstrItem::InstrItem(InstrView* iv, TQListView* parent, +InstrItem::InstrItem(InstrView* iv, TQListView* tqparent, Addr addr, bool inside, const TQString& code, const TQString& cmd, const TQString& args, TraceInstr* instr) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = iv; _addr = addr; @@ -86,9 +86,9 @@ InstrItem::InstrItem(InstrView* iv, TQListView* parent, } // for call lines -InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, +InstrItem::InstrItem(InstrView* iv, TQListViewItem* tqparent, Addr addr, TraceInstr* instr, TraceInstrCall* instrCall) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = iv; _addr = addr; @@ -107,7 +107,7 @@ InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, else templ += i18n("%n call to '%1'", "%n calls to '%1'", cc); - TQString callStr = templ.arg(_instrCall->call()->calledName()); + TQString callStr = templ.tqarg(_instrCall->call()->calledName()); TraceFunction* calledF = _instrCall->call()->called(); calledF->addPrettyLocation(callStr); @@ -118,9 +118,9 @@ InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, } // for jump lines -InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, +InstrItem::InstrItem(InstrView* iv, TQListViewItem* tqparent, Addr addr, TraceInstr* instr, TraceInstrJump* instrJump) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = iv; _addr = addr; @@ -135,13 +135,13 @@ InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, TQString jStr; if (_instrJump->isCondJump()) jStr = i18n("Jump %1 of %2 times to 0x%3") - .arg(_instrJump->followedCount().pretty()) - .arg(_instrJump->executedCount().pretty()) - .arg(_instrJump->instrTo()->addr().toString()); + .tqarg(_instrJump->followedCount().pretty()) + .tqarg(_instrJump->executedCount().pretty()) + .tqarg(_instrJump->instrTo()->addr().toString()); else jStr = i18n("Jump %1 times to 0x%2") - .arg(_instrJump->executedCount().pretty()) - .arg(_instrJump->instrTo()->addr().toString()); + .tqarg(_instrJump->executedCount().pretty()) + .tqarg(_instrJump->instrTo()->addr().toString()); setText(6, jStr); @@ -200,7 +200,7 @@ void InstrItem::updateCost() TraceCostType *ct = _view->costType(); _pure = ct ? instrCost->subCost(ct) : SubCost(0); if (_pure == 0) { - setText(1, TQString::null); + setText(1, TQString()); setPixmap(1, TQPixmap()); } else { @@ -209,7 +209,7 @@ void InstrItem::updateCost() if (Configuration::showPercentage()) setText(1, TQString("%1") - .arg(pure, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure, 0, 'f', Configuration::percentPrecision())); else setText(1, _pure.pretty()); @@ -219,7 +219,7 @@ void InstrItem::updateCost() TraceCostType *ct2 = _view->costType2(); _pure2 = ct2 ? instrCost->subCost(ct2) : SubCost(0); if (_pure2 == 0) { - setText(2, TQString::null); + setText(2, TQString()); setPixmap(2, TQPixmap()); } else { @@ -228,7 +228,7 @@ void InstrItem::updateCost() if (Configuration::showPercentage()) setText(2, TQString("%1") - .arg(pure, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure, 0, 'f', Configuration::percentPrecision())); else setText(2, _pure2.pretty()); @@ -297,7 +297,7 @@ int InstrItem::compare(TQListViewItem * i, int col, bool ascending ) const } void InstrItem::paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ) + int column, int width, int tqalignment ) { TQColorGroup _cg( cg ); @@ -309,7 +309,7 @@ void InstrItem::paintCell( TQPainter *p, const TQColorGroup &cg, if (column == 3) paintArrows(p, _cg, width); else - TQListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, tqalignment ); } void InstrItem::setJumpArray(const TQMemArray<TraceInstrJump*>& a) @@ -326,7 +326,7 @@ void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else iv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); @@ -373,7 +373,7 @@ void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) p->fillRect( marg + 6*i-2, (y1==0) ? y1: y1-2, 8, (y2-y1==height())? y2:y2+2, cg.brush( TQColorGroup::Highlight ) ); - c = lv->colorGroup().highlightedText(); + c = lv->tqcolorGroup().highlightedText(); } #endif p->fillRect( marg + 6*i, y1, 4, y2, c); @@ -388,7 +388,7 @@ void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) if (start >= 0) { #if 0 if (_jump[start] == ((TraceItemView*)_view)->selectedItem()) { - c = lv->colorGroup().highlightedText(); + c = lv->tqcolorGroup().highlightedText(); } #endif c = _jump[start]->isCondJump() ? red : blue; @@ -416,13 +416,13 @@ void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) p->drawConvexPolygon(a); p->setPen(c.light()); - p->drawPolyline(a, 0, 5); + p->tqdrawPolyline(a, 0, 5); p->setPen(c.dark()); - p->drawPolyline(a, 4, 2); + p->tqdrawPolyline(a, 4, 2); p->setPen(c.light()); - p->drawPolyline(a, 5, 2); + p->tqdrawPolyline(a, 5, 2); p->setPen(c.dark()); - p->drawPolyline(a, 6, 2); + p->tqdrawPolyline(a, 6, 2); } // draw inner vertical line for start/stop diff --git a/kcachegrind/kcachegrind/instritem.h b/kcachegrind/kcachegrind/instritem.h index 8f04b47a..ab5467d9 100644 --- a/kcachegrind/kcachegrind/instritem.h +++ b/kcachegrind/kcachegrind/instritem.h @@ -28,26 +28,26 @@ class InstrView; -class InstrItem: public QListViewItem +class InstrItem: public TQListViewItem { public: // for messages - InstrItem(InstrView* iv, TQListView* parent, + InstrItem(InstrView* iv, TQListView* tqparent, Addr addr, const TQString&); // for instruction lines - InstrItem(InstrView* iv, TQListView* parent, + InstrItem(InstrView* iv, TQListView* tqparent, Addr addr, bool inside, const TQString&, const TQString&, const TQString&, TraceInstr* instr); // for call instr - InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, + InstrItem(InstrView* iv, TQListViewItem* tqparent, Addr addr, TraceInstr* instr, TraceInstrCall* instrCall); // for jump lines - InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr, + InstrItem(InstrView* iv, TQListViewItem* tqparent, Addr addr, TraceInstr* instr, TraceInstrJump* instrJump); Addr addr() const { return _addr; } @@ -58,7 +58,7 @@ public: int compare(TQListViewItem * i, int col, bool ascending ) const; void paintCell(TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); + int column, int width, int tqalignment ); int width( const TQFontMetrics& fm, const TQListView* lv, int c ) const; diff --git a/kcachegrind/kcachegrind/instrview.cpp b/kcachegrind/kcachegrind/instrview.cpp index 8a67296e..24e83cf6 100644 --- a/kcachegrind/kcachegrind/instrview.cpp +++ b/kcachegrind/kcachegrind/instrview.cpp @@ -110,9 +110,9 @@ static bool parseLine(char* buf, Addr& addr, // -InstrView::InstrView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +InstrView::InstrView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { _showHexCode = DEFAULT_SHOWHEXCODE; _lastHexCodeWidth = 50; @@ -132,8 +132,8 @@ InstrView::InstrView(TraceItemView* parentView, addColumn( i18n( "Source Position" ) ); setAllColumnsShowFocus(true); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)), @@ -188,11 +188,11 @@ void InstrView::context(TQListViewItem* i, const TQPoint & p, int c) TQString name = f->name(); if ((int)name.length()>Configuration::maxSymbolLength()) name = name.left(Configuration::maxSymbolLength()) + "..."; - popup.insertItem(i18n("Go to '%1'").arg(name), 93); + popup.insertItem(i18n("Go to '%1'").tqarg(name), 93); popup.insertSeparator(); } else if (instr) { - popup.insertItem(i18n("Go to Address %1").arg(instr->name()), 93); + popup.insertItem(i18n("Go to Address %1").tqarg(instr->name()), 93); popup.insertSeparator(); } @@ -615,11 +615,11 @@ bool InstrView::fillInstrRange(TraceFunction* function, // generate command TQString popencmd, objfile; objfile = function->object()->name(); - objfile = objfile.replace(TQRegExp("[\"']"), ""); // security... + objfile = objfile.tqreplace(TQRegExp("[\"']"), ""); // security... popencmd = TQString("objdump -C -d " "--start-address=0x%1 --stop-address=0x%2 \"%3\"") - .arg(dumpStartAddr.toString()).arg(dumpEndAddr.toString()) - .arg(objfile); + .tqarg(dumpStartAddr.toString()).tqarg(dumpEndAddr.toString()) + .tqarg(objfile); if (1) qDebug("Running '%s'...", popencmd.ascii()); // and run... @@ -875,7 +875,7 @@ bool InstrView::fillInstrRange(TraceFunction* function, "There are %n cost lines without assembler code.", noAssLines)); new InstrItem(this, this, 2, i18n("This happens because the code of")); - new InstrItem(this, this, 3, TQString(" %1").arg(objfile)); + new InstrItem(this, this, 3, TQString(" %1").tqarg(objfile)); new InstrItem(this, this, 4, i18n("does not seem to match the profile data file.")); new InstrItem(this, this, 5, ""); diff --git a/kcachegrind/kcachegrind/instrview.h b/kcachegrind/kcachegrind/instrview.h index c807a0a4..fa175ae4 100644 --- a/kcachegrind/kcachegrind/instrview.h +++ b/kcachegrind/kcachegrind/instrview.h @@ -33,10 +33,11 @@ class InstrView : public TQListView, public TraceItemView friend class InstrItem; Q_OBJECT + TQ_OBJECT public: - InstrView(TraceItemView* parentView, - TQWidget* parent = 0, const char* name = 0); + InstrView(TraceItemView* tqparentView, + TQWidget* tqparent = 0, const char* name = 0); virtual TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/listutils.cpp b/kcachegrind/kcachegrind/listutils.cpp index 5c4a838c..0053646d 100644 --- a/kcachegrind/kcachegrind/listutils.cpp +++ b/kcachegrind/kcachegrind/listutils.cpp @@ -85,14 +85,14 @@ TQPixmap percentagePixmap(int w, int h, int percent, TQColor c, bool framed) if (w<3) return TQPixmap(); TQPixmap pix(w, h); - pix.fill(Qt::white); + pix.fill(TQt::white); TQPainter p(&pix); - p.setPen(Qt::black); + p.setPen(TQt::black); if (framed) p.drawRect(0, 0, w, h); // inside - p.setPen(Qt::NoPen); + p.setPen(TQt::NoPen); p.setBrush(c); p.drawRect(ix1, iy1, filled-1,ih); @@ -144,9 +144,9 @@ TQPixmap partitionPixmap(int w, int h, if (w<3) return TQPixmap(); TQPixmap pix(w, h); - pix.fill(Qt::white); + pix.fill(TQt::white); TQPainter p(&pix); - p.setPen(Qt::black); + p.setPen(TQt::black); if (framed) p.drawRect(0, 0, w, h); @@ -173,7 +173,7 @@ TQPixmap partitionPixmap(int w, int h, if (x2>=iw) x2=iw-1; // inside - p.setPen(Qt::NoPen); + p.setPen(TQt::NoPen); p.setBrush(c); p.drawRect(x1, iy1, x2-x1+1, ih); diff --git a/kcachegrind/kcachegrind/loader.h b/kcachegrind/kcachegrind/loader.h index 2c9937b9..ee374054 100644 --- a/kcachegrind/kcachegrind/loader.h +++ b/kcachegrind/kcachegrind/loader.h @@ -46,9 +46,10 @@ typedef TQPtrList<Loader> LoaderList; * KCachegrind will use the first matching loader. */ -class Loader: public QObject +class Loader: public TQObject { Q_OBJECT + TQ_OBJECT public: Loader(TQString name, TQString desc); @@ -66,7 +67,7 @@ public: TQString description() const { return _description; } signals: - void updateStatus(TQString, int); + void updatetqStatus(TQString, int); private: TQString _name, _description; diff --git a/kcachegrind/kcachegrind/multiview.cpp b/kcachegrind/kcachegrind/multiview.cpp index 4288e2df..014276df 100644 --- a/kcachegrind/kcachegrind/multiview.cpp +++ b/kcachegrind/kcachegrind/multiview.cpp @@ -34,8 +34,8 @@ // MultiView // -MultiView::MultiView(TopLevel* top, TQWidget* parent, const char* name) - : TQSplitter(parent, name), TraceItemView(0, top) +MultiView::MultiView(TopLevel* top, TQWidget* tqparent, const char* name) + : TQSplitter(tqparent, name), TraceItemView(0, top) { // default setOrientation(Qt::Horizontal); @@ -65,7 +65,7 @@ void MultiView::appendView() int n = _views.count()+1; TabView* tv = new TabView(this, this, - TQString("TabView-%1").arg(n).ascii()); + TQString("TabView-%1").tqarg(n).ascii()); connect(tv, TQT_SIGNAL(activated(TabView*)), this, TQT_SLOT(tabActivated(TabView*)) ); _views.append(tv); @@ -128,7 +128,7 @@ void MultiView::selected(TraceItemView* sender, TraceItem* i) // we react only on selection changes of the active TabView if (sender != (TraceItemView*)_active) return; - _views.findRef(_active); + _views.tqfindRef(_active); TabView* next = _views.next(); if (!next) next = _views.first(); @@ -176,7 +176,7 @@ void MultiView::readViewConfig(KConfig* c, KConfigGroup* g = configGroup(c, prefix, postfix); int n = g->readNumEntry("Panels", 1); setChildCount(n); - setOrientation( (g->readEntry("Orientation") == TQString("Horizontal")) ? + setOrientation( (g->readEntry("Qt::Orientation") == TQString("Horizontal")) ? Qt::Horizontal : Qt::Vertical ); setSizes(g->readIntListEntry("PanelSizes")); @@ -187,7 +187,7 @@ void MultiView::readViewConfig(KConfig* c, TabView* tv, *activeTV = 0; for(tv=_views.first();tv;tv=_views.next()) { if (tv->name() == active) activeTV=tv; - tv->readViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()), + tv->readViewConfig(c, TQString("%1-%2").tqarg(prefix).tqarg(tv->name()), postfix, withOptions); } @@ -207,7 +207,7 @@ void MultiView::saveViewConfig(KConfig* c, KConfigGroup g(c, (prefix+postfix).ascii()); g.writeEntry("Panels", childCount()); - g.writeEntry("Orientation", + g.writeEntry("Qt::Orientation", (orientation() == Qt::Horizontal) ? "Horizontal" : "Vertical"); @@ -216,7 +216,7 @@ void MultiView::saveViewConfig(KConfig* c, TabView* tv; for(tv=_views.first();tv;tv=_views.next()) - tv->saveViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()), + tv->saveViewConfig(c, TQString("%1-%2").tqarg(prefix).tqarg(tv->name()), postfix, withOptions); } diff --git a/kcachegrind/kcachegrind/multiview.h b/kcachegrind/kcachegrind/multiview.h index b4b53928..393638ba 100644 --- a/kcachegrind/kcachegrind/multiview.h +++ b/kcachegrind/kcachegrind/multiview.h @@ -34,9 +34,10 @@ class MultiView : public TQSplitter, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - MultiView(TopLevel* top, TQWidget* parent = 0, const char* name = 0); + MultiView(TopLevel* top, TQWidget* tqparent = 0, const char* name = 0); TQWidget* widget() { return this; } TabView* activeTabView() const { return _active; } diff --git a/kcachegrind/kcachegrind/partgraph.cpp b/kcachegrind/kcachegrind/partgraph.cpp index 11f4cd29..a7fd746a 100644 --- a/kcachegrind/kcachegrind/partgraph.cpp +++ b/kcachegrind/kcachegrind/partgraph.cpp @@ -29,8 +29,8 @@ // PartAreaWidget -PartAreaWidget::PartAreaWidget(TQWidget* parent, const char* name) - : TreeMapWidget(new BasePartItem(), parent, name) +PartAreaWidget::PartAreaWidget(TQWidget* tqparent, const char* name) + : TreeMapWidget(new BasePartItem(), tqparent, name) { _data = 0; _function = 0; @@ -90,7 +90,7 @@ void PartAreaWidget::refreshParts() { // rebuild only subparts to keep part selection state TreeMapItem* i; - TreeMapItemList* l = base()->children(); + TreeMapItemList* l = base()->tqchildren(); if (l) for (i=l->first();i;i=l->next()) i->refresh(); @@ -115,7 +115,7 @@ void PartAreaWidget::setGroupType(TraceCost::CostType gt) // rebuild hierarchy below parts. // thus, selected parts stay selected TreeMapItem* i; - TreeMapItemList* l = base()->children(); + TreeMapItemList* l = base()->tqchildren(); if (l) for (i=l->first();i;i=l->next()) i->refresh(); @@ -125,13 +125,13 @@ void PartAreaWidget::setGroupType(TraceCost::CostType gt) bool PartAreaWidget::isHidden(TracePart* part) const { - return (_hiddenParts.containsRef(part)>0); + return (_hiddenParts.tqcontainsRef(part)>0); } TQColor PartAreaWidget::groupColor(TraceFunction* f) const { if (!f) - return colorGroup().button(); + return tqcolorGroup().button(); return Configuration::functionColor(_groupType, f); } @@ -156,15 +156,15 @@ TQString PartAreaWidget::tipString(TreeMapItem* i) const itemTip += "\n"; tip = itemTip + tip; - i = i->parent(); + i = i->tqparent(); count++; } // skip to part - while (i && i->rtti()==3) i = i->parent(); + while (i && i->rtti()==3) i = i->tqparent(); if (i && i->rtti()==2) { - itemTip = i18n("Profile Part %1").arg(i->text(0)); + itemTip = i18n("Profile Part %1").tqarg(i->text(0)); if (!i->text(1).isEmpty()) itemTip += " (" + i->text(1) + ")"; @@ -201,9 +201,9 @@ void BasePartItem::setData(TraceData* data) refresh(); } -TreeMapItemList* BasePartItem::children() +TreeMapItemList* BasePartItem::tqchildren() { - if (!_data) return _children; + if (!_data) return _tqchildren; if (!initialized()) { // qDebug("Create Parts (%s)", name().ascii()); @@ -216,7 +216,7 @@ TreeMapItemList* BasePartItem::children() addItem(new PartItem(part)); } - return _children; + return _tqchildren; } TQString BasePartItem::text(int textNo) const @@ -228,13 +228,13 @@ TQString BasePartItem::text(int textNo) const if (_data->parts().count() == 0) return i18n("(no part)"); } - return TQString::null; + return TQString(); } TQColor BasePartItem::backColor() const { - return widget()->colorGroup().base(); + return widget()->tqcolorGroup().base(); } double BasePartItem::value() const @@ -263,7 +263,7 @@ TQString PartItem::text(int textNo) const return _p->prettyName(); if (textNo != 1) - return TQString::null; + return TQString(); TraceCostType* ct; PartAreaWidget* w = (PartAreaWidget*)widget(); @@ -276,7 +276,7 @@ TQString PartItem::text(int textNo) const TraceCost* t = _p->data()->totals(); double p = 100.0 * v / t->subCost(ct); return TQString("%1 %") - .arg(p, 0, 'f', Configuration::percentPrecision()); + .tqarg(p, 0, 'f', Configuration::percentPrecision()); } return v.pretty(); } @@ -324,9 +324,9 @@ double PartItem::sum() const return 0.0; } -TreeMapItemList* PartItem::children() +TreeMapItemList* PartItem::tqchildren() { - if (initialized()) return _children; + if (initialized()) return _tqchildren; TraceCost* c; // qDebug("Create Part subitems (%s)", name().ascii()); @@ -339,7 +339,7 @@ TreeMapItemList* PartItem::children() if (c) addItem(new SubPartItem(c)); } - return _children; + return _tqchildren; } @@ -397,7 +397,7 @@ TreeMapItemList* PartItem::children() break; } - return _children; + return _tqchildren; } @@ -426,7 +426,7 @@ TQString SubPartItem::text(int textNo) const } if (textNo != 1) - return TQString::null; + return TQString(); TraceCostType* ct; PartAreaWidget* w = (PartAreaWidget*)widget(); @@ -443,7 +443,7 @@ TQString SubPartItem::text(int textNo) const _partCostItem->part() : _partCostItem->part()->data()->totals(); double p = 100.0 * v / t->subCost(ct); return TQString("%1 %") - .arg(p, 0, 'f', Configuration::percentPrecision()); + .tqarg(p, 0, 'f', Configuration::percentPrecision()); } return v.pretty(); } @@ -491,7 +491,7 @@ double SubPartItem::sum() const return 0.0; } -TreeMapItemList* SubPartItem::children() +TreeMapItemList* SubPartItem::tqchildren() { if (!initialized()) { // qDebug("Create Part sub-subitems (%s)", name().ascii()); @@ -499,7 +499,7 @@ TreeMapItemList* SubPartItem::children() PartAreaWidget* w = (PartAreaWidget*)widget(); if (depth()-2 > w->callLevels()) - return _children; + return _tqchildren; if (w->visualisation() == PartAreaWidget::Inclusive) { TracePartCall* call; @@ -517,7 +517,7 @@ TreeMapItemList* SubPartItem::children() } } - return _children; + return _tqchildren; } diff --git a/kcachegrind/kcachegrind/partgraph.h b/kcachegrind/kcachegrind/partgraph.h index 7b8056a7..1477382e 100644 --- a/kcachegrind/kcachegrind/partgraph.h +++ b/kcachegrind/kcachegrind/partgraph.h @@ -29,12 +29,13 @@ class PartAreaWidget: public TreeMapWidget { Q_OBJECT + TQ_OBJECT public: // Visualisation inside of trace parts enum VisualisationMode { NoVisualisation, Partitioning, Inclusive }; - PartAreaWidget(TQWidget* parent=0, const char* name=0); + PartAreaWidget(TQWidget* tqparent=0, const char* name=0); void setData(TraceData* d); void setCostType(TraceCostType* ct); @@ -82,7 +83,7 @@ public: double value() const; TQString text(int) const; int borderWidth() const { return 0; } - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: @@ -100,7 +101,7 @@ public: int borderWidth() const { return 0; } TQString text(int) const; TQPixmap pixmap(int) const; - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: @@ -119,7 +120,7 @@ public: SplitMode splitMode() const { return Vertical; } TQString text(int) const; TQPixmap pixmap(int) const; - TreeMapItemList* children(); + TreeMapItemList* tqchildren(); TQColor backColor() const; private: diff --git a/kcachegrind/kcachegrind/partlistitem.cpp b/kcachegrind/kcachegrind/partlistitem.cpp index 40c2db36..f23db9a4 100644 --- a/kcachegrind/kcachegrind/partlistitem.cpp +++ b/kcachegrind/kcachegrind/partlistitem.cpp @@ -33,10 +33,10 @@ // PartListItem -PartListItem::PartListItem(TQListView* parent, TraceCostItem* costItem, +PartListItem::PartListItem(TQListView* tqparent, TraceCostItem* costItem, TraceCostType* ct, TraceCost::CostType gt, TracePart* part) - :TQListViewItem(parent) + :TQListViewItem(tqparent) { _partCostItem = costItem->findDepFromPart(part); _part = part; @@ -46,7 +46,7 @@ PartListItem::PartListItem(TQListView* parent, TraceCostItem* costItem, #if 0 TQString partName = TQString::number(part->partNumber()); if (part->data()->maxThreadID() >1) - partName += i18n(" (Thread %1)").arg(part->threadID()); + partName += i18n(" (Thread %1)").tqarg(part->threadID()); setText(0, partName); #else setText(0, _part->prettyName()); @@ -107,7 +107,7 @@ void PartListItem::update() double pure = 100.0 * _pure / selfTotal; if (Configuration::showPercentage()) { setText(2, TQString("%1") - .arg(pure, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure, 0, 'f', Configuration::percentPrecision())); } else setText(2, _partCostItem->prettySubCost(_costType)); @@ -123,7 +123,7 @@ void PartListItem::update() double sum = 100.0 * _sum / total; if (Configuration::showPercentage()) { setText(1, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); } else setText(1, _sum.pretty()); diff --git a/kcachegrind/kcachegrind/partlistitem.h b/kcachegrind/kcachegrind/partlistitem.h index 6704f51e..c395b239 100644 --- a/kcachegrind/kcachegrind/partlistitem.h +++ b/kcachegrind/kcachegrind/partlistitem.h @@ -29,10 +29,10 @@ * * Note: on a cost item / percentage change, the list is rebuild */ -class PartListItem: public QListViewItem +class PartListItem: public TQListViewItem { public: - PartListItem(TQListView* parent, TraceCostItem* costItem, + PartListItem(TQListView* tqparent, TraceCostItem* costItem, TraceCostType* ct, TraceCost::CostType gt, TracePart* part); int compare(TQListViewItem * i, int col, bool ascending ) const; diff --git a/kcachegrind/kcachegrind/partselection.cpp b/kcachegrind/kcachegrind/partselection.cpp index dfd1b096..3b1e6063 100644 --- a/kcachegrind/kcachegrind/partselection.cpp +++ b/kcachegrind/kcachegrind/partselection.cpp @@ -17,7 +17,7 @@ */ /* - * For part file selection, to be put into a QDockWindow + * For part file selection, to be put into a TQDockWindow */ #include <tqtimer.h> @@ -36,8 +36,8 @@ #include "partselection.h" #include "partgraph.h" -PartSelection::PartSelection( TQWidget* parent, const char* name) - : PartSelectionBase(parent, name) +PartSelection::PartSelection( TQWidget* tqparent, const char* name) + : PartSelectionBase(tqparent, name) { _data = 0; _costType = 0; @@ -148,7 +148,7 @@ void PartSelection::currentChangedSlot(TreeMapItem* i, bool kbd) TQString str = i->text(0); if (!i->text(1).isEmpty()) str += " (" + i->text(1) + ")"; - TQString msg = i18n("Profile Part Overview: Current is '%1'").arg(str); + TQString msg = i18n("Profile Part Overview: Current is '%1'").tqarg(str); emit showMessage(msg, 5000); if (_showInfo) fillInfo(); @@ -203,7 +203,7 @@ void PartSelection::selectionChanged() TracePart* part; // if nothing is selected, activate all parts - TreeMapItemList* list = partAreaWidget->base()->children(); + TreeMapItemList* list = partAreaWidget->base()->tqchildren(); if (!list) return; for (i=list->first();i;i=list->next()) @@ -235,11 +235,11 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list) kdDebug() << "Entering PartSelection::activePartsChangedSlot" << endl; TreeMapItem* i; - TreeMapItemList l = *partAreaWidget->base()->children(); + TreeMapItemList l = *partAreaWidget->base()->tqchildren(); // first deselect inactive, then select active (makes current active) for (i=l.first();i;i=l.next()) { TracePart* part = ((PartItem*)i)->part(); - bool active = (list.containsRef(part)>0); + bool active = (list.tqcontainsRef(part)>0); if (!active && partAreaWidget->isSelected(i)) { #if 0 qDebug("PartSelection::partsChangedSlot: Part %s changed to unselected.", @@ -251,7 +251,7 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list) } for (i=l.first();i;i=l.next()) { TracePart* part = ((PartItem*)i)->part(); - bool active = (list.containsRef(part)>0); + bool active = (list.tqcontainsRef(part)>0); if (active && !partAreaWidget->isSelected(i)) { #if 0 qDebug("PartSelection::partsChangedSlot: Part %s changed to selected.", @@ -310,7 +310,7 @@ void PartSelection::contextMenuRequested(TreeMapItem* i, str = i18n("Select") + " '" + ni->text(0) + "'"; popup.insertItem(str, id); - ni = ni->parent(); + ni = ni->tqparent(); id++; } } @@ -365,7 +365,7 @@ void PartSelection::contextMenuRequested(TreeMapItem* i, if (r>=100) { TreeMapItem* ci = i; while (ci && r>100) { - ci = ci->parent(); + ci = ci->tqparent(); r--; } doubleClicked(ci); @@ -381,7 +381,7 @@ void PartSelection::contextMenuRequested(TreeMapItem* i, case 2: // select all parts { - TreeMapItemList list = *partAreaWidget->base()->children(); + TreeMapItemList list = *partAreaWidget->base()->tqchildren(); partAreaWidget->setRangeSelection(list.first(), list.last(), true); } break; @@ -545,7 +545,7 @@ void PartSelection::fillInfo() TQString info = _data->activePartRange(); TreeMapItem* i = partAreaWidget->current(); - while (i && i->rtti()!=2) i = i->parent(); + while (i && i->rtti()!=2) i = i->tqparent(); if (i) { TracePart* part = ((PartItem*)i)->part(); diff --git a/kcachegrind/kcachegrind/partselection.h b/kcachegrind/kcachegrind/partselection.h index b3ea10ba..dfdeff17 100644 --- a/kcachegrind/kcachegrind/partselection.h +++ b/kcachegrind/kcachegrind/partselection.h @@ -18,7 +18,7 @@ /* * PartSelection for KCachegrind - * For part file selection, to be put into a QDockWindow + * For part file selection, to be put into a TQDockWindow */ #ifndef PARTSELECTION_H @@ -38,9 +38,10 @@ class TreeMapItem; class PartSelection: public PartSelectionBase { Q_OBJECT + TQ_OBJECT public: - PartSelection( TQWidget* parent = 0, const char* name = 0); + PartSelection( TQWidget* tqparent = 0, const char* name = 0); ~PartSelection(); TraceData* data() { return _data; } diff --git a/kcachegrind/kcachegrind/partselectionbase.ui b/kcachegrind/kcachegrind/partselectionbase.ui index 3267f49a..f3505368 100644 --- a/kcachegrind/kcachegrind/partselectionbase.ui +++ b/kcachegrind/kcachegrind/partselectionbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>PartSelectionBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>PartSelectionBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -37,14 +37,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>50</height> </size> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>rangeLabel</cstring> </property> @@ -85,5 +85,5 @@ <data format="XPM.GZ" length="5230">789c9597db4e1d4b0e86eff31428be8b46b5fb54dd551acd051020211c4320c0682eecaa5e9ccf90005bf3ee53cbbfe9d9c9c548a38ea27c2977b5cbfe6dd7fae3c3c2e1cee6c2873fde3d3cf2e3595a48a77cbff0213f5d5dbdfcf35ffff8f3ddfba65998fff161a179ffb777ef771f17d2c2d6cdf53807c705a889cdac6ee72c47736eebd637b5f2b672d70ecd30e744ca7d9b9a4ad7579587363433e527e5d072abefbb03636978ceb4a31c5bc13a91716ad41f89e0aec2fe74abcc6d6ad5f9e4945357375ef75f997357751dd61d19c71afb61bdef421b951f274ebaffb6716cb3f2b2f230f18d3183dd95b1b441d7d59f2e94757ccf1b27eceff69563618d0f5dcfd9d7beeb7a5dd7f3fac6fb4ee32b87c619f1168d976f7d6ff6df26d6ef4b301e1bac7f54f63e747a5e87f5c173276aff605c22a8fefc540e5e3af5972f956359577bf2c6d978cb78d6697edc9eb2f8b143fed7945359d778b0e6c3e7be81bf7465dce23cf4ac3c16567f19fecefaae53bd081b7baccbb131b7d05f679ca03f27c6b9d1f388c6bbaffab7f80dca4d1fed7bfafdbeedb9533d490f1e2ae8d5693ccacb83d77cd027e3d4416faa97beefa3d7f8f086f168f9d9020f43a3f5c5aa877e28eb88f74fe319becfaa873e0c15de775f95639f3dec37c143d361bf2be3cef4b76bdcb7d84ff5d2cbd0227facf1ecd360fa67d54b9f078ffcd10f636e11ff53e3847853ad3c1b668837e9fe43358c2df45a81430b3db2e6676842d368fd48abdc068b87e0fd2e788bf792b21f861e7afd0e0e5ce37dcdd7d0872218e5d789f57b3218a71ae7bb501eca3af67b510e21c05fd27a1b6218ac3ef17d0ed68fe8cb1be3fc6e5159863ca0bfed824340fe687d62c4838c23f677f0370de380fcdd2be7e03dfab1d6cf300bcd80fa80bfb358dbf9547fa18abe413d68fe421d63ade7737aded094cf63fdcc38f4d0bfee17dac2d08380a3a0dff24cb90bdc23ffaa87e0636c912fed87612e38d4df1e982bc4dbdd29872001f14aca319413eb793e83cbfbe8af27606e4c0f5f8d3bcb7763ec6b8da73b57e69083d61f9d82b9b5fada31f635fcaf8d7b7b5ffb41f16e34ff34fe214dfc0c8e1ef1a22330bfcdc345e31e4c33e3c1e6e181b1609e3ac43f8759803e8cd9f2e7e0ff18ab80ef5d8239e2fc0ef129f90ff0bf0773347fee8d13ce279bc6b34af5c61abf58157bf4b765b05435f4abfec726968c2b67e536fa80fe388279067f680d2c750dff75fe9766da07e44bc02521ba4e1d584c1fb261dcc23fd97f63f8c3af136bfc687362c4e76962ed8fac7a2ecdb7853f7c63ec6bf467bd3fc421c680780c60b6f9275fc045aea84fadaf18a2e0fc04ff0237bd9e8fefc0d236e8ef3f8d83c57fdd38daf94edeb886be74fec618b3ed7f3731e66b0fe67a403e76c0454ef8de9231dbfe9f8dc5fc47be38a6887ad2f950964d2fdc1a27d3c7b6710693f6ef9864b4fdb4ffc6cc5540fea0972c339c87afc1c9f4443a5fe2c84d40bd2f82cb3ae6c7b1716dbc37b1e68bf5be118b7e3dead78125d87d0bfa99bd7d8fb78c1bdb4fcfcfd51bcb9d716bebda3fb8966cf7cf57709103f2e327c6fe5a2fdc4ab4fb01deef5283fa65d50ffb54c13fd67ec37d61e845fb070f8571df7c341eec7e7a691c6ae453fb771937d1fa999ebfa43358bf573d3327c6fdd0a9de59b87414e59f60911ef3ff07380d16bf0b63b6fbb8ce0f4e523a80ee8ff8a5f21fe83f384f2e8cf9d419db7d4bb4bff32cb1dd871ae38c79417962dd9f8f2786bfaa3fa992ddbf68d5d8d6797d62dc27b4bf4a9bdeee5be7c619efbb169c2b9bb7aa67e972857a67d59bf8943cf4a6f5237dae3b9c3f4f8cef5713637e6a3c6548e546a7eb87e0b28e7cf7c68ddd2fb15f28acf166bd2f484c19f921f8cbc57de84ff52c397b8f7e178d7bbb7f7e9f18f743d593ccd210d12f9e8c05fd8417c1e5e704e2afefa7aa5cf850ff4fc6a1473debfc4d7561c4ebd3c48897f69fd4e4d8eb7e4efb736a0b23fe9adfd465bb3f388d6ff22933fa1df6f7597ad483c62371f6e6ff8671b6f89e198fb8cfb0ea3f49619c6f6562cc27d5474a7906e6b589d1df549f29e78479450fe0b1c2fc67d5731a0ba33ffc97a167fd7d92ebb1b1f9a87acdcdd8a23ff2e3c4a81fed0fb91bbb88f8e9f772f9b9c6b8bfac187bd41febbcc8c35831f4bb6edc227eeec8b847bc58ef0f398d91a1179d6f391746bdebfd60ac4716b0180bd8a97e473f8ea2dfdb7d9c3f8e1cff8f8760057b27e57f92cb6e743377e24efff29cb97377e12edd55b190c99eddb5bb71b7eeceddbb07f7e89edc0ff7d33dbb17f7ea16dd925b761fdd8a63d8174f52b15e756bee93fbecd6dd17b7e136dd96db763b6ed77d2dd67bee9bdb77078ed49e8b27b7c5fabb3b7447eed855ae768d6bcbd339ef7a37b8e022392a2734fbd1dd119350a24c23cde8844ee98ccee9c2f9c2977445d77443b793fd8ceee89e1ee8919ee807fdb4e7995ee8b5d82fd252b15ffe8bfd097da4155aa535fa34597fa6f5f2f717da28f69bb445dbb433d99fd22e7da53dfa3659efd3017da7c3f2af233aa68aeadfec1b6aa9236fd63d0d14ca15c0719913737b965fedcbf0c83cc29a677cc2a77cc6e77cc1977cc5d7c5fee637fbdbb2db9d5adff343b17ee427fec1737ee69762fffa9bfd222ff17259fdc82bbcca6bfc893ff33a7fe10ddee42ddee69ddfec77f92beff137dee703fece877cc4c7aee58a6b6ee8b8fc10ed7eb13f635f9a4bc5e54719477152ba671977a505c84845c57222a7bfd89fcb999ccb855cca955cbfc5546ee456ee68b14cf67b799047799aec2fdc92fc28999cef567224cff222afb2c85b32e36d599265f9282bb23ad95fba6559934f2593f3e798b74acc8fd5f6b3accb17d9904dd9926db3a7520d1fdd37d9915df95a72599e1291566df7e49beccb817c974339829eb55e56dc7e51ec0d2dcbb1545297a791563af1c5eff2d3beb4faf8562f568f0744745b9e9d5f1f7992d5e412a186ffef7afff7dfdffd077c99ae99</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcachegrind/kcachegrind/partview.cpp b/kcachegrind/kcachegrind/partview.cpp index 470a8dea..24262885 100644 --- a/kcachegrind/kcachegrind/partview.cpp +++ b/kcachegrind/kcachegrind/partview.cpp @@ -37,9 +37,9 @@ // -PartView::PartView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +PartView::PartView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { _inSelectionUpdate = false; @@ -51,9 +51,9 @@ PartView::PartView(TraceItemView* parentView, addColumn( i18n( "Comment" ) ); setAllColumnsShowFocus(true); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); - setColumnAlignment(3, Qt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); + setColumnAlignment(3, TQt::AlignRight); setMinimumHeight(50); setSelectionMode(Extended); @@ -103,8 +103,8 @@ void PartView::context(TQListViewItem* i, const TQPoint & pos, int) TracePart* p = i ? ((PartListItem*) i)->part() : 0; if (p) { - popup.insertItem(i18n("Select '%1'").arg(p->name()), 93); - popup.insertItem(i18n("Hide '%1'").arg(p->name()), 94); + popup.insertItem(i18n("Select '%1'").tqarg(p->name()), 93); + popup.insertItem(i18n("Hide '%1'").tqarg(p->name()), 94); popup.insertSeparator(); } @@ -138,8 +138,8 @@ void PartView::selectionChangedSlot() TraceItem* PartView::canShow(TraceItem* i) { - if (!data()) return 0; - if (data()->parts().count()>1) return i; + if (!TraceItemView::data()) return 0; + if (TraceItemView::data()->parts().count()>1) return i; return 0; } @@ -175,7 +175,7 @@ void PartView::doUpdate(int changeType) for(;item;item = item->nextSibling()) { part = ((PartListItem*)item)->part(); - if (_partList.containsRef(part)>0) { + if (_partList.tqcontainsRef(part)>0) { setSelected(item, true); ensureItemVisible(item); } @@ -214,7 +214,7 @@ void PartView::refresh() TQListViewItem* item = 0; for (part = allParts.first(); part; part = allParts.next()) { - if (hidden.findRef(part)>=0) continue; + if (hidden.tqfindRef(part)>=0) continue; item = new PartListItem(this, f, _costType, _groupType, part); if (part->isActive()) { diff --git a/kcachegrind/kcachegrind/partview.h b/kcachegrind/kcachegrind/partview.h index 03793e36..0d4e882c 100644 --- a/kcachegrind/kcachegrind/partview.h +++ b/kcachegrind/kcachegrind/partview.h @@ -30,10 +30,11 @@ class PartView: public TQListView, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - PartView(TraceItemView* parentView, - TQWidget* parent=0, const char* name=0); + PartView(TraceItemView* tqparentView, + TQWidget* tqparent=0, const char* name=0); virtual TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/sourceitem.cpp b/kcachegrind/kcachegrind/sourceitem.cpp index 40a97ca3..1da4dafb 100644 --- a/kcachegrind/kcachegrind/sourceitem.cpp +++ b/kcachegrind/kcachegrind/sourceitem.cpp @@ -37,11 +37,11 @@ // SourceItem // for source lines -SourceItem::SourceItem(SourceView* sv, TQListView* parent, +SourceItem::SourceItem(SourceView* sv, TQListView* tqparent, int fileno, unsigned int lineno, bool inside, const TQString& src, TraceLine* line) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = sv; _lineno = lineno; @@ -57,17 +57,17 @@ SourceItem::SourceItem(SourceView* sv, TQListView* parent, setText(0, TQString::number(lineno)); TQString s = src; - setText(4, s.replace( TQRegExp("\t"), " " )); + setText(4, s.tqreplace( TQRegExp("\t"), " " )); updateGroup(); updateCost(); } // for call lines -SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent, +SourceItem::SourceItem(SourceView* sv, TQListViewItem* tqparent, int fileno, unsigned int lineno, TraceLine* line, TraceLineCall* lineCall) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = sv; _lineno = lineno; @@ -87,7 +87,7 @@ SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent, else templ += i18n("%n call to '%1'", "%n calls to '%1'", cc); - TQString callStr = templ.arg(_lineCall->call()->calledName()); + TQString callStr = templ.tqarg(_lineCall->call()->calledName()); TraceFunction* calledF = _lineCall->call()->called(); calledF->addPrettyLocation(callStr); @@ -98,10 +98,10 @@ SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent, } // for jump lines -SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent, +SourceItem::SourceItem(SourceView* sv, TQListViewItem* tqparent, int fileno, unsigned int lineno, TraceLine* line, TraceLineJump* lineJump) - : TQListViewItem(parent) + : TQListViewItem(tqparent) { _view = sv; _lineno = lineno; @@ -123,13 +123,13 @@ SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent, TQString jStr; if (_lineJump->isCondJump()) jStr = i18n("Jump %1 of %2 times to %3") - .arg(_lineJump->followedCount().pretty()) - .arg(_lineJump->executedCount().pretty()) - .arg(to); + .tqarg(_lineJump->followedCount().pretty()) + .tqarg(_lineJump->executedCount().pretty()) + .tqarg(to); else jStr = i18n("Jump %1 times to %2") - .arg(_lineJump->executedCount().pretty()) - .arg(to); + .tqarg(_lineJump->executedCount().pretty()) + .tqarg(to); setText(4, jStr); } @@ -184,7 +184,7 @@ void SourceItem::updateCost() TraceCostType* ct = _view->costType(); _pure = ct ? lineCost->subCost(ct) : SubCost(0); if (_pure == 0) { - setText(1, TQString::null); + setText(1, TQString()); setPixmap(1, TQPixmap()); } else { @@ -193,7 +193,7 @@ void SourceItem::updateCost() if (Configuration::showPercentage()) setText(1, TQString("%1") - .arg(pure, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure, 0, 'f', Configuration::percentPrecision())); else setText(1, _pure.pretty()); @@ -203,7 +203,7 @@ void SourceItem::updateCost() TraceCostType* ct2 = _view->costType2(); _pure2 = ct2 ? lineCost->subCost(ct2) : SubCost(0); if (_pure2 == 0) { - setText(2, TQString::null); + setText(2, TQString()); setPixmap(2, TQPixmap()); } else { @@ -212,7 +212,7 @@ void SourceItem::updateCost() if (Configuration::showPercentage()) setText(2, TQString("%1") - .arg(pure2, 0, 'f', Configuration::percentPrecision())); + .tqarg(pure2, 0, 'f', Configuration::percentPrecision())); else setText(2, _pure2.pretty()); @@ -285,7 +285,7 @@ int SourceItem::compare(TQListViewItem * i, int col, bool ascending ) const } void SourceItem::paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ) + int column, int width, int tqalignment ) { TQColorGroup _cg( cg ); @@ -297,7 +297,7 @@ void SourceItem::paintCell( TQPainter *p, const TQColorGroup &cg, if (column == 3) paintArrows(p, _cg, width); else - TQListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, tqalignment ); } void SourceItem::setJumpArray(const TQMemArray<TraceLineJump*>& a) @@ -314,7 +314,7 @@ void SourceItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else sv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); @@ -391,13 +391,13 @@ void SourceItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width) p->drawConvexPolygon(a); p->setPen(c.light()); - p->drawPolyline(a, 0, 5); + p->tqdrawPolyline(a, 0, 5); p->setPen(c.dark()); - p->drawPolyline(a, 4, 2); + p->tqdrawPolyline(a, 4, 2); p->setPen(c.light()); - p->drawPolyline(a, 5, 2); + p->tqdrawPolyline(a, 5, 2); p->setPen(c.dark()); - p->drawPolyline(a, 6, 2); + p->tqdrawPolyline(a, 6, 2); } // draw inner vertical line for start/stop diff --git a/kcachegrind/kcachegrind/sourceitem.h b/kcachegrind/kcachegrind/sourceitem.h index 5f32da4c..532811e0 100644 --- a/kcachegrind/kcachegrind/sourceitem.h +++ b/kcachegrind/kcachegrind/sourceitem.h @@ -28,22 +28,22 @@ class SourceView; -class SourceItem: public QListViewItem +class SourceItem: public TQListViewItem { public: // for source lines - SourceItem(SourceView* sv, TQListView* parent, + SourceItem(SourceView* sv, TQListView* tqparent, int fileno, unsigned int lineno, bool inside, const TQString& src, TraceLine* line = 0); // for call lines - SourceItem(SourceView* sv, TQListViewItem* parent, + SourceItem(SourceView* sv, TQListViewItem* tqparent, int fileno, unsigned int lineno, TraceLine* line, TraceLineCall* lineCall); // for jump lines - SourceItem(SourceView* sv, TQListViewItem* parent, + SourceItem(SourceView* sv, TQListViewItem* tqparent, int fileno, unsigned int lineno, TraceLine* line, TraceLineJump* lineJump); @@ -57,7 +57,7 @@ public: int compare(TQListViewItem * i, int col, bool ascending ) const; void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); + int column, int width, int tqalignment ); int width( const TQFontMetrics& fm, const TQListView* lv, int c ) const; void updateGroup(); diff --git a/kcachegrind/kcachegrind/sourceview.cpp b/kcachegrind/kcachegrind/sourceview.cpp index a3a301c6..cdd3589c 100644 --- a/kcachegrind/kcachegrind/sourceview.cpp +++ b/kcachegrind/kcachegrind/sourceview.cpp @@ -37,9 +37,9 @@ // -SourceView::SourceView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQListView(parent, name), TraceItemView(parentView) +SourceView::SourceView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQListView(tqparent, name), TraceItemView(tqparentView) { _inSelectionUpdate = false; @@ -54,9 +54,9 @@ SourceView::SourceView(TraceItemView* parentView, addColumn( i18n( "Source (unknown)" ) ); setAllColumnsShowFocus(true); - setColumnAlignment(0, Qt::AlignRight); - setColumnAlignment(1, Qt::AlignRight); - setColumnAlignment(2, Qt::AlignRight); + setColumnAlignment(0, TQt::AlignRight); + setColumnAlignment(1, TQt::AlignRight); + setColumnAlignment(2, TQt::AlignRight); setResizeMode(TQListView::LastColumn); connect(this, @@ -113,11 +113,11 @@ void SourceView::context(TQListViewItem* i, const TQPoint & p, int c) TQString name = f->name(); if ((int)name.length()>Configuration::maxSymbolLength()) name = name.left(Configuration::maxSymbolLength()) + "..."; - popup.insertItem(i18n("Go to '%1'").arg(name), 93); + popup.insertItem(i18n("Go to '%1'").tqarg(name), 93); popup.insertSeparator(); } else if (line) { - popup.insertItem(i18n("Go to Line %1").arg(line->name()), 93); + popup.insertItem(i18n("Go to Line %1").tqarg(line->name()), 93); popup.insertSeparator(); } @@ -513,7 +513,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno) new SourceItem(this, this, fileno, 1, false, i18n("with any source line of this function in file")); new SourceItem(this, this, fileno, 2, false, - TQString(" '%1'").arg(sf->function()->prettyName())); + TQString(" '%1'").tqarg(sf->function()->prettyName())); new SourceItem(this, this, fileno, 3, false, i18n("Thus, no annotated source can be shown.")); return; @@ -550,13 +550,13 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno) // do it here, because the source directory could have been set before if (childCount()==0) { setColumnText(4, validSourceFile ? - i18n("Source ('%1')").arg(filename) : + i18n("Source ('%1')").tqarg(filename) : i18n("Source (unknown)")); } else { new SourceItem(this, this, fileno, 0, true, validSourceFile ? - i18n("--- Inlined from '%1' ---").arg(filename) : + i18n("--- Inlined from '%1' ---").tqarg(filename) : i18n("--- Inlined from unknown source ---")); } @@ -564,7 +564,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno) new SourceItem(this, this, fileno, 0, false, i18n("There is no source available for the following function:")); new SourceItem(this, this, fileno, 1, false, - TQString(" '%1'").arg(sf->function()->prettyName())); + TQString(" '%1'").tqarg(sf->function()->prettyName())); if (sf->file()->name().isEmpty()) { new SourceItem(this, this, fileno, 2, false, i18n("This is because no debug information is present.")); @@ -575,14 +575,14 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno) i18n("The function is located in this ELF object:")); new SourceItem(this, this, fileno, 5, false, TQString(" '%1'") - .arg(sf->function()->object()->prettyName())); + .tqarg(sf->function()->object()->prettyName())); } } else { new SourceItem(this, this, fileno, 2, false, i18n("This is because its source file cannot be found:")); new SourceItem(this, this, fileno, 3, false, - TQString(" '%1'").arg(sf->file()->name())); + TQString(" '%1'").tqarg(sf->file()->name())); new SourceItem(this, this, fileno, 4, false, i18n("Add the folder of this file to the source folder list.")); new SourceItem(this, this, fileno, 5, false, diff --git a/kcachegrind/kcachegrind/sourceview.h b/kcachegrind/kcachegrind/sourceview.h index 6856eddb..4c40b13d 100644 --- a/kcachegrind/kcachegrind/sourceview.h +++ b/kcachegrind/kcachegrind/sourceview.h @@ -33,10 +33,11 @@ class SourceView : public TQListView, public TraceItemView friend class SourceItem; Q_OBJECT + TQ_OBJECT public: - SourceView(TraceItemView* parentView, - TQWidget* parent = 0, const char* name = 0); + SourceView(TraceItemView* tqparentView, + TQWidget* tqparent = 0, const char* name = 0); TQWidget* widget() { return this; } TQString whatsThis() const; diff --git a/kcachegrind/kcachegrind/stackbrowser.cpp b/kcachegrind/kcachegrind/stackbrowser.cpp index 78095eb2..843714a9 100644 --- a/kcachegrind/kcachegrind/stackbrowser.cpp +++ b/kcachegrind/kcachegrind/stackbrowser.cpp @@ -172,7 +172,7 @@ TraceFunction* Stack::called(TraceFunction* fn, bool extend) return 0; } -bool Stack::contains(TraceFunction* fn) +bool Stack::tqcontains(TraceFunction* fn) { // cycles are listed on there own if (fn->cycle() == fn) return false; @@ -337,7 +337,7 @@ HistoryItem* StackBrowser::select(TraceFunction* f) } Stack* s = _current->stack(); - if (!s->contains(f)) { + if (!s->tqcontains(f)) { s = s->split(f); if (!s) s = new Stack(f); diff --git a/kcachegrind/kcachegrind/stackbrowser.h b/kcachegrind/kcachegrind/stackbrowser.h index e7d6b802..7e7677fe 100644 --- a/kcachegrind/kcachegrind/stackbrowser.h +++ b/kcachegrind/kcachegrind/stackbrowser.h @@ -29,7 +29,7 @@ public: Stack(TraceFunction*); // extend the stack at top/bottom if possible - bool contains(TraceFunction*); + bool tqcontains(TraceFunction*); void extendBottom(); void extendTop(); diff --git a/kcachegrind/kcachegrind/stackitem.cpp b/kcachegrind/kcachegrind/stackitem.cpp index e3763ab4..3b41740a 100644 --- a/kcachegrind/kcachegrind/stackitem.cpp +++ b/kcachegrind/kcachegrind/stackitem.cpp @@ -31,8 +31,8 @@ // StackItem StackItem::StackItem(StackSelection* ss, - TQListView* parent, TraceFunction* f) - :TQListViewItem(parent) + TQListView* tqparent, TraceFunction* f) + :TQListViewItem(tqparent) { _view = ss; _function = f; @@ -46,8 +46,8 @@ StackItem::StackItem(StackSelection* ss, } StackItem::StackItem(StackSelection* ss, - TQListView* parent, TraceCall* call) - :TQListViewItem(parent) + TQListView* tqparent, TraceCall* call) + :TQListViewItem(tqparent) { _view = ss; _call = call; @@ -85,7 +85,7 @@ void StackItem::updateCost() if (Configuration::showPercentage()) setText(0, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); else setText(0, _call->prettySubCost(ct)); @@ -107,7 +107,7 @@ void StackItem::updateCost() if (Configuration::showPercentage()) setText(1, TQString("%1") - .arg(sum, 0, 'f', Configuration::percentPrecision())); + .tqarg(sum, 0, 'f', Configuration::percentPrecision())); else setText(1, _call->prettySubCost(ct2)); diff --git a/kcachegrind/kcachegrind/stackitem.h b/kcachegrind/kcachegrind/stackitem.h index 1701f010..31e24b75 100644 --- a/kcachegrind/kcachegrind/stackitem.h +++ b/kcachegrind/kcachegrind/stackitem.h @@ -32,12 +32,12 @@ class StackSelection; // for the stack browser -class StackItem: public QListViewItem +class StackItem: public TQListViewItem { public: // for top - StackItem(StackSelection* ss, TQListView* parent, TraceFunction* f); - StackItem(StackSelection* ss, TQListView* parent, TraceCall* c); + StackItem(StackSelection* ss, TQListView* tqparent, TraceFunction* f); + StackItem(StackSelection* ss, TQListView* tqparent, TraceCall* c); TraceFunction* function() { return _function; } TraceCall* call() { return _call; } diff --git a/kcachegrind/kcachegrind/stackselection.cpp b/kcachegrind/kcachegrind/stackselection.cpp index 1080b860..fcba2ab9 100644 --- a/kcachegrind/kcachegrind/stackselection.cpp +++ b/kcachegrind/kcachegrind/stackselection.cpp @@ -19,7 +19,7 @@ /* * StackSelection for KCachegrind * For function selection of a most expected stack, - * to be put into a QDockWindow + * to be put into a TQDockWindow */ #include <tqtimer.h> @@ -35,8 +35,8 @@ #include "stackselection.h" #include "stackitem.h" -StackSelection::StackSelection( TQWidget* parent, const char* name) - : StackSelectionBase(parent, name) +StackSelection::StackSelection( TQWidget* tqparent, const char* name) + : StackSelectionBase(tqparent, name) { _data = 0; _browser = new StackBrowser(); @@ -49,9 +49,9 @@ StackSelection::StackSelection( TQWidget* parent, const char* name) stackList->setSorting(-1); stackList->setAllColumnsShowFocus(true); stackList->setResizeMode(TQListView::LastColumn); - stackList->setColumnAlignment(0, Qt::AlignRight); - stackList->setColumnAlignment(1, Qt::AlignRight); - stackList->setColumnAlignment(2, Qt::AlignRight); + stackList->setColumnAlignment(0, TQt::AlignRight); + stackList->setColumnAlignment(1, TQt::AlignRight); + stackList->setColumnAlignment(2, TQt::AlignRight); stackList->setColumnWidth(0, 50); // 2nd cost column hidden at first (_costType2 == 0) stackList->setColumnWidth(1, 0); diff --git a/kcachegrind/kcachegrind/stackselection.h b/kcachegrind/kcachegrind/stackselection.h index 5d34c7ac..6b71c2b8 100644 --- a/kcachegrind/kcachegrind/stackselection.h +++ b/kcachegrind/kcachegrind/stackselection.h @@ -19,7 +19,7 @@ /* * StackSelection for KCachegrind * For function selection of a most expected stack, - * to be put into a QDockWindow + * to be put into a TQDockWindow */ #ifndef STACKSELECTION_H @@ -36,9 +36,10 @@ class NestedAreaItem; class StackSelection : public StackSelectionBase { Q_OBJECT + TQ_OBJECT public: - StackSelection( TQWidget* parent = 0, const char* name = 0); + StackSelection( TQWidget* tqparent = 0, const char* name = 0); ~StackSelection(); TraceData* data() const { return _data; } diff --git a/kcachegrind/kcachegrind/stackselectionbase.ui b/kcachegrind/kcachegrind/stackselectionbase.ui index 291153bc..b034c85f 100644 --- a/kcachegrind/kcachegrind/stackselectionbase.ui +++ b/kcachegrind/kcachegrind/stackselectionbase.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>StackSelectionBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>StackSelectionBase</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Cost</string> @@ -76,5 +76,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kcachegrind/kcachegrind/tabview.cpp b/kcachegrind/kcachegrind/tabview.cpp index 13ec85d4..d40b284e 100644 --- a/kcachegrind/kcachegrind/tabview.cpp +++ b/kcachegrind/kcachegrind/tabview.cpp @@ -43,16 +43,16 @@ // TabBar -TabBar::TabBar(TabView* v, TQTabWidget* parent, const char *name) - : TQTabBar(parent, name) +TabBar::TabBar(TabView* v, TQTabWidget* tqparent, const char *name) + : TQTabBar(tqparent, name) { - _tabWidget = parent; + _tabWidget = tqparent; _tabView = v; } void TabBar::mousePressEvent(TQMouseEvent *e) { - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { TQTab *tab = selectTab( e->pos() ); TQWidget* page; page = tab ? _tabWidget->page( indexOf( tab->identifier() ) ) :0; @@ -114,8 +114,8 @@ void TabBar::mousePressEvent(TQMouseEvent *e) // Splitter // -Splitter::Splitter(Orientation o, TQWidget* parent, const char* name) - : TQSplitter(o, parent, name) +Splitter::Splitter(Qt::Orientation o, TQWidget* tqparent, const char* name) + : TQSplitter(o, tqparent, name) {} void Splitter::moveEvent(TQMoveEvent* e) @@ -128,8 +128,8 @@ void Splitter::moveEvent(TQMoveEvent* e) void Splitter::checkVisiblity() { - const TQObjectList *l = children(); - TQObjectListIt it( *l ); + const TQObjectList l = childrenListObject(); + TQObjectListIt it( l ); TQObject *obj; while ( (obj = it.current()) != 0 ) { ++it; @@ -145,9 +145,9 @@ void Splitter::checkVisiblity() // TabWidget // -TabWidget::TabWidget(TabView* v, TQWidget* parent, +TabWidget::TabWidget(TabView* v, TQWidget* tqparent, const char* name, WFlags f) - : TQTabWidget(parent, name, f) + : TQTabWidget(tqparent, name, f) { _hasVisibleRect = false; setTabBar(new TabBar(v, this)); @@ -228,11 +228,11 @@ void TabWidget::moveEvent(TQMoveEvent* e) * bottomSplitter mainSplitter */ -TabView::TabView(TraceItemView* parentView, - TQWidget* parent, const char* name) - : TQWidget(parent, name), TraceItemView(parentView) +TabView::TabView(TraceItemView* tqparentView, + TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name), TraceItemView(tqparentView) { - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); _isCollapsed = true; @@ -419,7 +419,7 @@ void TabView::updateVisibility() s.append(100); - // children of mainSplitter + // tqchildren of mainSplitter if (_rightTW->isHidden() != (r == 0)) { if (r == 0) { _rightTW->hide(); @@ -441,7 +441,7 @@ void TabView::updateVisibility() _leftSplitter->show(); } - // children of leftSplitter + // tqchildren of leftSplitter if (_topTW->isHidden() != (t == 0)) { if (t == 0) { _topTW->hide(); @@ -463,7 +463,7 @@ void TabView::updateVisibility() _bottomSplitter->show(); } - // children of bottomSplitter + // tqchildren of bottomSplitter if (_bottomTW->isHidden() != (b == 0)) { if (b == 0) { _bottomTW->hide(); @@ -700,11 +700,11 @@ void TabView::resizeEvent(TQResizeEvent* e) void TabView::selected(TraceItemView*, TraceItem* s) { - // we set selected item for our own children + // we set selected item for our own tqchildren select(s); updateView(); - // still forward to parent + // still forward to tqparent if (_parentView) _parentView->selected(this, s); } @@ -751,19 +751,19 @@ void TabView::readViewConfig(KConfig* c, ++it; TQString n = TQString(v->widget()->name()); - if (topTabs.contains(n)) { + if (topTabs.tqcontains(n)) { moveTab(v->widget(), TraceItemView::Top); if (n == activeT) activeTop = v; } - else if (bottomTabs.contains(n)) { + else if (bottomTabs.tqcontains(n)) { moveTab(v->widget(), TraceItemView::Bottom); if (n == activeB) activeBottom = v; } - else if (leftTabs.contains(n)) { + else if (leftTabs.tqcontains(n)) { moveTab(v->widget(), TraceItemView::Left); if (n == activeL) activeLeft = v; } - else if (rightTabs.contains(n)) { + else if (rightTabs.tqcontains(n)) { moveTab(v->widget(), TraceItemView::Right); if (n == activeR) activeRight = v; } @@ -771,7 +771,7 @@ void TabView::readViewConfig(KConfig* c, if (withOptions) v->readViewConfig(c, TQString("%1-%2") - .arg(prefix).arg(v->widget()->name()), + .tqarg(prefix).tqarg(v->widget()->name()), postfix, true); } if (activeTop) _topTW->showPage(activeTop->widget()); @@ -883,8 +883,8 @@ void TabView::saveViewConfig(KConfig* c, if (withOptions) for (v=_tabs.first();v;v=_tabs.next()) - v->saveViewConfig(c, TQString("%1-%2").arg(prefix) - .arg(v->widget()->name()), postfix, true); + v->saveViewConfig(c, TQString("%1-%2").tqarg(prefix) + .tqarg(v->widget()->name()), postfix, true); } #include "tabview.moc" diff --git a/kcachegrind/kcachegrind/tabview.h b/kcachegrind/kcachegrind/tabview.h index b312c03c..323464e9 100644 --- a/kcachegrind/kcachegrind/tabview.h +++ b/kcachegrind/kcachegrind/tabview.h @@ -37,12 +37,13 @@ class TabView; /** * Subclass of TQTabBar to enable context menu on tabs */ -class TabBar : public QTabBar +class TabBar : public TQTabBar { Q_OBJECT + TQ_OBJECT public: - TabBar(TabView*, TQTabWidget* parent, const char *name = 0); + TabBar(TabView*, TQTabWidget* tqparent, const char *name = 0); protected: void mousePressEvent(TQMouseEvent *e); @@ -54,16 +55,17 @@ class TabBar : public QTabBar /** * Own Splitter: - * Call checkVisiblity for all TabWidget children of the splitter + * Call checkVisiblity for all TabWidget tqchildren of the splitter * on a MoveEvent. This typically is produced when collapsing the widget * inside of another splitter. */ -class Splitter: public QSplitter +class Splitter: public TQSplitter { Q_OBJECT + TQ_OBJECT public: - Splitter(Orientation o, TQWidget* parent = 0, const char* name = 0); + Splitter(Qt::Orientation o, TQWidget* tqparent = 0, const char* name = 0); void checkVisiblity(); protected: @@ -77,13 +79,14 @@ protected: * This is needed to track if this widget is collapsed in a TQSplitter. * - Use own TabBar for context menu */ -class TabWidget: public QTabWidget +class TabWidget: public TQTabWidget { Q_OBJECT + TQ_OBJECT public: - TabWidget(TabView*, TQWidget* parent = 0, + TabWidget(TabView*, TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0); bool hasVisibleRect() { return _hasVisibleRect; } @@ -107,11 +110,12 @@ private: class TabView : public TQWidget, public TraceItemView { Q_OBJECT + TQ_OBJECT public: - TabView(TraceItemView* parentView, - TQWidget* parent = 0, const char* name = 0); + TabView(TraceItemView* tqparentView, + TQWidget* tqparent = 0, const char* name = 0); virtual TQWidget* widget() { return this; } TQString whatsThis() const ; diff --git a/kcachegrind/kcachegrind/toplevel.cpp b/kcachegrind/kcachegrind/toplevel.cpp index 4749f604..cf06a75d 100644 --- a/kcachegrind/kcachegrind/toplevel.cpp +++ b/kcachegrind/kcachegrind/toplevel.cpp @@ -33,12 +33,7 @@ #include <tqsizepolicy.h> #include <tqprogressbar.h> #include <tqfile.h> - -// With Qt 3.1, we can disallow user interaction with long tasks. -// This needs TQEventLoop. Otherwise, TQApplication::processEvents is used. -#if (QT_VERSION-0 >= 0x030100) #include <tqeventloop.h> -#endif #include <kapplication.h> #include <klocale.h> @@ -88,16 +83,16 @@ TopLevel::TopLevel(const char *name) _functionDockShown->setChecked(!_functionDock->isHidden()); connect(_partDock, TQT_SIGNAL(visibilityChanged(bool)), - this, TQT_SLOT(partVisibilityChanged(bool))); + TQT_TQOBJECT(this), TQT_SLOT(partVisibilityChanged(bool))); connect(_stackDock, TQT_SIGNAL(visibilityChanged(bool)), - this, TQT_SLOT(stackVisibilityChanged(bool))); + TQT_TQOBJECT(this), TQT_SLOT(stackVisibilityChanged(bool))); connect(_functionDock, TQT_SIGNAL(visibilityChanged(bool)), - this, TQT_SLOT(functionVisibilityChanged(bool))); + TQT_TQOBJECT(this), TQT_SLOT(functionVisibilityChanged(bool))); #if ENABLE_DUMPDOCK _dumpDockShown->setChecked(!_dumpDock->isHidden()); connect(_dumpDock, TQT_SIGNAL(visibilityChanged(bool)), - this, TQT_SLOT(dumpVisibilityChanged(bool))); + TQT_TQOBJECT(this), TQT_SLOT(dumpVisibilityChanged(bool))); #endif _statusbar = statusBar(); @@ -105,8 +100,8 @@ TopLevel::TopLevel(const char *name) #if 0 // how to do avoid main window resizing on large statusbar label? TQSizePolicy p(TQSizePolicy::Fixed, TQSizePolicy::Expanding); - _statusLabel->setSizePolicy(p); - _statusbar->setSizePolicy(p); + _statusLabel->tqsetSizePolicy(p); + _statusbar->tqsetSizePolicy(p); #endif _statusbar->addWidget(_statusLabel, 1); @@ -135,11 +130,11 @@ TopLevel::TopLevel(const char *name) setAutoSaveSettings(); // restore current state settings (not configuration options) - restoreCurrentState(TQString::null); + restoreCurrentState(TQString()); // if this is the first toplevel, show tip of day if (memberList->count() == 1) - TQTimer::singleShot( 200, this, TQT_SLOT(slotShowTipOnStart()) ); + TQTimer::singleShot( 200, TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOnStart()) ); } void TopLevel::init() @@ -179,19 +174,19 @@ void TopLevel::setupPartSelection(PartSelection* ps) // setup connections from the part selection widget connect(ps, TQT_SIGNAL(activePartsChanged(const TracePartList&)), - this, TQT_SLOT(activePartsChangedSlot(const TracePartList&))); + TQT_TQOBJECT(this), TQT_SLOT(activePartsChangedSlot(const TracePartList&))); connect(ps, TQT_SIGNAL(groupChanged(TraceCostItem*)), - this, TQT_SLOT(setGroupDelayed(TraceCostItem*))); + TQT_TQOBJECT(this), TQT_SLOT(setGroupDelayed(TraceCostItem*))); connect(ps, TQT_SIGNAL(functionChanged(TraceItem*)), - this, TQT_SLOT(setTraceItemDelayed(TraceItem*))); + TQT_TQOBJECT(this), TQT_SLOT(setTraceItemDelayed(TraceItem*))); connect(ps, TQT_SIGNAL(goBack()), _stackSelection, TQT_SLOT(browserBack())); connect(ps, TQT_SIGNAL(partsHideSelected()), - this, TQT_SLOT(partsHideSelectedSlotDelayed())); + TQT_TQOBJECT(this), TQT_SLOT(partsHideSelectedSlotDelayed())); connect(ps, TQT_SIGNAL(partsUnhideAll()), - this, TQT_SLOT(partsUnhideAllSlotDelayed())); + TQT_TQOBJECT(this), TQT_SLOT(partsUnhideAllSlotDelayed())); connect(ps, TQT_SIGNAL(showMessage(const TQString&, int)), _statusbar, TQT_SLOT(message(const TQString&, int))); @@ -231,22 +226,22 @@ void TopLevel::saveTraceSettings() TQString key = traceKey(); KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions")); - pConfig.writeEntry(TQString("CostType%1").arg(key), + pConfig.writeEntry(TQString("CostType%1").tqarg(key), _costType ? _costType->name() : TQString("?")); - pConfig.writeEntry(TQString("CostType2%1").arg(key), + pConfig.writeEntry(TQString("CostType2%1").tqarg(key), _costType2 ? _costType2->name() : TQString("?")); - pConfig.writeEntry(TQString("GroupType%1").arg(key), + pConfig.writeEntry(TQString("GroupType%1").tqarg(key), TraceItem::typeName(_groupType)); if (!_data) return; KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts")); - aConfig.writeEntry(TQString("Count%1").arg(key), _layoutCount); - aConfig.writeEntry(TQString("Current%1").arg(key), _layoutCurrent); + aConfig.writeEntry(TQString("Count%1").tqarg(key), _layoutCount); + aConfig.writeEntry(TQString("Current%1").tqarg(key), _layoutCurrent); saveCurrentState(key); - pConfig.writeEntry(TQString("Group%1").arg(key), - _group ? _group->name() : TQString::null); + pConfig.writeEntry(TQString("Group%1").tqarg(key), + _group ? _group->name() : TQString()); } /** @@ -264,7 +259,7 @@ void TopLevel::restoreCurrentState(TQString postfix) // dock properties (not position, this should be have done before) TQCString group = TQCString("PartOverview"); - if (gList.contains(group+pf)) group += pf; + if (gList.tqcontains(group+pf)) group += pf; KConfigGroup psConfig(kconfig, group); _partSelection->readVisualisationConfig(&psConfig); @@ -327,7 +322,7 @@ void TopLevel::createDocks() "above.</p>")); connect(_stackSelection, TQT_SIGNAL(functionSelected(TraceItem*)), - this, TQT_SLOT(setTraceItemDelayed(TraceItem*))); + TQT_TQOBJECT(this), TQT_SLOT(setTraceItemDelayed(TraceItem*))); _functionDock = new TQDockWindow(TQDockWindow::InDock, this); _functionDock->setCaption(i18n("Flat Profile")); @@ -394,7 +389,7 @@ void TopLevel::createDocks() // Restore QT Dock positions... KConfigGroup dockConfig(KGlobal::config(), TQCString("Docks")); - TQString str = dockConfig.readEntry("Position", TQString::null); + TQString str = dockConfig.readEntry("Position", TQString()); if (0) qDebug("Docks/Position: '%s'", str.ascii()); if (str.isEmpty()) { // default positions @@ -421,7 +416,7 @@ void TopLevel::createDocks() setAppropriate(_functionDock, true); connect( _partDock, TQT_SIGNAL(contextMenuRequested(const TQPoint &)), - this, TQT_SLOT(showDockMenu(const TQPoint &))); + TQT_TQOBJECT(this), TQT_SLOT(showDockMenu(const TQPoint &))); #endif } @@ -454,42 +449,42 @@ void TopLevel::createLayoutActions() action = new KAction( i18n( "&Duplicate" ), KShortcut(KKey("Ctrl+Plus")), - this, TQT_SLOT(layoutDuplicate()), - actionCollection(), "layout_duplicate" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutDuplicate()), + actionCollection(), "tqlayout_duplicate" ); hint = i18n("<b>Duplicate Current Layout</b>" - "<p>Make a copy of the current layout.</p>"); + "<p>Make a copy of the current tqlayout.</p>"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Remove" ), KShortcut(), - this, TQT_SLOT(layoutRemove()), - actionCollection(), "layout_remove" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutRemove()), + actionCollection(), "tqlayout_remove" ); hint = i18n("<b>Remove Current Layout</b>" - "<p>Delete current layout and make the previous active.</p>"); + "<p>Delete current tqlayout and make the previous active.</p>"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Go to Next" ), KShortcut(KKey("Ctrl+Right")), - this, TQT_SLOT(layoutNext()), - actionCollection(), "layout_next" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutNext()), + actionCollection(), "tqlayout_next" ); hint = i18n("Go to Next Layout"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Go to Previous" ), KShortcut(KKey("Ctrl+Left")), - this, TQT_SLOT(layoutPrevious()), - actionCollection(), "layout_previous" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutPrevious()), + actionCollection(), "tqlayout_previous" ); hint = i18n("Go to Previous Layout"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Restore to Default" ), KShortcut(), - this, TQT_SLOT(layoutRestore()), - actionCollection(), "layout_restore" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutRestore()), + actionCollection(), "tqlayout_restore" ); hint = i18n("Restore Layouts to Default"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Save as Default" ), KShortcut(), - this, TQT_SLOT(layoutSave()), - actionCollection(), "layout_save" ); + TQT_TQOBJECT(this), TQT_SLOT(tqlayoutSave()), + actionCollection(), "tqlayout_save" ); hint = i18n("Save Layouts as Default"); action->setWhatsThis( hint ); } @@ -500,12 +495,12 @@ void TopLevel::createMiscActions() TQString hint; KAction* action; - action = KStdAction::openNew(this, TQT_SLOT(newWindow()), actionCollection()); + action = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(newWindow()), actionCollection()); hint = i18n("<b>New</b><p>Open new empty KCachegrind window.</p>"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Add..." ), KShortcut(), - this, TQT_SLOT(addTrace()), + TQT_TQOBJECT(this), TQT_SLOT(addTrace()), actionCollection(), "file_add" ); hint = i18n("<b>Add Profile Data</b>" "<p>This opens an additional profile data file in the current window.</p>"); @@ -518,13 +513,13 @@ void TopLevel::createMiscActions() #else KStdAccel::key(KStdAccel::Reload), #endif - this, TQT_SLOT( reload() ), actionCollection(), "reload" ); + TQT_TQOBJECT(this), TQT_SLOT( reload() ), actionCollection(), "reload" ); hint = i18n("<b>Reload Profile Data</b>" "<p>This loads any new created parts, too.</p>"); action->setWhatsThis( hint ); action = new KAction( i18n( "&Export Graph" ), KShortcut(), - this, TQT_SLOT(exportGraph()), + TQT_TQOBJECT(this), TQT_SLOT(exportGraph()), actionCollection(), "export" ); hint = i18n("<b>Export Call Graph</b>" @@ -540,7 +535,7 @@ void TopLevel::createMiscActions() #else KStdAccel::key(KStdAccel::Redo), #endif - this, TQT_SLOT( forceTrace() ), + TQT_TQOBJECT(this), TQT_SLOT( forceTrace() ), actionCollection(), "dump" ); hint = i18n("<b>Force Dump</b>" "<p>This forces a dump for a Callgrind profile run " @@ -566,20 +561,20 @@ void TopLevel::createMiscActions() "of the program.</p>"); _taDump->setWhatsThis( hint ); - action = KStdAction::open(this, TQT_SLOT(loadTrace()), actionCollection()); + action = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(loadTrace()), actionCollection()); hint = i18n("<b>Open Profile Data</b>" "<p>This opens a profile data file, with possible multiple parts</p>"); action->setToolTip( hint ); action->setWhatsThis( hint ); - _openRecent = KStdAction::openRecent(this, TQT_SLOT(loadTrace(const KURL&)), + _openRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(loadTrace(const KURL&)), actionCollection()); - KStdAction::showStatusbar(this, + KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(toggleStatusBar()), actionCollection()); _partDockShown = new KToggleAction(i18n("Parts Overview"), KShortcut(), - this, TQT_SLOT(togglePartDock()), + TQT_TQOBJECT(this), TQT_SLOT(togglePartDock()), actionCollection(), "settings_show_partdock"); @@ -588,7 +583,7 @@ void TopLevel::createMiscActions() _partDockShown->setWhatsThis( hint ); _stackDockShown = new KToggleAction(i18n("Call Stack"), KShortcut(), - this, TQT_SLOT(toggleStackDock()), + TQT_TQOBJECT(this), TQT_SLOT(toggleStackDock()), actionCollection(), "settings_show_stackdock"); @@ -597,7 +592,7 @@ void TopLevel::createMiscActions() _stackDockShown->setWhatsThis( hint ); _functionDockShown = new KToggleAction(i18n("Function Profile"), KShortcut(), - this, TQT_SLOT(toggleFunctionDock()), + TQT_TQOBJECT(this), TQT_SLOT(toggleFunctionDock()), actionCollection(), "settings_show_profiledock"); @@ -607,7 +602,7 @@ void TopLevel::createMiscActions() #if ENABLE_DUMPDOCK _dumpDockShown = new KToggleAction(i18n("Profile Dumps"), KShortcut(), - this, TQT_SLOT(toggleDumpDock()), + TQT_TQOBJECT(this), TQT_SLOT(toggleDumpDock()), actionCollection(), "settings_show_dumpdock"); @@ -618,7 +613,7 @@ void TopLevel::createMiscActions() _taPercentage = new KToggleAction(i18n("Show Relative Costs"), "percent", KShortcut(), - this, TQT_SLOT(togglePercentage()), + TQT_TQOBJECT(this), TQT_SLOT(togglePercentage()), actionCollection(), "view_percentage"); #if KDE_VERSION >= 0x030290 @@ -632,19 +627,19 @@ void TopLevel::createMiscActions() _taExpanded = new KToggleAction(i18n("Percentage Relative to Parent"), "move", KShortcut(), - this, TQT_SLOT(toggleExpanded()), + TQT_TQOBJECT(this), TQT_SLOT(toggleExpanded()), actionCollection(), "view_expanded"); - hint = i18n("Show percentage costs relative to parent"); + hint = i18n("Show percentage costs relative to tqparent"); _taExpanded->setToolTip( hint ); _taExpanded->setWhatsThis( hint ); - hint = i18n("<b>Show percentage costs relative to parent</b>" + hint = i18n("<b>Show percentage costs relative to tqparent</b>" "<p>If this is switched off, percentage costs are always shown " "relative to the total cost of the profile part(s) that are " "currently browsed. By turning on this option, percentage cost " - "of shown cost items will be relative to the parent cost item." + "of shown cost items will be relative to the tqparent cost item." "<ul><table>" "<tr><td><b>Cost Type</td><td><b>Parent Cost</td></tr>" "<tr><td>Function Cumulative</td><td>Total</td></tr>" @@ -657,7 +652,7 @@ void TopLevel::createMiscActions() _taCycles = new KToggleAction( i18n( "Do Cycle Detection" ), "undo", KShortcut(), - this, TQT_SLOT( toggleCycles() ), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT( toggleCycles() ), actionCollection(), "view_cycles" ); #if KDE_VERSION >= 0x030290 // for KDE 3.3: show another text instead of a checkmark @@ -678,10 +673,10 @@ void TopLevel::createMiscActions() "is the option to switch this off."); _taCycles->setWhatsThis( hint ); - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection()); - KStdAction::configureToolbars(this,TQT_SLOT(configureToolbars()), + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(configureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this),TQT_SLOT(configureToolbars()), actionCollection()); #if 0 action = KStdAction::back(_stackSelection, TQT_SLOT(browserBack()), @@ -706,32 +701,32 @@ void TopLevel::createMiscActions() #else _paUp = new KToolBarPopupAction( i18n( "&Up" ), "up", ALT+Key_Up, - _stackSelection, TQT_SLOT( browserUp() ), + TQT_TQOBJECT(_stackSelection), TQT_SLOT( browserUp() ), actionCollection(), "go_up" ); connect( _paUp->popupMenu(), TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( upAboutToShow() ) ); + TQT_TQOBJECT(this), TQT_SLOT( upAboutToShow() ) ); connect( _paUp->popupMenu(), TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( upActivated( int ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( upActivated( int ) ) ); hint = i18n("<b>Go Up</b>" "<p>Go to last selected caller of current function. " "If no caller was visited, use that with highest cost.</p>"); _paUp->setToolTip( hint ); _paUp->setWhatsThis( hint ); - QPair< KGuiItem, KGuiItem > backForward = KStdGuiItem::backAndForward(); + TQPair< KGuiItem, KGuiItem > backForward = KStdGuiItem::backAndForward(); _paBack = new KToolBarPopupAction( backForward.first, ALT+Key_Left, - _stackSelection, TQT_SLOT(browserBack()), + TQT_TQOBJECT(_stackSelection), TQT_SLOT(browserBack()), actionCollection(), "go_back" ); connect( _paBack->popupMenu(), TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( backAboutToShow() ) ); + TQT_TQOBJECT(this), TQT_SLOT( backAboutToShow() ) ); connect( _paBack->popupMenu(), TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( backActivated( int ) ) ); + TQT_TQOBJECT(this), TQT_SLOT( backActivated( int ) ) ); hint = i18n("Go back in function selection history"); _paBack->setToolTip( hint ); _paBack->setWhatsThis( hint ); _paForward = new KToolBarPopupAction( backForward.second, ALT+Key_Right, - _stackSelection, + TQT_TQOBJECT(_stackSelection), TQT_SLOT(browserForward()), actionCollection(), "go_forward" ); connect( _paForward->popupMenu(), TQT_SIGNAL( aboutToShow() ), @@ -753,7 +748,7 @@ void TopLevel::createMiscActions() // cost types are dependent on loaded data, thus KSelectAction // is filled in setData() connect( _saCost, TQT_SIGNAL(activated(const TQString&)), - this, TQT_SLOT(costTypeSelected(const TQString&))); + TQT_TQOBJECT(this), TQT_SLOT(costTypeSelected(const TQString&))); _saCost2 = new KSelectAction( i18n("Secondary Event Type"), KShortcut(), actionCollection(), "view_cost_type2"); @@ -763,7 +758,7 @@ void TopLevel::createMiscActions() _saCost2->setWhatsThis( hint ); connect( _saCost2, TQT_SIGNAL(activated(const TQString&)), - this, TQT_SLOT(costType2Selected(const TQString&))); + TQT_TQOBJECT(this), TQT_SLOT(costType2Selected(const TQString&))); saGroup = new KSelectAction( i18n("Grouping"), KShortcut(), actionCollection(), "view_group_type"); @@ -782,32 +777,32 @@ void TopLevel::createMiscActions() saGroup->setItems(args); connect( saGroup, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(groupTypeSelected(int))); + TQT_TQOBJECT(this), TQT_SLOT(groupTypeSelected(int))); _taSplit = new KToggleAction(i18n("Split"), "view_left_right", KShortcut(), - this, TQT_SLOT(splitSlot()), + TQT_TQOBJECT(this), TQT_SLOT(splitSlot()), actionCollection(), "view_split"); hint = i18n("Show two information panels"); _taSplit->setToolTip( hint ); _taSplit->setWhatsThis( hint ); - _taSplitDir = new KToggleAction(i18n("Split Horizontal"), + _taSplitDir = new KToggleAction(i18n("SplitQt::Horizontal"), "view_left_right", KShortcut(), - this, TQT_SLOT(splitDirSlot()), + TQT_TQOBJECT(this), TQT_SLOT(splitDirSlot()), actionCollection(), "view_split_dir"); - hint = i18n("Change Split Orientation when main window is split."); + hint = i18n("Change Split Qt::Orientation when main window is split."); _taSplitDir->setToolTip( hint ); _taSplitDir->setWhatsThis( hint ); // copied from KMail... #if KDE_VERSION >= 308 // KDE 3.1 - KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() ); + KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotShowTip() ), actionCollection() ); #else (void) new KAction( KGuiItem( i18n("Tip of the &Day..."), "idea", i18n("Show \"Tip of the Day\"") ), - 0, this, TQT_SLOT(slotShowTip()), + 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowTip()), actionCollection(), "help_show_tip" ); #endif } @@ -925,7 +920,7 @@ void TopLevel::toggleCycles() if (!_data) return; - _data->invalidateDynamicCost(); + _data->tqinvalidateDynamicCost(); _data->updateFunctionCycles(); _partSelection->refresh(); @@ -1057,7 +1052,7 @@ void TopLevel::loadTrace(TQString file) void TopLevel::addTrace() { - KURL url = KFileDialog::getOpenURL(TQString::null, + KURL url = KFileDialog::getOpenURL(TQString(), i18n("cachegrind.out* callgrind.out*|Callgrind Profile Data\n*|All Files"), this, i18n("Add Callgrind Profile Data")); @@ -1107,7 +1102,7 @@ void TopLevel::addTrace(TQString file) void TopLevel::loadDelayed(TQString file) { _loadTraceDelayed = file; - TQTimer::singleShot(0, this, TQT_SLOT(loadTraceDelayed())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(loadTraceDelayed())); } void TopLevel::loadTraceDelayed() @@ -1115,7 +1110,7 @@ void TopLevel::loadTraceDelayed() if (_loadTraceDelayed.isEmpty()) return; loadTrace(_loadTraceDelayed); - _loadTraceDelayed = TQString::null; + _loadTraceDelayed = TQString(); } @@ -1142,7 +1137,7 @@ void TopLevel::exportGraph() ge.writeDot(); TQString cmd = TQString("(dot %1 -Tps > %2.ps; kghostview %3.ps)&") - .arg(n).arg(n).arg(n); + .tqarg(n).tqarg(n).tqarg(n); system(TQFile::encodeName( cmd )); } @@ -1386,13 +1381,13 @@ bool TopLevel::setFunction(TraceFunction* f) void TopLevel::setCostTypeDelayed(TraceCostType* ct) { _costTypeDelayed = ct; - TQTimer::singleShot (0, this, TQT_SLOT(setCostTypeDelayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setCostTypeDelayed())); } void TopLevel::setCostType2Delayed(TraceCostType* ct) { _costType2Delayed = ct; - TQTimer::singleShot (0, this, TQT_SLOT(setCostType2Delayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setCostType2Delayed())); } void TopLevel::setCostTypeDelayed() @@ -1408,7 +1403,7 @@ void TopLevel::setCostType2Delayed() void TopLevel::setGroupTypeDelayed(TraceItem::CostType gt) { _groupTypeDelayed = gt; - TQTimer::singleShot (0, this, TQT_SLOT(setGroupTypeDelayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setGroupTypeDelayed())); } void TopLevel::setGroupTypeDelayed() @@ -1425,7 +1420,7 @@ void TopLevel::setGroupDelayed(TraceCostItem* g) #endif _groupDelayed = g; - TQTimer::singleShot (0, this, TQT_SLOT(setGroupDelayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setGroupDelayed())); } void TopLevel::setGroupDelayed() @@ -1436,7 +1431,7 @@ void TopLevel::setGroupDelayed() void TopLevel::setDirectionDelayed(TraceItemView::Direction d) { _directionDelayed = d; - TQTimer::singleShot (0, this, TQT_SLOT(setDirectionDelayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setDirectionDelayed())); } void TopLevel::setDirectionDelayed() @@ -1474,7 +1469,7 @@ void TopLevel::setTraceItemDelayed(TraceItem* i) // no need to select same item a 2nd time... if (_traceItemDelayed == i) return; _traceItemDelayed = i; - _lastSender = sender(); + _lastSender = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())); kdDebug() << "Selected " << (i ? i->prettyName() : "(none)") << endl; @@ -1484,7 +1479,7 @@ void TopLevel::setTraceItemDelayed(TraceItem* i) _lastSender ? _lastSender->name() :"0" ); #endif - TQTimer::singleShot (0, this, TQT_SLOT(setTraceItemDelayed())); + TQTimer::singleShot (0, TQT_TQOBJECT(this), TQT_SLOT(setTraceItemDelayed())); } void TopLevel::setTraceItemDelayed() @@ -1657,10 +1652,10 @@ void TopLevel::addCostMenu(TQPopupMenu* popup, bool withCost2) } if (_showPercentage) popup->insertItem(i18n("Show Absolute Cost"), - this, TQT_SLOT(setAbsoluteCost())); + TQT_TQOBJECT(this), TQT_SLOT(setAbsoluteCost())); else popup->insertItem(i18n("Show Relative Cost"), - this, TQT_SLOT(setRelativeCost())); + TQT_TQOBJECT(this), TQT_SLOT(setRelativeCost())); } bool TopLevel::setCostType(int id) @@ -1689,9 +1684,9 @@ bool TopLevel::setCostType2(int id) void TopLevel::addGoMenu(TQPopupMenu* popup) { - popup->insertItem(i18n("Go Back"), this, TQT_SLOT(goBack())); - popup->insertItem(i18n("Go Forward"), this, TQT_SLOT(goForward())); - popup->insertItem(i18n("Go Up"), this, TQT_SLOT(goUp())); + popup->insertItem(i18n("Go Back"), TQT_TQOBJECT(this), TQT_SLOT(goBack())); + popup->insertItem(i18n("Go Forward"), TQT_TQOBJECT(this), TQT_SLOT(goForward())); + popup->insertItem(i18n("Go Up"), TQT_TQOBJECT(this), TQT_SLOT(goUp())); } void TopLevel::goBack() @@ -1711,7 +1706,7 @@ void TopLevel::goUp() TQString TopLevel::traceKey() { - if (!_data || _data->command().isEmpty()) return TQString::null; + if (!_data || _data->command().isEmpty()) return TQString(); TQString name = _data->command(); TQString key; @@ -1730,9 +1725,9 @@ void TopLevel::restoreTraceTypes() KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions")); TQString groupType, costType, costType2; - groupType = pConfig.readEntry(TQString("GroupType%1").arg(key)); - costType = pConfig.readEntry(TQString("CostType%1").arg(key)); - costType2 = pConfig.readEntry(TQString("CostType2%1").arg(key)); + groupType = pConfig.readEntry(TQString("GroupType%1").tqarg(key)); + costType = pConfig.readEntry(TQString("CostType%1").tqarg(key)); + costType2 = pConfig.readEntry(TQString("CostType2%1").tqarg(key)); if (groupType.isEmpty()) groupType = cConfig.readEntry("GroupType"); if (costType.isEmpty()) costType = cConfig.readEntry("CostType"); @@ -1747,9 +1742,9 @@ void TopLevel::restoreTraceTypes() costTypeSelected(_saCost->items().first()); KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts")); - _layoutCount = aConfig.readNumEntry(TQString("Count%1").arg(key), 0); - _layoutCurrent = aConfig.readNumEntry(TQString("Current%1").arg(key), 0); - if (_layoutCount == 0) layoutRestore(); + _layoutCount = aConfig.readNumEntry(TQString("Count%1").tqarg(key), 0); + _layoutCurrent = aConfig.readNumEntry(TQString("Current%1").tqarg(key), 0); + if (_layoutCount == 0) tqlayoutRestore(); updateLayoutActions(); } @@ -1766,7 +1761,7 @@ void TopLevel::restoreTraceSettings() TQString key = traceKey(); KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions")); - TQString group = pConfig.readEntry(TQString("Group%1").arg(key)); + TQString group = pConfig.readEntry(TQString("Group%1").tqarg(key)); if (!group.isEmpty()) setGroup(group); restoreCurrentState(key); @@ -1783,21 +1778,21 @@ void TopLevel::restoreTraceSettings() /* Layout */ -void TopLevel::layoutDuplicate() +void TopLevel::tqlayoutDuplicate() { // save current and allocate a new slot _multiView->saveViewConfig(KGlobal::config(), - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), traceKey(), false); _layoutCurrent = _layoutCount; _layoutCount++; updateLayoutActions(); - kdDebug() << "TopLevel::layoutDuplicate: count " << _layoutCount << endl; + kdDebug() << "TopLevel::tqlayoutDuplicate: count " << _layoutCount << endl; } -void TopLevel::layoutRemove() +void TopLevel::tqlayoutRemove() { if (_layoutCount <2) return; @@ -1805,14 +1800,14 @@ void TopLevel::layoutRemove() if (_layoutCurrent == from) { _layoutCurrent--; from--; } // restore from last and decrement count _multiView->readViewConfig(KGlobal::config(), - TQString("Layout%1-MainView").arg(from), + TQString("Layout%1-MainView").tqarg(from), traceKey(), false); _layoutCount--; updateLayoutActions(); } -void TopLevel::layoutNext() +void TopLevel::tqlayoutNext() { if (_layoutCount <2) return; @@ -1820,20 +1815,20 @@ void TopLevel::layoutNext() TQString key = traceKey(); _multiView->saveViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); _layoutCurrent++; if (_layoutCurrent == _layoutCount) _layoutCurrent = 0; _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); - if (0) kdDebug() << "TopLevel::layoutNext: current " + if (0) kdDebug() << "TopLevel::tqlayoutNext: current " << _layoutCurrent << endl; } -void TopLevel::layoutPrevious() +void TopLevel::tqlayoutPrevious() { if (_layoutCount <2) return; @@ -1841,39 +1836,39 @@ void TopLevel::layoutPrevious() TQString key = traceKey(); _multiView->saveViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); _layoutCurrent--; if (_layoutCurrent <0) _layoutCurrent = _layoutCount-1; _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); - if (0) kdDebug() << "TopLevel::layoutPrevious: current " + if (0) kdDebug() << "TopLevel::tqlayoutPrevious: current " << _layoutCurrent << endl; } -void TopLevel::layoutSave() +void TopLevel::tqlayoutSave() { KConfig* config = KGlobal::config(); TQString key = traceKey(); _multiView->saveViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); for(int i=0;i<_layoutCount;i++) { _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(i), + TQString("Layout%1-MainView").tqarg(i), key, false); _multiView->saveViewConfig(config, - TQString("Layout%1-MainView").arg(i), + TQString("Layout%1-MainView").tqarg(i), TQString(), false); } _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); KConfigGroup aConfig(config, TQCString("Layouts")); @@ -1881,7 +1876,7 @@ void TopLevel::layoutSave() aConfig.writeEntry("DefaultCurrent", _layoutCurrent); } -void TopLevel::layoutRestore() +void TopLevel::tqlayoutRestore() { KConfig* config = KGlobal::config(); KConfigGroup aConfig(config, TQCString("Layouts")); @@ -1895,15 +1890,15 @@ void TopLevel::layoutRestore() TQString key = traceKey(); for(int i=0;i<_layoutCount;i++) { _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(i), + TQString("Layout%1-MainView").tqarg(i), TQString(), false); _multiView->saveViewConfig(config, - TQString("Layout%1-MainView").arg(i), + TQString("Layout%1-MainView").tqarg(i), key, false); } _multiView->readViewConfig(config, - TQString("Layout%1-MainView").arg(_layoutCurrent), + TQString("Layout%1-MainView").tqarg(_layoutCurrent), key, false); updateLayoutActions(); @@ -1914,16 +1909,16 @@ void TopLevel::updateLayoutActions() { KAction* ka; - ka = actionCollection()->action("layout_next"); + ka = actionCollection()->action("tqlayout_next"); if (ka) ka->setEnabled(_layoutCount>1); - ka = actionCollection()->action("layout_previous"); + ka = actionCollection()->action("tqlayout_previous"); if (ka) ka->setEnabled(_layoutCount>1); - ka = actionCollection()->action("layout_remove"); + ka = actionCollection()->action("tqlayout_remove"); if (ka) ka->setEnabled(_layoutCount>1); - _statusbar->message(i18n("Layout Count: %1").arg(_layoutCount), 1000); + _statusbar->message(i18n("Layout Count: %1").tqarg(_layoutCount), 1000); } @@ -1935,19 +1930,19 @@ void TopLevel::updateStatusBar() } TQString status = TQString("%1 [%2] - ") - .arg(_data->shortTraceName()) - .arg(_data->activePartRange()); + .tqarg(_data->shortTraceName()) + .tqarg(_data->activePartRange()); if (_costType) { status += i18n("Total %1 Cost: %2") - .arg(_costType->longName()) - .arg(_data->prettySubCost(_costType)); + .tqarg(_costType->longName()) + .tqarg(_data->prettySubCost(_costType)); /* this gets too long... if (_costType2 && (_costType2 != _costType)) status += i18n(", %1 Cost: %2") - .arg(_costType2->longName()) - .arg(_data->prettySubCost(_costType2)); + .tqarg(_costType2->longName()) + .tqarg(_data->prettySubCost(_costType2)); */ } else @@ -1957,8 +1952,8 @@ void TopLevel::updateStatusBar() if (_groupType != TraceItem::Function) { status += TQString(" - %1 '%2'") - .arg(TraceItem::i18nTypeName(_groupType)) - .arg(_group ? _group->prettyName() : i18n("(None)")); + .tqarg(TraceItem::i18nTypeName(_groupType)) + .tqarg(_group ? _group->prettyName() : i18n("(None)")); } */ @@ -1991,7 +1986,7 @@ bool TopLevel::queryExit() Configuration::setShowCycles(_showCycles); Configuration::saveOptions(KGlobal::config()); - saveCurrentState(TQString::null); + saveCurrentState(TQString()); // save QT dock positions... @@ -2053,7 +2048,7 @@ void TopLevel::configChanged() //qDebug("TopLevel::configChanged"); //_showPercentage->setChecked(Configuration::showPercentage()); - // invalidate found/cached dirs of source files + // tqinvalidate found/cached dirs of source files _data->resetSourceDirs(); _partSelection->refresh(); @@ -2071,7 +2066,7 @@ void TopLevel::slotShowTipOnStart() { } void TopLevel::slotShowTip() { - KTipDialog::showTip( this, TQString::null, true ); + KTipDialog::showTip( this, TQString(), true ); } void TopLevel::dummySlot() @@ -2103,7 +2098,7 @@ void TopLevel::activePartsChangedSlot(const TracePartList& list) void TopLevel::partsHideSelectedSlotDelayed() { - TQTimer::singleShot( 0, this, TQT_SLOT(partsHideSelectedSlot()) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT(partsHideSelectedSlot()) ); } // this puts selected parts into hidden list, @@ -2116,8 +2111,8 @@ void TopLevel::partsHideSelectedSlot() TracePartList newHidden, newActive; TracePartList l = _data->parts(); for (part=l.first();part;part=l.next()) { - if ((_activeParts.findRef(part)>=0) || - (_hiddenParts.findRef(part)>=0)) + if ((_activeParts.tqfindRef(part)>=0) || + (_hiddenParts.tqfindRef(part)>=0)) newHidden.append(part); else newActive.append(part); @@ -2136,7 +2131,7 @@ void TopLevel::partsHideSelectedSlot() void TopLevel::partsUnhideAllSlotDelayed() { - TQTimer::singleShot( 0, this, TQT_SLOT(partsUnhideAllSlot()) ); + TQTimer::singleShot( 0, TQT_TQOBJECT(this), TQT_SLOT(partsUnhideAllSlot()) ); } // this unhides all hidden parts. Does NOT change selection @@ -2164,7 +2159,7 @@ void TopLevel::forceTrace() cmd.close(); } if (_taDump->isChecked()) - TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) ); + TQTimer::singleShot( 1000, TQT_TQOBJECT(this), TQT_SLOT(forceTraceReload()) ); else { // cancel request cmd.remove(); @@ -2179,7 +2174,7 @@ void TopLevel::forceTraceReload() TQFile cmd("callgrind.cmd"); if (cmd.exists()) { if (_taDump->isChecked()) - TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) ); + TQTimer::singleShot( 1000, TQT_TQOBJECT(this), TQT_SLOT(forceTraceReload()) ); return; } _taDump->setChecked(false); @@ -2345,7 +2340,7 @@ void TopLevel::showMessage(const TQString& msg, int ms) _statusbar->message(msg, ms); } -void TopLevel::showStatus(TQString msg, int progress) +void TopLevel::showtqStatus(TQString msg, int progress) { static bool msgUpdateNeeded = true; @@ -2387,13 +2382,8 @@ void TopLevel::showStatus(TQString msg, int progress) _progressBar->setProgress(progress); // let the progress bar update itself -#if (QT_VERSION-0 >= 0x030100) - TQEventLoop* l = qApp->eventLoop(); + TQEventLoop* l = tqApp->eventLoop(); if (l) l->processEvents(TQEventLoop::ExcludeUserInput); -#else - // for Qt 3.0.x. This allows user input and thus potentially races - qApp->processEvents(); -#endif } #include "toplevel.moc" diff --git a/kcachegrind/kcachegrind/toplevel.h b/kcachegrind/kcachegrind/toplevel.h index c12fe773..c24b27d3 100644 --- a/kcachegrind/kcachegrind/toplevel.h +++ b/kcachegrind/kcachegrind/toplevel.h @@ -33,7 +33,7 @@ class MultiView; class TQLineEdit; -class QDockWidget; +class TQDockWidget; class TQLabel; class TQProgressBar; class TQPopupMenu; @@ -55,6 +55,7 @@ class TraceFunction; class TopLevel : public KMainWindow, public DCOPObject { Q_OBJECT + TQ_OBJECT public: TopLevel(const char *name = 0); @@ -103,13 +104,13 @@ public slots: void querySlot(); void dummySlot(); - // layouts - void layoutDuplicate(); - void layoutRemove(); - void layoutNext(); - void layoutPrevious(); - void layoutSave(); - void layoutRestore(); + // tqlayouts + void tqlayoutDuplicate(); + void tqlayoutRemove(); + void tqlayoutNext(); + void tqlayoutPrevious(); + void tqlayoutSave(); + void tqlayoutRestore(); void updateLayoutActions(); void updateStatusBar(); @@ -195,7 +196,7 @@ public slots: void slotShowTip(); // progress in status bar, empty message disables progress display - void showStatus(TQString msg, int progress); + void showtqStatus(TQString msg, int progress); void showMessage(const TQString&, int msec); private: @@ -215,7 +216,7 @@ private: TQLabel* _statusLabel; KRecentFilesAction* _openRecent; bool _twoMainWidgets; - Orientation _spOrientation; + Qt::Orientation _spOrientation; MultiView* _multiView; FunctionSelection* _functionSelection; @@ -250,7 +251,7 @@ private: TracePartList _activeParts; // hidden parts TracePartList _hiddenParts; - // layouts + // tqlayouts int _layoutCurrent, _layoutCount; // for delayed slots diff --git a/kcachegrind/kcachegrind/tracedata.cpp b/kcachegrind/kcachegrind/tracedata.cpp index 4e6a625c..83cc1488 100644 --- a/kcachegrind/kcachegrind/tracedata.cpp +++ b/kcachegrind/kcachegrind/tracedata.cpp @@ -76,9 +76,7 @@ TQString Addr::toString() const uint64 n = _v; TQString hex; -#if (QT_VERSION-0 >= 0x030200) hex.reserve(16); -#endif while(n>0) { int d = (n & 15); @@ -96,9 +94,7 @@ TQString Addr::pretty() const uint64 n = _v; int p = 0; TQString hex; -#if (QT_VERSION-0 >= 0x030200) hex.reserve(20); -#endif while(n>0) { int d = (n & 15); @@ -230,7 +226,7 @@ TraceItem::CostType TraceItem::i18nCostType(TQString s) void TraceItem::clear() { - invalidate(); + tqinvalidate(); } @@ -243,8 +239,8 @@ TQString TraceItem::name() const { if (part()) { return i18n("%1 from %2") - .arg(_dep->name()) - .arg(part()->name()); + .tqarg(_dep->name()) + .tqarg(part()->name()); } if (_dep) @@ -263,21 +259,21 @@ TQString TraceItem::prettyName() const TQString TraceItem::fullName() const { return TQString("%1 %2") - .arg(typeName(type())).arg(prettyName()); + .tqarg(typeName(type())).tqarg(prettyName()); } TQString TraceItem::toString() { - return TQString("%1\n [%3]").arg(fullName()).arg(costString(0)); + return TQString("%1\n [%3]").tqarg(fullName()).tqarg(costString(0)); } -void TraceItem::invalidate() +void TraceItem::tqinvalidate() { if (_dirty) return; _dirty = true; if (_dep) - _dep->invalidate(); + _dep->tqinvalidate(); } void TraceItem::update() @@ -364,7 +360,7 @@ void TraceCost::set(TraceSubMapping* sm, const char* s) _count = maxIndex; } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); } void TraceCost::set(TraceSubMapping* sm, FixString & s) @@ -395,7 +391,7 @@ void TraceCost::set(TraceSubMapping* sm, FixString & s) _cost[i] = 0; _count = maxIndex+1; } - invalidate(); + tqinvalidate(); } @@ -440,13 +436,13 @@ void TraceCost::addCost(TraceSubMapping* sm, const char* s) } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); #if TRACE_DEBUG _dirty = false; // don't recurse ! qDebug("%s\n now %s", fullName().ascii(), TraceCost::costString(0).ascii()); - _dirty = true; // because of invalidate() + _dirty = true; // because of tqinvalidate() #endif } @@ -492,13 +488,13 @@ void TraceCost::addCost(TraceSubMapping* sm, FixString & s) } } - invalidate(); + tqinvalidate(); #if TRACE_DEBUG _dirty = false; // don't recurse ! qDebug("%s\n now %s", fullName().ascii(), TraceCost::costString(0).ascii()); - _dirty = true; // because of invalidate() + _dirty = true; // because of tqinvalidate() #endif } @@ -548,13 +544,13 @@ void TraceCost::maxCost(TraceSubMapping* sm, FixString & s) } } - invalidate(); + tqinvalidate(); #if TRACE_DEBUG _dirty = false; // don't recurse ! qDebug("%s\n now %s", fullName().ascii(), TraceCost::costString(0).ascii()); - _dirty = true; // because of invalidate() + _dirty = true; // because of tqinvalidate() #endif } @@ -582,14 +578,14 @@ void TraceCost::addCost(TraceCost* item) } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); #if TRACE_DEBUG _dirty = false; // don't recurse ! qDebug("%s added cost item\n %s\n now %s", fullName().ascii(), item->fullName().ascii(), TraceCost::costString(0).ascii()); - _dirty = true; // because of invalidate() + _dirty = true; // because of tqinvalidate() #endif } @@ -616,14 +612,14 @@ void TraceCost::maxCost(TraceCost* item) } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); #if TRACE_DEBUG _dirty = false; // don't recurse ! qDebug("%s added cost item\n %s\n now %s", fullName().ascii(), item->fullName().ascii(), TraceCost::costString(0).ascii()); - _dirty = true; // because of invalidate() + _dirty = true; // because of tqinvalidate() #endif } @@ -640,7 +636,7 @@ void TraceCost::addCost(int type, SubCost value) } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); } void TraceCost::maxCost(int type, SubCost value) @@ -657,7 +653,7 @@ void TraceCost::maxCost(int type, SubCost value) } // a cost change has to be propagated (esp. in subclasses) - invalidate(); + tqinvalidate(); } @@ -695,14 +691,14 @@ TQString TraceCost::costString(TraceCostMapping* m) } -void TraceCost::invalidate() +void TraceCost::tqinvalidate() { if (_dirty) return; _dirty = true; _cachedType = 0; // cached value is invalid, too if (_dep) - _dep->invalidate(); + _dep->tqinvalidate(); } void TraceCost::update() @@ -771,8 +767,8 @@ TQString TraceJumpCost::costString(TraceCostMapping*) if (_dirty) update(); return TQString("%1/%2") - .arg(_followedCount.pretty()) - .arg(_executedCount.pretty()); + .tqarg(_followedCount.pretty()) + .tqarg(_executedCount.pretty()); } void TraceJumpCost::clear() @@ -830,7 +826,7 @@ void TraceCostType::setRealIndex(int i) i=TraceCost::InvalidIndex; _realIndex = i; - _formula = TQString::null; + _formula = TQString(); } // checks for existing types and sets coefficients @@ -917,7 +913,7 @@ TQString TraceCostType::parsedFormula() if (!t) continue; if (!t->name().isEmpty()) - res += TQString(" * %1").arg(t->name()); + res += TQString(" * %1").tqarg(t->name()); } return res; @@ -1366,8 +1362,8 @@ TraceCallCost::~TraceCallCost() TQString TraceCallCost::costString(TraceCostMapping* m) { return TQString("%1, Calls %2") - .arg(TraceCost::costString(m)) - .arg(_callCount.pretty()); + .tqarg(TraceCost::costString(m)) + .tqarg(_callCount.pretty()); } TQString TraceCallCost::prettyCallCount() @@ -1392,7 +1388,7 @@ void TraceCallCost::addCallCount(SubCost c) { _callCount += c; - invalidate(); + tqinvalidate(); } @@ -1408,8 +1404,8 @@ TraceInclusiveCost::~TraceInclusiveCost() TQString TraceInclusiveCost::costString(TraceCostMapping* m) { return TQString("%1, Inclusive %2") - .arg(TraceCost::costString(m)) - .arg(_inclusive.costString(m)); + .tqarg(TraceCost::costString(m)) + .tqarg(_inclusive.costString(m)); } void TraceInclusiveCost::clear() @@ -1429,7 +1425,7 @@ void TraceInclusiveCost::addInclusive(TraceCost* c) { _inclusive.addCost(c); - invalidate(); + tqinvalidate(); } @@ -1447,7 +1443,7 @@ TraceListCost::~TraceListCost() void TraceListCost::addDep(TraceCost* dep) { #if TRACE_ASSERTIONS - if (_deps.findRef(dep)>=0) { + if (_deps.tqfindRef(dep)>=0) { qDebug("addDep: %s already in list!", dep->fullName().ascii()); return; @@ -1456,7 +1452,7 @@ void TraceListCost::addDep(TraceCost* dep) _deps.append(dep); _lastDep = dep; - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1521,7 +1517,7 @@ TraceJumpListCost::~TraceJumpListCost() void TraceJumpListCost::addDep(TraceJumpCost* dep) { #if TRACE_ASSERTIONS - if (_deps.findRef(dep)>=0) { + if (_deps.tqfindRef(dep)>=0) { qDebug("addDep: %s already in list!", dep->fullName().ascii()); return; @@ -1530,7 +1526,7 @@ void TraceJumpListCost::addDep(TraceJumpCost* dep) _deps.append(dep); _lastDep = dep; - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1595,7 +1591,7 @@ TraceCallListCost::~TraceCallListCost() void TraceCallListCost::addDep(TraceCallCost* dep) { #if TRACE_ASSERTIONS - if (_deps.findRef(dep)>=0) { + if (_deps.tqfindRef(dep)>=0) { qDebug("addDep: %s already in list!", dep->fullName().ascii()); return; @@ -1604,7 +1600,7 @@ void TraceCallListCost::addDep(TraceCallCost* dep) _deps.append(dep); _lastDep = dep; - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1674,7 +1670,7 @@ TraceInclusiveListCost::~TraceInclusiveListCost() void TraceInclusiveListCost::addDep(TraceInclusiveCost* dep) { #if TRACE_ASSERTIONS - if (_deps.findRef(dep)>=0) { + if (_deps.tqfindRef(dep)>=0) { qDebug("addDep: %s already in list!", dep->fullName().ascii()); return; @@ -1683,7 +1679,7 @@ void TraceInclusiveListCost::addDep(TraceInclusiveCost* dep) _deps.append(dep); _lastDep = dep; - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1901,9 +1897,9 @@ TQString TracePartFunction::costString(TraceCostMapping* m) TQString res = TraceInclusiveCost::costString(m); res += TQString(", called from %1: %2") - .arg(_calledContexts).arg(prettyCalledCount()); + .tqarg(_calledContexts).tqarg(prettyCalledCount()); res += TQString(", calling from %1: %2") - .arg(_callingContexts).arg(prettyCallingCount()); + .tqarg(_callingContexts).tqarg(prettyCallingCount()); return res; } @@ -1912,7 +1908,7 @@ TQString TracePartFunction::costString(TraceCostMapping* m) void TracePartFunction::addPartInstr(TracePartInstr* ref) { #if TRACE_ASSERTIONS - if (_partInstr.findRef(ref)>=0) { + if (_partInstr.tqfindRef(ref)>=0) { qDebug("TracePartFunction::addPartInstr: %s already in list!", ref->name().ascii()); return; @@ -1920,7 +1916,7 @@ void TracePartFunction::addPartInstr(TracePartInstr* ref) #endif _partInstr.append(ref); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1933,7 +1929,7 @@ void TracePartFunction::addPartInstr(TracePartInstr* ref) void TracePartFunction::addPartLine(TracePartLine* ref) { #if TRACE_ASSERTIONS - if (_partLines.findRef(ref)>=0) { + if (_partLines.tqfindRef(ref)>=0) { qDebug("TracePartFunction::addPartLine: %s already in list!", ref->name().ascii()); return; @@ -1941,7 +1937,7 @@ void TracePartFunction::addPartLine(TracePartLine* ref) #endif _partLines.append(ref); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -1954,7 +1950,7 @@ void TracePartFunction::addPartLine(TracePartLine* ref) void TracePartFunction::addPartCaller(TracePartCall* ref) { #if TRACE_ASSERTIONS - if (_partCallers.findRef(ref)>=0) { + if (_partCallers.tqfindRef(ref)>=0) { qDebug("TracePartFunction::addPartCaller: %s already in list!", ref->name().ascii()); return; @@ -1962,7 +1958,7 @@ void TracePartFunction::addPartCaller(TracePartCall* ref) #endif _partCallers.append(ref); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added Caller\n %s (now %d)", @@ -1975,7 +1971,7 @@ void TracePartFunction::addPartCaller(TracePartCall* ref) void TracePartFunction::addPartCalling(TracePartCall* ref) { #if TRACE_ASSERTIONS - if (_partCallings.findRef(ref)>=0) { + if (_partCallings.tqfindRef(ref)>=0) { qDebug("TracePartFunction::addPartCalling: %s already in list!", ref->name().ascii()); return; @@ -1983,7 +1979,7 @@ void TracePartFunction::addPartCalling(TracePartCall* ref) #endif _partCallings.append(ref); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added Calling\n %s (now %d)", @@ -2140,8 +2136,8 @@ TracePartClass::~TracePartClass() TQString TracePartClass::prettyName() const { return TQString("%1 from %2") - .arg( _dep->name().isEmpty() ? TQString("(global)") : _dep->name()) - .arg(part()->name()); + .tqarg( _dep->name().isEmpty() ? TQString("(global)") : _dep->name()) + .tqarg(part()->name()); } //--------------------------------------------------- @@ -2237,8 +2233,8 @@ void TraceInstrJump::update() TQString TraceInstrJump::name() const { return TQString("jump at 0x%1 to 0x%2") - .arg(_instrFrom->addr().toString()) - .arg(_instrTo->addr().toString()); + .tqarg(_instrFrom->addr().toString()) + .tqarg(_instrTo->addr().toString()); } @@ -2320,8 +2316,8 @@ TracePartLineJump* TraceLineJump::partLineJump(TracePart* part) TQString TraceLineJump::name() const { return TQString("jump at %1 to %2") - .arg(_lineFrom->prettyName()) - .arg(_lineTo->prettyName()); + .tqarg(_lineFrom->prettyName()) + .tqarg(_lineTo->prettyName()); } @@ -2399,7 +2395,7 @@ TracePartInstrCall* TraceInstrCall::partInstrCall(TracePart* part, TQString TraceInstrCall::name() const { - return TQString("%1 at %2").arg(_call->name()).arg(_instr->name()); + return TQString("%1 at %2").tqarg(_call->name()).tqarg(_instr->name()); } @@ -2435,7 +2431,7 @@ TracePartLineCall* TraceLineCall::partLineCall(TracePart* part, TQString TraceLineCall::name() const { - return TQString("%1 at %2").arg(_call->name()).arg(_line->name()); + return TQString("%1 at %2").tqarg(_call->name()).tqarg(_line->name()); } @@ -2482,7 +2478,7 @@ TraceInstrCall* TraceCall::instrCall(TraceInstr* i) icall = new TraceInstrCall(this, i); _instrCalls.append(icall); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("Created %s [TraceCall::instrCall]", icall->fullName().ascii()); @@ -2504,7 +2500,7 @@ TraceLineCall* TraceCall::lineCall(TraceLine* l) lcall = new TraceLineCall(this, l); _lineCalls.append(lcall); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("Created %s [TraceCall::lineCall]", lcall->fullName().ascii()); @@ -2515,25 +2511,25 @@ TraceLineCall* TraceCall::lineCall(TraceLine* l) } -void TraceCall::invalidateDynamicCost() +void TraceCall::tqinvalidateDynamicCost() { TraceLineCall* lc; for (lc=_lineCalls.first();lc;lc=_lineCalls.next()) - lc->invalidate(); + lc->tqinvalidate(); TraceInstrCall* ic; for (ic=_instrCalls.first();ic;ic=_instrCalls.next()) - ic->invalidate(); + ic->tqinvalidate(); - invalidate(); + tqinvalidate(); } TQString TraceCall::name() const { return TQString("%1 => %2") - .arg(_caller->name()) - .arg(_called->name()); + .tqarg(_caller->name()) + .tqarg(_called->name()); } int TraceCall::inCycle() @@ -2591,7 +2587,7 @@ TQString TraceCall::callerName(bool skipCycle) const TraceFunctionCycle* c = _called->cycle(); if (c && _caller && (_caller->cycle() != c)) { TQString via = _called->prettyName(); - return i18n("%1 via %2").arg(_caller->prettyName()).arg(via); + return i18n("%1 via %2").tqarg(_caller->prettyName()).tqarg(via); } } @@ -2610,7 +2606,7 @@ TQString TraceCall::calledName(bool skipCycle) const _called->setCycle(0); TQString via = _called->prettyName(); _called->setCycle(c); - return i18n("%1 via %2").arg(c->name()).arg(via); + return i18n("%1 via %2").tqarg(c->name()).tqarg(via); } } return _called->prettyName(); @@ -2687,7 +2683,7 @@ TraceInstrJump* TraceInstr::instrJump(TraceInstr* to, bool isJmpCond) void TraceInstr::addInstrCall(TraceInstrCall* instrCall) { #if TRACE_ASSERTIONS - if (_instrCalls.findRef(instrCall)>=0) return; + if (_instrCalls.tqfindRef(instrCall)>=0) return; if (instrCall->instr() != this) { qDebug("Can't add instruction call to another instruction!"); @@ -2696,7 +2692,7 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall) #endif _instrCalls.append(instrCall); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -2708,12 +2704,12 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall) TQString TraceInstr::name() const { - return TQString("0x%1").arg(_addr.toString()); + return TQString("0x%1").tqarg(_addr.toString()); } TQString TraceInstr::prettyName() const { - return TQString("0x%1").arg(_addr.toString()); + return TQString("0x%1").tqarg(_addr.toString()); } @@ -2787,7 +2783,7 @@ TraceLineJump* TraceLine::lineJump(TraceLine* to, bool isJmpCond) void TraceLine::addLineCall(TraceLineCall* lineCall) { #if TRACE_ASSERTIONS - if (_lineCalls.findRef(lineCall)>=0) return; + if (_lineCalls.tqfindRef(lineCall)>=0) return; if (lineCall->line() != this) { qDebug("Can't add line call to another line!"); @@ -2811,7 +2807,7 @@ void TraceLine::addLineCall(TraceLineCall* lineCall) } _lineCalls.append(lineCall); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -2828,13 +2824,13 @@ TQString TraceLine::name() const return i18n("(unknown)"); return TQString("%1:%2") - .arg(fileShortName).arg(_lineno); + .tqarg(fileShortName).tqarg(_lineno); } TQString TraceLine::prettyName() const { return TQString("%1 [%2]") - .arg(name()).arg(_sourceFile->function()->prettyName()); + .tqarg(name()).tqarg(_sourceFile->function()->prettyName()); } //--------------------------------------------------- @@ -2873,7 +2869,7 @@ TraceFunctionSource::~TraceFunctionSource() TQString TraceFunctionSource::name() const { - return TQString("%1 for %2").arg(_file->name()).arg(_function->name()); + return TQString("%1 for %2").tqarg(_file->name()).tqarg(_function->name()); } uint TraceFunctionSource::firstLineno() @@ -2912,7 +2908,7 @@ TraceLine* TraceFunctionSource::line(uint lineno, bool createNew) if (!createNew) { if (!_lineMap) return 0; - TraceLineMap::Iterator it = _lineMap->find(lineno); + TraceLineMap::Iterator it = _lineMap->tqfind(lineno); if (it == _lineMap->end()) return 0; return &(it.data()); } @@ -2949,17 +2945,17 @@ void TraceFunctionSource::update() _dirty = false; } -void TraceFunctionSource::invalidateDynamicCost() +void TraceFunctionSource::tqinvalidateDynamicCost() { // no need to create lineMap if not already created if (_lineMap) { TraceLineMap::Iterator lit; for ( lit = _lineMap->begin(); lit != _lineMap->end(); ++lit ) - (*lit).invalidate(); + (*lit).tqinvalidate(); } - invalidate(); + tqinvalidate(); } TraceLineMap* TraceFunctionSource::lineMap() @@ -3129,12 +3125,12 @@ void TraceAssoziation::clear(TraceData* d, int rtti) (*it).removeAssoziation(rtti); } -void TraceAssoziation::invalidate(TraceData* d, int rtti) +void TraceAssoziation::tqinvalidate(TraceData* d, int rtti) { TraceFunctionMap::Iterator it; for ( it = d->functionMap().begin(); it != d->functionMap().end(); ++it ) - (*it).invalidateAssoziation(rtti); + (*it).tqinvalidateAssoziation(rtti); } @@ -3202,12 +3198,12 @@ void TraceFunction::removeAssoziation(int rtti, bool reallyDelete) } } -void TraceFunction::invalidateAssoziation(int rtti) +void TraceFunction::tqinvalidateAssoziation(int rtti) { TraceAssoziation* a; for (a=_assoziations.first();a;a=_assoziations.next()) if ((rtti==0) || (a->rtti() == rtti)) - a->invalidate(); + a->tqinvalidate(); } TraceAssoziation* TraceFunction::assoziation(int rtti) @@ -3244,7 +3240,7 @@ TQString TraceFunction::prettyName() const if (_name.isEmpty()) return i18n("(unknown)"); - int p = _name.find('('); + int p = _name.tqfind('('); if (p>0) { // handle C++ "operator()" correct if ((_name[p+1] == ')') && (_name[p+2] == '(')) p+=2; @@ -3258,9 +3254,9 @@ TQString TraceFunction::prettyName() const // cycle members if (_cycle) { if (_cycle != this) - res = TQString("%1 <cycle %2>").arg(res).arg(_cycle->cycleNo()); + res = TQString("%1 <cycle %2>").tqarg(res).tqarg(_cycle->cycleNo()); else - res = TQString("<cycle %2>").arg(_cycle->cycleNo()); + res = TQString("<cycle %2>").tqarg(_cycle->cycleNo()); } @@ -3283,9 +3279,9 @@ TQString TraceFunction::location(int maxFiles) const uint to = lastAddress(); if (from != 0 && to != 0) { if (from == to) - loc += TQString(" (0x%1)").arg(to, 0, 16); + loc += TQString(" (0x%1)").tqarg(to, 0, 16); else - loc += TQString(" (0x%1-0x%2)").arg(from, 0, 16).arg(to, 0, 16); + loc += TQString(" (0x%1-0x%2)").tqarg(from, 0, 16).tqarg(to, 0, 16); } #endif } @@ -3314,9 +3310,9 @@ TQString TraceFunction::location(int maxFiles) const to = sourceFile->lastLineno(); if (from != 0 && to != 0) { if (from == to) - loc += TQString(" (%1)").arg(to); + loc += TQString(" (%1)").tqarg(to); else - loc += TQString(" (%1-%2)").arg(from).arg(to); + loc += TQString(" (%1-%2)").tqarg(from).tqarg(to); } #endif } @@ -3338,7 +3334,7 @@ void TraceFunction::addPrettyLocation(TQString& s, int maxFiles) const TQString l = location(maxFiles); if (l.isEmpty()) return; - s += TQString(" (%1)").arg(l); + s += TQString(" (%1)").tqarg(l); } TQString TraceFunction::prettyNameWithLocation(int maxFiles) const @@ -3346,17 +3342,17 @@ TQString TraceFunction::prettyNameWithLocation(int maxFiles) const TQString l = location(maxFiles); if (l.isEmpty()) return prettyName(); - return TQString("%1 (%2)").arg(prettyName()).arg(l); + return TQString("%1 (%2)").tqarg(prettyName()).tqarg(l); } TQString TraceFunction::info() const { TQString l = location(); if (l.isEmpty()) - return TQString("Function %1").arg(name()); + return TQString("Function %1").tqarg(name()); return TQString("Function %1 (location %2)") - .arg(name()).arg(l); + .tqarg(name()).tqarg(l); } @@ -3385,7 +3381,7 @@ TraceInstr* TraceFunction::instr(Addr addr, bool createNew) if (!createNew) { if (!_instrMap) return 0; - TraceInstrMap::Iterator it = _instrMap->find(addr); + TraceInstrMap::Iterator it = _instrMap->tqfind(addr); if (it == _instrMap->end()) return 0; return &(it.data()); @@ -3414,11 +3410,11 @@ void TraceFunction::addCaller(TraceCall* caller) return; } - if (_callers.findRef(caller)>=0) return; + if (_callers.tqfindRef(caller)>=0) return; #endif _callers.append(caller); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added Caller\n %s (now %d)", @@ -3430,7 +3426,7 @@ void TraceFunction::addCaller(TraceCall* caller) TraceCall* TraceFunction::calling(TraceFunction* called) { - TraceCallMap::Iterator it = _callingMap.find(called); + TraceCallMap::Iterator it = _callingMap.tqfind(called); TraceCall* calling = (it == _callingMap.end()) ? 0 : it.data(); if (!calling) { @@ -3439,8 +3435,8 @@ TraceCall* TraceFunction::calling(TraceFunction* called) _callingMap.insert(called, calling); _callings.append(calling); - // we have to invalidate ourself so invalidations from item propagate up - invalidate(); + // we have to tqinvalidate ourself so invalidations from item propagate up + tqinvalidate(); #if TRACE_DEBUG qDebug("Created %s [TraceFunction::calling]", calling->fullName().ascii()); @@ -3464,8 +3460,8 @@ TraceFunctionSource* TraceFunction::sourceFile(TraceFile* file, _sourceFiles.append(sourceFile); - // we have to invalidate ourself so invalidations from item propagate up - invalidate(); + // we have to tqinvalidate ourself so invalidations from item propagate up + tqinvalidate(); #if TRACE_DEBUG qDebug("Created SourceFile %s [TraceFunction::line]", @@ -3591,24 +3587,24 @@ const TraceCallList& TraceFunction::callings(bool /* skipCycle */) const return _callings; } -void TraceFunction::invalidateDynamicCost() +void TraceFunction::tqinvalidateDynamicCost() { TraceCall* c; for (c=_callings.first();c;c=_callings.next()) - c->invalidateDynamicCost(); + c->tqinvalidateDynamicCost(); TraceFunctionSource* sf; for (sf=_sourceFiles.first();sf;sf=_sourceFiles.next()) - sf->invalidateDynamicCost(); + sf->tqinvalidateDynamicCost(); if (_instrMap) { TraceInstrMap::Iterator iit; for ( iit = _instrMap->begin(); iit != _instrMap->end(); ++iit ) - (*iit).invalidate(); + (*iit).tqinvalidate(); } - invalidate(); + tqinvalidate(); } void TraceFunction::update() @@ -3955,7 +3951,7 @@ TraceFunctionCycle::TraceFunctionCycle(TraceFunction* f, int n) _cycle = this; setPosition(f->data()); - setName(TQString("<cycle %1>").arg(n)); + setName(TQString("<cycle %1>").tqarg(n)); // reset to attributes of base function setFile(_base->file()); @@ -3971,7 +3967,7 @@ void TraceFunctionCycle::init() // this deletes all TraceCall's to members _callings.clear(); - invalidate(); + tqinvalidate(); } void TraceFunctionCycle::add(TraceFunction* f) @@ -3991,19 +3987,19 @@ void TraceFunctionCycle::setup() TraceCall *call; TraceCallList l = f->callers(); for (call=l.first();call;call=l.next()) { - if ( _memberSet.contains(call->caller()) ) continue; + if ( _memberSet.tqcontains(call->caller()) ) continue; _callers.append(call); } // the cycle has a call to each member call = new TraceCall(this, f); - call->invalidate(); + call->tqinvalidate(); _callings.append(call); // now do some faking... f->setCycle(this); } - invalidate(); + tqinvalidate(); } @@ -4045,12 +4041,12 @@ void TraceClass::addFunction(TraceFunction* function) return; } - if (_functions.findRef(function)>=0) return; + if (_functions.tqfindRef(function)>=0) return; #endif _functions.append(function); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -4092,12 +4088,12 @@ void TraceFile::addFunction(TraceFunction* function) return; } - if (_functions.findRef(function)>=0) return; + if (_functions.tqfindRef(function)>=0) return; #endif _functions.append(function); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -4118,7 +4114,7 @@ void TraceFile::addSourceFile(TraceFunctionSource* sourceFile) _sourceFiles.append(sourceFile); // not truely needed, as we don't use the sourceFiles for cost update - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s \n added SourceFile %s (now %d)", @@ -4142,10 +4138,10 @@ TQString TraceFile::directory() if (!_dir.isEmpty()) return _dir; int lastIndex = 0, index; - while ( (index=_name.find("/", lastIndex)) >=0) + while ( (index=_name.tqfind("/", lastIndex)) >=0) lastIndex = index+1; - if (lastIndex==0) return TQString::null; + if (lastIndex==0) return TQString(); // without ending "/" return _name.left(lastIndex-1); @@ -4155,7 +4151,7 @@ TQString TraceFile::directory() TQString TraceFile::shortName() const { int lastIndex = 0, index; - while ( (index=_name.find("/", lastIndex)) >=0) + while ( (index=_name.tqfind("/", lastIndex)) >=0) lastIndex = index+1; return _name.mid(lastIndex); @@ -4210,12 +4206,12 @@ void TraceObject::addFunction(TraceFunction* function) return; } - if (_functions.findRef(function)>=0) return; + if (_functions.tqfindRef(function)>=0) return; #endif _functions.append(function); - invalidate(); + tqinvalidate(); #if TRACE_DEBUG qDebug("%s added\n %s (now %d)", @@ -4230,7 +4226,7 @@ void TraceObject::setName(const TQString& name) _name = name; int lastIndex = 0, index; - while ( (index=_name.find("/", lastIndex)) >=0) + while ( (index=_name.tqfind("/", lastIndex)) >=0) lastIndex = index+1; _shortName = _name.mid(lastIndex); @@ -4294,7 +4290,7 @@ void TracePart::setProcessID(int pid) TQString TracePart::shortName() const { int lastIndex = 0, index; - while ( (index=_name.find("/", lastIndex)) >=0) + while ( (index=_name.tqfind("/", lastIndex)) >=0) lastIndex = index+1; return _name.mid(lastIndex); @@ -4302,9 +4298,9 @@ TQString TracePart::shortName() const TQString TracePart::prettyName() const { - TQString name = TQString("%1.%2").arg(_pid).arg(_number); + TQString name = TQString("%1.%2").tqarg(_pid).tqarg(_number); if (data()->maxThreadID()>1) - name += TQString("-%3").arg(_tid); + name += TQString("-%3").tqarg(_tid); return name; } @@ -4314,7 +4310,7 @@ bool TracePart::activate(bool active) _active = active; // to be done by the client of this function - // data()->invalidateDynamicCost(); + // data()->tqinvalidateDynamicCost(); // So better use the TraceData functions... return true; @@ -4393,7 +4389,7 @@ TraceData::~TraceData() TQString TraceData::shortTraceName() const { int lastIndex = 0, index; - while ( (index=_traceName.find("/", lastIndex)) >=0) + while ( (index=_traceName.tqfind("/", lastIndex)) >=0) lastIndex = index+1; return _traceName.mid(lastIndex); @@ -4502,7 +4498,7 @@ void TraceData::load(const TQString& base) if ((str.length() > pos) && (str[pos] == '.')) { pos++; while(str.length()>pos) { - if (str[pos] < '0' || str[pos] > '9') break; + if ((int)str.tqat(pos) < '0' || (int)str.tqat(pos) > '9') break; n = 10*n + (str[pos++] - '0'); } } @@ -4512,7 +4508,7 @@ void TraceData::load(const TQString& base) if ((str.length() > pos) && (str[pos] == '-')) { pos++; while(str.length()>pos) { - if (str[pos] < '0' || str[pos] > '9') break; + if ((int)str.tqat(pos) < '0' || (int)str.tqat(pos) > '9') break; t = 10*t + (str[pos++] - '0'); } } @@ -4531,16 +4527,16 @@ void TraceData::load(const TQString& base) } _parts.sort(); - invalidateDynamicCost(); + tqinvalidateDynamicCost(); updateFunctionCycles(); // clear loading messages from status bar - if (_topLevel) _topLevel->showStatus(TQString::null, 0); + if (_topLevel) _topLevel->showtqStatus(TQString(), 0); } TracePart* TraceData::addPart(const TQString& dir, const TQString& name) { - TQString filename = TQString("%1/%2").arg(dir).arg(name); + TQString filename = TQString("%1/%2").tqarg(dir).tqarg(name); #if TRACE_DEBUG qDebug("TraceData::addPart('%s')", filename.ascii()); #endif @@ -4551,8 +4547,8 @@ TracePart* TraceData::addPart(const TQString& dir, const TQString& name) if (!l) return 0; if (_topLevel) - _topLevel->connect(l, TQT_SIGNAL(updateStatus(TQString, int)), - TQT_SLOT(showStatus(TQString, int))); + _topLevel->connect(l, TQT_SIGNAL(updatetqStatus(TQString, int)), + TQT_SLOT(showtqStatus(TQString, int))); TracePart* part = new TracePart(this, file); @@ -4572,13 +4568,13 @@ bool TraceData::activateParts(const TracePartList& l) TracePart* part; for (part=_parts.first();part;part=_parts.next()) - if (part->activate(l.containsRef(part)>0)) + if (part->activate(l.tqcontainsRef(part)>0)) changed = true; if (changed) { // because active parts have changed, throw away calculated // costs... - invalidateDynamicCost(); + tqinvalidateDynamicCost(); updateFunctionCycles(); } @@ -4592,12 +4588,12 @@ bool TraceData::activateParts(TracePartList l, bool active) TracePart* part; for (part=l.first();part;part=l.next()) - if (_parts.findRef(part)>=0) + if (_parts.tqfindRef(part)>=0) if (part->activate(active)) changed = true; if (changed) { - invalidateDynamicCost(); + tqinvalidateDynamicCost(); updateFunctionCycles(); } @@ -4636,45 +4632,45 @@ TQString TraceData::activePartRange() else { if (!res.isEmpty()) res += ";"; if (r1==r2) res += TQString::number(r1); - else res += TQString("%1-%2").arg(r1).arg(r2); + else res += TQString("%1-%2").tqarg(r1).tqarg(r2); r1 = r2 = count; } } if (r1>=0) { if (!res.isEmpty()) res += ";"; if (r1==r2) res += TQString::number(r1); - else res += TQString("%1-%2").arg(r1).arg(r2); + else res += TQString("%1-%2").tqarg(r1).tqarg(r2); } return res; } -void TraceData::invalidateDynamicCost() +void TraceData::tqinvalidateDynamicCost() { - // invalidate all dynamic costs + // tqinvalidate all dynamic costs TraceObjectMap::Iterator oit; for ( oit = _objectMap.begin(); oit != _objectMap.end(); ++oit ) - (*oit).invalidate(); + (*oit).tqinvalidate(); TraceClassMap::Iterator cit; for ( cit = _classMap.begin(); cit != _classMap.end(); ++cit ) - (*cit).invalidate(); + (*cit).tqinvalidate(); TraceFileMap::Iterator fit; for ( fit = _fileMap.begin(); fit != _fileMap.end(); ++fit ) - (*fit).invalidate(); + (*fit).tqinvalidate(); TraceFunctionMap::Iterator it; for ( it = _functionMap.begin(); it != _functionMap.end(); ++it ) { - (*it).invalidateDynamicCost(); + (*it).tqinvalidateDynamicCost(); } - invalidate(); + tqinvalidate(); } @@ -4719,21 +4715,21 @@ TraceClass* TraceData::cls(const TQString& fnName, TQString& shortName) int lastIndex = 0, index, pIndex; // we ignore any "::" after a '(' or a space - pIndex=fnName.find("(", 0); + pIndex=fnName.tqfind("(", 0); #if 0 - int sIndex=fnName.find(" ", 0); + int sIndex=fnName.tqfind(" ", 0); if (sIndex>=0) if ((pIndex == -1) || (sIndex < pIndex)) pIndex = sIndex; #endif - while ((index=fnName.find("::", lastIndex)) >=0) { + while ((index=fnName.tqfind("::", lastIndex)) >=0) { if (pIndex>=0 && pIndex<index) break; lastIndex = index+2; } - TQString clsName = (lastIndex < 3) ? TQString::null : + TQString clsName = (lastIndex < 3) ? TQString() : fnName.left(lastIndex-2); shortName = fnName.mid(lastIndex); @@ -4770,7 +4766,7 @@ TraceFunction* TraceData::function(const TQString& name, TQString key = name + object->shortName(); TraceFunctionMap::Iterator it; - it = _functionMap.find(key); + it = _functionMap.tqfind(key); if (it == _functionMap.end()) { it = _functionMap.insert(key, TraceFunction()); TraceFunction& f = it.data(); @@ -4807,7 +4803,7 @@ TraceFunctionMap::Iterator TraceData::functionIterator(TraceFunction* f) key += f->name(); key += f->object()->shortName(); - return _functionMap.find(key); + return _functionMap.tqfind(key); } TraceFunctionMap::ConstIterator TraceData::functionBeginIterator() const @@ -4847,10 +4843,10 @@ void TraceData::update() } TraceCost* TraceData::search(TraceItem::CostType t, TQString name, - TraceCostType* ct, TraceCost* parent) + TraceCostType* ct, TraceCost* tqparent) { TraceCost* result = 0; - TraceItem::CostType pt = parent ? parent->type() : NoCostType; + TraceItem::CostType pt = tqparent ? tqparent->type() : NoCostType; SubCost sc, scTop = 0; switch(t) { @@ -4864,9 +4860,9 @@ TraceCost* TraceData::search(TraceItem::CostType t, TQString name, if (f->name() != name) continue; - if ((pt == Class) && (parent != f->cls())) continue; - if ((pt == File) && (parent != f->file())) continue; - if ((pt == Object) && (parent != f->object())) continue; + if ((pt == Class) && (tqparent != f->cls())) continue; + if ((pt == File) && (tqparent != f->file())) continue; + if ((pt == Object) && (tqparent != f->object())) continue; if (ct) { sc = f->inclusive()->subCost(ct); @@ -4935,7 +4931,7 @@ TraceCost* TraceData::search(TraceItem::CostType t, TQString name, case Instr: if (pt == Function) { - TraceInstrMap* instrMap = ((TraceFunction*)parent)->instrMap(); + TraceInstrMap* instrMap = ((TraceFunction*)tqparent)->instrMap(); if (!instrMap) break; TraceInstr *instr; @@ -4953,9 +4949,9 @@ TraceCost* TraceData::search(TraceItem::CostType t, TQString name, { TraceFunctionSourceList sList; if (pt == Function) - sList = ((TraceFunction*)parent)->sourceFiles(); + sList = ((TraceFunction*)tqparent)->sourceFiles(); else if (pt == FunctionSource) - sList.append((TraceFunctionSource*) parent); + sList.append((TraceFunctionSource*) tqparent); else break; TraceLineMap* lineMap; @@ -5019,7 +5015,7 @@ void TraceData::updateFunctionCycles() #if 0 int fCount = _functionMap.size(), fNo = 0, progress=0, p; TQString msg = i18n("Recalculating Function Cycles..."); - if (_topLevel) _topLevel->showStatus(msg,0); + if (_topLevel) _topLevel->showtqStatus(msg,0); #endif // DFS and collapse strong connected components (Tarjan) @@ -5033,7 +5029,7 @@ void TraceData::updateFunctionCycles() p = 100*fNo/fCount; if (p> progress) { progress = p; - _topLevel->showStatus(msg, p); + _topLevel->showtqStatus(msg, p); } } #endif @@ -5047,11 +5043,11 @@ void TraceData::updateFunctionCycles() cycle->setup(); _inFunctionCycleUpdate = false; - // we have to invalidate costs because cycles are now taken into account - invalidateDynamicCost(); + // we have to tqinvalidate costs because cycles are now taken into account + tqinvalidateDynamicCost(); #if 0 - if (0) if (_topLevel) _topLevel->showStatus(TQString::null,0); + if (0) if (_topLevel) _topLevel->showtqStatus(TQString(),0); #endif } diff --git a/kcachegrind/kcachegrind/tracedata.h b/kcachegrind/kcachegrind/tracedata.h index 3ebe1310..1b57d297 100644 --- a/kcachegrind/kcachegrind/tracedata.h +++ b/kcachegrind/kcachegrind/tracedata.h @@ -64,7 +64,7 @@ class TQFile; * * For cost items, which are sums over all trace files read in, the * summed cost metrics change when e.g. a new trace file is read. - * Thus, their cached costs are invalidated, and again recalculated + * Thus, their cached costs are tqinvalidated, and again recalculated * only on demand. In the following list, theses cost items are called * "dynamic", the other "fixed" (but neverless calculated lazy). * @@ -301,16 +301,16 @@ public: virtual void clear(); /** Invalidate the cost attributes. - * An invalidated object needs to be recalculated when a cost + * An tqinvalidated object needs to be recalculated when a cost * attribute is requested (e.g. by subCost()). * Has to be overwritten by subclasses when the cost influences costs of * other cost items. If only one item depends on the cost of this item, * it can by set with setDependant() without a need for overwriting. */ - virtual void invalidate(); + virtual void tqinvalidate(); /** - * Sets a dependant to be invalidated when this cost is invalidated. + * Sets a dependant to be tqinvalidated when this cost is tqinvalidated. * Call this function directly after the constructor. */ void setDependant(TraceItem* d) { _dep = d; } @@ -388,7 +388,7 @@ public: void maxCost(int index, SubCost value); TraceCost diff(TraceCost* item); - virtual void invalidate(); + virtual void tqinvalidate(); /** Returns a sub cost. This automatically triggers * a call to update() if needed. @@ -443,8 +443,8 @@ public: * <formula> uses short names to reference other types */ TraceCostType(TQString name, - TQString longName = TQString::null, - TQString formula = TQString::null); + TQString longName = TQString(), + TQString formula = TQString()); void setName(TQString n) { _name = n; } void setLongName(TQString n) { _longName = n; } @@ -1303,7 +1303,7 @@ class TraceCall: public TraceCallListCost // we need some special handling for cycle calls void update(); - void invalidateDynamicCost(); + void tqinvalidateDynamicCost(); // factories TracePartCall* partCall(TracePart*, @@ -1502,7 +1502,7 @@ public: uint lastLineno(); TraceLineMap* lineMap(); - void invalidateDynamicCost(); + void tqinvalidateDynamicCost(); /* factories */ TraceLine* line(uint lineno, bool createNew = true); @@ -1549,7 +1549,7 @@ class TraceAssoziation bool setFunction(TraceFunction*); TraceFunction* function() { return _function; } - void invalidate() { _valid = false; } + void tqinvalidate() { _valid = false; } bool isValid() { return _valid; } /** @@ -1562,7 +1562,7 @@ class TraceAssoziation * Invalidate all assoziations in TraceFunctions of data with * rtti runtime info. rtti = 0: Invalidate ALL assoziations. */ - static void invalidate(TraceData* data, int rtti); + static void tqinvalidate(TraceData* data, int rtti); protected: TraceFunction* _function; @@ -1590,9 +1590,9 @@ class TraceFunction: public TraceCostItem virtual CostType type() const { return Function; } virtual void update(); - // this invalidate all subcosts of function depending on + // this tqinvalidate all subcosts of function depending on // active status of parts - void invalidateDynamicCost(); + void tqinvalidateDynamicCost(); void addCaller(TraceCall*); @@ -1651,7 +1651,7 @@ class TraceFunction: public TraceCostItem void addAssoziation(TraceAssoziation* a); void removeAssoziation(TraceAssoziation* a); void removeAssoziation(int rtti, bool reallyDelete = true); - void invalidateAssoziation(int rtti); + void tqinvalidateAssoziation(int rtti); TraceAssoziation* assoziation(int rtti); // cycles @@ -1764,7 +1764,7 @@ class TraceFile: public TraceCostItem virtual CostType type() const { return File; } void setDirectory(const TQString& dir); - void resetDirectory() { _dir = TQString::null; } + void resetDirectory() { _dir = TQString(); } TQString directory(); void addFunction(TraceFunction*); @@ -1841,10 +1841,10 @@ class TraceData: public TraceCost void load(const TQString&); /** returns true if something changed. These do NOT - * invalidate the dynamic costs on a activation change, + * tqinvalidate the dynamic costs on a activation change, * i.e. all cost items dependend on active parts. * This has to be done by the caller when true is returned by - * calling invalidateDynamicCost(). + * calling tqinvalidateDynamicCost(). */ bool activateParts(const TracePartList&); bool activateParts(TracePartList, bool active); @@ -1879,13 +1879,13 @@ class TraceData: public TraceCost /** * Search for item with given name and highest subcost of given cost type. * - * For some items, they will only be found if the parent cost is given: - * Instr, Line, Call => need parent of type Function - * For Function, a parent of type Obj/File/Class can be given, but + * For some items, they will only be found if the tqparent cost is given: + * Instr, Line, Call => need tqparent of type Function + * For Function, a tqparent of type Obj/File/Class can be given, but * isn't needed. */ TraceCost* search(TraceItem::CostType, TQString, - TraceCostType* ct = 0, TraceCost* parent = 0); + TraceCostType* ct = 0, TraceCost* tqparent = 0); // for pretty function names without signature if unique... TraceFunctionMap::Iterator functionIterator(TraceFunction*); @@ -1914,8 +1914,8 @@ class TraceData: public TraceCost virtual void update(); - // invalidates all cost items dependant on active state of parts - void invalidateDynamicCost(); + // tqinvalidates all cost items dependant on active state of parts + void tqinvalidateDynamicCost(); // cycle detection void updateFunctionCycles(); diff --git a/kcachegrind/kcachegrind/traceitemview.cpp b/kcachegrind/kcachegrind/traceitemview.cpp index d11f02b6..1d612ac3 100644 --- a/kcachegrind/kcachegrind/traceitemview.cpp +++ b/kcachegrind/kcachegrind/traceitemview.cpp @@ -30,10 +30,10 @@ #define TRACE_UPDATES 0 -TraceItemView::TraceItemView(TraceItemView* parentView, TopLevel* top) +TraceItemView::TraceItemView(TraceItemView* tqparentView, TopLevel* top) { - _parentView = parentView; - _topLevel = top ? top : parentView->topLevel(); + _parentView = tqparentView; + _topLevel = top ? top : tqparentView->topLevel(); _data = _newData = 0; // _partList and _newPartList is empty @@ -62,7 +62,7 @@ KConfigGroup* TraceItemView::configGroup(KConfig* c, TQString group, TQString post) { TQStringList gList = c->groupList(); - if (gList.contains((group+post).ascii()) ) group += post; + if (gList.tqcontains((group+post).ascii()) ) group += post; return new KConfigGroup(c, group); } @@ -178,7 +178,7 @@ void TraceItemView::setData(TraceData* d) { _newData = d; - // invalidate all pointers to old data + // tqinvalidate all pointers to old data _activeItem = _newActiveItem = 0; _selectedItem = _newSelectedItem = 0; _costType = _newCostType = 0; diff --git a/kcachegrind/kcachegrind/traceitemview.h b/kcachegrind/kcachegrind/traceitemview.h index f83aa896..a842a1d2 100644 --- a/kcachegrind/kcachegrind/traceitemview.h +++ b/kcachegrind/kcachegrind/traceitemview.h @@ -66,10 +66,10 @@ public: enum Direction { None, Back, Forward, Up }; - // a TraceItemView can have a position in a parent container + // a TraceItemView can have a position in a tqparent container enum Position { Hidden, Top, Right, Left, Bottom }; - TraceItemView(TraceItemView* parentView, TopLevel* top = 0); + TraceItemView(TraceItemView* tqparentView, TopLevel* top = 0); virtual ~TraceItemView() {} virtual TQString whatsThis() const; @@ -94,7 +94,7 @@ public: // Overwrite in container views to also set new data for all members. virtual void setData(TraceData* d); - // change from parent, call updateView() to update lazily (only if visible) + // change from tqparent, call updateView() to update lazily (only if visible) void setCostType(TraceCostType* t) { _newCostType = t; } void setCostType2(TraceCostType* t) { _newCostType2 = t; } void set(TraceItem::CostType g) { _newGroupType = g; } @@ -113,7 +113,7 @@ public: /** * Notification from child views. - * Default implementation notifies parent + * Default implementation notifies tqparent */ virtual void selected(TraceItemView* sender, TraceItem*); virtual void selected(TraceItemView* sender, const TracePartList&); @@ -165,7 +165,7 @@ public: void addGoMenu(TQPopupMenu*); protected: - // helpers to call selected()/activated() of parentView + // helpers to call selected()/activated() of tqparentView void selected(TraceItem*); void selected(const TracePartList&); void activated(TraceItem*); diff --git a/kcachegrind/kcachegrind/treemap.cpp b/kcachegrind/kcachegrind/treemap.cpp index fe01c796..cdc48cc8 100644 --- a/kcachegrind/kcachegrind/treemap.cpp +++ b/kcachegrind/kcachegrind/treemap.cpp @@ -51,7 +51,7 @@ StoredDrawParams::StoredDrawParams() _shaded = true; _rotated = false; - _backColor = Qt::white; + _backColor = TQt::white; // field array has size 0 } @@ -73,7 +73,7 @@ StoredDrawParams::StoredDrawParams(TQColor c, TQString StoredDrawParams::text(int f) const { if ((f<0) || (f >= (int)_field.size())) - return TQString::null; + return TQString(); return _field[f].text; } @@ -269,7 +269,7 @@ void RectDrawing::drawBack(TQPainter* p, DrawParams* dp) if (dp->shaded()) { // some shading - bool goDark = qGray(normal.rgb())>128; + bool goDark = tqGray(normal.rgb())>128; int rBase, gBase, bBase; normal.rgb(&rBase, &gBase, &bBase); p->setBrush(TQBrush::NoBrush); @@ -528,7 +528,7 @@ bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp) } p->save(); - p->setPen( (qGray(dp->backColor().rgb())>100) ? Qt::black : Qt::white); + p->setPen( (tqGray(dp->backColor().rgb())>100) ? TQt::black : TQt::white); p->setFont(dp->font()); if (rotate) { //p->translate(r.x()+2, r.y()+r.height()); @@ -619,7 +619,7 @@ bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp) } } else - remaining = TQString::null; + remaining = TQString(); /* truncate and add ... if needed */ if (w>width) { @@ -658,7 +658,7 @@ bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp) p->drawText( x+pixW, y, width - pixW, h, - Qt::AlignLeft, name); + TQt::AlignLeft, name); y = isBottom ? (y-h) : (y+h); lines--; @@ -720,11 +720,11 @@ int TreeMapItemList::compareItems ( Item item1, Item item2 ) bool ascending; int result; - TreeMapItem* parent = ((TreeMapItem*)item1)->parent(); + TreeMapItem* tqparent = ((TreeMapItem*)item1)->tqparent(); // shouldn't happen - if (!parent) return 0; + if (!tqparent) return 0; - int textNo = parent->sorting(&ascending); + int textNo = tqparent->sorting(&ascending); if (textNo < 0) { double diff = ((TreeMapItem*)item1)->value() - @@ -741,25 +741,25 @@ int TreeMapItemList::compareItems ( Item item1, Item item2 ) TreeMapItem* TreeMapItemList::commonParent() { - TreeMapItem* parent, *item; - parent = first(); - if (parent) + TreeMapItem* tqparent, *item; + tqparent = first(); + if (tqparent) while( (item = next()) != 0) - parent = parent->commonParent(item); + tqparent = tqparent->commonParent(item); - return parent; + return tqparent; } // TreeMapItem -TreeMapItem::TreeMapItem(TreeMapItem* parent, double value) +TreeMapItem::TreeMapItem(TreeMapItem* tqparent, double value) { _value = value; - _parent = parent; + _parent = tqparent; _sum = 0; - _children = 0; + _tqchildren = 0; _widget = 0; _index = -1; _depth = -1; // not set @@ -767,7 +767,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value) _freeRects = 0; if (_parent) { - // take sorting from parent + // take sorting from tqparent _sortTextNo = _parent->sorting(&_sortAscending); _parent->addItem(this); } @@ -778,12 +778,12 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value) } -TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, +TreeMapItem::TreeMapItem(TreeMapItem* tqparent, double value, TQString text1, TQString text2, TQString text3, TQString text4) { _value = value; - _parent = parent; + _parent = tqparent; // this resizes the text vector only if needed if (!text4.isEmpty()) setText(3, text4); @@ -792,7 +792,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, setText(0, text1); _sum = 0; - _children = 0; + _tqchildren = 0; _widget = 0; _index = -1; _depth = -1; // not set @@ -804,7 +804,7 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, TreeMapItem::~TreeMapItem() { - if (_children) delete _children; + if (_tqchildren) delete _tqchildren; if (_freeRects) delete _freeRects; // finally, notify widget about deletion @@ -832,7 +832,7 @@ bool TreeMapItem::isChildOf(TreeMapItem* item) TreeMapItem* TreeMapItem::commonParent(TreeMapItem* item) { while (item && !isChildOf(item)) { - item = item->parent(); + item = item->tqparent(); } return item; } @@ -845,18 +845,18 @@ void TreeMapItem::redraw() void TreeMapItem::clear() { - if (_children) { + if (_tqchildren) { // delete selected items below this item from selection if (_widget) _widget->clearSelection(this); - delete _children; - _children = 0; + delete _tqchildren; + _tqchildren = 0; } } -// invalidates current children and forces redraw -// this is only usefull when children are created on demand in items() +// tqinvalidates current tqchildren and forces redraw +// this is only usefull when tqchildren are created on demand in items() void TreeMapItem::refresh() { clear(); @@ -890,9 +890,9 @@ int TreeMapItem::depth() const bool TreeMapItem::initialized() { - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); return false; } return true; @@ -902,16 +902,16 @@ void TreeMapItem::addItem(TreeMapItem* i) { if (!i) return; - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); } i->setParent(this); if (sorting(0) == -1) - _children->append(i); // preserve insertion order + _tqchildren->append(i); // preserve insertion order else - _children->inSort(i); + _tqchildren->inSort(i); } @@ -977,17 +977,17 @@ void TreeMapItem::setSorting(int textNo, bool ascending) _sortAscending = ascending; _sortTextNo = textNo; - if (_children && _sortTextNo != -1) _children->sort(); + if (_tqchildren && _sortTextNo != -1) _tqchildren->sort(); } void TreeMapItem::resort(bool recursive) { - if (!_children) return; + if (!_tqchildren) return; - if (_sortTextNo != -1) _children->sort(); + if (_sortTextNo != -1) _tqchildren->sort(); if (recursive) - for (TreeMapItem* i=_children->first(); i; i=_children->next()) + for (TreeMapItem* i=_tqchildren->first(); i; i=_tqchildren->next()) i->resort(recursive); } @@ -1005,13 +1005,13 @@ int TreeMapItem::rtti() const return 0; } -TreeMapItemList* TreeMapItem::children() +TreeMapItemList* TreeMapItem::tqchildren() { - if (!_children) { - _children = new TreeMapItemList; - _children->setAutoDelete(true); + if (!_tqchildren) { + _tqchildren = new TreeMapItemList; + _tqchildren->setAutoDelete(true); } - return _children; + return _tqchildren; } void TreeMapItem::clearItemRect() @@ -1075,7 +1075,7 @@ void TreeMapItem::addFreeRect(const TQRect& r) // Tooltips for TreeMapWidget -class TreeMapTip: public QToolTip +class TreeMapTip: public TQToolTip { public: TreeMapTip( TQWidget* p ):TQToolTip(p) {} @@ -1086,17 +1086,17 @@ protected: void TreeMapTip::maybeTip( const TQPoint& pos ) { - if ( !parentWidget()->inherits( "TreeMapWidget" ) ) + if ( !tqparentWidget()->inherits( "TreeMapWidget" ) ) return; - TreeMapWidget* p = (TreeMapWidget*)parentWidget(); + TreeMapWidget* p = (TreeMapWidget*)tqparentWidget(); TreeMapItem* i; i = p->item(pos.x(), pos.y()); TQPtrList<TQRect>* rList = i ? i->freeRects() : 0; if (rList) { TQRect* r; for(r=rList->first();r;r=rList->next()) - if (r->contains(pos)) + if (r->tqcontains(pos)) tip(*r, p->tipString(i)); } } @@ -1106,8 +1106,8 @@ void TreeMapTip::maybeTip( const TQPoint& pos ) // TreeMapWidget TreeMapWidget::TreeMapWidget(TreeMapItem* base, - TQWidget* parent, const char* name) - : TQWidget(parent, name) + TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name) { _base = base; _base->setWidget(this); @@ -1147,8 +1147,8 @@ TreeMapWidget::TreeMapWidget(TreeMapItem* base, _lastOver = 0; _needsRefresh = _base; - setBackgroundMode(Qt::NoBackground); - setFocusPolicy(TQWidget::StrongFocus); + setBackgroundMode(TQt::NoBackground); + setFocusPolicy(TQ_StrongFocus); _tip = new TreeMapTip(this); } @@ -1278,7 +1278,7 @@ void TreeMapWidget::setMaxDrawingDepth(int d) TQString TreeMapWidget::defaultFieldType(int f) const { - return i18n("Text %1").arg(f+1); + return i18n("Text %1").tqarg(f+1); } TQString TreeMapWidget::defaultFieldStop(int) const @@ -1459,10 +1459,10 @@ void TreeMapWidget::setMinimalArea(int area) void TreeMapWidget::deletingItem(TreeMapItem* i) { // remove any references to the item to be deleted - while(_selection.findRef(i) > -1) + while(_selection.tqfindRef(i) > -1) _selection.remove(); - while(_tmpSelection.findRef(i) > -1) + while(_tmpSelection.tqfindRef(i) > -1) _tmpSelection.remove(); if (_current == i) _current = 0; @@ -1472,9 +1472,9 @@ void TreeMapWidget::deletingItem(TreeMapItem* i) // don't redraw a deleted item if (_needsRefresh == i) { - // we can savely redraw the parent, as deleting order is - // from child to parent; i.e. i->parent() is existing. - _needsRefresh = i->parent(); + // we can savely redraw the tqparent, as deleting order is + // from child to tqparent; i.e. i->tqparent() is existing. + _needsRefresh = i->tqparent(); } } @@ -1494,7 +1494,7 @@ TQString TreeMapWidget::tipString(TreeMapItem* i) const tip += itemTip; } - i = i->parent(); + i = i->tqparent(); } return tip; } @@ -1504,11 +1504,11 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const TreeMapItem* p = _base; TreeMapItem* i; - if (!rect().contains(x, y)) return 0; + if (!TQT_TQRECT_OBJECT(rect()).tqcontains(x, y)) return 0; if (DEBUG_DRAWING) kdDebug(90100) << "item(" << x << "," << y << "):" << endl; while (1) { - TreeMapItemList* list = p->children(); + TreeMapItemList* list = p->tqchildren(); if (!list) i = 0; else { @@ -1517,11 +1517,11 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const if (DEBUG_DRAWING) kdDebug(90100) << " Checking " << i->path(0).join("/") << " (" - << i->itemRect().x() << "/" << i->itemRect().y() - << "-" << i->itemRect().width() - << "x" << i->itemRect().height() << ")" << endl; + << i->tqitemRect().x() << "/" << i->tqitemRect().y() + << "-" << i->tqitemRect().width() + << "x" << i->tqitemRect().height() << ")" << endl; - if (i->itemRect().contains(x, y)) { + if (i->tqitemRect().tqcontains(x, y)) { if (DEBUG_DRAWING) kdDebug(90100) << " .. Got. Index " << idx << endl; @@ -1539,7 +1539,7 @@ TreeMapItem* TreeMapWidget::item(int x, int y) const if (DEBUG_DRAWING) kdDebug(90100) << "item(" << x << "," << y << "): Got " << p->path(0).join("/") << " (Size " - << p->itemRect().width() << "x" << p->itemRect().height() + << p->tqitemRect().width() << "x" << p->tqitemRect().height() << ", Val " << p->value() << ")" << endl; } @@ -1556,7 +1556,7 @@ TreeMapItem* TreeMapWidget::possibleSelection(TreeMapItem* i) const if (_maxSelectDepth>=0) { int depth = i->depth(); while(i && depth > _maxSelectDepth) { - i = i->parent(); + i = i->tqparent(); depth--; } } @@ -1568,16 +1568,16 @@ TreeMapItem* TreeMapWidget::visibleItem(TreeMapItem* i) const { if (i) { /* Must have a visible area */ - while(i && ((i->itemRect().width() <1) || - (i->itemRect().height() <1))) { - TreeMapItem* p = i->parent(); + while(i && ((i->tqitemRect().width() <1) || + (i->tqitemRect().height() <1))) { + TreeMapItem* p = i->tqparent(); if (!p) break; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->tqfindRef(i); idx--; if (idx<0) i = p; else - i = p->children()->at(idx); + i = p->tqchildren()->at(idx); } } return i; @@ -1622,12 +1622,12 @@ TreeMapItemList TreeMapWidget::diff(TreeMapItemList& l1, TreeMapItem* item; while ( (item = it1.current()) != 0 ) { ++it1; - if (l2.containsRef(item) > 0) continue; + if (l2.tqcontainsRef(item) > 0) continue; l.append(item); } while ( (item = it2.current()) != 0 ) { ++it2; - if (l1.containsRef(item) > 0) continue; + if (l1.tqcontainsRef(item) > 0) continue; l.append(item); } @@ -1670,13 +1670,13 @@ TreeMapItem* TreeMapWidget::setTmpSelected(TreeMapItem* item, bool selected) } -bool TreeMapWidget::clearSelection(TreeMapItem* parent) +bool TreeMapWidget::clearSelection(TreeMapItem* tqparent) { TreeMapItemList old = _selection; TreeMapItem* i=_selection.first(); while (i) { - if (i->isChildOf(parent)) { + if (i->isChildOf(tqparent)) { _selection.remove(); i = _selection.current(); } @@ -1694,12 +1694,12 @@ bool TreeMapWidget::clearSelection(TreeMapItem* parent) bool TreeMapWidget::isSelected(TreeMapItem* i) const { - return _selection.containsRef(i)>0; + return _selection.tqcontainsRef(i)>0; } bool TreeMapWidget::isTmpSelected(TreeMapItem* i) { - return _tmpSelection.containsRef(i)>0; + return _tmpSelection.tqcontainsRef(i)>0; } @@ -1764,14 +1764,14 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1, TreeMapItem* commonParent = i1; while (commonParent && !i2->isChildOf(commonParent)) { i1 = commonParent; - commonParent = commonParent->parent(); + commonParent = commonParent->tqparent(); } if (!commonParent) return changed; - while (i2 && i2->parent() != commonParent) - i2 = i2->parent(); + while (i2 && i2->tqparent() != commonParent) + i2 = i2->tqparent(); if (!i2) return changed; - TreeMapItemList* list = commonParent->children(); + TreeMapItemList* list = commonParent->tqchildren(); if (!list) return changed; TreeMapItem* i = list->first(); @@ -1794,11 +1794,11 @@ void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e ) { //kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl; - if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) ) + if ( tqreceivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) ) e->accept(); if ( e->reason() == TQContextMenuEvent::Keyboard ) { - TQRect r = (_current) ? _current->itemRect() : _base->itemRect(); + TQRect r = (_current) ? _current->tqitemRect() : _base->tqitemRect(); TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2); emit contextMenuRequested(_current, p); } @@ -1852,7 +1852,7 @@ void TreeMapWidget::mousePressEvent( TQMouseEvent* e ) } // item under mouse always selected on right button press - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { TreeMapItem* changed2 = setTmpSelected(item, true); if (changed2) changed = changed2->commonParent(changed); } @@ -1862,7 +1862,7 @@ void TreeMapWidget::mousePressEvent( TQMouseEvent* e ) if (changed) redraw(changed); - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { // emit selection change if (! (_tmpSelection == _selection)) { @@ -1961,15 +1961,15 @@ void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e ) /* returns -1 if nothing visible found */ int nextVisible(TreeMapItem* i) { - TreeMapItem* p = i->parent(); - if (!p || p->itemRect().isEmpty()) return -1; + TreeMapItem* p = i->tqparent(); + if (!p || p->tqitemRect().isEmpty()) return -1; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->tqfindRef(i); if (idx<0) return -1; - while (idx < (int)p->children()->count()-1) { + while (idx < (int)p->tqchildren()->count()-1) { idx++; - TQRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->tqchildren()->at(idx)->tqitemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -1979,15 +1979,15 @@ int nextVisible(TreeMapItem* i) /* returns -1 if nothing visible found */ int prevVisible(TreeMapItem* i) { - TreeMapItem* p = i->parent(); - if (!p || p->itemRect().isEmpty()) return -1; + TreeMapItem* p = i->tqparent(); + if (!p || p->tqitemRect().isEmpty()) return -1; - int idx = p->children()->findRef(i); + int idx = p->tqchildren()->tqfindRef(i); if (idx<0) return -1; while (idx > 0) { idx--; - TQRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->tqchildren()->at(idx)->tqitemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -2050,7 +2050,7 @@ void TreeMapWidget::keyPressEvent( TQKeyEvent* e ) } TreeMapItem* old = _current, *newItem; - TreeMapItem* p = _current->parent(); + TreeMapItem* p = _current->tqparent(); bool goBack; if (_current->sorting(&goBack) == -1) { @@ -2068,24 +2068,24 @@ void TreeMapWidget::keyPressEvent( TQKeyEvent* e ) int newIdx = goBack ? nextVisible(_current) : prevVisible(_current); if (p && newIdx>=0) { p->setIndex(newIdx); - setCurrent(p->children()->at(newIdx), true); + setCurrent(p->tqchildren()->at(newIdx), true); } } else if (e->key() == Key_Right) { int newIdx = goBack ? prevVisible(_current) : nextVisible(_current); if (p && newIdx>=0) { p->setIndex(newIdx); - setCurrent(p->children()->at(newIdx), true); + setCurrent(p->tqchildren()->at(newIdx), true); } } else if (e->key() == Key_Down) { - if (_current->children() && _current->children()->count()>0) { + if (_current->tqchildren() && _current->tqchildren()->count()>0) { int newIdx = _current->index(); if (newIdx<0) - newIdx = goBack ? (_current->children()->count()-1) : 0; - if (newIdx>=(int)_current->children()->count()) - newIdx = _current->children()->count()-1; - newItem = visibleItem(_current->children()->at(newIdx)); + newIdx = goBack ? (_current->tqchildren()->count()-1) : 0; + if (newIdx>=(int)_current->tqchildren()->count()) + newIdx = _current->tqchildren()->count()-1; + newItem = visibleItem(_current->tqchildren()->at(newIdx)); setCurrent(newItem, true); } } @@ -2162,7 +2162,7 @@ void TreeMapWidget::drawTreeMap() } else { // only subitem - if (!_needsRefresh->itemRect().isValid()) return; + if (!_needsRefresh->tqitemRect().isValid()) return; } // reset cached font object; it could have been changed @@ -2173,14 +2173,14 @@ void TreeMapWidget::drawTreeMap() _needsRefresh = 0; } - bitBlt( this, 0, 0, &_pixmap, 0, 0, + bitBlt( TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&_pixmap), 0, 0, TQWidget::width(), TQWidget::height(), CopyROP, true); if (hasFocus()) { TQPainter p(this); - style().drawPrimitive( TQStyle::PE_FocusRect, &p, + tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, TQRect(0, 0, TQWidget::width(), TQWidget::height()), - colorGroup() ); + tqcolorGroup() ); } } @@ -2210,7 +2210,7 @@ void TreeMapWidget::drawItem(TQPainter* p, TreeMapItem* i; if (_markNo>0) { - for(i = item;i;i=i->parent()) + for(i = item;i;i=i->tqparent()) if (i->isMarked(_markNo)) break; isSelected = (i!=0); @@ -2226,7 +2226,7 @@ void TreeMapWidget::drawItem(TQPainter* p, int dd = item->depth(); if (isTransparent(dd)) return; - RectDrawing d(item->itemRect()); + RectDrawing d(item->tqitemRect()); item->setSelected(isSelected); item->setCurrent(isCurrent); item->setShaded(_shading); @@ -2261,25 +2261,25 @@ void TreeMapWidget::drawItems(TQPainter* p, { if (DEBUG_DRAWING) kdDebug(90100) << "+drawItems(" << item->path(0).join("/") << ", " - << item->itemRect().x() << "/" << item->itemRect().y() - << "-" << item->itemRect().width() << "x" - << item->itemRect().height() << "), Val " << item->value() + << item->tqitemRect().x() << "/" << item->tqitemRect().y() + << "-" << item->tqitemRect().width() << "x" + << item->tqitemRect().height() << "), Val " << item->value() << ", Sum " << item->sum() << endl; drawItem(p, item); item->clearFreeRects(); - TQRect origRect = item->itemRect(); + TQRect origRect = item->tqitemRect(); int bw = item->borderWidth(); TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw, origRect.width()-2*bw, origRect.height()-2*bw); - TreeMapItemList* list = item->children(); + TreeMapItemList* list = item->tqchildren(); TreeMapItem* i; bool stopDrawing = false; - // only subdivide if there are children + // only subdivide if there are tqchildren if (!list || list->count()==0) stopDrawing = true; @@ -2312,12 +2312,12 @@ void TreeMapWidget::drawItems(TQPainter* p, if (stopDrawing) { if (list) { - // invalidate rects + // tqinvalidate rects for (i=list->first();i;i=list->next()) i->clearItemRect(); } // tooltip apears on whole item rect - item->addFreeRect(item->itemRect()); + item->addFreeRect(item->tqitemRect()); // if we have space for text... if ((r.height() < _fontHeight) || (r.width() < _fontHeight)) return; @@ -2428,7 +2428,7 @@ void TreeMapWidget::drawItems(TQPainter* p, r.setRect(r.x(), r.y()+sr.height(), r.width(), r.height()-sr.height()); } - // set selfRect (not occupied by children) for tooltip + // set selfRect (not occupied by tqchildren) for tooltip item->addFreeRect(sr); if (0) kdDebug(90100) << "Item " << item->path(0).join("/") << ": SelfR " @@ -2566,16 +2566,16 @@ void TreeMapWidget::drawItems(TQPainter* p, kdDebug(90100) << "-drawItems(" << item->path(0).join("/") << ")" << endl; } -// fills area with a pattern if to small to draw children +// fills area with a pattern if to small to draw tqchildren void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r) { - p->setBrush(Qt::Dense4Pattern); - p->setPen(Qt::NoPen); + p->setBrush(TQt::Dense4Pattern); + p->setPen(TQt::NoPen); p->drawRect(r); i->addFreeRect(r); } -// fills area with a pattern if to small to draw children +// fills area with a pattern if to small to draw tqchildren void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r, TreeMapItemListIterator it, int len, bool goBack) { @@ -2584,8 +2584,8 @@ void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r, << "-" << r.width() << "x" << r.height() << ", len " << len << ")" << endl; - p->setBrush(Qt::Dense4Pattern); - p->setPen(Qt::NoPen); + p->setBrush(TQt::Dense4Pattern); + p->setPen(TQt::NoPen); p->drawRect(r); i->addFreeRect(r); @@ -2874,10 +2874,10 @@ void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id) popup->insertItem(i18n("Border"), bpopup, id+1); bpopup->insertItem(i18n("Correct Borders Only"), id+2); bpopup->insertSeparator(); - bpopup->insertItem(i18n("Width %1").arg(0), id+3); - bpopup->insertItem(i18n("Width %1").arg(1), id+4); - bpopup->insertItem(i18n("Width %1").arg(2), id+5); - bpopup->insertItem(i18n("Width %1").arg(3), id+6); + bpopup->insertItem(i18n("Width %1").tqarg(0), id+3); + bpopup->insertItem(i18n("Width %1").tqarg(1), id+4); + bpopup->insertItem(i18n("Width %1").tqarg(2), id+5); + bpopup->insertItem(i18n("Width %1").tqarg(3), id+6); bpopup->setItemChecked(id+2, skipIncorrectBorder()); bpopup->setItemChecked(id+3, borderWidth()==0); bpopup->setItemChecked(id+4, borderWidth()==1); @@ -2935,7 +2935,7 @@ void TreeMapWidget::selectionActivated(int id) TreeMapItem* i = _menuItem; id -= _selectionID; while (id>0 && i) { - i=i->parent(); + i=i->tqparent(); id--; } if (i) @@ -2957,18 +2957,18 @@ void TreeMapWidget::addSelectionItems(TQPopupMenu* popup, TQString name = i->text(0); if (name.isEmpty()) break; popup->insertItem(i->text(0), id++); - i = i->parent(); + i = i->tqparent(); } } void TreeMapWidget::fieldStopActivated(int id) { - if (id == _fieldStopID) setFieldStop(0, TQString::null); + if (id == _fieldStopID) setFieldStop(0, TQString()); else { TreeMapItem* i = _menuItem; id -= _fieldStopID+1; while (id>0 && i) { - i=i->parent(); + i=i->tqparent(); id--; } if (i) @@ -2984,7 +2984,7 @@ void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup, connect(popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(fieldStopActivated(int))); - popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id); + popup->insertItem(i18n("No %1 Limit").tqarg(fieldType(0)), id); popup->setItemChecked(id, fieldStop(0).isEmpty()); _menuItem = i; bool foundFieldStop = false; @@ -3000,7 +3000,7 @@ void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup, popup->setItemChecked(id, true); foundFieldStop = true; } - i = i->parent(); + i = i->tqparent(); } } @@ -3043,7 +3043,7 @@ void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup, int area = i->width() * i->height(); popup->insertSeparator(); popup->insertItem(i18n("Area of '%1' (%2)") - .arg(i->text(0)).arg(area), id+1); + .tqarg(i->text(0)).tqarg(area), id+1); if (area == minimalArea()) { popup->setItemChecked(id+1, true); foundArea = true; @@ -3069,9 +3069,9 @@ void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup, } popup->insertItem(i18n("Double Area Limit (to %1)") - .arg(minimalArea()*2), id+5); + .tqarg(minimalArea()*2), id+5); popup->insertItem(i18n("Halve Area Limit (to %1)") - .arg(minimalArea()/2), id+6); + .tqarg(minimalArea()/2), id+6); } } @@ -3105,7 +3105,7 @@ void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, int d = i->depth(); popup->insertSeparator(); popup->insertItem(i18n("Depth of '%1' (%2)") - .arg(i->text(0)).arg(d), id+1); + .tqarg(i->text(0)).tqarg(d), id+1); if (d == maxDrawingDepth()) { popup->setItemChecked(id+1, true); foundDepth = true; @@ -3115,14 +3115,14 @@ void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, if (maxDrawingDepth()>1) { popup->insertSeparator(); if (!foundDepth) { - popup->insertItem(i18n("Depth %1").arg(maxDrawingDepth()), id+10); + popup->insertItem(i18n("Depth %1").tqarg(maxDrawingDepth()), id+10); popup->setItemChecked(id+10, true); } popup->insertItem(i18n("Decrement (to %1)") - .arg(maxDrawingDepth()-1), id+2); + .tqarg(maxDrawingDepth()-1), id+2); popup->insertItem(i18n("Increment (to %1)") - .arg(maxDrawingDepth()+1), id+3); + .tqarg(maxDrawingDepth()+1), id+3); } } @@ -3145,13 +3145,13 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix) int f, fCount = _attr.size(); config->writeEntry(prefix+"FieldCount", fCount); for (f=0;f<fCount;f++) { - config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f), + config->writeEntry(TQString(prefix+"FieldVisible%1").tqarg(f), _attr[f].visible); - config->writeEntry(TQString(prefix+"FieldForced%1").arg(f), + config->writeEntry(TQString(prefix+"FieldForced%1").tqarg(f), _attr[f].forced); - config->writeEntry(TQString(prefix+"FieldStop%1").arg(f), + config->writeEntry(TQString(prefix+"FieldStop%1").tqarg(f), _attr[f].stop); - config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f), + config->writeEntry(TQString(prefix+"FieldPosition%1").tqarg(f), fieldPositionString(f)); } } @@ -3195,18 +3195,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix) int f; for (f=0;f<num;f++) { - str = TQString(prefix+"FieldVisible%1").arg(f); + str = TQString(prefix+"FieldVisible%1").tqarg(f); if (config->hasKey(str)) setFieldVisible(f, config->readBoolEntry(str)); - str = TQString(prefix+"FieldForced%1").arg(f); + str = TQString(prefix+"FieldForced%1").tqarg(f); if (config->hasKey(str)) setFieldForced(f, config->readBoolEntry(str)); - str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldStop%1").tqarg(f)); setFieldStop(f, str); - str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldPosition%1").tqarg(f)); if (!str.isEmpty()) setFieldPosition(f, str); } } diff --git a/kcachegrind/kcachegrind/treemap.h b/kcachegrind/kcachegrind/treemap.h index 289610bb..9c936cbd 100644 --- a/kcachegrind/kcachegrind/treemap.h +++ b/kcachegrind/kcachegrind/treemap.h @@ -81,7 +81,7 @@ public: virtual int maxLines(int) const { return 0; } virtual int fieldCount() const { return 0; } - virtual TQColor backColor() const { return Qt::white; } + virtual TQColor backColor() const { return TQt::white; } virtual const TQFont& font() const = 0; virtual bool selected() const { return false; } @@ -222,7 +222,7 @@ typedef TQPtrListIterator<TreeMapItem> TreeMapItemListIterator; * * If you want more flexibility, reimplement TreeMapItem and * override the corresponding methods. For dynamic creation of child - * items on demand, reimplement children(). + * items on demand, reimplement tqchildren(). */ class TreeMapItem: public StoredDrawParams { @@ -234,20 +234,20 @@ public: * longest side of rectangle left for drawing * Best: Choose split direction for all subitems of an area * depending on longest side - * HAlternate: Horizontal at top; alternate direction on depth step - * VAlternate: Vertical at top; alternate direction on depth step - * Horizontal: Always horizontal split direction - * Vertical: Always vertical split direction + * HAlternate:Qt::Horizontal at top; alternate direction on depth step + * VAlternate:Qt::Vertical at top; alternate direction on depth step + * Qt::Horizontal: Always horizontal split direction + * Qt::Vertical: Always vertical split direction */ enum SplitMode { Bisection, Columns, Rows, AlwaysBest, Best, HAlternate, VAlternate, Horizontal, Vertical }; - TreeMapItem(TreeMapItem* parent = 0, double value = 1.0 ); - TreeMapItem(TreeMapItem* parent, double value, - TQString text1, TQString text2 = TQString::null, - TQString text3 = TQString::null, TQString text4 = TQString::null); + TreeMapItem(TreeMapItem* tqparent = 0, double value = 1.0 ); + TreeMapItem(TreeMapItem* tqparent, double value, + TQString text1, TQString text2 = TQString(), + TQString text3 = TQString(), TQString text4 = TQString()); virtual ~TreeMapItem(); bool isChildOf(TreeMapItem*); @@ -257,7 +257,7 @@ public: // force a redraw of this item void redraw(); - // delete all children + // delete all tqchildren void clear(); // force new child generation & refresh @@ -268,9 +268,9 @@ public: bool initialized(); /** - * Adds an item to a parent. + * Adds an item to a tqparent. * When no sorting is used, the item is appended (drawn at bottom). - * This is only needed if the parent was not already specified in the + * This is only needed if the tqparent was not already specified in the * construction of the item. */ void addItem(TreeMapItem*); @@ -289,7 +289,7 @@ public: /** * Parent Item */ - TreeMapItem* parent() const { return _parent; } + TreeMapItem* tqparent() const { return _parent; } /** * Temporary rectangle used for drawing this item the last time. @@ -297,7 +297,7 @@ public: */ void setItemRect(const TQRect& r) { _rect = r; } void clearItemRect(); - const TQRect& itemRect() const { return _rect; } + const TQRect& tqitemRect() const { return _rect; } int width() const { return _rect.width(); } int height() const { return _rect.height(); } @@ -328,7 +328,7 @@ public: virtual double sum() const; virtual double value() const; - // replace "Default" position with setting from TreeMapWidget + // tqreplace "Default" position with setting from TreeMapWidget virtual Position position(int) const; virtual const TQFont& font() const; virtual bool isMarked(int) const; @@ -350,7 +350,7 @@ public: * For value() sorting, use <textNo> = -2 * * For fast sorting, set this to -1 before child insertions and call - * again after inserting all children. + * again after inserting all tqchildren. */ void setSorting(int textNo, bool ascending = true); @@ -358,18 +358,18 @@ public: * Resort according to the already set sorting. * * This has to be done if the sorting base changes (e.g. text or values - * change). If this is only true for the children of this item, you can + * change). If this is only true for the tqchildren of this item, you can * set the recursive parameter to false. */ void resort(bool recursive = true); virtual SplitMode splitMode() const; virtual int rtti() const; - // not const as this can create children on demand - virtual TreeMapItemList* children(); + // not const as this can create tqchildren on demand + virtual TreeMapItemList* tqchildren(); protected: - TreeMapItemList* _children; + TreeMapItemList* _tqchildren; double _sum, _value; private: @@ -379,7 +379,7 @@ private: int _sortTextNo; bool _sortAscending; - // temporary layout + // temporary tqlayout TQRect _rect; TQPtrList<TQRect>* _freeRects; int _depth; @@ -396,19 +396,20 @@ private: * Class for visualization of a metric of hierarchically * nested items as 2D areas. */ -class TreeMapWidget: public QWidget +class TreeMapWidget: public TQWidget { Q_OBJECT + TQ_OBJECT public: /** - * Same as in QListBox/QListView + * Same as in TQListBox/TQListView */ enum SelectionMode { Single, Multi, Extended, NoSelection }; /* The widget becomes owner of the base item */ - TreeMapWidget(TreeMapItem* base, TQWidget* parent=0, const char* name=0); + TreeMapWidget(TreeMapItem* base, TQWidget* tqparent=0, const char* name=0); ~TreeMapWidget(); /** @@ -435,7 +436,7 @@ public: /** * Returns the item possible for selection. this returns the - * given item itself or a parent thereof, + * given item itself or a tqparent thereof, * depending on setting of maxSelectDepth(). */ TreeMapItem* possibleSelection(TreeMapItem*) const; @@ -443,7 +444,7 @@ public: /** * Selects or unselects an item. * In multiselection mode, the constrain that a selected item - * has no selected children or parents stays true. + * has no selected tqchildren or tqparents stays true. */ void setSelected(TreeMapItem*, bool selected = true); @@ -459,19 +460,19 @@ public: void setMarked(int markNo = 1, bool redraw = true); /** - * Clear selection of all selected items which are children of - * parent. When parent == 0, clears whole selection + * Clear selection of all selected items which are tqchildren of + * tqparent. When tqparent == 0, clears whole selection * Returns true if selection changed. */ - bool clearSelection(TreeMapItem* parent = 0); + bool clearSelection(TreeMapItem* tqparent = 0); /** * Selects or unselects items in a range. * This is needed internally for Shift-Click in Extented mode. * Range means for a hierarchical widget: * - select/unselect i1 and i2 according selected - * - search common parent of i1 and i2, and select/unselect the - * range of direct children between but excluding the child + * - search common tqparent of i1 and i2, and select/unselect the + * range of direct tqchildren between but excluding the child * leading to i1 and the child leading to i2. */ void setRangeSelection(TreeMapItem* i1, @@ -531,15 +532,15 @@ public: void setVisibleWidth(int width, bool reuseSpace = false); /** - * If a children value() is almost the parents sum(), + * If a tqchildren value() is almost the tqparents sum(), * it can happen that the border to be drawn for visibilty of * nesting relations takes to much space, and the - * parent/child size relation can not be mapped to a correct + * tqparent/child size relation can not be mapped to a correct * area size relation. * * Either * (1) Ignore the incorrect drawing, or - * (2) Skip drawing of the parent level alltogether. + * (2) Skip drawing of the tqparent level alltogether. */ void setSkipIncorrectBorder(bool enable = true); bool skipIncorrectBorder() const { return _skipIncorrectBorder; } @@ -613,8 +614,8 @@ public: /** * Save/restore options. */ - void saveOptions(KConfigGroup*, TQString prefix = TQString::null); - void restoreOptions(KConfigGroup*, TQString prefix = TQString::null); + void saveOptions(KConfigGroup*, TQString prefix = TQString()); + void restoreOptions(KConfigGroup*, TQString prefix = TQString()); /** * These functions populate given popup menus. @@ -643,7 +644,7 @@ public: virtual TQString tipString(TreeMapItem* i) const; /** - * Redraws an item with all children. + * Redraws an item with all tqchildren. * This takes changed values(), sums(), colors() and text() into account. */ void redraw(TreeMapItem*); diff --git a/kcachegrind/kcachegrind/utils.h b/kcachegrind/kcachegrind/utils.h index 7256f054..06052a61 100644 --- a/kcachegrind/kcachegrind/utils.h +++ b/kcachegrind/kcachegrind/utils.h @@ -86,7 +86,7 @@ class FixString { bool stripInt64(int64&, bool stripSpaces = true); operator TQString() const - { return TQString::fromLatin1(_str,_len); } + { return TQString::tqfromLatin1(_str,_len); } private: const char* _str; |