summaryrefslogtreecommitdiffstats
path: root/kcachegrind/kcachegrind/toplevel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kcachegrind/kcachegrind/toplevel.cpp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcachegrind/kcachegrind/toplevel.cpp')
-rw-r--r--kcachegrind/kcachegrind/toplevel.cpp304
1 files changed, 147 insertions, 157 deletions
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"