summaryrefslogtreecommitdiffstats
path: root/vcs/perforce
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /vcs/perforce
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'vcs/perforce')
-rw-r--r--vcs/perforce/commitdlg.cpp32
-rw-r--r--vcs/perforce/commitdlg.h3
-rw-r--r--vcs/perforce/integrator/perforceintegrator.cpp10
-rw-r--r--vcs/perforce/integrator/perforceintegrator.h7
-rw-r--r--vcs/perforce/integrator/pfintegratordlg.cpp4
-rw-r--r--vcs/perforce/integrator/pfintegratordlg.h3
-rw-r--r--vcs/perforce/integrator/pfintegratordlgbase.ui8
-rw-r--r--vcs/perforce/perforcepart.cpp28
-rw-r--r--vcs/perforce/perforcepart.h3
9 files changed, 51 insertions, 47 deletions
diff --git a/vcs/perforce/commitdlg.cpp b/vcs/perforce/commitdlg.cpp
index a6aa98b9..2f119ed2 100644
--- a/vcs/perforce/commitdlg.cpp
+++ b/vcs/perforce/commitdlg.cpp
@@ -28,8 +28,8 @@
#include "execcommand.h"
-CommitDialog::CommitDialog( TQWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n("Perforce Submit"), Ok|Cancel|Details )
+CommitDialog::CommitDialog( TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n("Perforce Submit"), Ok|Cancel|Details )
{
TQWidget *w = new TQWidget( this, "main widget" );
setMainWidget( w );
@@ -38,11 +38,11 @@ CommitDialog::CommitDialog( TQWidget *parent, const char *name )
TQFontMetrics fm(edit->fontMetrics());
edit->setMinimumSize(fm.width("0")*40, fm.lineSpacing()*3);
- TQVBoxLayout *layout = new TQVBoxLayout( w, 0, spacingHint() );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( w, 0, spacingHint() );
TQLabel *editLabel = new TQLabel(i18n("&Enter description:"), w);
editLabel->setBuddy(edit);
- layout->addWidget(editLabel);
- layout->addWidget(edit);
+ tqlayout->addWidget(editLabel);
+ tqlayout->addWidget(edit);
w = new TQWidget( this, "details widget" );
@@ -50,19 +50,19 @@ CommitDialog::CommitDialog( TQWidget *parent, const char *name )
userEdit = new KLineEdit( w );
filesBox = new KListBox( w );
- layout = new TQVBoxLayout( w, 0, spacingHint() );
+ tqlayout = new TQVBoxLayout( w, 0, spacingHint() );
TQLabel *clientLabel = new TQLabel(i18n("C&lient:"), w);
clientLabel->setBuddy(clientEdit);
- layout->addWidget(clientLabel);
- layout->addWidget( clientEdit );
+ tqlayout->addWidget(clientLabel);
+ tqlayout->addWidget( clientEdit );
TQLabel *userLabel = new TQLabel(i18n("&User:"), w);
userLabel->setBuddy(userEdit);
- layout->addWidget( userLabel );
- layout->addWidget( userEdit );
+ tqlayout->addWidget( userLabel );
+ tqlayout->addWidget( userEdit );
TQLabel *filesLabel = new TQLabel(i18n("&File(s):"), w);
filesLabel->setBuddy(filesBox);
- layout->addWidget( filesLabel );
- layout->addWidget( filesBox );
+ tqlayout->addWidget( filesLabel );
+ tqlayout->addWidget( filesBox );
setDetailsWidget( w );
autoGuess();
@@ -103,7 +103,7 @@ void CommitDialog::setDepotFiles( const TQStringList& lst )
args << (*it);
}
- ExecCommand* cmd = new ExecCommand( "p4", args, TQString::null, TQStringList(), this );
+ ExecCommand* cmd = new ExecCommand( "p4", args, TQString(), TQStringList(), TQT_TQOBJECT(this) );
connect( cmd, TQT_SIGNAL(finished( const TQString&, const TQString& )),
this, TQT_SLOT(getFilesFinished( const TQString&, const TQString& )) );
}
@@ -112,7 +112,7 @@ void CommitDialog::getFilesFinished( const TQString& out, const TQString& /* err
{
TQStringList lst = TQStringList::split( TQChar('\n'), out );
for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
- int pos = (*it).find( TQChar('#') );
+ int pos = (*it).tqfind( TQChar('#') );
if ( pos > 1 && (*it).startsWith( "//" ) ) {
filesBox->insertItem( (*it).left( pos ) );
}
@@ -126,10 +126,10 @@ TQString CommitDialog::changeList() const
lst += "Change: new\n"
"Client: " + client() + "\n"
"User: " + user() + "\n"
- "Status: new\n"
+ "tqStatus: new\n"
"Description:\n ";
- lst += logMessage().replace(TQRegExp("\n"), "\n ") + "\n\n";
+ lst += logMessage().tqreplace(TQRegExp("\n"), "\n ") + "\n\n";
lst += "Files:\n";
diff --git a/vcs/perforce/commitdlg.h b/vcs/perforce/commitdlg.h
index 09a9c72f..ddca48a2 100644
--- a/vcs/perforce/commitdlg.h
+++ b/vcs/perforce/commitdlg.h
@@ -24,8 +24,9 @@ class KProcess;
class CommitDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CommitDialog( TQWidget *parent = 0, const char *name = 0 );
+ CommitDialog( TQWidget *tqparent = 0, const char *name = 0 );
~CommitDialog();
TQString logMessage() const { return edit->text(); }
diff --git a/vcs/perforce/integrator/perforceintegrator.cpp b/vcs/perforce/integrator/perforceintegrator.cpp
index bc7c0988..ec9802c9 100644
--- a/vcs/perforce/integrator/perforceintegrator.cpp
+++ b/vcs/perforce/integrator/perforceintegrator.cpp
@@ -28,10 +28,10 @@ static const KDevPluginInfo data("kdevperforceintegrator");
typedef KDevGenericFactory<PerforceIntegrator> PerforceIntegratorFactory;
K_EXPORT_COMPONENT_FACTORY( libperforceintegrator, PerforceIntegratorFactory(data) )
-PerforceIntegrator::PerforceIntegrator(TQObject* parent, const char* name,
+PerforceIntegrator::PerforceIntegrator(TQObject* tqparent, const char* name,
const TQStringList // args
)
- :KDevVCSIntegrator(parent, name)
+ :KDevVCSIntegrator(tqparent, name)
{
}
@@ -39,15 +39,15 @@ PerforceIntegrator::~PerforceIntegrator()
{
}
-VCSDialog* PerforceIntegrator::fetcher(TQWidget* // parent
+VCSDialog* PerforceIntegrator::fetcher(TQWidget* // tqparent
)
{
return 0;
}
-VCSDialog* PerforceIntegrator::integrator(TQWidget* parent)
+VCSDialog* PerforceIntegrator::integrator(TQWidget* tqparent)
{
- PFIntegratorDlg *dlg = new PFIntegratorDlg(parent);
+ PFIntegratorDlg *dlg = new PFIntegratorDlg(tqparent);
return dlg;
}
diff --git a/vcs/perforce/integrator/perforceintegrator.h b/vcs/perforce/integrator/perforceintegrator.h
index 1d047826..b76f8de8 100644
--- a/vcs/perforce/integrator/perforceintegrator.h
+++ b/vcs/perforce/integrator/perforceintegrator.h
@@ -27,12 +27,13 @@
class PerforceIntegrator : public KDevVCSIntegrator
{
Q_OBJECT
+ TQ_OBJECT
public:
- PerforceIntegrator(TQObject* parent, const char* name, const TQStringList args = TQStringList());
+ PerforceIntegrator(TQObject* tqparent, const char* name, const TQStringList args = TQStringList());
~PerforceIntegrator();
- virtual VCSDialog* fetcher(TQWidget* parent);
- virtual VCSDialog* integrator(TQWidget* parent);
+ virtual VCSDialog* fetcher(TQWidget* tqparent);
+ virtual VCSDialog* integrator(TQWidget* tqparent);
};
diff --git a/vcs/perforce/integrator/pfintegratordlg.cpp b/vcs/perforce/integrator/pfintegratordlg.cpp
index 8685b2f4..90e66923 100644
--- a/vcs/perforce/integrator/pfintegratordlg.cpp
+++ b/vcs/perforce/integrator/pfintegratordlg.cpp
@@ -19,8 +19,8 @@
***************************************************************************/
#include "pfintegratordlg.h"
-PFIntegratorDlg::PFIntegratorDlg(TQWidget *parent, const char *name)
- :PFIntegratorDlgBase(parent, name)
+PFIntegratorDlg::PFIntegratorDlg(TQWidget *tqparent, const char *name)
+ :PFIntegratorDlgBase(tqparent, name)
{
}
diff --git a/vcs/perforce/integrator/pfintegratordlg.h b/vcs/perforce/integrator/pfintegratordlg.h
index 750795b6..a4f515bf 100644
--- a/vcs/perforce/integrator/pfintegratordlg.h
+++ b/vcs/perforce/integrator/pfintegratordlg.h
@@ -25,8 +25,9 @@
class PFIntegratorDlg: public PFIntegratorDlgBase, public VCSDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- PFIntegratorDlg(TQWidget *parent = 0, const char *name = 0);
+ PFIntegratorDlg(TQWidget *tqparent = 0, const char *name = 0);
virtual void accept();
virtual void init(const TQString &projectName, const TQString &projectLocation);
diff --git a/vcs/perforce/integrator/pfintegratordlgbase.ui b/vcs/perforce/integrator/pfintegratordlgbase.ui
index 5b12a70f..8a5795a8 100644
--- a/vcs/perforce/integrator/pfintegratordlgbase.ui
+++ b/vcs/perforce/integrator/pfintegratordlgbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>PFIntegratorDlgBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PFIntegratorDlgBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -34,7 +34,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>435</height>
@@ -43,5 +43,5 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/vcs/perforce/perforcepart.cpp b/vcs/perforce/perforcepart.cpp
index cb3d7ba9..406de1f8 100644
--- a/vcs/perforce/perforcepart.cpp
+++ b/vcs/perforce/perforcepart.cpp
@@ -38,8 +38,8 @@ static const KDevPluginInfo data("kdevperforce");
typedef KDevGenericFactory<PerforcePart> PerforceFactory;
K_EXPORT_COMPONENT_FACTORY( libkdevperforce, PerforceFactory( data ) )
-PerforcePart::PerforcePart( TQObject *parent, const char *name, const TQStringList & )
- : KDevVersionControl( &data, parent, name ? name : "PerforcePart" )
+PerforcePart::PerforcePart( TQObject *tqparent, const char *name, const TQStringList & )
+ : KDevVersionControl( &data, tqparent, name ? name : "PerforcePart" )
{
setInstance(PerforceFactory::instance());
setupActions();
@@ -94,30 +94,30 @@ void PerforcePart::contextMenu(TQPopupMenu *popup, const Context *context)
KPopupMenu *sub = new KPopupMenu(popup);
TQString name = fi.fileName();
- sub->insertTitle( i18n("Actions for %1").arg(name) );
+ sub->insertTitle( i18n("Actions for %1").tqarg(name) );
int id = sub->insertItem( i18n("Edit"),
this, TQT_SLOT(slotEdit()) );
- sub->setWhatsThis(id, i18n("<b>Edit</b><p>Opens file(s) in a client workspace for edit."));
+ sub->tqsetWhatsThis(id, i18n("<b>Edit</b><p>Opens file(s) in a client workspace for edit."));
id = sub->insertItem( i18n("Revert"),
this, TQT_SLOT(slotRevert()) );
- sub->setWhatsThis(id, i18n("<b>Revert</b><p>Discards changes made to open files."));
+ sub->tqsetWhatsThis(id, i18n("<b>Revert</b><p>Discards changes made to open files."));
id = sub->insertItem( i18n("Submit"),
this, TQT_SLOT(slotCommit()) );
- sub->setWhatsThis(id, i18n("<b>Submit</b><p>Sends changes made to open files to the depot."));
+ sub->tqsetWhatsThis(id, i18n("<b>Submit</b><p>Sends changes made to open files to the depot."));
id = sub->insertItem( i18n("Sync"),
this, TQT_SLOT(slotUpdate()) );
- sub->setWhatsThis(id, i18n("<b>Sync</b><p>Copies files from the depot into the workspace."));
+ sub->tqsetWhatsThis(id, i18n("<b>Sync</b><p>Copies files from the depot into the workspace."));
sub->insertSeparator();
id = sub->insertItem( i18n("Diff Against Repository"),
this, TQT_SLOT(slotDiff()) );
- sub->setWhatsThis(id, i18n("<b>Diff against repository</b><p>Compares a client workspace file to a revision in the depot."));
+ sub->tqsetWhatsThis(id, i18n("<b>Diff against repository</b><p>Compares a client workspace file to a revision in the depot."));
id = sub->insertItem( i18n("Add to Repository"),
this, TQT_SLOT(slotAdd()) );
- sub->setWhatsThis(id, i18n("<b>Add to repository</b><p>Open file(s) in a client workspace for addition to the depot."));
+ sub->tqsetWhatsThis(id, i18n("<b>Add to repository</b><p>Open file(s) in a client workspace for addition to the depot."));
id = sub->insertItem( i18n("Remove From Repository"),
this, TQT_SLOT(slotRemove()) );
- sub->setWhatsThis(id, i18n("<b>Remove from repository</b><p>Open file(s) in a client workspace for deletion from the depot."));
+ sub->tqsetWhatsThis(id, i18n("<b>Remove from repository</b><p>Open file(s) in a client workspace for deletion from the depot."));
id = popup->insertItem(i18n("Perforce"), sub);
}
}
@@ -153,7 +153,7 @@ void PerforcePart::revert( const TQString& filename )
{
if ( KMessageBox::questionYesNo( 0,
i18n("Do you really want to revert "
- "the file %1 and lose all your changes?").arg( filename ), TQString::null, i18n("Revert"), i18n("Do Not Revert") ) == KMessageBox::Yes ) {
+ "the file %1 and lose all your changes?").tqarg( filename ), TQString(), i18n("Revert"), i18n("Do Not Revert") ) == KMessageBox::Yes ) {
execCommand( "revert", filename );
}
}
@@ -242,7 +242,7 @@ void PerforcePart::diff( const TQString& filename )
args << "diff";
args << "-du";
args << name;
- ExecCommand* cmv = new ExecCommand( "p4", args, TQString::null, TQStringList(), this );
+ ExecCommand* cmv = new ExecCommand( "p4", args, TQString(), TQStringList(), this );
connect( cmv, TQT_SIGNAL(finished( const TQString&, const TQString& )),
this, TQT_SLOT(slotDiffFinished( const TQString&, const TQString& )) );
}
@@ -275,7 +275,7 @@ void PerforcePart::slotDiffFinished( const TQString& diff, const TQString& err )
static TQRegExp rx( "(^|\\n)==== ([^ ]+) -.*====\\n" );
rx.setMinimal( true );
TQString strippedDiff = diff;
- strippedDiff.replace( rx, "--- \\2\n+++ \\2\n" );
+ strippedDiff.tqreplace( rx, "--- \\2\n+++ \\2\n" );
if (KDevDiffFrontend *diffFrontend = extension<KDevDiffFrontend>("KDevelop/DiffFrontend"))
diffFrontend->showDiff( strippedDiff );
@@ -289,7 +289,7 @@ TQString PerforcePart::currentFile()
if ( url.isLocalFile() )
return url.path();
}
- return TQString::null;
+ return TQString();
}
void PerforcePart::slotActionCommit()
diff --git a/vcs/perforce/perforcepart.h b/vcs/perforce/perforcepart.h
index e5d2da9b..18994e0d 100644
--- a/vcs/perforce/perforcepart.h
+++ b/vcs/perforce/perforcepart.h
@@ -23,9 +23,10 @@ class KAction;
class PerforcePart : public KDevVersionControl
{
Q_OBJECT
+ TQ_OBJECT
public:
- PerforcePart( TQObject *parent, const char *name, const TQStringList & );
+ PerforcePart( TQObject *tqparent, const char *name, const TQStringList & );
~PerforcePart();
virtual TQString shortDescription() const