summaryrefslogtreecommitdiffstats
path: root/kate/make
diff options
context:
space:
mode:
Diffstat (limited to 'kate/make')
-rw-r--r--kate/make/plugin_katemake.cpp92
-rw-r--r--kate/make/plugin_katemake.h10
2 files changed, 52 insertions, 50 deletions
diff --git a/kate/make/plugin_katemake.cpp b/kate/make/plugin_katemake.cpp
index e78bda9..6cfa9e8 100644
--- a/kate/make/plugin_katemake.cpp
+++ b/kate/make/plugin_katemake.cpp
@@ -62,8 +62,8 @@ K_EXPORT_COMPONENT_FACTORY( katemakeplugin, KGenericFactory<PluginKateMake>( "ka
// #define FUNCTIONSETUP kdDebug() << k_funcinfo << endl;
#define FUNCTIONSETUP
-PluginKateMake::PluginKateMake( TQObject* parent, const char* name, const TQStringList& )
- : Kate::Plugin ( (Kate::Application *)parent, name )
+PluginKateMake::PluginKateMake( TQObject* tqparent, const char* name, const TQStringList& )
+ : Kate::Plugin ( (Kate::Application *)tqparent, name )
{
FUNCTIONSETUP;
}
@@ -82,7 +82,7 @@ void PluginKateMake::addView(Kate::MainWindow *win)
Kate::ToolViewManager *viewmanager = win->toolViewManager();
TQWidget *w = viewmanager->createToolView("kate_plugin_make",
Kate::ToolViewManager::Bottom,
- SmallIcon(TQString::fromLatin1("misc")),
+ SmallIcon(TQString::tqfromLatin1("misc")),
i18n("Make Output"));
PluginKateMakeView *view = new PluginKateMakeView (w,win,
"katemakeview");
@@ -120,24 +120,24 @@ void PluginKateMake::removeView(Kate::MainWindow *win)
#define COL_MSG (2)
-class ErrorMessage : public QListViewItem
+class ErrorMessage : public TQListViewItem
{
public:
- ErrorMessage(TQListView *parent,
+ ErrorMessage(TQListView *tqparent,
const TQString &filename,
int lineno,
const TQString &message) :
- TQListViewItem(parent,
+ TQListViewItem(tqparent,
filename,
- (lineno > 0 ? TQString::number(lineno) : TQString::null),
+ (lineno > 0 ? TQString::number(lineno) : TQString()),
message)
{
- m_isError = !message.contains(TQString::fromLatin1("warning"));
+ m_isError = !message.tqcontains(TQString::tqfromLatin1("warning"));
m_lineno = lineno;
m_serial = s_serial++;
}
- ErrorMessage(TQListView *parent,const TQString &message) :
- TQListViewItem(parent,TQString::null,TQString::null,TQString::null)
+ ErrorMessage(TQListView *tqparent,const TQString &message) :
+ TQListViewItem(tqparent,TQString(),TQString(),TQString())
{
TQString m(message);
m.remove('\n');
@@ -149,8 +149,8 @@ public:
m_serial = s_serial++;
setSelectable(false);
}
- ErrorMessage(TQListView *parent, bool start) :
- TQListViewItem(parent,TQString::null)
+ ErrorMessage(TQListView *tqparent, bool start) :
+ TQListViewItem(tqparent,TQString())
{
m_isError=false;
m_lineno=-1;
@@ -192,22 +192,22 @@ protected:
TQString ErrorMessage::caption() const
{
- return TQString::fromLatin1("%1:%2").arg(text(COL_FILE)).arg(line());
+ return TQString::tqfromLatin1("%1:%2").tqarg(text(COL_FILE)).tqarg(line());
}
TQString ErrorMessage::fancyMessage() const
{
- TQString msg = TQString::fromLatin1("<qt>");
+ TQString msg = TQString::tqfromLatin1("<qt>");
if (isError())
{
- msg.append(TQString::fromLatin1("<font color=\"red\">"));
+ msg.append(TQString::tqfromLatin1("<font color=\"red\">"));
}
msg.append(message());
if (isError())
{
- msg.append(TQString::fromLatin1("</font>"));
+ msg.append(TQString::tqfromLatin1("</font>"));
}
- msg.append(TQString::fromLatin1("<qt>"));
+ msg.append(TQString::tqfromLatin1("<qt>"));
return msg;
}
@@ -261,7 +261,7 @@ TQString ErrorMessage::fancyMessage() const
class LinePopup : public KPassivePopup
{
protected:
- LinePopup( TQWidget *parent=0, const char *name=0, WFlags f=0 );
+ LinePopup( TQWidget *tqparent=0, const char *name=0, WFlags f=0 );
virtual ~LinePopup();
public:
@@ -292,12 +292,12 @@ LinePopup::~LinePopup()
one=0L;
}
-/* static */ LinePopup *LinePopup::message(TQWidget *parent,
+/* static */ LinePopup *LinePopup::message(TQWidget *tqparent,
const TQPoint &p,
ErrorMessage *e)
{
if (one) delete one;
- LinePopup *pop = new LinePopup( parent );
+ LinePopup *pop = new LinePopup( tqparent );
pop->setAutoDelete( true );
@@ -321,10 +321,10 @@ LinePopup::~LinePopup()
}
}
-PluginKateMakeView::PluginKateMakeView(TQWidget *parent,
+PluginKateMakeView::PluginKateMakeView(TQWidget *tqparent,
Kate::MainWindow *mainwin,
const char* name) :
- TQListView(parent,name),
+ TQListView(tqparent,name),
KXMLGUIClient(),
win(mainwin),
filenameDetector(0L),
@@ -334,26 +334,26 @@ PluginKateMakeView::PluginKateMakeView(TQWidget *parent,
m_proc=0;
(void) new KAction ( i18n("Next Error"), KShortcut(ALT+CTRL+Key_Right),
- this, TQT_SLOT( slotNext() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotNext() ),
actionCollection(), "make_right" );
(void) new KAction ( i18n("Previous Error"), KShortcut(ALT+CTRL+Key_Left),
- this, TQT_SLOT( slotPrev() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotPrev() ),
actionCollection(), "make_left" );
(void) new KAction ( i18n("Make"), KShortcut(ALT+Key_R),
- this, TQT_SLOT( slotValidate() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotValidate() ),
actionCollection(), "make_check" );
(void) new KAction ( i18n("Configure..."), KShortcut(),
- this, TQT_SLOT( slotConfigure() ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotConfigure() ),
actionCollection(), "make_settings" );
setInstance(new KInstance("kate"));
- setXMLFile(TQString::fromLatin1("plugins/katemake/ui.rc"));
+ setXMLFile(TQString::tqfromLatin1("plugins/katemake/ui.rc"));
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
setSorting(COL_LINE);
addColumn(i18n("File"), -1);
@@ -368,18 +368,18 @@ PluginKateMakeView::PluginKateMakeView(TQWidget *parent,
connect(m_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcExited(KProcess*)));
connect(m_proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, TQT_SLOT(slotReceivedProcStderr(KProcess*, char*, int)));
+ TQT_TQOBJECT(this), TQT_SLOT(slotReceivedProcStderr(KProcess*, char*, int)));
KConfig c("katemakepluginrc");
c.setGroup("Prefixes");
- source_prefix = c.readEntry("Source",TQString::null);
- build_prefix = c.readEntry("Build",TQString::null);
+ source_prefix = c.readEntry("Source",TQString());
+ build_prefix = c.readEntry("Build",TQString());
// if (source_prefix.isEmpty())
{
filenameDetector = new TQRegExp(
- TQString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:"));
+ TQString::tqfromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:"));
}
// else
{
@@ -403,21 +403,21 @@ void PluginKateMakeView::processLine(const TQString &l)
kdDebug() << "Got line " << l ;
- if (!filenameDetector && l.find(source_prefix)!=0)
+ if (!filenameDetector && l.tqfind(source_prefix)!=0)
{
/* ErrorMessage *e = */ (void) new ErrorMessage(this,l);
return;
}
- if (filenameDetector && l.find(*filenameDetector)<0)
+ if (filenameDetector && l.tqfind(*filenameDetector)<0)
{
ErrorMessage *e = new ErrorMessage(this,l);
kdDebug() << "Got message(1) #" << e->serial() << endl;
return;
}
- int ofs1 = l.find(':');
- int ofs2 = l.find(':',ofs1+1);
+ int ofs1 = l.tqfind(':');
+ int ofs2 = l.tqfind(':',ofs1+1);
//
TQString m = l.mid(ofs2+1);
m.remove('\n');
@@ -452,7 +452,7 @@ void PluginKateMakeView::slotReceivedProcStderr(KProcess *, char *result, int le
output_line += l;
int nl_p = -1;
- while ((nl_p = output_line.find('\n')) > 1)
+ while ((nl_p = output_line.tqfind('\n')) > 1)
{
processLine(output_line.left(nl_p+1));
output_line.remove(0,nl_p+1);
@@ -504,8 +504,8 @@ void PluginKateMakeView::slotProcExited(KProcess *p)
this);
clear();
#if 0
- TQListViewItem *i = new TQListViewItem(this,TQString::null,
- TQString::null,
+ TQListViewItem *i = new TQListViewItem(this,TQString(),
+ TQString(),
i18n("No Errors."));
i->setSelectable(false);
#else
@@ -557,7 +557,7 @@ void PluginKateMakeView::slotClicked(TQListViewItem *item)
<< globalPos.x() << "," << globalPos.y() << endl;
#if 0
KPassivePopup::message(
- TQString::fromLatin1("%1:%2").arg(filename).arg(lineno),
+ TQString::tqfromLatin1("%1:%2").tqarg(filename).tqarg(lineno),
msg,
this);
#else
@@ -632,7 +632,7 @@ bool PluginKateMakeView::slotValidate()
doc->save();
KURL url(doc->url());
- output_line = TQString::null;
+ output_line = TQString();
ErrorMessage::resetSerial();
found_error=false;
@@ -644,12 +644,12 @@ bool PluginKateMakeView::slotValidate()
KMessageBox::sorry(0,
i18n("The file <i>%1</i> is not a local file. "
"Non-local files cannot be compiled.")
- .arg(url.path()));
+ .tqarg(url.path()));
return false;
}
document_dir = TQFileInfo(url.path()).dirPath(true) +
- TQString::fromLatin1("/");
+ TQString::tqfromLatin1("/");
if (document_dir.startsWith(source_prefix))
{
@@ -662,7 +662,7 @@ bool PluginKateMakeView::slotValidate()
make = KStandardDirs::findExe("make");
*m_proc << make;
if( make.isEmpty() || ! m_proc->start(KProcess::NotifyOnExit, KProcess::AllOutput) ) {
- KMessageBox::error(0, i18n("<b>Error:</b> Failed to run %1.").arg(make.isEmpty() ?
+ KMessageBox::error(0, i18n("<b>Error:</b> Failed to run %1.").tqarg(make.isEmpty() ?
"make" : make));
return false;
}
@@ -674,7 +674,7 @@ bool PluginKateMakeView::slotValidate()
class Settings : public KDialogBase
{
public:
- Settings( TQWidget *parent,
+ Settings( TQWidget *tqparent,
const TQString &src, const TQString &bld);
KLineEdit *edit_src,*edit_bld;
@@ -717,7 +717,7 @@ void PluginKateMakeView::slotConfigure()
if (!filenameDetector)
{
filenameDetector = new TQRegExp(
- TQString::fromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:"));
+ TQString::tqfromLatin1("[a-zA-Z0-9_\\.\\-]*\\.[chp]*:[0-9]*:"));
}
}
//else
diff --git a/kate/make/plugin_katemake.h b/kate/make/plugin_katemake.h
index 21014be..f39ba88 100644
--- a/kate/make/plugin_katemake.h
+++ b/kate/make/plugin_katemake.h
@@ -27,8 +27,8 @@
** MA 02110-1301, USA.
*/
-// #define QT_NO_CAST_ASCII (1)
-// #define QT_NO_ASCII_CAST (1)
+// #define TQT_NO_CAST_ASCII (1)
+// #define TQT_NO_ASCII_CAST (1)
class TQRegExp;
@@ -51,9 +51,10 @@ class TQRegExp;
class PluginKateMakeView : public TQListView, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginKateMakeView(TQWidget *parent,
+ PluginKateMakeView(TQWidget *tqparent,
Kate::MainWindow *mainwin,
const char* name);
virtual ~PluginKateMakeView();
@@ -92,9 +93,10 @@ protected:
class PluginKateMake : public Kate::Plugin, Kate::PluginViewInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginKateMake( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() );
+ PluginKateMake( TQObject* tqparent = 0, const char* name = 0, const TQStringList& = TQStringList() );
virtual ~PluginKateMake();
void addView (Kate::MainWindow *win);