From 51e18b363eb37621479a059af58da3040db1be7e Mon Sep 17 00:00:00 2001 From: josef Date: Mon, 14 Oct 2002 17:21:03 +0000 Subject: - only allow sessions if all components (layer, widgetstack) are available - add io_modem to .pro file so it gets compiled - fix io_modem compilation (untested, but better than nothing) --- (limited to 'noncore/apps/opie-console/mainwindow.cpp') diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 415259e..1adb43d 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "profileeditordialog.h" #include "configdialog.h" @@ -309,6 +310,15 @@ void MainWindow::slotProfile( int id) { void MainWindow::create( const Profile& prof ) { Session *ses = manager()->fromProfile( prof, tabWidget() ); + if((!ses) || (!ses->layer()) || (!ses->widgetStack())) + { + QMessageBox::warning(this, + QObject::tr("Session failed"), + QObject::tr("Cannot open session: Not all components were found.")); + //if(ses) delete ses; + return; + } + m_sessions.append( ses ); tabWidget()->add( ses ); m_curSession = ses; -- cgit v0.9.0.2