summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/main.cpp6
-rw-r--r--korganizer/mainwindow.cpp6
-rw-r--r--korganizer/mainwindow.h2
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();