diff options
Diffstat (limited to 'vcs/clearcase/clearcasepart.cpp')
-rw-r--r-- | vcs/clearcase/clearcasepart.cpp | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/vcs/clearcase/clearcasepart.cpp b/vcs/clearcase/clearcasepart.cpp index 6c11a4a6..198cc1db 100644 --- a/vcs/clearcase/clearcasepart.cpp +++ b/vcs/clearcase/clearcasepart.cpp @@ -12,8 +12,8 @@ #include "clearcasepart.h" #include "commentdlg.h" -#include <qfileinfo.h> -#include <qpopupmenu.h> +#include <tqfileinfo.h> +#include <tqpopupmenu.h> #include <kpopupmenu.h> #include <kdebug.h> @@ -42,7 +42,7 @@ static const KDevPluginInfo data("kdevclearcase"); typedef KDevGenericFactory<ClearcasePart> ClearcaseFactory; K_EXPORT_COMPONENT_FACTORY( libkdevclearcase, ClearcaseFactory( data ) ) -ClearcasePart::ClearcasePart( QObject *parent, const char *name, const QStringList & ) +ClearcasePart::ClearcasePart( TQObject *parent, const char *name, const TQStringList & ) : KDevVersionControl( &data, parent, name ? name : "ClearcasePart" ), default_checkin(""), default_checkout(""), @@ -60,8 +60,8 @@ ClearcasePart::ClearcasePart( QObject *parent, const char *name, const QStringLi fileInfoProvider_ = new ClearcaseFileinfoProvider(this); setInstance(ClearcaseFactory::instance()); - connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), - this, SLOT(contextMenu(QPopupMenu *, const Context *)) ); + connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); } ClearcasePart::~ClearcasePart() @@ -69,45 +69,45 @@ ClearcasePart::~ClearcasePart() -bool ClearcasePart::isValidDirectory(const QString &dirPath) const { +bool ClearcasePart::isValidDirectory(const TQString &dirPath) const { return isValidCCDirectory_; } -void ClearcasePart::contextMenu(QPopupMenu *popup, const Context *context) +void ClearcasePart::contextMenu(TQPopupMenu *popup, const Context *context) { if (context->hasType( Context::FileContext )) { const FileContext *fcontext = static_cast<const FileContext*>(context); popupfile_ = fcontext->urls().first().path(); - QFileInfo fi(popupfile_); + TQFileInfo fi(popupfile_); popup->insertSeparator(); KPopupMenu *sub = new KPopupMenu(popup); - QString name = fi.fileName(); + TQString name = fi.fileName(); sub->insertTitle( i18n("Actions for %1").arg(name) ); sub->insertItem( i18n("Checkin"), - this, SLOT(slotCheckin()) ); + this, TQT_SLOT(slotCheckin()) ); sub->insertItem( i18n("Checkout"), - this, SLOT(slotCheckout()) ); + this, TQT_SLOT(slotCheckout()) ); sub->insertItem( i18n("Uncheckout"), - this, SLOT(slotUncheckout()) ); + this, TQT_SLOT(slotUncheckout()) ); sub->insertSeparator(); sub->insertItem( i18n("Create Element"), - this, SLOT(slotCreate()) ); + this, TQT_SLOT(slotCreate()) ); sub->insertItem( i18n("Remove Element"), - this, SLOT(slotRemove()) ); + this, TQT_SLOT(slotRemove()) ); sub->insertSeparator(); sub->insertItem( i18n("History"), - this, SLOT(slotListHistory()) ); + this, TQT_SLOT(slotListHistory()) ); sub->insertSeparator(); sub->insertItem( i18n("Diff"), - this, SLOT(slotDiff()) ); + this, TQT_SLOT(slotDiff()) ); sub->insertSeparator(); sub->insertItem( i18n("List Checkouts"), - this, SLOT(slotListCheckouts()) ); + this, TQT_SLOT(slotListCheckouts()) ); popup->insertItem(i18n("Clearcase"), sub); @@ -120,23 +120,23 @@ void ClearcasePart::contextMenu(QPopupMenu *popup, const Context *context) void ClearcasePart::slotCheckin() { - QString dir, name; - QFileInfo fi(popupfile_); + TQString dir, name; + TQFileInfo fi(popupfile_); dir = fi.dirPath(); name = fi.fileName(); CcaseCommentDlg dlg(FALSE); - if (dlg.exec() == QDialog::Rejected) + if (dlg.exec() == TQDialog::Rejected) return; - QDomDocument &dom = *this->projectDom(); - QString message = DomUtil::readEntry(dom,"/kdevclearcase/checkin_options",default_checkin); + TQDomDocument &dom = *this->projectDom(); + TQString message = DomUtil::readEntry(dom,"/kdevclearcase/checkin_options",default_checkin); if(dlg.logMessage().isEmpty()) message += "-nc "; else message += "-c \"" + dlg.logMessage() + "\""; - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); command += " && "; command += " cleartool checkin "; @@ -151,17 +151,17 @@ void ClearcasePart::slotCheckin() void ClearcasePart::slotCheckout() { - QString dir, name; - QFileInfo fi(popupfile_); + TQString dir, name; + TQFileInfo fi(popupfile_); dir = fi.dirPath(); name = fi.fileName(); CcaseCommentDlg dlg(TRUE); - if (dlg.exec() == QDialog::Rejected) + if (dlg.exec() == TQDialog::Rejected) return; - QDomDocument &dom = *this->projectDom(); - QString message = DomUtil::readEntry(dom,"/kdevclearcase/checkout_options",default_checkout); + TQDomDocument &dom = *this->projectDom(); + TQString message = DomUtil::readEntry(dom,"/kdevclearcase/checkout_options",default_checkout); if(!dlg.isReserved()) message += "-unres "; if(dlg.logMessage().isEmpty()) @@ -169,7 +169,7 @@ void ClearcasePart::slotCheckout() else message += "-c \"" + dlg.logMessage() + "\""; - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); command += " && cleartool checkout "; command += message; @@ -185,14 +185,14 @@ void ClearcasePart::slotCheckout() void ClearcasePart::slotUncheckout() { - QString dir, name; - QFileInfo fi(popupfile_); + TQString dir, name; + TQFileInfo fi(popupfile_); dir = fi.dirPath(); name = fi.fileName(); - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); command += " && cleartool uncheckout "; command += DomUtil::readEntry(dom,"/kdevclearcase/uncheckout_options",default_uncheckout); @@ -207,16 +207,16 @@ void ClearcasePart::slotUncheckout() void ClearcasePart::slotCreate() { - QFileInfo fi(popupfile_); - QString dir = fi.dirPath(); - QString name = fi.fileName(); + TQFileInfo fi(popupfile_); + TQString dir = fi.dirPath(); + TQString name = fi.fileName(); - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); // Checking whether current directory is checked out or not is cumbersome so skip it for now - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); - QFileInfo di(dir); + TQFileInfo di(dir); if(!di.isWritable()) { // Work-around to check if directory is checked out command += " && cleartool co -unres -nc "; command += KShellProcess::quote(dir); @@ -237,15 +237,15 @@ void ClearcasePart::slotCreate() void ClearcasePart::slotRemove() { - QFileInfo fi(popupfile_); - QString dir = fi.dirPath(); - QString name = fi.fileName(); + TQFileInfo fi(popupfile_); + TQString dir = fi.dirPath(); + TQString name = fi.fileName(); - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); - QFileInfo di(dir); + TQFileInfo di(dir); if(!di.isWritable()) { // Work-around to check if directory is checked out command += " && cleartool co -unres -nc "; command += KShellProcess::quote(dir); @@ -263,16 +263,16 @@ void ClearcasePart::slotRemove() void ClearcasePart::slotListHistory() { - QFileInfo fi(popupfile_); - QString dir = fi.dirPath(); - QString name = fi.fileName(); - QStringList args; - QStringList env; - QString str; + TQFileInfo fi(popupfile_); + TQString dir = fi.dirPath(); + TQString name = fi.fileName(); + TQStringList args; + TQStringList env; + TQString str; - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); command += " && cleartool lshistory "; command += DomUtil::readEntry(dom, "/kdevclearcase/lshistory_options", default_lshistory); @@ -285,31 +285,31 @@ void ClearcasePart::slotListHistory() void ClearcasePart::slotDiff() { - QFileInfo fi(popupfile_); - QString dir = fi.dirPath(); - QString name = fi.fileName(); - QStringList args; - QStringList env; - QString str; + TQFileInfo fi(popupfile_); + TQString dir = fi.dirPath(); + TQString name = fi.fileName(); + TQStringList args; + TQStringList env; + TQString str; - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); args << "diff"; str = DomUtil::readEntry(dom,"/kdevclearcase/diff_options",default_diff); if (str.length()) { - QStringList list = QStringList::split(' ',str); - for(QStringList::Iterator it = list.begin(); it != list.end(); ++it) args << *it; + TQStringList list = TQStringList::split(' ',str); + for(TQStringList::Iterator it = list.begin(); it != list.end(); ++it) args << *it; } args << name; ExecCommand* cmv = new ExecCommand( "cleartool", args, dir, env, this ); - connect( cmv, SIGNAL(finished( const QString&, const QString& )), - this, SLOT(slotDiffFinished( const QString&, const QString& )) ); + connect( cmv, TQT_SIGNAL(finished( const TQString&, const TQString& )), + this, TQT_SLOT(slotDiffFinished( const TQString&, const TQString& )) ); } -void ClearcasePart::slotDiffFinished( const QString& diff, const QString& err ) +void ClearcasePart::slotDiffFinished( const TQString& diff, const TQString& err ) { if ( diff.isNull() && err.isNull() ) { kdDebug(9000) << "clearcase diff canceled" << endl; @@ -323,7 +323,7 @@ void ClearcasePart::slotDiffFinished( const QString& diff, const QString& err ) if ( !err.isEmpty() ) { int s = KMessageBox::warningContinueCancelList( 0, i18n("Clearcase outputted errors during diff. Do you still want to continue?"), - QStringList::split( "\n", err, false ), i18n("Errors During Diff") ); + TQStringList::split( "\n", err, false ), i18n("Errors During Diff") ); if ( s != KMessageBox::Continue ) return; } @@ -339,17 +339,17 @@ void ClearcasePart::slotDiffFinished( const QString& diff, const QString& err ) void ClearcasePart::slotListCheckouts() { - QString dir; - QFileInfo fi(popupfile_); + TQString dir; + TQFileInfo fi(popupfile_); if (fi.isDir()) { dir = fi.absFilePath(); } else { dir = fi.dirPath(); } - QDomDocument &dom = *this->projectDom(); + TQDomDocument &dom = *this->projectDom(); - QString command("cd "); + TQString command("cd "); command += KShellProcess::quote(dir); command += " && cleartool lsco "; command += DomUtil::readEntry(dom, "/kdevclearcase/lscheckout_options", default_lscheckout); |