summaryrefslogtreecommitdiff
path: root/noncore/settings/netsystemtime/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/netsystemtime/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/netsystemtime/mainwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/noncore/settings/netsystemtime/mainwindow.cpp b/noncore/settings/netsystemtime/mainwindow.cpp
index 2d240ba..66e1ca3 100644
--- a/noncore/settings/netsystemtime/mainwindow.cpp
+++ b/noncore/settings/netsystemtime/mainwindow.cpp
@@ -36,24 +36,25 @@
#include <opie/oprocess.h>
#include <opie/otabwidget.h>
#include <qpe/config.h>
#include <qpe/datebookdb.h>
#include <qpe/qpeapplication.h>
+#include <qpe/qpedialog.h>
#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
#include <qpe/qcopenvelope_qws.h>
#endif
#include <qlayout.h>
#include <qmessagebox.h>
#include <qsocket.h>
#include <qstring.h>
#include <qtimer.h>
-MainWindow::MainWindow()
+MainWindow::MainWindow( QWidget *parent , const char *name, bool modal, WFlags f )
: QDialog( 0x0, 0x0, TRUE, 0 )
{
setCaption( tr( "SystemTime" ) );
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setMargin( 2 );
@@ -76,17 +77,16 @@ MainWindow::MainWindow()
slotDisplayNTPTab( config.readBoolEntry( "displayNtpTab", FALSE ) );
slotDisplayPredictTab( config.readBoolEntry( "displayPredictTab", FALSE ) );
mainWidget->setCurrentTab( tr( "Time" ) );
layout->addWidget( mainWidget );
- // Create QCOP channel
- QCopChannel *channel = new QCopChannel( "QPE/Application/netsystemtime", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
+ connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)),
this, SLOT(slotQCopReceive(const QCString&, const QByteArray&)) );
+
// Create NTP socket
ntpSock = new QSocket( this );
connect( ntpSock, SIGNAL(error(int)),SLOT(slotCheckNtp(int)) );
slotProbeNTPServer();
// Create timer for automatic time lookups
@@ -107,13 +107,14 @@ MainWindow::MainWindow()
// Do initial time server check
slotNTPDelayChanged( config.readNumEntry( "ntpRefreshFreq", 1440 ) );
slotCheckNtp( -1 );
// Display app
- showMaximized();
+ //showMaximized();
+ (void)new QPEDialogListener(this);
}
MainWindow::~MainWindow()
{
if ( ntpProcess )
delete ntpProcess;