summaryrefslogtreecommitdiffstats
path: root/kate/xmlcheck
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/xmlcheck
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/xmlcheck')
-rw-r--r--kate/xmlcheck/plugin_katexmlcheck.cpp28
-rw-r--r--kate/xmlcheck/plugin_katexmlcheck.h6
2 files changed, 18 insertions, 16 deletions
diff --git a/kate/xmlcheck/plugin_katexmlcheck.cpp b/kate/xmlcheck/plugin_katexmlcheck.cpp
index 253c9d0..2f94759 100644
--- a/kate/xmlcheck/plugin_katexmlcheck.cpp
+++ b/kate/xmlcheck/plugin_katexmlcheck.cpp
@@ -54,8 +54,8 @@
K_EXPORT_COMPONENT_FACTORY( katexmlcheckplugin, KGenericFactory<PluginKateXMLCheck>( "katexmlcheck" ) )
-PluginKateXMLCheck::PluginKateXMLCheck( TQObject* parent, const char* name, const TQStringList& )
- : Kate::Plugin ( (Kate::Application *)parent, name )
+PluginKateXMLCheck::PluginKateXMLCheck( TQObject* tqparent, const char* name, const TQStringList& )
+ : Kate::Plugin ( (Kate::Application *)tqparent, name )
{
}
@@ -94,12 +94,12 @@ void PluginKateXMLCheck::removeView(Kate::MainWindow *win)
//---------------------------------
-PluginKateXMLCheckView::PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow *mainwin,const char* name)
- :TQListView(parent,name),KXMLGUIClient(),win(mainwin)
+PluginKateXMLCheckView::PluginKateXMLCheckView(TQWidget *tqparent,Kate::MainWindow *mainwin,const char* name)
+ :TQListView(tqparent,name),KXMLGUIClient(),win(mainwin)
{
m_tmp_file=0;
m_proc=0;
- (void) new KAction ( i18n("Validate XML"), 0, this,
+ (void) new KAction ( i18n("Validate XML"), 0, TQT_TQOBJECT(this),
TQT_SLOT( slotValidate() ), actionCollection(), "xml_check" );
// TODO?:
//(void) new KAction ( i18n("Indent XML"), 0, this,
@@ -109,7 +109,7 @@ PluginKateXMLCheckView::PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow
setXMLFile("plugins/katexmlcheck/ui.rc");
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
addColumn(i18n("#"), -1);
addColumn(i18n("Line"), -1);
setColumnAlignment(1, AlignRight);
@@ -120,7 +120,7 @@ PluginKateXMLCheckView::PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow
setResizeMode(TQListView::LastColumn);
connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotClicked(TQListViewItem *)));
-/* TODO?: invalidate the listview when document has changed
+/* TODO?: tqinvalidate the listview when document has changed
Kate::View *kv = application()->activeMainWindow()->viewManager()->activeView();
if( ! kv ) {
kdDebug() << "Warning: no Kate::View" << endl;
@@ -189,10 +189,10 @@ void PluginKateXMLCheckView::slotProcExited(KProcess*)
for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) {
TQString line = *it;
line_count++;
- int semicolon_1 = line.find(':');
- int semicolon_2 = line.find(':', semicolon_1+1);
- int semicolon_3 = line.find(':', semicolon_2+2);
- int caret_pos = line.find('^');
+ int semicolon_1 = line.tqfind(':');
+ int semicolon_2 = line.tqfind(':', semicolon_1+1);
+ int semicolon_3 = line.tqfind(':', semicolon_2+2);
+ int caret_pos = line.tqfind('^');
if( semicolon_1 != -1 && semicolon_2 != -1 && semicolon_3 != -1 ) {
linenumber = line.mid(semicolon_1+1, semicolon_2-semicolon_1-1).stripWhiteSpace();
linenumber = linenumber.rightJustify(6, ' '); // for sorting numbers
@@ -280,7 +280,7 @@ bool PluginKateXMLCheckView::slotValidate()
if( m_tmp_file->status() != 0 ) {
kdDebug() << "Error (slotValidate()): could not create '" << m_tmp_file->name() << "': " << m_tmp_file->status() << endl;
KMessageBox::error(0, i18n("<b>Error:</b> Could not create "
- "temporary file '%1'.").arg(m_tmp_file->name()));
+ "temporary file '%1'.").tqarg(m_tmp_file->name()));
delete m_tmp_file;
m_tmp_file=0L;
return false;
@@ -317,7 +317,7 @@ bool PluginKateXMLCheckView::slotValidate()
// and needs to be ignored then):
TQRegExp re("<!--.*-->");
re.setMinimal(true);
- text_start.replace(re, "");
+ text_start.tqreplace(re, "");
TQRegExp re_doctype("<!DOCTYPE\\s+(.*)\\s+(?:PUBLIC\\s+[\"'].*[\"']\\s+[\"'](.*)[\"']|SYSTEM\\s+[\"'](.*)[\"'])", false);
re_doctype.setMinimal(true);
@@ -336,7 +336,7 @@ bool PluginKateXMLCheckView::slotValidate()
m_validating = true;
*m_proc << "--valid";
}
- } else if( text_start.find("<!DOCTYPE") != -1 ) {
+ } else if( text_start.tqfind("<!DOCTYPE") != -1 ) {
// DTD is inside the XML file
m_validating = true;
*m_proc << "--valid";
diff --git a/kate/xmlcheck/plugin_katexmlcheck.h b/kate/xmlcheck/plugin_katexmlcheck.h
index b078f59..89c6c59 100644
--- a/kate/xmlcheck/plugin_katexmlcheck.h
+++ b/kate/xmlcheck/plugin_katexmlcheck.h
@@ -44,9 +44,10 @@
class PluginKateXMLCheckView : public TQListView, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginKateXMLCheckView(TQWidget *parent,Kate::MainWindow *mainwin,const char* name);
+ PluginKateXMLCheckView(TQWidget *tqparent,Kate::MainWindow *mainwin,const char* name);
virtual ~PluginKateXMLCheckView();
Kate::MainWindow *win;
@@ -72,9 +73,10 @@ class PluginKateXMLCheckView : public TQListView, public KXMLGUIClient
class PluginKateXMLCheck : public Kate::Plugin, Kate::PluginViewInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- PluginKateXMLCheck( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() );
+ PluginKateXMLCheck( TQObject* tqparent = 0, const char* name = 0, const TQStringList& = TQStringList() );
virtual ~PluginKateXMLCheck();
void addView (Kate::MainWindow *win);