summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kscons_kxt
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_kxt
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_kxt')
-rw-r--r--languages/cpp/app_templates/kscons_kxt/QUICKSTART16
-rw-r--r--languages/cpp/app_templates/kscons_kxt/SConscript-src2
-rw-r--r--languages/cpp/app_templates/kscons_kxt/SConstruct16
-rw-r--r--languages/cpp/app_templates/kscons_kxt/app.cpp2
-rw-r--r--languages/cpp/app_templates/kscons_kxt/app.h1
-rw-r--r--languages/cpp/app_templates/kscons_kxt/appview.cpp6
-rw-r--r--languages/cpp/app_templates/kscons_kxt/appview.h3
-rw-r--r--languages/cpp/app_templates/kscons_kxt/appview_base.ui6
-rwxr-xr-xlanguages/cpp/app_templates/kscons_kxt/messages.sh6
-rw-r--r--languages/cpp/app_templates/kscons_kxt/prefs-base.ui18
10 files changed, 39 insertions, 37 deletions
diff --git a/languages/cpp/app_templates/kscons_kxt/QUICKSTART b/languages/cpp/app_templates/kscons_kxt/QUICKSTART
index ceaf1bda..0ba306bb 100644
--- a/languages/cpp/app_templates/kscons_kxt/QUICKSTART
+++ b/languages/cpp/app_templates/kscons_kxt/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_kxt/SConscript-src b/languages/cpp/app_templates/kscons_kxt/SConscript-src
index 02432be5..bc91cc0b 100644
--- a/languages/cpp/app_templates/kscons_kxt/SConscript-src
+++ b/languages/cpp/app_templates/kscons_kxt/SConscript-src
@@ -33,7 +33,7 @@ myenv.KDEprogram( "%{APPNAMELC}", %{APPNAMELC}_sources )
## Customization
## Additional include paths for compiling the source files
-## Always add '../' (top-level directory) because moc makes code that needs it
+## Always add '../' (top-level directory) because tqmoc makes code that needs it
myenv.KDEaddpaths_includes( "./ ../" )
## Necessary libraries to link against
diff --git a/languages/cpp/app_templates/kscons_kxt/SConstruct b/languages/cpp/app_templates/kscons_kxt/SConstruct
index b82de4e1..238a05b8 100644
--- a/languages/cpp/app_templates/kscons_kxt/SConstruct
+++ b/languages/cpp/app_templates/kscons_kxt/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_kxt/app.cpp b/languages/cpp/app_templates/kscons_kxt/app.cpp
index 2a696ea0..ec892c11 100644
--- a/languages/cpp/app_templates/kscons_kxt/app.cpp
+++ b/languages/cpp/app_templates/kscons_kxt/app.cpp
@@ -158,7 +158,7 @@ void %{APPNAME}::changeCaption(const TQString& text)
void %{APPNAME}::showTip()
{
- KTipDialog::showTip(this,TQString::null,true);
+ KTipDialog::showTip(this,TQString(),true);
}
void %{APPNAME}::showTipOnStart()
diff --git a/languages/cpp/app_templates/kscons_kxt/app.h b/languages/cpp/app_templates/kscons_kxt/app.h
index e812716d..afc6d642 100644
--- a/languages/cpp/app_templates/kscons_kxt/app.h
+++ b/languages/cpp/app_templates/kscons_kxt/app.h
@@ -29,6 +29,7 @@ class %{APPNAME} : public KMainWindow, public DCOPObject
{
K_DCOP
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
diff --git a/languages/cpp/app_templates/kscons_kxt/appview.cpp b/languages/cpp/app_templates/kscons_kxt/appview.cpp
index 2bcc9c6a..a474e605 100644
--- a/languages/cpp/app_templates/kscons_kxt/appview.cpp
+++ b/languages/cpp/app_templates/kscons_kxt/appview.cpp
@@ -6,8 +6,8 @@
#include <klocale.h>
#include <tqlabel.h>
-%{APPNAME}View::%{APPNAME}View(TQWidget *parent)
- : %{APPNAME}view_base(parent)
+%{APPNAME}View::%{APPNAME}View(TQWidget *tqparent)
+ : %{APPNAME}view_base(tqparent)
{
settingsChanged();
}
@@ -33,7 +33,7 @@ void %{APPNAME}View::settingsChanged()
sillyLabel->setPaletteForegroundColor( Settings::col_foreground() );
// i18n : internationalization
- sillyLabel->setText( i18n("This project is %1 days old").arg(Settings::val_time()) );
+ sillyLabel->setText( i18n("This project is %1 days old").tqarg(Settings::val_time()) );
emit signalChangeStatusbar( i18n("Settings changed") );
}
diff --git a/languages/cpp/app_templates/kscons_kxt/appview.h b/languages/cpp/app_templates/kscons_kxt/appview.h
index 8cd02bef..8d4517bd 100644
--- a/languages/cpp/app_templates/kscons_kxt/appview.h
+++ b/languages/cpp/app_templates/kscons_kxt/appview.h
@@ -22,11 +22,12 @@ class KURL;
class %{APPNAME}View : public %{APPNAME}view_base
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
*/
- %{APPNAME}View(TQWidget *parent);
+ %{APPNAME}View(TQWidget *tqparent);
/**
* Destructor
diff --git a/languages/cpp/app_templates/kscons_kxt/appview_base.ui b/languages/cpp/app_templates/kscons_kxt/appview_base.ui
index 6cd36d2c..4604ca4b 100644
--- a/languages/cpp/app_templates/kscons_kxt/appview_base.ui
+++ b/languages/cpp/app_templates/kscons_kxt/appview_base.ui
@@ -2,7 +2,7 @@
<class>%{APPNAME}view_base</class>
<comment>%{CPP_TEMPLATE}</comment>
<author>%{AUTHOR} &lt;%{EMAIL}&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>%{APPNAME}view_base</cstring>
</property>
@@ -21,7 +21,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>sillyLabel</cstring>
</property>
@@ -31,5 +31,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/languages/cpp/app_templates/kscons_kxt/messages.sh b/languages/cpp/app_templates/kscons_kxt/messages.sh
index a36f5c93..7df00263 100755
--- a/languages/cpp/app_templates/kscons_kxt/messages.sh
+++ b/languages/cpp/app_templates/kscons_kxt/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_kxt/prefs-base.ui b/languages/cpp/app_templates/kscons_kxt/prefs-base.ui
index 43ef8a5f..59403c40 100644
--- a/languages/cpp/app_templates/kscons_kxt/prefs-base.ui
+++ b/languages/cpp/app_templates/kscons_kxt/prefs-base.ui
@@ -2,7 +2,7 @@
<class>Prefs_base</class>
<comment>%{CPP_TEMPLATE}</comment>
<author>%{AUTHOR} &lt;%{EMAIL}&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>Prefs_base</cstring>
</property>
@@ -18,7 +18,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -34,7 +34,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -42,7 +42,7 @@
<string>Project age:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -68,7 +68,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
@@ -85,14 +85,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSpinBox" row="2" column="1">
+ <widget class="TQSpinBox" row="2" column="1">
<property name="name">
<cstring>kcfg_val_time</cstring>
</property>
@@ -113,7 +113,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
@@ -122,7 +122,7 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcolorbutton.h</includehint>
</includehints>