summaryrefslogtreecommitdiffstats
path: root/kate/insertcommand
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/insertcommand
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/insertcommand')
-rw-r--r--kate/insertcommand/plugin_kateinsertcommand.cpp28
-rw-r--r--kate/insertcommand/plugin_kateinsertcommand.h19
2 files changed, 25 insertions, 22 deletions
diff --git a/kate/insertcommand/plugin_kateinsertcommand.cpp b/kate/insertcommand/plugin_kateinsertcommand.cpp
index fb42c3f..cc88a5b 100644
--- a/kate/insertcommand/plugin_kateinsertcommand.cpp
+++ b/kate/insertcommand/plugin_kateinsertcommand.cpp
@@ -57,8 +57,8 @@ class PluginView : public KXMLGUIClient
//END
//BEGIN PluginKateInsertCommand
-PluginKateInsertCommand::PluginKateInsertCommand( TQObject* parent, const char* name, const TQStringList& )
- : Kate::Plugin ( (Kate::Application *)parent, name ),
+PluginKateInsertCommand::PluginKateInsertCommand( TQObject* tqparent, const char* name, const TQStringList& )
+ : Kate::Plugin ( (Kate::Application *)tqparent, name ),
kv ( 0 ),
sh ( 0 )
{
@@ -169,11 +169,11 @@ void PluginKateInsertCommand::slotInsertCommand()
*sh << "cd" << d->wd() << "&&";
config->writePathEntry("Last WD", d->wd());
}
- *sh << TQFile::encodeName(d->command());
+ *sh << TQFile::encodeName(d->command()).data();
sh->start( KProcess::NotifyOnExit, KProcess::All );
// add command to history
- if ( cmdhist.contains( d->command() ) ) {
+ if ( cmdhist.tqcontains( d->command() ) ) {
cmdhist.remove( d->command() );
}
cmdhist.prepend( d->command() );
@@ -208,7 +208,7 @@ void PluginKateInsertCommand::slotShowWaitDlg()
{
if ( sh->isRunning() ) {
wdlg = new WaitDlg( (TQWidget*)kv, i18n(
- "Executing command:\n%1\n\nPress 'Cancel' to abort.").arg(cmd) );
+ "Executing command:\n%1\n\nPress 'Cancel' to abort.").tqarg(cmd) );
connect(wdlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotAbort()) );
}
if ( sh->isRunning() ) // we may have finished while creating the dialog.
@@ -277,13 +277,13 @@ void PluginKateInsertCommand::applyConfig( InsertCommandConfigPage *p )
//BEGIN CmdPrompt
// This is a simple dialog to retrieve a command and decide if
// stdErr should be included in the text inserted.
-CmdPrompt::CmdPrompt(TQWidget* parent,
+CmdPrompt::CmdPrompt(TQWidget* tqparent,
const char* name,
const TQStringList& cmdhist,
const TQString& dir,
const TQString& /*docdir*/,
int settings)
- : KDialogBase (parent, name, true, i18n("Insert Command"), Ok|Cancel, Ok, true)
+ : KDialogBase (tqparent, name, true, i18n("Insert Command"), Ok|Cancel, Ok, true)
{
TQWidget *page = new TQWidget( this );
setMainWidget(page);
@@ -345,14 +345,14 @@ void CmdPrompt::slotTextChanged(const TQString &text)
//BEGIN WaitDlg implementation
// This is a dialog that is displayed while a command is running,
// with a cancel button to allow the user to kill the command
-WaitDlg::WaitDlg(TQWidget* parent, const TQString& text, const TQString& title)
- : KDialogBase( parent, "wait dialog", true, title, Cancel, Cancel, true )
+WaitDlg::WaitDlg(TQWidget* tqparent, const TQString& text, const TQString& title)
+ : KDialogBase( tqparent, "wait dialog", true, title, Cancel, Cancel, true )
{
TQWidget *page = new TQWidget( this );
setMainWidget( page );
TQHBoxLayout *lo = new TQHBoxLayout( page, 0, spacingHint() );
- KAnimWidget *aw = new KAnimWidget( TQString::fromLatin1("kde"), 48, page );
+ KAnimWidget *aw = new KAnimWidget( TQString::tqfromLatin1("kde"), 48, page );
lo->addWidget(aw);
TQLabel *l = new TQLabel( text, page );
lo->addWidget( l );
@@ -366,9 +366,9 @@ WaitDlg::~WaitDlg()
//BEGIN InsertCommandConfigPage
// This is the config page for this plugin.
-InsertCommandConfigPage::InsertCommandConfigPage(TQObject* /*parent*/,
- TQWidget *parentWidget)
- : Kate::PluginConfigPage( parentWidget )
+InsertCommandConfigPage::InsertCommandConfigPage(TQObject* /*tqparent*/,
+ TQWidget *tqparentWidget)
+ : Kate::PluginConfigPage( tqparentWidget )
{
TQVBoxLayout* lo = new TQVBoxLayout( this );
lo->setSpacing(KDialogBase::spacingHint());
@@ -414,4 +414,4 @@ void InsertCommandConfigPage::apply()
emit configPageApplyRequest( this );
}
//END InsertCommandConfigPage
-// kate: space-indent on; indent-width 2; replace-tabs on;
+// kate: space-indent on; indent-width 2; tqreplace-tabs on;
diff --git a/kate/insertcommand/plugin_kateinsertcommand.h b/kate/insertcommand/plugin_kateinsertcommand.h
index 03a1415..ff3a584 100644
--- a/kate/insertcommand/plugin_kateinsertcommand.h
+++ b/kate/insertcommand/plugin_kateinsertcommand.h
@@ -55,9 +55,10 @@ class PluginKateInsertCommand : public Kate::Plugin,
Kate::PluginConfigInterfaceExtension
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginKateInsertCommand( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() );
+ PluginKateInsertCommand( TQObject* tqparent = 0, const char* name = 0, const TQStringList& = TQStringList() );
virtual ~PluginKateInsertCommand();
void addView (Kate::MainWindow *win);
@@ -103,12 +104,13 @@ class PluginKateInsertCommand : public Kate::Plugin,
class CmdPrompt : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CmdPrompt(TQWidget* parent=0,
+ CmdPrompt(TQWidget* tqparent=0,
const char* name=0,
const TQStringList& cmdhist=TQStringList(),
- const TQString& dir=TQString::null,
- const TQString& docdir=TQString::null,
+ const TQString& dir=TQString(),
+ const TQString& docdir=TQString(),
int settings=0);
~CmdPrompt();
TQString command()const { return cmb_cmd->currentText(); }
@@ -130,8 +132,8 @@ private slots:
class WaitDlg : public KDialogBase
{
public:
- WaitDlg(TQWidget* parent,
- const TQString& text=TQString::null,
+ WaitDlg(TQWidget* tqparent,
+ const TQString& text=TQString(),
const TQString& title=i18n("Please Wait"));
~WaitDlg();
};
@@ -140,10 +142,11 @@ class WaitDlg : public KDialogBase
class InsertCommandConfigPage : public Kate::PluginConfigPage
{
Q_OBJECT
+ TQ_OBJECT
friend class PluginKateInsertCommand;
public:
- InsertCommandConfigPage(TQObject* parent = 0L, TQWidget *parentWidget = 0L);
+ InsertCommandConfigPage(TQObject* tqparent = 0L, TQWidget *tqparentWidget = 0L);
~InsertCommandConfigPage() {}
/** Reimplemented from Kate::PluginConfigPage
@@ -167,4 +170,4 @@ class InsertCommandConfigPage : public Kate::PluginConfigPage
};
#endif // _PLUGIN_KATE_INSERT_COMMAND_H_
-// kate: space-indent on; indent-width 2; replace-tabs on;
+// kate: space-indent on; indent-width 2; tqreplace-tabs on;