author | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
commit | 07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861 (patch) (side-by-side diff) | |
tree | 03d0e5d20e607e035e17fcdabd6bce789069f41e /korganizer | |
parent | 44169895703beb3e8b1551a313d2d341bf742905 (diff) | |
download | kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.zip kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.gz kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.bz2 |
some bugfixes
-rw-r--r-- | korganizer/main.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 6 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index 7f9b5c6..16186c0 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -1,10 +1,11 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +#include <qcopchannel_qws.h> #include <qpe/global.h> #include <stdlib.h> #else #include <qapplication.h> #include <qstring.h> #include <qwindowsstyle.h> @@ -76,12 +77,14 @@ int main( int argc, char **argv ) fileName = qApp->applicationDirPath () + "/kdepim/korganizer/"; KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); #endif KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "korganizer"))); MainWindow m; #ifndef DESKTOP_VERSION + QCopChannel* c1 = new QCopChannel("QPE/Application/datebook",&m, "channel" ) ; + QObject::connect( c1, SIGNAL (received ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); a.showMainWidget(&m ); #else a.setMainWidget(&m ); m.show(); //m.resize( 800, 600 ); @@ -93,10 +96,13 @@ int main( int argc, char **argv ) command += argv[2]; qApp->processEvents(); m.recieve(command, QByteArray() ); } a.exec(); +#ifndef DESKTOP_VERSION + delete c1; +#endif } qDebug("KO: Bye! "); } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 2d17986..3c16458 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -127,13 +127,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : QMainWindow( parent, name ) { #ifdef DESKTOP_VERSION setFont( QFont("Arial"), 14 ); #endif - mServerSocket = 0; mClosed = false; //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; QString confFile = locateLocal("config","korganizerrc"); QFileInfo finf ( confFile ); bool showWarning = !finf.exists(); setIcon(SmallIcon( "ko24" ) ); @@ -276,16 +275,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : #endif } MainWindow::~MainWindow() { //qDebug("MainWindow::~MainWindow() "); //save toolbar location - delete mServerSocket; delete mCalendar; - delete KOPrefs::instance(); - delete KIncidenceFormatter::instance(); + delete mSyncManager; } void MainWindow::showMaximized () { #ifndef DESKTOP_VERSION @@ -479,13 +476,12 @@ void MainWindow::initActions() menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); menuBar->insertItem( i18n("Filter"),selectFilterMenu ); menuBar->insertItem( i18n("Help"), helpMenu ); //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); menuBar1->setMaximumSize( menuBar1->sizeHint( )); } - connect ( syncMenu, SIGNAL( activated ( int ) ), this, SLOT (slotSyncMenu( int ) ) ); connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); connect ( selectFilterMenu, SIGNAL( aboutToShow () ), this, SLOT (fillFilterMenu() ) ); // ****************** QAction *action; QIconSet icon; diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index ee7bd87..e3383ed 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -89,14 +89,12 @@ class MainWindow : public QMainWindow QString piFileString; QTime piTime; void getFile( bool ); void syncFileRequest(); private: KSyncManager* mSyncManager; - //QTimer* mTimerCommandSocket; - KServerSocket * mServerSocket; bool mClosed; void saveOnClose(); bool mFlagKeyPressed; bool mBlockAtStartup; QPEToolBar *iconToolBar; void initActions(); |