summaryrefslogtreecommitdiffstats
path: root/src/partcontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/partcontroller.cpp')
-rw-r--r--src/partcontroller.cpp99
1 files changed, 46 insertions, 53 deletions
diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp
index 33e50afd..086d641e 100644
--- a/src/partcontroller.cpp
+++ b/src/partcontroller.cpp
@@ -92,9 +92,9 @@ struct ModificationData
PartController::PartController(TQWidget *parent)
: KDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false)
{
- connect(this, TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part* )) );
- connect(this, TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part* )) );
- connect(this, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*)));
+ connect(this, TQ_SIGNAL(partRemoved(KParts::Part*)), this, TQ_SLOT(slotPartRemoved(KParts::Part* )) );
+ connect(this, TQ_SIGNAL(partAdded(KParts::Part*)), this, TQ_SLOT(slotPartAdded(KParts::Part* )) );
+ connect(this, TQ_SIGNAL(activePartChanged(KParts::Part*)), this, TQ_SLOT(slotActivePartChanged(KParts::Part*)));
setupActions();
@@ -126,56 +126,56 @@ void PartController::setupActions()
{
TDEActionCollection *ac = TopLevel::getInstance()->main()->actionCollection();
- TDEAction* newAction = KStdAction::open(this, TQT_SLOT(slotOpenFile()), ac, "file_open");
+ TDEAction* newAction = KStdAction::open(this, TQ_SLOT(slotOpenFile()), ac, "file_open");
newAction->setToolTip( i18n("Open file") );
newAction->setWhatsThis( i18n("<b>Open file</b><p>Opens an existing file without adding it to the project.</p>") );
- m_openRecentAction = KStdAction::openRecent( this, TQT_SLOT(slotOpenRecent(const KURL&) ), ac, "file_open_recent" );
+ m_openRecentAction = KStdAction::openRecent( this, TQ_SLOT(slotOpenRecent(const KURL&) ), ac, "file_open_recent" );
m_openRecentAction->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(m_openRecentAction->text())).arg(i18n("Opens recently opened file.")));
m_openRecentAction->loadEntries( kapp->config(), "RecentFiles" );
- m_saveAllFilesAction = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(slotSaveAllFiles()), ac, "file_save_all");
+ m_saveAllFilesAction = new TDEAction(i18n("Save Al&l"), 0, this, TQ_SLOT(slotSaveAllFiles()), ac, "file_save_all");
m_saveAllFilesAction->setToolTip( i18n("Save all modified files") );
m_saveAllFilesAction->setWhatsThis(i18n("<b>Save all</b><p>Saves all modified files."));
m_saveAllFilesAction->setEnabled(false);
- m_revertAllFilesAction = new TDEAction(i18n("Rever&t All"), 0, this, TQT_SLOT(slotRevertAllFiles()), ac, "file_revert_all");
+ m_revertAllFilesAction = new TDEAction(i18n("Rever&t All"), 0, this, TQ_SLOT(slotRevertAllFiles()), ac, "file_revert_all");
m_revertAllFilesAction->setToolTip(i18n("Revert all changes"));
m_revertAllFilesAction->setWhatsThis(i18n("<b>Revert all</b><p>Reverts all changes in opened files. Prompts to save changes so the reversion can be canceled for each modified file."));
m_revertAllFilesAction->setEnabled(false);
- m_closeWindowAction = KStdAction::close(this, TQT_SLOT(slotCloseWindow()), ac, "file_close");
+ m_closeWindowAction = KStdAction::close(this, TQ_SLOT(slotCloseWindow()), ac, "file_close");
m_closeWindowAction->setToolTip( i18n("Close current file") );
m_closeWindowAction->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(m_closeWindowAction->text())).arg(i18n("Closes current file.")));
m_closeWindowAction->setEnabled(false);
- m_closeAllWindowsAction = new TDEAction(i18n("Close All"), 0, this, TQT_SLOT(slotCloseAllWindows()), ac, "file_close_all");
+ m_closeAllWindowsAction = new TDEAction(i18n("Close All"), 0, this, TQ_SLOT(slotCloseAllWindows()), ac, "file_close_all");
m_closeAllWindowsAction->setToolTip( i18n("Close all files") );
m_closeAllWindowsAction->setWhatsThis(i18n("<b>Close all</b><p>Close all opened files."));
m_closeAllWindowsAction->setEnabled(false);
- m_closeOtherWindowsAction = new TDEAction(i18n("Close All Others"), 0, this, TQT_SLOT(slotCloseOtherWindows()), ac, "file_closeother");
+ m_closeOtherWindowsAction = new TDEAction(i18n("Close All Others"), 0, this, TQ_SLOT(slotCloseOtherWindows()), ac, "file_closeother");
m_closeOtherWindowsAction->setToolTip( i18n("Close other files") );
m_closeOtherWindowsAction->setWhatsThis(i18n("<b>Close all others</b><p>Close all opened files except current."));
m_closeOtherWindowsAction->setEnabled(false);
new TDEActionSeparator(ac, "dummy_separator");
- m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, this, TQT_SLOT(slotBack()), ac, "history_back");
+ m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, this, TQ_SLOT(slotBack()), ac, "history_back");
m_backAction->setEnabled( false );
m_backAction->setToolTip(i18n("Back"));
m_backAction->setWhatsThis(i18n("<b>Back</b><p>Moves backwards one step in the navigation history."));
- connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotBackAboutToShow()));
- connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotBackPopupActivated(int)));
+ connect(m_backAction->popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(slotBackAboutToShow()));
+ connect(m_backAction->popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotBackPopupActivated(int)));
- m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, this, TQT_SLOT(slotForward()), ac, "history_forward");
+ m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, this, TQ_SLOT(slotForward()), ac, "history_forward");
m_forwardAction->setEnabled( false );
m_forwardAction->setToolTip(i18n("Forward"));
m_forwardAction->setWhatsThis(i18n("<b>Forward</b><p>Moves forward one step in the navigation history."));
- connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotForwardAboutToShow()));
- connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotForwardPopupActivated(int)));
+ connect(m_forwardAction->popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(slotForwardAboutToShow()));
+ connect(m_forwardAction->popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotForwardPopupActivated(int)));
- m_gotoLastEditPosAction = new TDEAction( i18n("Goto Last Edit Position"), "go-bottom", 0, this, TQT_SLOT(gotoLastEditPos()), ac, "goto_last_edit_pos" );
+ m_gotoLastEditPosAction = new TDEAction( i18n("Goto Last Edit Position"), "go-bottom", 0, this, TQ_SLOT(gotoLastEditPos()), ac, "goto_last_edit_pos" );
m_gotoLastEditPosAction->setEnabled( false );
m_gotoLastEditPosAction->setToolTip( i18n("Goto Last Edit Position") );
m_gotoLastEditPosAction->setWhatsThis( i18n("<b>Goto Last Edit Position</b><p>Open the last edited file and position cursor at the point of edit") );
@@ -395,14 +395,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
if ( dom != 0 )
{
// The global option specifies a fallback if the project
- // has no setting or no project is open. However for TQt4
- // projects we want to use ExternalDesigner in any case.
- if ( DomUtil::readIntEntry( *dom, "/kdevcppsupport/qt/version", 3 ) == 4 )
- {
- designerPluginPaths = DomUtil::readListEntry(*dom, "/kdevcppsupport/qt/designerpluginpaths", "path" );
- DesignerSetting = "ExternalDesigner";
- }
-
+ // has no setting or no project is open.
DesignerSetting = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designerintegration", DesignerSetting );
designerExec = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designer", designerExec );
}
@@ -581,8 +574,8 @@ void PartController::showDocument(const KURL &url, bool newWin)
{
part = new HTMLDocumentationPart;
integratePart(part,docUrl);
- connect(part, TQT_SIGNAL(fileNameChanged(KParts::ReadOnlyPart* )),
- this, TQT_SIGNAL(partURLChanged(KParts::ReadOnlyPart* )));
+ connect(part, TQ_SIGNAL(fileNameChanged(KParts::ReadOnlyPart* )),
+ this, TQ_SIGNAL(partURLChanged(KParts::ReadOnlyPart* )));
}
else
{
@@ -685,14 +678,14 @@ void PartController::integratePart(KParts::Part *part, const KURL &url,
emit loadedFile( ro_part->url() );
- connect( part, TQT_SIGNAL(modifiedOnDisc(Kate::Document*, bool, unsigned char)), this, TQT_SLOT(slotDocumentDirty(Kate::Document*, bool, unsigned char)) );
+ connect( part, TQ_SIGNAL(modifiedOnDisc(Kate::Document*, bool, unsigned char)), this, TQ_SLOT(slotDocumentDirty(Kate::Document*, bool, unsigned char)) );
// let's get notified when a document has been changed
- connect(part, TQT_SIGNAL(completed()), this, TQT_SLOT(slotUploadFinished()));
+ connect(part, TQ_SIGNAL(completed()), this, TQ_SLOT(slotUploadFinished()));
// yes, we're cheating again. this signal exists for katepart's
// Document object and our HTMLDocumentationPart
-// connect(part, TQT_SIGNAL(fileNameChanged()), this, TQT_SLOT(slotFileNameChanged()));
+// connect(part, TQ_SIGNAL(fileNameChanged()), this, TQ_SLOT(slotFileNameChanged()));
// Connect to the document's views newStatus() signal in order to keep track of the
// modified-status of the document.
@@ -704,22 +697,22 @@ void PartController::integratePart(KParts::Part *part, const KURL &url,
if (designerPart && API::getInstance()->languageSupport())
{
kdDebug() << "integrating designer part with language support" << endl;
- connect(designerPart, TQT_SIGNAL(addedFunction(DesignerType, const TQString&, Function )),
+ connect(designerPart, TQ_SIGNAL(addedFunction(DesignerType, const TQString&, Function )),
API::getInstance()->languageSupport(),
- TQT_SLOT(addFunction(DesignerType, const TQString&, Function )));
- connect(designerPart, TQT_SIGNAL(editedFunction(DesignerType, const TQString&, Function, Function )), API::getInstance()->languageSupport(),
- TQT_SLOT(editFunction(DesignerType, const TQString&, Function, Function )));
- connect(designerPart, TQT_SIGNAL(removedFunction(DesignerType, const TQString&, Function )),
+ TQ_SLOT(addFunction(DesignerType, const TQString&, Function )));
+ connect(designerPart, TQ_SIGNAL(editedFunction(DesignerType, const TQString&, Function, Function )), API::getInstance()->languageSupport(),
+ TQ_SLOT(editFunction(DesignerType, const TQString&, Function, Function )));
+ connect(designerPart, TQ_SIGNAL(removedFunction(DesignerType, const TQString&, Function )),
API::getInstance()->languageSupport(),
- TQT_SLOT(removeFunction(DesignerType, const TQString&, Function )));
- connect(designerPart, TQT_SIGNAL(editFunction(DesignerType, const TQString&, const TQString& )),
+ TQ_SLOT(removeFunction(DesignerType, const TQString&, Function )));
+ connect(designerPart, TQ_SIGNAL(editFunction(DesignerType, const TQString&, const TQString& )),
API::getInstance()->languageSupport(),
- TQT_SLOT(openFunction(DesignerType, const TQString&, const TQString& )));
- connect(designerPart, TQT_SIGNAL(editSource(DesignerType, const TQString& )),
+ TQ_SLOT(openFunction(DesignerType, const TQString&, const TQString& )));
+ connect(designerPart, TQ_SIGNAL(editSource(DesignerType, const TQString& )),
API::getInstance()->languageSupport(),
- TQT_SLOT(openSource(DesignerType, const TQString& )));
- connect(designerPart, TQT_SIGNAL(newStatus(const TQString &, int)),
- this, TQT_SLOT(slotNewDesignerStatus(const TQString &, int)));
+ TQ_SLOT(openSource(DesignerType, const TQString& )));
+ connect(designerPart, TQ_SIGNAL(newStatus(const TQString &, int)),
+ this, TQ_SLOT(slotNewDesignerStatus(const TQString &, int)));
}
}
@@ -740,14 +733,14 @@ void PartController::integrateTextEditorPart(KTextEditor::Document* doc)
if ( !doc ) return;
- connect( doc, TQT_SIGNAL(textChanged()), this, TQT_SLOT(textChanged()) );
- connect( doc, TQT_SIGNAL(fileNameChanged()),
- this, TQT_SLOT(slotDocumentUrlChanged()));
+ connect( doc, TQ_SIGNAL(textChanged()), this, TQ_SLOT(textChanged()) );
+ connect( doc, TQ_SIGNAL(fileNameChanged()),
+ this, TQ_SLOT(slotDocumentUrlChanged()));
if( doc->widget() )
{
- connect( doc->widget(), TQT_SIGNAL(dropEventPass(TQDropEvent *)),
- TopLevel::getInstance()->main(), TQT_SLOT(slotDropEvent(TQDropEvent *)) );
+ connect( doc->widget(), TQ_SIGNAL(dropEventPass(TQDropEvent *)),
+ TopLevel::getInstance()->main(), TQ_SLOT(slotDropEvent(TQDropEvent *)) );
}
if ( KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( doc->widget() ) )
@@ -787,7 +780,7 @@ void PartController::integrateTextEditorPart(KTextEditor::Document* doc)
TQPtrListIterator<KTextEditor::View> it( list );
while ( it.current() )
{
- connect( it, TQT_SIGNAL( newStatus() ), this, TQT_SLOT( slotNewStatus() ) );
+ connect( it, TQ_SIGNAL( newStatus() ), this, TQ_SLOT( slotNewStatus() ) );
++it;
}
}
@@ -1334,7 +1327,7 @@ void PartController::slotActivePartChanged( KParts::Part *part )
}
updateMenuItems();
- TQTimer::singleShot( 100, this, TQT_SLOT(slotWaitForFactoryHack()) );
+ TQTimer::singleShot( 100, this, TQ_SLOT(slotWaitForFactoryHack()) );
}
void PartController::showPart( KParts::Part* part, const TQString& name, const TQString& shortDescription )
@@ -1386,7 +1379,7 @@ void PartController::slotDocumentDirty( Kate::Document * d, bool isModified, uns
p->doc = doc;
p->isModified = isModified;
p->reason = reason;
- KDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p );
+ KDevJobTimer::singleShot( 0, this, TQ_SLOT(slotDocumentDirtyStepTwo(void*)), p );
}
}
@@ -1522,7 +1515,7 @@ void PartController::slotNewStatus( )
{
kdDebug(9000) << k_funcinfo << endl;
- TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
+ TQObject * senderobj = const_cast<TQObject*>(sender());
KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( senderobj );
if ( view )
{
@@ -1761,7 +1754,7 @@ void PartController::slotWaitForFactoryHack( )
{
if ( !activePart()->factory() )
{
- TQTimer::singleShot( 100, this, TQT_SLOT(slotWaitForFactoryHack()) );
+ TQTimer::singleShot( 100, this, TQ_SLOT(slotWaitForFactoryHack()) );
return;
}
else
@@ -1848,7 +1841,7 @@ void PartController::gotoLastEditPos()
void PartController::slotDocumentUrlChanged()
{
- TQObject *obj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
+ TQObject *obj = const_cast<TQObject*>(sender());
KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>( obj );
if (!doc)
return;