summaryrefslogtreecommitdiffstats
path: root/languages/cpp/app_templates/kpartapp
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/kpartapp
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/kpartapp')
-rw-r--r--languages/cpp/app_templates/kpartapp/app.cpp2
-rw-r--r--languages/cpp/app_templates/kpartapp/app.h1
-rw-r--r--languages/cpp/app_templates/kpartapp/app_part.cpp20
-rw-r--r--languages/cpp/app_templates/kpartapp/app_part.h10
-rw-r--r--languages/cpp/app_templates/kpartapp/src-Makefile.am4
5 files changed, 20 insertions, 17 deletions
diff --git a/languages/cpp/app_templates/kpartapp/app.cpp b/languages/cpp/app_templates/kpartapp/app.cpp
index 3a8a2274..39bb7108 100644
--- a/languages/cpp/app_templates/kpartapp/app.cpp
+++ b/languages/cpp/app_templates/kpartapp/app.cpp
@@ -183,7 +183,7 @@ void %{APPNAME}::fileOpen()
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
KURL url =
- KFileDialog::getOpenURL( TQString::null, TQString::null, this );
+ KFileDialog::getOpenURL( TQString(), TQString(), this );
if (url.isEmpty() == false)
{
diff --git a/languages/cpp/app_templates/kpartapp/app.h b/languages/cpp/app_templates/kpartapp/app.h
index 25cd63bf..9bc577cb 100644
--- a/languages/cpp/app_templates/kpartapp/app.h
+++ b/languages/cpp/app_templates/kpartapp/app.h
@@ -22,6 +22,7 @@ class KToggleAction;
class %{APPNAME} : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
diff --git a/languages/cpp/app_templates/kpartapp/app_part.cpp b/languages/cpp/app_templates/kpartapp/app_part.cpp
index 809d642a..45a8116a 100644
--- a/languages/cpp/app_templates/kpartapp/app_part.cpp
+++ b/languages/cpp/app_templates/kpartapp/app_part.cpp
@@ -12,15 +12,15 @@
#include <tqtextstream.h>
#include <tqmultilineedit.h>
-%{APPNAME}Part::%{APPNAME}Part( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name )
- : KParts::ReadWritePart(parent, name)
+%{APPNAME}Part::%{APPNAME}Part( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name )
+ : KParts::ReadWritePart(tqparent, name)
{
// we need an instance
setInstance( %{APPNAME}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);
@@ -74,7 +74,7 @@ void %{APPNAME}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);
}
@@ -86,7 +86,7 @@ bool %{APPNAME}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())
@@ -109,7 +109,7 @@ bool %{APPNAME}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;
@@ -164,12 +164,12 @@ KAboutData* %{APPNAME}PartFactory::s_about = 0L;
s_instance = 0L;
}
-KParts::Part* %{APPNAME}PartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+KParts::Part* %{APPNAME}PartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const char *classname, const TQStringList &args )
{
// Create an instance of our Part
- %{APPNAME}Part* obj = new %{APPNAME}Part( parentWidget, widgetName, parent, name );
+ %{APPNAME}Part* obj = new %{APPNAME}Part( tqparentWidget, widgetName, tqparent, name );
// See if we are to be read-write or not
if (TQCString(classname) == "KParts::ReadOnlyPart")
diff --git a/languages/cpp/app_templates/kpartapp/app_part.h b/languages/cpp/app_templates/kpartapp/app_part.h
index 1ebc7825..8d5417ad 100644
--- a/languages/cpp/app_templates/kpartapp/app_part.h
+++ b/languages/cpp/app_templates/kpartapp/app_part.h
@@ -21,12 +21,13 @@ class TQMultiLineEdit;
class %{APPNAME}Part : public KParts::ReadWritePart
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
*/
- %{APPNAME}Part(TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name);
+ %{APPNAME}Part(TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name);
/**
* Destructor
@@ -70,11 +71,12 @@ class KAboutData;
class %{APPNAME}PartFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
%{APPNAME}PartFactory();
virtual ~%{APPNAME}PartFactory();
- virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+ virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const char *classname, const TQStringList &args );
static KInstance* instance();
diff --git a/languages/cpp/app_templates/kpartapp/src-Makefile.am b/languages/cpp/app_templates/kpartapp/src-Makefile.am
index 357e2d0b..9b1a14b4 100644
--- a/languages/cpp/app_templates/kpartapp/src-Makefile.am
+++ b/languages/cpp/app_templates/kpartapp/src-Makefile.am
@@ -4,11 +4,11 @@ INCLUDES = $(all_includes)
# these are the headers for your project
noinst_HEADERS = %{APPNAMELC}.h %{APPNAMELC}_part.h
-# let automoc handle all of the meta source files (moc)
+# let autotqmoc handle all of the meta source files (tqmoc)
METASOURCES = AUTO
messages: rc.cpp
- $(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
+ $(EXTRACTRC) `tqfind . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/%{APPNAMELC}.pot
KDE_ICON = AUTO