summaryrefslogtreecommitdiff
path: root/noncore/tools/remote/remote.cpp
Unidiff
Diffstat (limited to 'noncore/tools/remote/remote.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/remote/remote.cpp40
1 files changed, 22 insertions, 18 deletions
diff --git a/noncore/tools/remote/remote.cpp b/noncore/tools/remote/remote.cpp
index 67fc57d..5b756cb 100644
--- a/noncore/tools/remote/remote.cpp
+++ b/noncore/tools/remote/remote.cpp
@@ -39,22 +39,26 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
39 39
40int main( int argc, char **argv ) 40int main( int argc, char **argv )
41{ 41{
42 QPEApplication a( argc, argv ); 42 QPEApplication a( argc, argv );
43 MainView w; 43
44 a.setMainWidget( &w ); 44 LircHandler lh;
45 QPEApplication::showWidget( &w ); 45
46 46 lh.disableIrDA();
47 LircHandler lh; 47 lh.setupModules();
48 if(!lh.isLircdRunning()) { 48 lh.startLircd();
49 QMessageBox mb("Error!", 49 if(!lh.isLircdRunning()) {
50 "Lircd is not running", 50 QMessageBox::critical(NULL, QObject::tr("Error"),
51 QMessageBox::NoIcon, 51 QObject::tr("Unable to start lircd"),
52 QMessageBox::Ok, 52 QMessageBox::Ok, QMessageBox::NoButton);
53 QMessageBox::NoButton, 53 }
54 QMessageBox::NoButton); 54
55 mb.exec(); 55 MainView w;
56 56 a.setMainWidget( &w );
57 } 57 QPEApplication::showWidget( &w );
58 58 int result = a.exec();
59 return a.exec(); 59
60 lh.stopLircd();
61 lh.cleanupModules();
62
63 return result;
60} 64}