summaryrefslogtreecommitdiffstats
path: root/ktuberling/soundfactory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /ktuberling/soundfactory.cpp
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktuberling/soundfactory.cpp')
-rw-r--r--ktuberling/soundfactory.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/ktuberling/soundfactory.cpp b/ktuberling/soundfactory.cpp
index 9831adcd..5bb309d8 100644
--- a/ktuberling/soundfactory.cpp
+++ b/ktuberling/soundfactory.cpp
@@ -18,17 +18,17 @@
#include "toplevel.h"
// Constructor
-SoundFactory::SoundFactory(TopLevel *parent, const char *name, uint selectedLanguage)
- : TQObject(parent, name)
+SoundFactory::SoundFactory(TopLevel *tqparent, const char *name, uint selectedLanguage)
+ : TQObject(tqparent, name)
{
- topLevel = parent;
+ topLevel = tqparent;
namesList = filesList = 0;
- TQDomDocument layoutsDocument;
- bool ok = topLevel->loadLayout(layoutsDocument);
- if (ok) ok = registerLanguages(layoutsDocument);
- if (ok) ok = loadLanguage(layoutsDocument, selectedLanguage);
+ TQDomDocument tqlayoutsDocument;
+ bool ok = topLevel->loadLayout(tqlayoutsDocument);
+ if (ok) ok = registerLanguages(tqlayoutsDocument);
+ if (ok) ok = loadLanguage(tqlayoutsDocument, selectedLanguage);
if (!ok) loadFailure();
}
@@ -42,9 +42,9 @@ SoundFactory::~SoundFactory()
// Change the language
void SoundFactory::change(uint selectedLanguage)
{
- TQDomDocument layoutsDocument;
- bool ok = topLevel->loadLayout(layoutsDocument);
- if (ok) ok = loadLanguage(layoutsDocument, selectedLanguage);
+ TQDomDocument tqlayoutsDocument;
+ bool ok = topLevel->loadLayout(tqlayoutsDocument);
+ if (ok) ok = loadLanguage(tqlayoutsDocument, selectedLanguage);
if (!ok) loadFailure();
}
@@ -74,14 +74,14 @@ void SoundFactory::loadFailure()
}
// Register the various languages
-bool SoundFactory::registerLanguages(TQDomDocument &layoutDocument)
+bool SoundFactory::registerLanguages(TQDomDocument &tqlayoutDocument)
{
TQDomNodeList languagesList, menuItemsList, labelsList;
TQDomElement languageElement, menuItemElement, labelElement;
TQDomAttr codeAttribute, actionAttribute;
bool enabled;
- languagesList = layoutDocument.elementsByTagName("language");
+ languagesList = tqlayoutDocument.elementsByTagName("language");
if (languagesList.count() < 1)
return false;
@@ -110,7 +110,7 @@ bool SoundFactory::registerLanguages(TQDomDocument &layoutDocument)
}
// Load the sounds of one given language
-bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, uint toLoad)
+bool SoundFactory::loadLanguage(TQDomDocument &tqlayoutDocument, uint toLoad)
{
TQDomNodeList languagesList,
soundNamesList;
@@ -118,7 +118,7 @@ bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, uint toLoad)
soundNameElement;
TQDomAttr nameAttribute, fileAttribute;
- languagesList = layoutDocument.elementsByTagName("language");
+ languagesList = tqlayoutDocument.elementsByTagName("language");
if (toLoad >= languagesList.count())
return false;
@@ -129,9 +129,9 @@ bool SoundFactory::loadLanguage(TQDomDocument &layoutDocument, uint toLoad)
if (sounds < 1)
return false;
- if (!(namesList = new QString[sounds]))
+ if (!(namesList = new TQString[sounds]))
return false;
- if (!(filesList = new QString[sounds]))
+ if (!(filesList = new TQString[sounds]))
return false;
for (uint sound = 0; sound < sounds; sound++)