summaryrefslogtreecommitdiffstats
path: root/kapptemplate/kpartapp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kapptemplate/kpartapp
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kapptemplate/kpartapp')
-rw-r--r--kapptemplate/kpartapp/app-Makefile.am2
-rw-r--r--kapptemplate/kpartapp/app.cpp2
-rw-r--r--kapptemplate/kpartapp/app.h1
-rw-r--r--kapptemplate/kpartapp/app_part-desktop2
-rw-r--r--kapptemplate/kpartapp/app_part.cpp14
-rw-r--r--kapptemplate/kpartapp/app_part.h5
6 files changed, 14 insertions, 12 deletions
diff --git a/kapptemplate/kpartapp/app-Makefile.am b/kapptemplate/kpartapp/app-Makefile.am
index 3aa0495f..fc096f65 100644
--- a/kapptemplate/kpartapp/app-Makefile.am
+++ b/kapptemplate/kpartapp/app-Makefile.am
@@ -10,7 +10,7 @@ INCLUDES = \$(all_includes)
# these are the headers for your project
noinst_HEADERS = ${APP_NAME_LC}.h ${APP_NAME_LC}_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
diff --git a/kapptemplate/kpartapp/app.cpp b/kapptemplate/kpartapp/app.cpp
index 626aa8bd..c5d21f06 100644
--- a/kapptemplate/kpartapp/app.cpp
+++ b/kapptemplate/kpartapp/app.cpp
@@ -152,7 +152,7 @@ void ${APP_NAME}::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/kapptemplate/kpartapp/app.h b/kapptemplate/kpartapp/app.h
index 41daea60..b9862c3b 100644
--- a/kapptemplate/kpartapp/app.h
+++ b/kapptemplate/kpartapp/app.h
@@ -21,6 +21,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}.h
class ${APP_NAME} : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default Constructor
diff --git a/kapptemplate/kpartapp/app_part-desktop b/kapptemplate/kpartapp/app_part-desktop
index 6ba3bf54..b32923f6 100644
--- a/kapptemplate/kpartapp/app_part-desktop
+++ b/kapptemplate/kpartapp/app_part-desktop
@@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.desktop
[Desktop Entry]
Encoding=UTF-8
Name=${APP_NAME}Part
-MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
+MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-tqmoc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart
X-KDE-Library=lib${APP_NAME_LC}part
Type=Service
diff --git a/kapptemplate/kpartapp/app_part.cpp b/kapptemplate/kpartapp/app_part.cpp
index d8880577..25bf0886 100644
--- a/kapptemplate/kpartapp/app_part.cpp
+++ b/kapptemplate/kpartapp/app_part.cpp
@@ -17,16 +17,16 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.cpp
typedef KParts::GenericFactory<${APP_NAME}Part> ${APP_NAME}PartFactory;
K_EXPORT_COMPONENT_FACTORY( lib${APP_NAME_LC}part, ${APP_NAME}PartFactory )
-${APP_NAME}Part::${APP_NAME}Part( TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+${APP_NAME}Part::${APP_NAME}Part( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const TQStringList & /*args*/ )
- : KParts::ReadWritePart(parent, name)
+ : KParts::ReadWritePart(tqparent, name)
{
// we need an instance
setInstance( ${APP_NAME}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);
@@ -79,7 +79,7 @@ void ${APP_NAME}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);
}
@@ -101,7 +101,7 @@ bool ${APP_NAME}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())
@@ -124,7 +124,7 @@ bool ${APP_NAME}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/kapptemplate/kpartapp/app_part.h b/kapptemplate/kpartapp/app_part.h
index 75eedc4f..908adaa3 100644
--- a/kapptemplate/kpartapp/app_part.h
+++ b/kapptemplate/kpartapp/app_part.h
@@ -22,12 +22,13 @@ class KAboutData;
class ${APP_NAME}Part : public KParts::ReadWritePart
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor
*/
- ${APP_NAME}Part(TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList &args);
+ ${APP_NAME}Part(TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList &args);
/**
* Destructor