summaryrefslogtreecommitdiff
path: root/noncore/todayplugins/fortune/fortunepluginwidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/todayplugins/fortune/fortunepluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
index e6a0d09..3aa978c 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
@@ -16,6 +16,9 @@
#include "fortunepluginwidget.h"
+#include <qpe/config.h>
+#include <qpe/qcopenvelope_qws.h>
+
#include <qvaluelist.h>
#include <qtl.h>
#include <qstring.h>
@@ -23,12 +26,6 @@
#include <qobject.h>
#include <qlayout.h>
-#include <qpe/config.h>
-#include <qpe/qcopenvelope_qws.h>
-
-#include <opie/oprocess.h>
-#include <opie/oticker.h>
-
FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name )
{
@@ -63,20 +60,20 @@ void FortunePluginWidget::getFortune() {
fortuneProcess = new OProcess();
*fortuneProcess << "fortune";
-
+
connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ),
this, SLOT(slotStdOut(OProcess*,char*,int) ) );
-
+
if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start :(");
fortune->setText( QString("Failed to obtain fortune.") );
delete fortuneProcess;
fortuneProcess = 0;
}
-
+
}
-void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len )
+void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len )
{
QCString s( buf, len );
s.replace( QRegExp("\n"), "" );