6 files changed, 24 insertions, 21 deletions
diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro index 2e4b4b3..74c60b1 100644 --- a/noncore/todayplugins/fortune/fortune.pro +++ b/noncore/todayplugins/fortune/fortune.pro | |||
@@ -1,14 +1,13 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | #CONFIG -= moc | ||
3 | CONFIG += qt plugin | 2 | CONFIG += qt plugin |
4 | 3 | ||
5 | # Input | 4 | # Input |
6 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ | 5 | HEADERS = fortuneplugin.h fortunepluginimpl.h \ |
7 | fortunepluginwidget.h | 6 | fortunepluginwidget.h |
8 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ | 7 | SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \ |
9 | fortunepluginwidget.cpp | 8 | fortunepluginwidget.cpp |
10 | 9 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 10 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 11 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 12 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 13 | ../ ../library |
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp index c3ee546..c147567 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp +++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp | |||
@@ -7,36 +7,39 @@ | |||
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "fortunepluginwidget.h" | 17 | #include "fortunepluginwidget.h" |
18 | 18 | ||
19 | /* OPIE */ | ||
20 | #include <opie2/odebug.h> | ||
19 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
20 | #include <qpe/qcopenvelope_qws.h> | 22 | #include <qpe/qcopenvelope_qws.h> |
23 | using namespace Opie::Core; | ||
24 | using namespace Opie::Ui; | ||
21 | 25 | ||
26 | /* QT */ | ||
22 | #include <qvaluelist.h> | 27 | #include <qvaluelist.h> |
23 | #include <qtl.h> | 28 | #include <qtl.h> |
24 | #include <qstring.h> | 29 | #include <qstring.h> |
25 | #include <qscrollview.h> | 30 | #include <qscrollview.h> |
26 | #include <qobject.h> | 31 | #include <qobject.h> |
27 | #include <qlayout.h> | 32 | #include <qlayout.h> |
28 | 33 | ||
29 | using namespace Opie::Core; | ||
30 | using namespace Opie::Ui; | ||
31 | FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) | 34 | FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) |
32 | : QWidget( parent, name ) | 35 | : QWidget( parent, name ) |
33 | { | 36 | { |
34 | 37 | ||
35 | fortune = NULL; | 38 | fortune = NULL; |
36 | getFortune(); | 39 | getFortune(); |
37 | } | 40 | } |
38 | 41 | ||
39 | FortunePluginWidget::~FortunePluginWidget() { | 42 | FortunePluginWidget::~FortunePluginWidget() { |
40 | if( fortuneProcess ){ | 43 | if( fortuneProcess ){ |
41 | delete fortuneProcess; | 44 | delete fortuneProcess; |
42 | } | 45 | } |
@@ -58,25 +61,25 @@ void FortunePluginWidget::getFortune() { | |||
58 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); | 61 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); |
59 | 62 | ||
60 | fortune->setText( QString("Obtaining fortune...") ); | 63 | fortune->setText( QString("Obtaining fortune...") ); |
61 | layoutFortune->addWidget( fortune ); | 64 | layoutFortune->addWidget( fortune ); |
62 | 65 | ||
63 | fortuneProcess = new OProcess(); | 66 | fortuneProcess = new OProcess(); |
64 | *fortuneProcess << "fortune"; | 67 | *fortuneProcess << "fortune"; |
65 | 68 | ||
66 | connect(fortuneProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), | 69 | connect(fortuneProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), |
67 | this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int) ) ); | 70 | this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int) ) ); |
68 | 71 | ||
69 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 72 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
70 | qWarning("could not start :("); | 73 | owarn << "could not start :(" << oendl; |
71 | fortune->setText( QString("Failed to obtain fortune.") ); | 74 | fortune->setText( QString("Failed to obtain fortune.") ); |
72 | delete fortuneProcess; | 75 | delete fortuneProcess; |
73 | fortuneProcess = 0; | 76 | fortuneProcess = 0; |
74 | } | 77 | } |
75 | 78 | ||
76 | } | 79 | } |
77 | 80 | ||
78 | void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len ) | 81 | void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len ) |
79 | { | 82 | { |
80 | QCString s( buf, len ); | 83 | QCString s( buf, len ); |
81 | s.replace( QRegExp("\n"), "" ); | 84 | s.replace( QRegExp("\n"), "" ); |
82 | fortune->setText( s ); | 85 | fortune->setText( s ); |
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp index ce35256..ae219d7 100644 --- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp +++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp | |||
@@ -1,33 +1,35 @@ | |||
1 | #include "inputDialog.h" | 1 | #include "inputDialog.h" |
2 | #include "helpwindow.h" | ||
3 | |||
4 | /* OPIE */ | ||
5 | #include <opie2/odebug.h> | ||
6 | #include <qpe/config.h> | ||
7 | using namespace Opie::Core; | ||
2 | 8 | ||
9 | /* QT */ | ||
3 | #include <qapplication.h> | 10 | #include <qapplication.h> |
4 | #include <qlayout.h> | 11 | #include <qlayout.h> |
5 | #include <qcheckbox.h> | 12 | #include <qcheckbox.h> |
6 | #include <qlineedit.h> | 13 | #include <qlineedit.h> |
7 | #include <qvariant.h> | 14 | #include <qvariant.h> |
8 | #include <qpushbutton.h> | 15 | #include <qpushbutton.h> |
9 | #include <qwhatsthis.h> | 16 | #include <qwhatsthis.h> |
10 | #include <qlabel.h> | 17 | #include <qlabel.h> |
11 | #include <qlayout.h> | 18 | #include <qlayout.h> |
12 | #include <qpe/config.h> | ||
13 | #include <qstringlist.h> | 19 | #include <qstringlist.h> |
14 | using namespace Opie::Core; | ||
15 | using namespace Opie::Core; | ||
16 | #include <qmainwindow.h> | 20 | #include <qmainwindow.h> |
17 | #include "helpwindow.h" | ||
18 | 21 | ||
22 | /* STD */ | ||
19 | #include <stdlib.h> | 23 | #include <stdlib.h> |
20 | // #include <sys/stat.h> | ||
21 | // #include <unistd.h> | ||
22 | 24 | ||
23 | InputDialog::InputDialog( ) | 25 | InputDialog::InputDialog( ) |
24 | : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) { | 26 | : QMainWindow( 0x0, 0x0, WStyle_ContextHelp ) { |
25 | setCaption( tr("Symbol Lookup")); | 27 | setCaption( tr("Symbol Lookup")); |
26 | 28 | ||
27 | QGridLayout *layout = new QGridLayout( this ); | 29 | QGridLayout *layout = new QGridLayout( this ); |
28 | layout->setSpacing(6); | 30 | layout->setSpacing(6); |
29 | layout->setMargin( 2); | 31 | layout->setMargin( 2); |
30 | 32 | ||
31 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | 33 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); |
32 | LineEdit1->setFocus(); | 34 | LineEdit1->setFocus(); |
33 | 35 | ||
@@ -45,44 +47,44 @@ InputDialog::InputDialog( ) | |||
45 | 47 | ||
46 | } | 48 | } |
47 | 49 | ||
48 | InputDialog::~InputDialog() { | 50 | InputDialog::~InputDialog() { |
49 | } | 51 | } |
50 | 52 | ||
51 | void InputDialog::doLookup() { | 53 | void InputDialog::doLookup() { |
52 | // http://finance.yahoo.com/l?m=&s=siemens&t= | 54 | // http://finance.yahoo.com/l?m=&s=siemens&t= |
53 | 55 | ||
54 | QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; | 56 | QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; |
55 | QString tempHtml = "/tmp/stockticker.html"; | 57 | QString tempHtml = "/tmp/stockticker.html"; |
56 | QString cmd = "wget -O "+tempHtml+" "+url; | 58 | QString cmd = "wget -O "+tempHtml+" "+url; |
57 | qDebug(cmd); | 59 | odebug << cmd << oendl; |
58 | 60 | ||
59 | 61 | ||
60 | /* | 62 | /* |
61 | OProcess proc; | 63 | OProcess proc; |
62 | proc << "/usr/bin/wget"; | 64 | proc << "/usr/bin/wget"; |
63 | proc<<"-O"<< tempHtml<< url; | 65 | proc<<"-O"<< tempHtml<< url; |
64 | 66 | ||
65 | connect( &proc, SIGNAL( processExited(Opie::Core::OProcess*)),this, SLOT( showBrowser(Opie::Core::OProcess*))); | 67 | connect( &proc, SIGNAL( processExited(Opie::Core::OProcess*)),this, SLOT( showBrowser(Opie::Core::OProcess*))); |
66 | proc.start( OProcess::NotifyOnExit); | 68 | proc.start( OProcess::NotifyOnExit); |
67 | */ | 69 | */ |
68 | system(cmd.latin1()); | 70 | system(cmd.latin1()); |
69 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); | 71 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); |
70 | StockLookup->setCaption("Symbol"); | 72 | StockLookup->setCaption("Symbol"); |
71 | StockLookup->showMaximized(); | 73 | StockLookup->showMaximized(); |
72 | StockLookup->show(); | 74 | StockLookup->show(); |
73 | LineEdit1->text(); | 75 | LineEdit1->text(); |
74 | 76 | ||
75 | 77 | ||
76 | } | 78 | } |
77 | 79 | ||
78 | void InputDialog::showBrowser(OProcess*) { | 80 | void InputDialog::showBrowser(OProcess*) { |
79 | qDebug("BLAH"); | 81 | odebug << "BLAH" << oendl; |
80 | QString tempHtml = "/tmp/stockticker.html"; | 82 | QString tempHtml = "/tmp/stockticker.html"; |
81 | 83 | ||
82 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); | 84 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); |
83 | StockLookup->setCaption("Symbol"); | 85 | StockLookup->setCaption("Symbol"); |
84 | StockLookup->showMaximized(); | 86 | StockLookup->showMaximized(); |
85 | StockLookup->show(); | 87 | StockLookup->show(); |
86 | LineEdit1->text(); | 88 | LineEdit1->text(); |
87 | 89 | ||
88 | } | 90 | } |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/config.in b/noncore/todayplugins/stockticker/stocktickerlib/config.in index 4d589f9..7dbe03a 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/config.in +++ b/noncore/todayplugins/stockticker/stocktickerlib/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config TODAY_STOCKTICKERLIB | 1 | config TODAY_STOCKTICKERLIB |
2 | boolean | 2 | boolean |
3 | default "y" if TODAY_STOCKTICKER | 3 | default "y" if TODAY_STOCKTICKER |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && LIBOPIE2PIM && TODAY | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && TODAY |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro index e70d1c0..6dcf945 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerlib.pro | |||
@@ -1,29 +1,28 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | ||
3 | CONFIG += qt plugin | 2 | CONFIG += qt plugin |
4 | 3 | ||
5 | HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ | 4 | HEADERS = stocktickerplugin.h stocktickerpluginimpl.h stocktickerpluginwidget.h stocktickerconfig.h \ |
6 | ../libstocks/csv.h \ | 5 | ../libstocks/csv.h \ |
7 | ../libstocks/http.h \ | 6 | ../libstocks/http.h \ |
8 | ../libstocks/lists.h \ | 7 | ../libstocks/lists.h \ |
9 | ../libstocks/stocks.h | 8 | ../libstocks/stocks.h |
10 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp stocktickerconfig.cpp \ | 9 | SOURCES = stocktickerplugin.cpp stocktickerpluginimpl.cpp stocktickerpluginwidget.cpp stocktickerconfig.cpp \ |
11 | ../libstocks/csv.c \ | 10 | ../libstocks/csv.c \ |
12 | ../libstocks/currency.c \ | 11 | ../libstocks/currency.c \ |
13 | ../libstocks/history.c \ | 12 | ../libstocks/history.c \ |
14 | ../libstocks/http.c \ | 13 | ../libstocks/http.c \ |
15 | ../libstocks/lists.c \ | 14 | ../libstocks/lists.c \ |
16 | ../libstocks/stocks.c | 15 | ../libstocks/stocks.c |
17 | 16 | ||
18 | INCLUDEPATH += $(OPIEDIR)/include \ | 17 | INCLUDEPATH += $(OPIEDIR)/include \ |
19 | ../ ../library | 18 | ../ ../library |
20 | DEPENDPATH += $(OPIEDIR)/include \ | 19 | DEPENDPATH += $(OPIEDIR)/include \ |
21 | ../ ../library | 20 | ../ ../library |
22 | 21 | ||
23 | LIBS+= -lqpe -lopieui2 -lopiepim2 -lpthread | 22 | LIBS += -lqpe -lopiecore2 -lopieui2 -lopiepim2 -lpthread |
24 | TMAKE_CFLAGS += -D__UNIX__ | 23 | DEFINES += __UNIX__ |
25 | 24 | ||
26 | DESTDIR = $(OPIEDIR)/plugins/today | 25 | DESTDIR = $(OPIEDIR)/plugins/today |
27 | TARGET = todaystocktickerplugin | 26 | TARGET = todaystocktickerplugin |
28 | 27 | ||
29 | include ( $(OPIEDIR)/include.pro ) | 28 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index aaeb5ee..4855ac6 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | |||
@@ -36,25 +36,25 @@ extern "C" { | |||
36 | bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; | 36 | bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; |
37 | bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck; | 37 | bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck; |
38 | bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck; | 38 | bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck; |
39 | 39 | ||
40 | void getStocks(char *blah) { | 40 | void getStocks(char *blah) { |
41 | 41 | ||
42 | // stocktickerTicker->setText( "Downloading stock data."); | 42 | // stocktickerTicker->setText( "Downloading stock data."); |
43 | stock *stocks_quotes=NULL; | 43 | stock *stocks_quotes=NULL; |
44 | stock *stocks_tmp; | 44 | stock *stocks_tmp; |
45 | stock_liste = blah; | 45 | stock_liste = blah; |
46 | ::free ( blah ); | 46 | ::free ( blah ); |
47 | // char *stock_liste = (char *)blah->latin1(); | 47 | // char *stock_liste = (char *)blah->latin1(); |
48 | // qDebug("%s", stock_liste.data() ); | 48 | // odebug << "" << stock_liste.data() << "" << oendl; |
49 | output = ""; | 49 | output = ""; |
50 | QString tempString; | 50 | QString tempString; |
51 | libstocks_return_code error; | 51 | libstocks_return_code error; |
52 | 52 | ||
53 | // Config cfg( "stockticker"); | 53 | // Config cfg( "stockticker"); |
54 | // cfg.setGroup( "Fields" ); | 54 | // cfg.setGroup( "Fields" ); |
55 | // bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; | 55 | // bool dotimeCheck, dodateCheck, dosymbolCheck, donameCheck; |
56 | // bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck; | 56 | // bool docurrentPriceCheck, dolastPriceCheck, doopenPriceCheck; |
57 | // bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck; | 57 | // bool dominPriceCheck, domaxPriceCheck, dovariationCheck, dovolumeCheck; |
58 | 58 | ||
59 | dotimeCheck=dodateCheck=dosymbolCheck=donameCheck= docurrentPriceCheck=dolastPriceCheck=doopenPriceCheck=dominPriceCheck=domaxPriceCheck=dovariationCheck=dovolumeCheck=false; | 59 | dotimeCheck=dodateCheck=dosymbolCheck=donameCheck= docurrentPriceCheck=dolastPriceCheck=doopenPriceCheck=dominPriceCheck=domaxPriceCheck=dovariationCheck=dovolumeCheck=false; |
60 | 60 | ||
@@ -269,51 +269,51 @@ void getStocks(char *blah) { | |||
269 | 269 | ||
270 | //::free((void*)thread1); | 270 | //::free((void*)thread1); |
271 | //getStocks(blah); | 271 | //getStocks(blah); |
272 | } | 272 | } |
273 | } | 273 | } |
274 | 274 | ||
275 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { | 275 | void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { |
276 | killTimer(e->timerId()); | 276 | killTimer(e->timerId()); |
277 | checkConnection(); | 277 | checkConnection(); |
278 | } | 278 | } |
279 | 279 | ||
280 | void StockTickerPluginWidget::checkConnection() { | 280 | void StockTickerPluginWidget::checkConnection() { |
281 | // qDebug("checking connection"); | 281 | // odebug << "checking connection" << oendl; |
282 | // Sock = new QSocket( this ); | 282 | // Sock = new QSocket( this ); |
283 | 283 | ||
284 | // if( wasError) | 284 | // if( wasError) |
285 | // stocktickerTicker->setText("Checking connection"); | 285 | // stocktickerTicker->setText("Checking connection"); |
286 | 286 | ||
287 | // if(Sock->state() == QSocket::Idle) { | 287 | // if(Sock->state() == QSocket::Idle) { |
288 | // Sock->connectToHost("finance.yahoo.com", 80); | 288 | // Sock->connectToHost("finance.yahoo.com", 80); |
289 | // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); | 289 | // connect( Sock, SIGNAL( error(int) ), SLOT(socketError(int)) ); |
290 | // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); | 290 | // connect( Sock, SIGNAL( hostFound() ), SLOT(isConnected()) ); |
291 | // } else { | 291 | // } else { |
292 | // qDebug("State is not Idle"); | 292 | // odebug << "State is not Idle" << oendl; |
293 | isConnected(); | 293 | isConnected(); |
294 | // } | 294 | // } |
295 | } | 295 | } |
296 | 296 | ||
297 | void StockTickerPluginWidget::isConnected() { | 297 | void StockTickerPluginWidget::isConnected() { |
298 | // qDebug("We connect, so ok to grab stocks"); | 298 | // odebug << "We connect, so ok to grab stocks" << oendl; |
299 | if(this->isVisible()) | 299 | if(this->isVisible()) |
300 | doStocks(); | 300 | doStocks(); |
301 | 301 | ||
302 | Config cfg( "stockticker"); | 302 | Config cfg( "stockticker"); |
303 | cfg.setGroup("Timer"); | 303 | cfg.setGroup("Timer"); |
304 | timerDelay= cfg.readNumEntry("Delay",0); | 304 | timerDelay= cfg.readNumEntry("Delay",0); |
305 | if(timerDelay > 0) | 305 | if(timerDelay > 0) |
306 | startTimer(timerDelay*60000); | 306 | startTimer(timerDelay*60000); |
307 | // qDebug("timer set for %d",(timerDelay*60000)/60000); | 307 | // odebug << "timer set for " << (timerDelay*60000)/60000 << "" << oendl; |
308 | wasError = false; | 308 | wasError = false; |
309 | 309 | ||
310 | // Sock->close(); | 310 | // Sock->close(); |
311 | } | 311 | } |
312 | 312 | ||
313 | void StockTickerPluginWidget::socketError(int errcode) { | 313 | void StockTickerPluginWidget::socketError(int errcode) { |
314 | switch(errcode) { | 314 | switch(errcode) { |
315 | case QSocket::ErrConnectionRefused: | 315 | case QSocket::ErrConnectionRefused: |
316 | output = tr("Connection refused."); | 316 | output = tr("Connection refused."); |
317 | break; | 317 | break; |
318 | case QSocket::ErrHostNotFound: | 318 | case QSocket::ErrHostNotFound: |
319 | output = tr("Could not find server."); | 319 | output = tr("Could not find server."); |