Rename KApplication to TDEApplication to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 4ffd16a310
commit 2e384e286e

@ -60,8 +60,8 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions (options);
KApplication::addCmdLineOptions();
KApplication kapplication;
TDEApplication::addCmdLineOptions();
TDEApplication kapplication;
KGlobal::locale()->insertCatalogue("libtdegames");
if (kapplication.isRestored())

@ -29,7 +29,7 @@ int main( int argc, char *argv[] )
aboutData.addAuthor("Martin R. Jones",0, "mjones@kde.org");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
KGlobal::dirs()->addResourceType("sprite", KStandardDirs::kde_default("data") + "kasteroids/sprites/");
KGlobal::dirs()->addResourceType("sounds", KStandardDirs::kde_default("data") + "kasteroids/sounds/");

@ -53,7 +53,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData );
TQApplication::setColorSpec(TQApplication::ManyColor);
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
if ( a.isRestored() )

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &about);
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
if (app.isRestored())

@ -29,7 +29,7 @@ KBAIPlayer::KBAIPlayer()
m_ownShipList = 0;
m_battleField = 0;
m_masterStrategy = 0;
m_randomSeq = new KRandomSequence(KApplication::random());
m_randomSeq = new KRandomSequence(TDEApplication::random());
}
KBAIPlayer::~KBAIPlayer()

@ -32,7 +32,7 @@ KBChooserStrategy::KBChooserStrategy(KBStrategy *parent) : KBStrategy(parent)
m_child = 0;
m_random = new KRandomSequence(KApplication::random());
m_random = new KRandomSequence(TDEApplication::random());
}
KBChooserStrategy::~KBChooserStrategy()

@ -48,7 +48,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
TQString picDirCheck = locate("data", "kbattleship/pictures/");

@ -32,7 +32,7 @@ int main( int argc, char **argv )
aboutData.addAuthor("Robert Cimrman",0, "cimrman3@students.zcu.cz");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored())

@ -55,7 +55,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData );
TQApplication::setColorSpec(TQApplication::ManyColor);
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
ExtManager manager;

@ -480,7 +480,7 @@ int main(int argc, char *argv[])
flip=.85;
limit=.75;
KApplication app(argc, argv, "BallTest");
TDEApplication app(argc, argv, "BallTest");
BallTest top;
app.setMainWidget( &top );

@ -46,7 +46,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
/* command line handling */

@ -100,7 +100,7 @@ KGoldrunner::KGoldrunner()
#ifdef QT3
// Base size of playing-area and widgets on the monitor resolution.
int dw = KApplication::desktop()->width();
int dw = TDEApplication::desktop()->width();
if (dw > 800) { // More than 800x600.
view->changeSize (+1); // Scale 1.25:1.
}

@ -28,7 +28,7 @@ int main (int argc, char **argv)
TDECmdLineArgs::init (argc, argv, &about);
KApplication app;
TDEApplication app;
// Register as a DCOP client.
app.dcopClient()->registerAs (app.name(), false);

@ -43,7 +43,7 @@ int main(int argc, char *argv[])
aboutData.addAuthor("Benjamin Meyer",I18N_NOOP("Various improvements"), "ben+kjumpingcube@meyerhome.net");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
// All session management is handled in the RESTORE macro

@ -42,7 +42,7 @@ int main( int argc, char **argv )
aboutData.addAuthor("Roman Razilov", I18N_NOOP("Rewrite and Extension"), "Roman.Razilov@gmx.de");
TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored())

@ -22,7 +22,7 @@ int main( int argc, char** argv )
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
KImageIO::registerFormats();

@ -247,7 +247,7 @@ int main(int argc, char **argv)
aboutData.addCredit("Thomas Capricelli", I18N_NOOP("Magic reveal mode"));
TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
KExtHighscore::ExtManager manager;

@ -48,7 +48,7 @@ int main(int argc, char ** argv)
TDECmdLineArgs::init(argc, argv, &about);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");

@ -71,7 +71,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
}
TQApplication::setColorSpec(TQApplication::ManyColor);
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
Kolf *top = new Kolf;

@ -18,7 +18,7 @@ main(int argc, char **argv)
aboutData.addAuthor("Russ Steffen",0, "rsteffen@bayarea.net");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
TQApplication::setGlobalMouseTracking( true );
KGlobal::locale()->insertCatalogue("libtdegames");

@ -120,7 +120,7 @@ since kpat-0.4
since kpat-0.3
- kpat is a KApplication now (Matthias)
- kpat is a TDEApplication now (Matthias)
since kpat-0.2

@ -57,7 +57,7 @@ int main( int argc, char **argv )
TDECmdLineArgs::addCmdLineOptions (options);
TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs();
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
if (a.isRestored())

@ -40,7 +40,7 @@ int main( int argc, char *argv[] )
I18N_NOOP("Original author"), "whynot@mabi.de");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication myApp;
TDEApplication myApp;
KGlobal::locale()->insertCatalogue("libtdegames");
if (myApp.isRestored())

@ -66,7 +66,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
// used for loading background pixmaps

@ -39,8 +39,8 @@ int main( int argc, char **argv ) {
aboutData.addAuthor("Marcus Kreutzberger", 0, "kreutzbe@informatik.mu-luebeck.de");
TDECmdLineArgs::init(argc, argv, &aboutData);
KApplication::setColorSpec(TQApplication::ManyColor+TQApplication::CustomColor);
KApplication a;
TDEApplication::setColorSpec(TQApplication::ManyColor+TQApplication::CustomColor);
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
KSameWidget *w = new KSameWidget;

@ -62,7 +62,7 @@ int main(int argc, char **argv)
aboutData.addCredit(0, I18N_NOOP("Thanks also to everyone who should be listed here but isn't!"), 0);
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
App *app = new App();

@ -40,7 +40,7 @@ TileSet::TileSet() : scaledTiles(nTiles)
if(tileset.isNull())
{
KMessageBox::sorry(0, i18n("Cannot load tiles pixmap!"));
KApplication::exit(1);
TDEApplication::exit(1);
}
// split into individual tiles

@ -43,7 +43,7 @@ int main(int argc, char **argv)
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
GameWindow *w = new GameWindow;

@ -43,7 +43,7 @@ int main( int argc, char **argv )
aboutData.addCredit("Benjamin Meyer", I18N_NOOP("Improvements"), "ben+ksnake@meyerhome.net");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
Game *ksnake = new Game();

@ -143,7 +143,7 @@ LevelCollection::indexTextCollection() {
void
LevelCollection::loadPrefs() {
if (id_ >= 0) {
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
TQString key;
@ -240,7 +240,7 @@ LevelCollection::LevelCollection(const TQString &_path, const TQString &_name,
LevelCollection::~LevelCollection() {
if (id_ >= 0) {
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup ("settings");
TQString key;
@ -271,7 +271,7 @@ LevelCollection::levelCompleted() {
TQString key;
key.sprintf("status%d", id_);
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
cfg->writeEntry(key, x, true, false, false);
cfg->sync();

@ -57,7 +57,7 @@ MainWindow::createCollectionMenu() {
}
checkedCollection_ = 0;
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
int id = cfg->readNumEntry("collection", 10);
@ -76,7 +76,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
setEraseColor(TQColor(0,0,0));
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry");
int width = cfg->readNumEntry("width", 750);
int height = cfg->readNumEntry("height", 562);
@ -107,7 +107,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
game_->insertItem(TQIconSet(pixmap), i18n("&Redo"), playField_, TQT_SLOT(redo()), TQKeySequence( (KStdAccel::redo()).toString()));
game_->insertSeparator();
pixmap = SmallIcon("exit");
game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), KApplication::kApplication(), TQT_SLOT(closeAllWindows()), TQKeySequence( (KStdAccel::quit()).toString()));
game_->insertItem(TQIconSet(pixmap), i18n("&Quit"), TDEApplication::kApplication(), TQT_SLOT(closeAllWindows()), TQKeySequence( (KStdAccel::quit()).toString()));
menu_->insertItem(i18n("&Game"), game_);
animation_ = new TQPopupMenu(0,"animation menu");
@ -190,7 +190,7 @@ MainWindow::MainWindow() : KMainWindow(0), externalCollection_(0) {
MainWindow::~MainWindow()
{
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("Geometry");
cfg->writeEntry("width", width());
@ -297,7 +297,7 @@ MainWindow::changeCollection(int id)
void
MainWindow::loadLevels() {
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
cfg->setGroup("settings");
TQString lastFile = cfg->readPathEntry("lastLevelFile");
@ -309,7 +309,7 @@ MainWindow::loadLevels() {
void
MainWindow::openURL(KURL _url) {
KConfig *cfg=(KApplication::kApplication())->config();
KConfig *cfg=(TDEApplication::kApplication())->config();
// int namepos = _url.path().findRev('/') + 1; // NOTE: findRev can return -1
// TQString levelName = _url.path().mid(namepos);

@ -108,7 +108,7 @@ ModalLabel::eventFilter (TQObject *, TQEvent *e) {
void
ModalLabel::message (const TQString &text, TQWidget *parent) {
KApplication *app = KApplication::kApplication ();
TDEApplication *app = TDEApplication::kApplication ();
ModalLabel cl (text, parent);
while (!cl.completed_) app->processOneEvent ();

@ -61,7 +61,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
highlightX_ = highlightY_ = 0;
KConfig *cfg = (KApplication::kApplication())->config();
KConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings");
imageData_ = new StaticImage;
@ -82,7 +82,7 @@ PlayField::PlayField(TQWidget *parent, const char *name, WFlags f)
}
PlayField::~PlayField() {
KConfig *cfg = (KApplication::kApplication())->config();
KConfig *cfg = (TDEApplication::kApplication())->config();
cfg->setGroup("settings");
cfg->writeEntry("animDelay", animDelay_, true, false, false);
@ -586,7 +586,7 @@ PlayField::keyPressEvent(TQKeyEvent * e) {
break;
case Key_Q:
KApplication::kApplication()->closeAllWindows();
TDEApplication::kApplication()->closeAllWindows();
break;
case Key_Backspace:

@ -63,7 +63,7 @@ main (int argc, char **argv)
TQApplication::setColorSpec(TQApplication::ManyColor);
// KUniqueApplication app;
KApplication app;
TDEApplication app;
// KImageIO::registerFormats();
MainWindow *widget = new MainWindow();

@ -15,7 +15,7 @@ int main(int argc,char **argv)
aboutData.addAuthor("Andreas Zehender",0, "az@azweb.de");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication myapplication;
TDEApplication myapplication;
MyTopLevelWidget* top = new MyTopLevelWidget( );
myapplication.setMainWidget(top);
top->show();

@ -186,7 +186,7 @@ void MyMainView::readConfig()
void MyMainView::writeConfig()
{
KConfig *cfg;
cfg=KApplication::kApplication()->config();
cfg=TDEApplication::kApplication()->config();
cfg->setGroup("Game");
cfg->writeEntry("gravity",customConfig.gravity);

@ -40,7 +40,7 @@ int main(int argc, char* argv[])
aboutData.addAuthor("Benjamin Meyer",I18N_NOOP("Various improvements"), "ben+ktron@meyerhome.net");
TDECmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
TDEApplication a;
KGlobal::locale()->insertCatalogue("libtdegames");
// used for loading background pixmaps

@ -39,7 +39,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions(options);
KApplication app;
TDEApplication app;
KGlobal::locale()->insertCatalogue("libtdegames");
KImageIO::registerFormats();

@ -215,7 +215,7 @@ void TopLevel::readOptions()
KConfig *config;
TQString option;
config = KApplication::kApplication()->config();
config = TDEApplication::kApplication()->config();
config->setGroup("General");
option = config->readEntry("Sound", "on");
@ -238,7 +238,7 @@ void TopLevel::writeOptions()
{
KConfig *config;
config = KApplication::kApplication()->config();
config = TDEApplication::kApplication()->config();
config->setGroup("General");
config->writeEntry("Sound", soundEnabled? "on": "off");

@ -28,7 +28,7 @@ BaseFactory::BaseFactory(const MainData &md, const BaseBoardInfo &bi)
void BaseFactory::init(int argc, char **argv)
{
TDECmdLineArgs::init(argc, argv, _aboutData);
(void)new KApplication;
(void)new TDEApplication;
KGlobal::locale()->insertCatalogue("libtdegames");
KGlobal::locale()->insertCatalogue("libksirtet");
}

@ -117,7 +117,7 @@ public:
* effective group id is completely dropped afterwards.
*
* Note: this method should be called in main() before creating a
* KApplication and doing anything else (KApplication checks that the
* TDEApplication and doing anything else (TDEApplication checks that the
* program is not suid/sgid and will exit the program for security
* reason if it is the case).
*/

@ -579,7 +579,7 @@ TQString KCardDialog::getRandomDeck()
if (list.isEmpty())
return TQString();
int d = KApplication::random() % list.count();
int d = TDEApplication::random() % list.count();
return getDeckName(*list.at(d));
}
@ -591,7 +591,7 @@ TQString KCardDialog::getRandomCardDir()
if (list.isEmpty())
return TQString();
int d = KApplication::random() % list.count();
int d = TDEApplication::random() % list.count();
TQString entry = *list.at(d);
return entry.left(entry.length() - strlen("index.desktop"));
}

@ -59,7 +59,7 @@ class LSkatView;
* LSkatApp reimplements the methods that KMainWindow provides for main window handling and supports
* full session management as well as keyboard accelerator configuration by using KAccel.
* @see KMainWindow
* @see KApplication
* @see TDEApplication
* @see KConfig
* @see KAccel
*
@ -103,7 +103,7 @@ class LSkatApp : public KMainWindow
void ExtractGame(KEMessage *msg);
/** initGUI creates the menubar and inserts the menupopups as well as creating the helpMenu.
* @see KApplication#getHelpMenu
* @see TDEApplication#getHelpMenu
*/
void initGUI();
/** Checks all menus..usually done on init programm */
@ -136,7 +136,7 @@ class LSkatApp : public KMainWindow
*/
virtual bool queryExit();
/** saves the window properties for each open window during session end to the session config file, including saving the currently
* opened file by a temporary filename provided by KApplication.
* opened file by a temporary filename provided by TDEApplication.
* @see KMainWindow#saveProperties
*/
virtual void saveProperties(KConfig *_cfg);

@ -37,7 +37,7 @@ class LSkatView;
/** LSkatDoc provides a document object for a document-view model.
*
* The LSkatDoc class provides a document object that can be used in conjunction with the classes LSkatApp and LSkatView
* to create a document-view model for standard TDE applications based on KApplication and KTMainWindow. Thereby, the document object
* to create a document-view model for standard TDE applications based on TDEApplication and KTMainWindow. Thereby, the document object
* is created by the LSkatApp instance and contains the document structure with the according methods for manipulation of the document
* data by LSkatView objects. Also, LSkatDoc contains the methods for serialization of the document data from and to files.
*

@ -51,7 +51,7 @@ int main(int argc, char *argv[])
}
args->clear();
KApplication app;
TDEApplication app;
if (app.isRestored())
{

@ -56,7 +56,7 @@ int main(int argc, char *argv[])
kdDebug(12010) << "Debug level set to " << global_debug << endl;
}
args->clear();
KApplication app(argc, argv);
TDEApplication app(argc, argv);
KGlobal::locale()->insertCatalogue("libtdegames");
if (app.isRestored())

Loading…
Cancel
Save