From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: TQt4 port piklab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/libgui/gui_debug_manager.cpp | 44 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/libgui/gui_debug_manager.cpp') diff --git a/src/libgui/gui_debug_manager.cpp b/src/libgui/gui_debug_manager.cpp index adda68a..fdf0979 100644 --- a/src/libgui/gui_debug_manager.cpp +++ b/src/libgui/gui_debug_manager.cpp @@ -25,8 +25,8 @@ bool Debugger::GuiManager::addEditor(Editor &editor) { - if ( _editors.find(&editor)!=_editors.end() ) return false; - connect(&editor, SIGNAL(destroyed()), SLOT(editorDestroyed())); + if ( _editors.tqfind(&editor)!=_editors.end() ) return false; + connect(&editor, TQT_SIGNAL(destroyed()), TQT_SLOT(editorDestroyed())); _editors.append(&editor); return true; } @@ -45,14 +45,14 @@ void Debugger::GuiManager::addTextEditor(TextEditor &editor) void Debugger::GuiManager::clearEditors() { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) (*it)->disconnect(this); _editors.clear(); } void Debugger::GuiManager::editorDestroyed() { - QValueList::iterator it = _editors.begin(); + TQValueList::iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { if ( (*it)!=sender() ) continue; _editors.remove(it); @@ -74,7 +74,7 @@ PURL::Url Debugger::GuiManager::coffUrl() const bool Debugger::GuiManager::internalInit() { if ( !Manager::internalInit() ) return false; - if ( !Main::projectManager().contains(coffUrl()) ) + if ( !Main::projectManager().tqcontains(coffUrl()) ) Main::projectManager().addExternalFile(coffUrl(), ProjectManager::Generated); Main::watchView().init(true); if ( registerView() ) registerView()->view()->updateView(); @@ -93,7 +93,7 @@ Breakpoint::Data Debugger::GuiManager::currentBreakpointData() { const Breakpoint::Data *data = Main::breakpointsView().currentData(); if (data) return *data; - TextEditor *editor = ::qt_cast(Main::currentEditor()); + TextEditor *editor = ::tqqt_cast(Main::currentEditor()); Q_ASSERT(editor); return Breakpoint::Data(editor->url(), editor->cursorLine()); } @@ -105,7 +105,7 @@ void Debugger::GuiManager::toggleBreakpoint() return; } Breakpoint::Data data = currentBreakpointData(); - if ( Breakpoint::list().contains(data) ) { + if ( Breakpoint::list().tqcontains(data) ) { Breakpoint::list().remove(data); return; } @@ -148,7 +148,7 @@ void Debugger::GuiManager::updateEditorMarks(TextEditor &editor) const } // update pc if ( _coff && programmer() && programmer()->isActive() && pc().isInitialized() && !reached - && _currentSourceLines.contains(editor.url()) ) { + && _currentSourceLines.tqcontains(editor.url()) ) { int pcline = _currentSourceLines[editor.url()]; if ( programmer()->state()==Programmer::Halted ) editor.setMark(pcline, Breakpoint::ProgramCounterActive); else editor.setMark(pcline, Breakpoint::ProgramCounterDisabled); @@ -181,12 +181,12 @@ void Debugger::GuiManager::updateView(bool gotoPC) { Main::breakpointsView().updateView(); bool currentHasPC = false; - QValueList::iterator ite; + TQValueList::iterator ite; for (ite=_editors.begin(); ite!=_editors.end(); ++ite) { - TextEditor *e = ::qt_cast(*ite); + TextEditor *e = ::tqqt_cast(*ite); if ( e==0 ) continue; updateEditorMarks(*e); - if ( !_currentSourceLines.contains(e->url()) ) continue; + if ( !_currentSourceLines.tqcontains(e->url()) ) continue; if (gotoPC) e->setCursor(_currentSourceLines[e->url()], 0); if ( e==Main::currentEditor() ) currentHasPC = true; } @@ -195,16 +195,16 @@ void Debugger::GuiManager::updateView(bool gotoPC) // 2: look at files inside project // 3: look at existing files for (uint i=0; i<3; i++) { - QMap::const_iterator it; + TQMap::const_iterator it; for (it=_currentSourceLines.begin(); it!=_currentSourceLines.end(); ++it) { switch (i) { - case 0: if ( !Main::projectManager().contains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break; - case 1: if ( !Main::projectManager().contains(it.key()) ) continue; break; + case 0: if ( !Main::projectManager().tqcontains(it.key()) || Main::projectManager().isExternalFile(it.key()) ) continue; break; + case 1: if ( !Main::projectManager().tqcontains(it.key()) ) continue; break; case 2: if ( !it.key().exists() ) continue; break; } - TextEditor *e = ::qt_cast(Main::editorManager().findEditor(it.key())); + TextEditor *e = ::tqqt_cast(Main::editorManager().findEditor(it.key())); if ( e==0 ) { - if (gotoPC) e = ::qt_cast(Main::editorManager().openEditor(it.key())); + if (gotoPC) e = ::tqqt_cast(Main::editorManager().openEditor(it.key())); if ( e==0 ) continue; } updateEditorMarks(*e); @@ -219,9 +219,9 @@ void Debugger::GuiManager::updateView(bool gotoPC) Register::MainView *Debugger::GuiManager::registerView() const { - QValueList::const_iterator it = _editors.begin(); + TQValueList::const_iterator it = _editors.begin(); for (; it!=_editors.end(); ++it) { - Register::MainView *rv = ::qt_cast(*it); + Register::MainView *rv = ::tqqt_cast(*it); if (rv) return rv; } return 0; @@ -229,21 +229,21 @@ Register::MainView *Debugger::GuiManager::registerView() const bool Debugger::GuiManager::isProjectSource(const PURL::Url &url) const { - return ( Main::projectManager().contains(url) && !Main::projectManager().isExternalFile(url) ); + return ( Main::projectManager().tqcontains(url) && !Main::projectManager().isExternalFile(url) ); } void Debugger::GuiManager::showDisassemblyLocation() { - TextEditor *editor = ::qt_cast(Main::currentEditor()); + TextEditor *editor = ::tqqt_cast(Main::currentEditor()); Q_ASSERT(editor); Q_ASSERT(_coff); - QValueVector
addresses = _coff->addresses(editor->url(), editor->cursorLine()); + TQValueVector
addresses = _coff->addresses(editor->url(), editor->cursorLine()); if ( addresses.isEmpty() ) { MessageBox::sorry(i18n("Cannot show disassembly location for non-code line."), Log::Show); return; } int line = _coff->lineForAddress(_coff->url(), addresses[0]); if ( line==-1 ) return; // possible ? - TextEditor *e = ::qt_cast(Main::editorManager().openEditor(_coff->url())); + TextEditor *e = ::tqqt_cast(Main::editorManager().openEditor(_coff->url())); if (e) e->setCursor(line, 0); } -- cgit v1.2.3