summaryrefslogtreecommitdiffstats
path: root/src/partcontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/partcontroller.cpp')
-rw-r--r--src/partcontroller.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp
index 379f79dc..a14417eb 100644
--- a/src/partcontroller.cpp
+++ b/src/partcontroller.cpp
@@ -89,8 +89,8 @@ struct ModificationData
};
-PartController::PartController(TQWidget *parent)
- : KDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false)
+PartController::PartController(TQWidget *tqparent)
+ : KDevPartController(tqparent), _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* )) );
@@ -109,10 +109,10 @@ PartController::~PartController()
}
-void PartController::createInstance(TQWidget *parent)
+void PartController::createInstance(TQWidget *tqparent)
{
if (!s_instance)
- s_instance = new PartController(parent);
+ s_instance = new PartController(tqparent);
}
@@ -131,7 +131,7 @@ void PartController::setupActions()
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->setWhatsThis(TQString("<b>%1</b><p>%2").arg(beautifyToolTip(m_openRecentAction->text())).arg(i18n("Opens recently opened file.")));
+ m_openRecentAction->setWhatsThis(TQString("<b>%1</b><p>%2").tqarg(beautifyToolTip(m_openRecentAction->text())).tqarg(i18n("Opens recently opened file.")));
m_openRecentAction->loadEntries( kapp->config(), "RecentFiles" );
m_saveAllFilesAction = new KAction(i18n("Save Al&l"), 0, this, TQT_SLOT(slotSaveAllFiles()), ac, "file_save_all");
@@ -146,7 +146,7 @@ void PartController::setupActions()
m_closeWindowAction = KStdAction::close(this, TQT_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->setWhatsThis(TQString("<b>%1</b><p>%2").tqarg(beautifyToolTip(m_closeWindowAction->text())).tqarg(i18n("Closes current file.")));
m_closeWindowAction->setEnabled(false);
m_closeAllWindowsAction = new KAction(i18n("Close All"), 0, this, TQT_SLOT(slotCloseAllWindows()), ac, "file_close_all");
@@ -210,7 +210,7 @@ KURL PartController::findURLInProject(const KURL& url)
{
TQStringList fileList = API::getInstance()->project()->allFiles();
- bool filenameOnly = (url.url().find('/') == -1);
+ bool filenameOnly = (url.url().tqfind('/') == -1);
TQString filename = filenameOnly ? "/" : "";
filename += url.url();
@@ -267,7 +267,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
{
ei->setEncoding( m_presetEncoding );
}
- m_presetEncoding = TQString::null;
+ m_presetEncoding = TQString();
}
addHistoryEntry();
@@ -395,7 +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 Qt4
+ // 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 )
{
@@ -434,7 +434,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
if( designerPluginPaths.isEmpty() )
KRun::runCommand( designerExec+" "+url.pathOrURL() );
else
- KRun::runCommand( "QT_PLUGIN_PATH=\""+designerPluginPaths.join(":")+"\" "+designerExec+" "+url.pathOrURL() );
+ KRun::runCommand( "TQT_PLUGIN_PATH=\""+designerPluginPaths.join(":")+"\" "+designerExec+" "+url.pathOrURL() );
return;
}
@@ -442,7 +442,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
config->setGroup("General");
TQStringList texttypeslist = config->readListEntry( "TextTypes" );
- if ( texttypeslist.contains( MimeType->name() ) )
+ if ( texttypeslist.tqcontains( MimeType->name() ) )
{
m_openNextAsText = true;
}
@@ -461,7 +461,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
if ( m_presetEncoding.isNull() && API::getInstance()->projectDom() )
{
TQDomDocument * projectDom = API::getInstance()->projectDom();
- m_presetEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString::null );
+ m_presetEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString() );
}
if ( !m_presetEncoding.isNull() )
@@ -470,7 +470,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
{
ei->setEncoding( m_presetEncoding );
}
- m_presetEncoding = TQString::null;
+ m_presetEncoding = TQString();
}
addHistoryEntry();
@@ -534,8 +534,8 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum,
else
{
MimeWarningDialog dlg;
- dlg.text2->setText( TQString( "<qt><b>%1</b></qt>" ).arg(url.path()));
- dlg.text3->setText( dlg.text3->text().arg(MimeType->name()) );
+ dlg.text2->setText( TQString( "<qt><b>%1</b></qt>" ).tqarg(url.path()));
+ dlg.text3->setText( dlg.text3->text().tqarg(MimeType->name()) );
if ( dlg.exec() == TQDialog::Accepted )
{
@@ -593,7 +593,7 @@ void PartController::showDocument(const KURL &url, bool newWin)
KParts::Factory *PartController::findPartFactory(const TQString &mimeType, const TQString &partType, const TQString &preferredName)
{
- KTrader::OfferList offers = KTrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").arg(partType));
+ KTrader::OfferList offers = KTrader::self()->query(mimeType, TQString("'%1' in ServiceTypes").tqarg(partType));
if (offers.count() > 0)
{
@@ -694,7 +694,7 @@ void PartController::integratePart(KParts::Part *part, const KURL &url,
// Document object and our HTMLDocumentationPart
// connect(part, TQT_SIGNAL(fileNameChanged()), this, TQT_SLOT(slotFileNameChanged()));
- // Connect to the document's views newStatus() signal in order to keep track of the
+ // Connect to the document's views newtqStatus() signal in order to keep track of the
// modified-status of the document.
if (isTextEditor)
@@ -718,8 +718,8 @@ void PartController::integratePart(KParts::Part *part, const KURL &url,
connect(designerPart, TQT_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)));
+ connect(designerPart, TQT_SIGNAL(newtqStatus(const TQString &, int)),
+ this, TQT_SLOT(slotNewDesignertqStatus(const TQString &, int)));
}
}
@@ -787,7 +787,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, TQT_SIGNAL( newtqStatus() ), this, TQT_SLOT( slotNewtqStatus() ) );
++it;
}
}
@@ -830,7 +830,7 @@ void PartController::updatePartURL( KParts::ReadOnlyPart * ro_part )
bool PartController::partURLHasChanged( KParts::ReadOnlyPart * ro_part )
{
- if ( _partURLMap.contains( ro_part ) && !ro_part->url().isEmpty() )
+ if ( _partURLMap.tqcontains( ro_part ) && !ro_part->url().isEmpty() )
{
if ( _partURLMap[ ro_part ] != ro_part->url() )
{
@@ -842,7 +842,7 @@ bool PartController::partURLHasChanged( KParts::ReadOnlyPart * ro_part )
KURL PartController::storedURLForPart( KParts::ReadOnlyPart * ro_part )
{
- if ( _partURLMap.contains( ro_part ) )
+ if ( _partURLMap.tqcontains( ro_part ) )
{
return _partURLMap[ ro_part ];
}
@@ -1005,7 +1005,7 @@ void PartController::reloadFile( const KURL & url )
if ( part->isModified() )
{
if ( KMessageBox::warningYesNo( TopLevel::getInstance()->main(),
- i18n( "The file \"%1\" is modified in memory. Are you sure you want to reload it? (Local changes will be lost.)" ).arg( url.path() ),
+ i18n( "The file \"%1\" is modified in memory. Are you sure you want to reload it? (Local changes will be lost.)" ).tqarg( url.path() ),
i18n( "File is Modified" ), i18n("Reload"), i18n("Do Not Reload") ) == KMessageBox::Yes )
{
part->setModified( false );
@@ -1120,7 +1120,7 @@ bool PartController::saveFile( const KURL & url, bool force )
case DirtyAndModified:
{
int code = KMessageBox::warningYesNoCancel( TopLevel::getInstance()->main(),
- i18n("The file \"%1\" is modified on disk.\n\nAre you sure you want to overwrite it? (External changes will be lost.)").arg( url.path() ),
+ i18n("The file \"%1\" is modified on disk.\n\nAre you sure you want to overwrite it? (External changes will be lost.)").tqarg( url.path() ),
i18n("File Externally Modified"), i18n("Overwrite"), i18n("Do Not Overwrite") );
if ( code == KMessageBox::Yes )
{
@@ -1216,7 +1216,7 @@ bool PartController::closeFilesDialog( KURL::List const & ignoreList )
while ( KParts::Part* part = it.current() )
{
KParts::ReadOnlyPart * ro_part = dynamic_cast<KParts::ReadOnlyPart*>( part );
- if ( ro_part && !ignoreList.contains( ro_part->url() ) || !ro_part )
+ if ( ro_part && !ignoreList.tqcontains( ro_part->url() ) || !ro_part )
{
closePart( part );
}
@@ -1276,7 +1276,7 @@ void PartController::slotOpenFile()
TQString DefaultEncoding;
if ( TQDomDocument * projectDom = API::getInstance()->projectDom() )
{
- DefaultEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString::null );
+ DefaultEncoding = DomUtil::readEntry( *projectDom, "/general/defaultencoding", TQString() );
}
if ( DefaultEncoding.isEmpty() )
@@ -1284,11 +1284,11 @@ void PartController::slotOpenFile()
// have a peek at katepart's settings:
KConfig * config = kapp->config();
config->setGroup("Kate Document Defaults");
- DefaultEncoding = config->readEntry("Encoding", TQString::null );
+ DefaultEncoding = config->readEntry("Encoding", TQString() );
}
- KEncodingFileDialog::Result result = KEncodingFileDialog::getOpenURLsAndEncoding( DefaultEncoding, TQString::null,
- TQString::null, TopLevel::getInstance()->main(), TQString::null );
+ KEncodingFileDialog::Result result = KEncodingFileDialog::getOpenURLsAndEncoding( DefaultEncoding, TQString(),
+ TQString(), TopLevel::getInstance()->main(), TQString() );
for ( KURL::List::Iterator it = result.URLs.begin(); it != result.URLs.end(); ++it )
{
@@ -1426,7 +1426,7 @@ void PartController::slotDocumentDirtyStepTwo( void * payload )
if ( reason > 0 )
{
- if ( !_dirtyDocuments.contains( doc ) )
+ if ( !_dirtyDocuments.tqcontains( doc ) )
{
_dirtyDocuments.append( doc );
}
@@ -1455,7 +1455,7 @@ void PartController::slotDocumentDirtyStepTwo( void * payload )
bool PartController::isDirty( KURL const & url )
{
- return _dirtyDocuments.contains( static_cast<KTextEditor::Document*>( partForURL( url ) ) );
+ return _dirtyDocuments.tqcontains( static_cast<KTextEditor::Document*>( partForURL( url ) ) );
}
bool PartController::reactToDirty( KURL const & url, unsigned char reason )
@@ -1481,7 +1481,7 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason )
{
KMessageBox::sorry( TopLevel::getInstance()->main(),
i18n("Conflict: The file \"%1\" has changed on disk while being modified in memory.\n\n"
- "You should investigate before saving to make sure you are not losing data.").arg( url.path() ),
+ "You should investigate before saving to make sure you are not losing data.").tqarg( url.path() ),
i18n("Conflict") );
return false;
}
@@ -1490,7 +1490,7 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason )
{
KMessageBox::sorry( TopLevel::getInstance()->main(),
i18n("Warning: The file \"%1\" has been deleted on disk.\n\n"
- "If this was not your intention, make sure to save this file now.").arg( url.path() ),
+ "If this was not your intention, make sure to save this file now.").tqarg( url.path() ),
i18n("File Deleted") );
return false;
}
@@ -1498,7 +1498,7 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason )
if ( dirtyAction == "alert" )
{
if ( KMessageBox::warningYesNo( TopLevel::getInstance()->main(),
- i18n("The file \"%1\" has changed on disk.\n\nDo you want to reload it?").arg( url.path() ),
+ i18n("The file \"%1\" has changed on disk.\n\nDo you want to reload it?").tqarg( url.path() ),
i18n("File Changed"), i18n("Reload"), i18n("Do Not Reload") ) == KMessageBox::No )
{
return false;
@@ -1511,18 +1511,18 @@ bool PartController::reactToDirty( KURL const & url, unsigned char reason )
return true;
}
-void PartController::slotNewDesignerStatus(const TQString &formName, int status)
+void PartController::slotNewDesignertqStatus(const TQString &formName, int status)
{
kdDebug(9000) << k_funcinfo << endl;
kdDebug(9000) << " formName: " << formName << ", status: " << status << endl;
emit documentChangedState( KURL::fromPathOrURL(formName), DocumentState(status) );
}
-void PartController::slotNewStatus( )
+void PartController::slotNewtqStatus( )
{
kdDebug(9000) << k_funcinfo << endl;
- TQObject * senderobj = const_cast<TQObject*>( sender() );
+ TQObject * senderobj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>( sender() ));
KTextEditor::View * view = dynamic_cast<KTextEditor::View*>( senderobj );
if ( view )
{
@@ -1628,7 +1628,7 @@ void PartController::slotBackAboutToShow()
TQValueList<HistoryEntry>::ConstIterator it = m_backHistory.begin();
while( i < 10 && it != m_backHistory.end() )
{
- popup->insertItem( (*it).url.fileName() + TQString(" (%1)").arg( (*it).line +1), (*it).id );
+ popup->insertItem( (*it).url.fileName() + TQString(" (%1)").tqarg( (*it).line +1), (*it).id );
++i;
++it;
}
@@ -1645,7 +1645,7 @@ void PartController::slotForwardAboutToShow( )
TQValueList<HistoryEntry>::ConstIterator it = m_forwardHistory.begin();
while( i < 10 && it != m_forwardHistory.end() )
{
- popup->insertItem( (*it).url.fileName() + TQString(" (%1)").arg( (*it).line +1), (*it).id );
+ popup->insertItem( (*it).url.fileName() + TQString(" (%1)").tqarg( (*it).line +1), (*it).id );
++i;
++it;
}
@@ -1789,7 +1789,7 @@ KParts::ReadOnlyPart *PartController::qtDesignerPart()
for ( ; it.current(); ++it)
{
KInterfaceDesigner::Designer *des = dynamic_cast<KInterfaceDesigner::Designer*>(it.current());
- if (des && des->designerType() == KInterfaceDesigner::QtDesigner)
+ if (des && des->designerType() == KInterfaceDesigner::TQtDesigner)
return des;
}
return 0;
@@ -1812,7 +1812,7 @@ KTextEditor::Editor *PartController::openTextDocument( bool activate )
args.serviceType = TQString( "text/plain;" ) + m_presetEncoding;
extension->setURLArgs(args);
}
- m_presetEncoding = TQString::null;
+ m_presetEncoding = TQString();
}
TQWidget * widget =
@@ -1848,7 +1848,7 @@ void PartController::gotoLastEditPos()
void PartController::slotDocumentUrlChanged()
{
- TQObject *obj = const_cast<TQObject*>(sender());
+ TQObject *obj = TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>( obj );
if (!doc)
return;