-rw-r--r-- | noncore/apps/confedit/main.cpp | 15 | ||||
-rw-r--r-- | noncore/games/tictac/main.cpp | 24 |
2 files changed, 11 insertions, 28 deletions
diff --git a/noncore/apps/confedit/main.cpp b/noncore/apps/confedit/main.cpp index 7e7f064..74923c8 100644 --- a/noncore/apps/confedit/main.cpp +++ b/noncore/apps/confedit/main.cpp @@ -1,13 +1,8 @@ #include "mainwindow.h" -#include <opie2/oapplication.h> - -int main( int argc, char ** argv ) -{ - OApplication a( argc, argv, "confedit" ); - MainWindow mw; - mw.showMaximized(); - a.showMainDocumentWidget( &mw ); - return a.exec(); -} +#include <qpe/qpeapplication.h> +#include <opie/oapplicationfactory.h> + +OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) + diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp index 78fb3b7..0185b8c 100644 --- a/noncore/games/tictac/main.cpp +++ b/noncore/games/tictac/main.cpp @@ -1,31 +1,19 @@ /**************************************************************************** +<<<<<<< main.cpp ** $Id$ +======= +** $Id$ +>>>>>>> 1.1.8.1.2.1 ** ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. ** ** This file is part of an example program for Qt. This example ** program may be used, distributed and modified without limitation. ** *****************************************************************************/ #include <qpe/qpeapplication.h> -#include <stdlib.h> +#include <opie/oapplicationfactory.h> #include "tictac.h" - -int main( int argc, char **argv ) -{ - QPEApplication a( argc, argv ); - int n = 3; - if ( argc == 2 ) // get board size n - n = atoi(argv[1]); - if ( n < 3 || n > 10 ) { // out of range - qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); - return 1; - } - TicTacToe ttt( n ); // create game - a.setMainWidget( &ttt ); - ttt.setCaption( QObject::tr("TicTac") ); - ttt.show(); // show widget - return a.exec(); // go -} +OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> ) |