summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kmdi
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 /languages/cpp/app_templates/kscons_kmdi
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 'languages/cpp/app_templates/kscons_kmdi')
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/QUICKSTART16
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/SConscript-src2
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/SConstruct16
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/app_part.cpp14
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/app_part.h5
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp8
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdi.h1
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp8
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/appkmdiView.h3
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp2
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h5
-rwxr-xr-xlanguages/cpp/app_templates/kscons_kmdi/messages.sh6
-rw-r--r--languages/cpp/app_templates/kscons_kmdi/prefs.ui6
13 files changed, 48 insertions, 44 deletions
diff --git a/languages/cpp/app_templates/kscons_kmdi/QUICKSTART b/languages/cpp/app_templates/kscons_kmdi/QUICKSTART
index ceaf1bda..0ba306bb 100644
--- a/languages/cpp/app_templates/kscons_kmdi/QUICKSTART
+++ b/languages/cpp/app_templates/kscons_kmdi/QUICKSTART
@@ -12,7 +12,7 @@ http://freehackers.org/~tnagy/bksys_manual.html
CONFIGURING AND COMPILING THE PROJECT(S)
SCONS TIPS
-MOC PROCESSING
+TQMOC PROCESSING
SCONS MINIMUM DISTRIBUTION
MORE TIPS
@@ -61,20 +61,20 @@ checkinstall --fstrans=no --nodoc scons install
To make scons run (much) faster, consult ./addons/README in bksys
------------------------------------------
-MOC PROCESSING
+TQMOC PROCESSING
In qt programs, when a header 'foo.h' contains a class that has
-signals and slots, then 'foo.h' must contain the macro Q_OBJECT
-in order to compile. foo_moc.cpp is usually generated, and is
-used to produce foo_moc.o which is linked with the
+Q_SIGNALS and Q_SLOTS, then 'foo.h' must contain the macro Q_OBJECT
+in order to compile. foo_tqmoc.cpp is usually generated, and is
+used to produce foo_tqmoc.o which is linked with the
program or the library.
-In kde programs, 'foo.moc' is generated instead of foo_moc.cpp,
+In kde programs, 'foo.tqmoc' is generated instead of foo_tqmoc.cpp,
and it must be included at the very end of foo.cpp
(add #include "foo.moc" : this increases the speed of
compilation a *lot* and makes less object files.
-Both modes are provided though, see test6-mocfiesta/
+Both modes are provided though, see test6-tqmocfiesta/
------------------------------------------
MINIMUM SCONS DISTRIBUTION
@@ -127,7 +127,7 @@ remember that libtool is broken on many systems (invalid flags
among others), so when you can work without libtool
(small projects especially), just do it.
-** moc processing **
+** tqmoc processing **
As stated above, you should always add #include "foo.moc"
for your qt classes (Q_OBJECT) to save precious compilation time.
diff --git a/languages/cpp/app_templates/kscons_kmdi/SConscript-src b/languages/cpp/app_templates/kscons_kmdi/SConscript-src
index 746cdf98..9850e2ae 100644
--- a/languages/cpp/app_templates/kscons_kmdi/SConscript-src
+++ b/languages/cpp/app_templates/kscons_kmdi/SConscript-src
@@ -1,6 +1,6 @@
#! /usr/bin/env python
## This script is a quick test to demonstrate (and test)
-## the bksys moc handling '#include "file.moc"' can be added .. or not
+## the bksys tqmoc handling '#include "file.moc"' can be added .. or not
##
## Thomas Nagy, 2005
## This file can be reused freely for any project (see COPYING)
diff --git a/languages/cpp/app_templates/kscons_kmdi/SConstruct b/languages/cpp/app_templates/kscons_kmdi/SConstruct
index b82de4e1..238a05b8 100644
--- a/languages/cpp/app_templates/kscons_kmdi/SConstruct
+++ b/languages/cpp/app_templates/kscons_kmdi/SConstruct
@@ -73,20 +73,20 @@ if 'dist' in COMMAND_LINE_TARGETS:
shutil.copytree(startdir, FOLDER)
## remove our object files first
- os.popen("find "+FOLDER+" -name \"*cache*\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \"*.pyc\" | xargs rm -f")
+ os.popen("tqfind "+FOLDER+" -name \"*cache*\" | xargs rm -rf")
+ os.popen("tqfind "+FOLDER+" -name \"*.pyc\" | xargs rm -f")
#os.popen("pushd %s && scons -c " % FOLDER) # TODO
## CVS cleanup
- os.popen("find "+FOLDER+" -name \"CVS\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".cvsignore\" | xargs rm -rf")
+ os.popen("tqfind "+FOLDER+" -name \"CVS\" | xargs rm -rf")
+ os.popen("tqfind "+FOLDER+" -name \".cvsignore\" | xargs rm -rf")
## Subversion cleanup
- os.popen("find %s -name .svn -type d | xargs rm -rf" % FOLDER)
+ os.popen("tqfind %s -name .svn -type d | xargs rm -rf" % FOLDER)
## GNU Arch cleanup
- os.popen("find "+FOLDER+" -name \"{arch}\" | xargs rm -rf")
- os.popen("find "+FOLDER+" -name \".arch-i*\" | xargs rm -rf")
+ os.popen("tqfind "+FOLDER+" -name \"{arch}\" | xargs rm -rf")
+ os.popen("tqfind "+FOLDER+" -name \".arch-i*\" | xargs rm -rf")
## Create the tarball (coloured output)
print "\033[92m"+"Writing archive "+ARCHIVE+"\033[0m"
@@ -105,7 +105,7 @@ if 'distclean' in COMMAND_LINE_TARGETS:
import os, shutil
if os.path.isdir(env['CACHEDIR']):
shutil.rmtree(env['CACHEDIR'])
- os.popen("find . -name \"*.pyc\" | xargs rm -rf")
+ os.popen("tqfind . -name \"*.pyc\" | xargs rm -rf")
env.Default(None)
env.Exit(0)
diff --git a/languages/cpp/app_templates/kscons_kmdi/app_part.cpp b/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
index a851f02a..1f27cee4 100644
--- a/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/app_part.cpp
@@ -17,15 +17,15 @@
typedef KParts::GenericFactory<%{APPNAMELC}Part> %{APPNAMELC}PartFactory;
K_EXPORT_COMPONENT_FACTORY( lib%{APPNAMELC}part, %{APPNAMELC}PartFactory );
-%{APPNAMELC}Part::%{APPNAMELC}Part( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList & /*args*/)
- : KParts::ReadWritePart(parent)
+%{APPNAMELC}Part::%{APPNAMELC}Part( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/)
+ : KParts::ReadWritePart(tqparent)
{
// we need an instance
setInstance( %{APPNAMELC}PartFactory::instance() );
// this should be your custom internal widget
- m_widget = new TQMultiLineEdit( parentWidget, widgetName );
+ m_widget = new TQMultiLineEdit( tqparentWidget, widgetName );
// notify the part that this is our internal widget
setWidget(m_widget);
@@ -88,7 +88,7 @@ void %{APPNAMELC}Part::setModified(bool modified)
else
save->setEnabled(false);
- // in any event, we want our parent to do it's thing
+ // in any event, we want our tqparent to do it's thing
ReadWritePart::setModified(modified);
}
@@ -100,7 +100,7 @@ bool %{APPNAMELC}Part::openFile()
return false;
// our example widget is text-based, so we use TQTextStream instead
- // of a raw QDataStream
+ // of a raw TQDataStream
TQTextStream stream(&file);
TQString str;
while (!stream.eof())
@@ -123,7 +123,7 @@ bool %{APPNAMELC}Part::saveFile()
if (isReadWrite() == false)
return false;
- // m_file is always local, so we use QFile
+ // m_file is always local, so we use TQFile
TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
diff --git a/languages/cpp/app_templates/kscons_kmdi/app_part.h b/languages/cpp/app_templates/kscons_kmdi/app_part.h
index 3fa9beb5..39509adf 100644
--- a/languages/cpp/app_templates/kscons_kmdi/app_part.h
+++ b/languages/cpp/app_templates/kscons_kmdi/app_part.h
@@ -23,12 +23,13 @@ class KAboutData;
class %{APPNAMELC}Part : public KParts::ReadWritePart
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
*/
- %{APPNAMELC}Part(TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList & /*args*/);
+ %{APPNAMELC}Part(TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/);
/**
* Destructor
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
index 4286053a..efb41c1d 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdi.cpp
@@ -4,7 +4,7 @@
#include <tqpainter.h>
#include <tqpaintdevicemetrics.h>
#include <tqdragobject.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqtoolbutton.h>
#include <kdebug.h>
@@ -146,7 +146,7 @@ void %{APPNAMELC}kmdi::setupActions()
void %{APPNAMELC}kmdi::showTip()
{
- KTipDialog::showTip(this,TQString::null,true);
+ KTipDialog::showTip(this,TQString(),true);
}
void %{APPNAMELC}kmdi::showTipOnStart()
@@ -204,7 +204,7 @@ void %{APPNAMELC}kmdi::currentChanged( KMdiChildView *current )
}
// switch to the corresponding document
- if ( m_views.contains( (%{APPNAMELC}kmdiView*) current ) )
+ if ( m_views.tqcontains( (%{APPNAMELC}kmdiView*) current ) )
{
%{APPNAMELC}kmdiView *view = (%{APPNAMELC}kmdiView*) current;
//view->updateCaption();
@@ -243,7 +243,7 @@ bool %{APPNAMELC}kmdi::requestClose(KMdiChildView* v)
}
%{APPNAMELC}kmdiView *view = (%{APPNAMELC}kmdiView*) v;
- if ( m_views.contains( view ) )
+ if ( m_views.tqcontains( view ) )
{
m_views.remove( view );
if ( view->part()->queryClose() )
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdi.h b/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
index 8e80ab29..ca78c895 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdi.h
@@ -28,6 +28,7 @@ class MiscProperties;
class %{APPNAMELC}kmdi : public KMdiMainFrm
{
Q_OBJECT
+ TQ_OBJECT
public:
%{APPNAMELC}kmdi( KMdi::MdiMode mode );
virtual ~%{APPNAMELC}kmdi();
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
index d7c00001..232d6b44 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.cpp
@@ -13,8 +13,8 @@
#include "%{APPNAMELC}kmdiView.h"
- %{APPNAMELC}kmdiView::%{APPNAMELC}kmdiView( TQWidget *parentWidget, const char *name )
-: KMdiChildView( parentWidget, name )
+ %{APPNAMELC}kmdiView::%{APPNAMELC}kmdiView( TQWidget *tqparentWidget, const char *name )
+: KMdiChildView( tqparentWidget, name )
{
m_part = NULL;
@@ -35,9 +35,9 @@
part()->widget()->setFocus();
setFocusProxy(part()->widget());
- TQBoxLayout* layout = new TQHBoxLayout(this, 0, -1, "kdissertviewlayout" );
+ TQBoxLayout* tqlayout = new TQHBoxLayout(this, 0, -1, "kdissertviewtqlayout" );
part()->widget()->reparent( this, TQPoint(0, 0) );
- layout->addWidget( part()->widget() );
+ tqlayout->addWidget( part()->widget() );
// connect( m_part, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(updateCaption()) );
}
diff --git a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
index af05df48..31167035 100644
--- a/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
+++ b/languages/cpp/app_templates/kscons_kmdi/appkmdiView.h
@@ -15,8 +15,9 @@
class %{APPNAMELC}kmdiView : public KMdiChildView
{
Q_OBJECT
+ TQ_OBJECT
public:
- %{APPNAMELC}kmdiView( TQWidget *parentWidget=0L, const char *name=0L );
+ %{APPNAMELC}kmdiView( TQWidget *tqparentWidget=0L, const char *name=0L );
virtual ~%{APPNAMELC}kmdiView();
KParts::ReadWritePart *part() { return m_part; }
diff --git a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
index 5bd6b949..d0c856ec 100644
--- a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
+++ b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.cpp
@@ -12,7 +12,7 @@
#include "kmdikonsole.h"
-kmdikonsole::kmdikonsole(TQWidget *parent, const char *name) : TQVBox(parent, name)
+kmdikonsole::kmdikonsole(TQWidget *tqparent, const char *name) : TQVBox(tqparent, name)
{
m_haskonsole = false;
respawn();
diff --git a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
index ef5a2c1e..e97175c1 100644
--- a/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
+++ b/languages/cpp/app_templates/kscons_kmdi/kmdikonsole.h
@@ -5,12 +5,13 @@
#include <tqvbox.h>
-class kmdikonsole : public QVBox
+class kmdikonsole : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- kmdikonsole( TQWidget* parent, const char* name=0);
+ kmdikonsole( TQWidget* tqparent, const char* name=0);
~kmdikonsole();
public slots:
diff --git a/languages/cpp/app_templates/kscons_kmdi/messages.sh b/languages/cpp/app_templates/kscons_kmdi/messages.sh
index a36f5c93..7df00263 100755
--- a/languages/cpp/app_templates/kscons_kmdi/messages.sh
+++ b/languages/cpp/app_templates/kscons_kmdi/messages.sh
@@ -34,14 +34,14 @@ fi
echo "extracting the strings"
# process the .ui and .rc files
-$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp
-$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp
+$EXTRACTRC `tqfind $SRCDIR -iname *.rc` >> rc.cpp
+$EXTRACTRC `tqfind $SRCDIR -iname *.ui` >> rc.cpp
echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp
# process the tips - $SRCDIR is supposed to be where the tips are living
pushd $TIPSDIR; preparetips >tips.cpp; popd
-$XGETTEXT `find $SRCDIR -name "*.cpp"` -o kdissert.pot
+$XGETTEXT `tqfind $SRCDIR -name "*.cpp"` -o kdissert.pot
# remove the intermediate files
rm -f $TIPSDIR/tips.cpp
diff --git a/languages/cpp/app_templates/kscons_kmdi/prefs.ui b/languages/cpp/app_templates/kscons_kmdi/prefs.ui
index 5de638ef..8b3346de 100644
--- a/languages/cpp/app_templates/kscons_kmdi/prefs.ui
+++ b/languages/cpp/app_templates/kscons_kmdi/prefs.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>prefs</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>prefs</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
-<widget class="QCheckBox" row="0" column="0">
+<widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>kcfg_showCloseTabsButton</cstring>
</property>
@@ -26,5 +26,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>