author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/todayplugins | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
4 files changed, 12 insertions, 12 deletions
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp index b210fa9..e6a0d09 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp +++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp | |||
@@ -43,42 +43,42 @@ FortunePluginWidget::~FortunePluginWidget() { | |||
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * Get the fortunes | 47 | * Get the fortunes |
48 | */ | 48 | */ |
49 | void FortunePluginWidget::getFortune() { | 49 | void FortunePluginWidget::getFortune() { |
50 | 50 | ||
51 | QVBoxLayout* layoutFortune = new QVBoxLayout( this ); | 51 | QVBoxLayout* layoutFortune = new QVBoxLayout( this ); |
52 | 52 | ||
53 | if ( fortune ) { | 53 | if ( fortune ) { |
54 | delete fortune; | 54 | delete fortune; |
55 | } | 55 | } |
56 | 56 | ||
57 | fortune = new OTicker( this ); | 57 | fortune = new OTicker( this ); |
58 | //fortune->setReadOnly( TRUE ); | 58 | //fortune->setReadOnly( TRUE ); |
59 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); | 59 | //fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); |
60 | 60 | ||
61 | fortune->setText( QString("Obtaining fortune...") ); | 61 | fortune->setText( QString("Obtaining fortune...") ); |
62 | layoutFortune->addWidget( fortune ); | 62 | layoutFortune->addWidget( fortune ); |
63 | 63 | ||
64 | fortuneProcess = new OProcess(); | 64 | fortuneProcess = new OProcess(); |
65 | *fortuneProcess << "fortune"; | 65 | *fortuneProcess << "fortune"; |
66 | 66 | ||
67 | connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*, char*, int ) ), | 67 | connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), |
68 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); | 68 | this, SLOT(slotStdOut(OProcess*,char*,int) ) ); |
69 | 69 | ||
70 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 70 | if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
71 | qWarning("could not start :("); | 71 | qWarning("could not start :("); |
72 | fortune->setText( QString("Failed to obtain fortune.") ); | 72 | fortune->setText( QString("Failed to obtain fortune.") ); |
73 | delete fortuneProcess; | 73 | delete fortuneProcess; |
74 | fortuneProcess = 0; | 74 | fortuneProcess = 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len ) | 79 | void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len ) |
80 | { | 80 | { |
81 | QCString s( buf, len ); | 81 | QCString s( buf, len ); |
82 | s.replace( QRegExp("\n"), "" ); | 82 | s.replace( QRegExp("\n"), "" ); |
83 | fortune->setText( s ); | 83 | fortune->setText( s ); |
84 | } | 84 | } |
diff --git a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp index 2274402..db662e8 100644 --- a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp +++ b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp | |||
@@ -22,119 +22,119 @@ HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* par | |||
22 | { | 22 | { |
23 | readHistory(); | 23 | readHistory(); |
24 | readBookmarks(); | 24 | readBookmarks(); |
25 | 25 | ||
26 | browser = new QTextBrowser( this ); | 26 | browser = new QTextBrowser( this ); |
27 | QStringList Strlist; | 27 | QStringList Strlist; |
28 | Strlist.append( home_); | 28 | Strlist.append( home_); |
29 | 29 | ||
30 | browser->mimeSourceFactory()->setFilePath( Strlist ); | 30 | browser->mimeSourceFactory()->setFilePath( Strlist ); |
31 | 31 | ||
32 | browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 32 | browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
33 | 33 | ||
34 | connect( browser, SIGNAL( textChanged() ), | 34 | connect( browser, SIGNAL( textChanged() ), |
35 | 35 | ||
36 | this, SLOT( textChanged() ) ); | 36 | this, SLOT( textChanged() ) ); |
37 | 37 | ||
38 | setCentralWidget( browser ); | 38 | setCentralWidget( browser ); |
39 | 39 | ||
40 | if ( !home_.isEmpty() ) | 40 | if ( !home_.isEmpty() ) |
41 | 41 | ||
42 | //////////////////////////////// | 42 | //////////////////////////////// |
43 | browser->setSource( home_ ); | 43 | browser->setSource( home_ ); |
44 | 44 | ||
45 | //////////////////////////////// | 45 | //////////////////////////////// |
46 | connect( browser, SIGNAL( highlighted( const QString&) ), | 46 | connect( browser, SIGNAL( highlighted(const QString&) ), |
47 | statusBar(), SLOT( message( const QString&)) ); | 47 | statusBar(), SLOT( message(const QString&)) ); |
48 | 48 | ||
49 | setGeometry( 0,0,236,280); | 49 | setGeometry( 0,0,236,280); |
50 | 50 | ||
51 | QPopupMenu* file = new QPopupMenu( this ); | 51 | QPopupMenu* file = new QPopupMenu( this ); |
52 | // file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N ); | 52 | // file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N ); |
53 | file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O ); | 53 | file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O ); |
54 | // file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P ); | 54 | // file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P ); |
55 | file->insertSeparator(); | 55 | file->insertSeparator(); |
56 | file->insertItem( tr("&Close"), this, SLOT( close() ), ALT | Key_Q ); | 56 | file->insertItem( tr("&Close"), this, SLOT( close() ), ALT | Key_Q ); |
57 | // file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), ALT | Key_X ); | 57 | // file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), ALT | Key_X ); |
58 | 58 | ||
59 | // The same three icons are used twice each. | 59 | // The same three icons are used twice each. |
60 | ////F FIXME | 60 | ////F FIXME |
61 | QString pixs=(QDir::homeDirPath ()) +"/Applications/gutenbrowser/pix/"; | 61 | QString pixs=(QDir::homeDirPath ()) +"/Applications/gutenbrowser/pix/"; |
62 | QIconSet icon_back( QPixmap(pixs+"back.png") ); | 62 | QIconSet icon_back( QPixmap(pixs+"back.png") ); |
63 | QIconSet icon_forward( QPixmap(pixs+"forward.png") ); | 63 | QIconSet icon_forward( QPixmap(pixs+"forward.png") ); |
64 | QIconSet icon_home( QPixmap(pixs+"home.png") ); | 64 | QIconSet icon_home( QPixmap(pixs+"home.png") ); |
65 | 65 | ||
66 | QPopupMenu* go = new QPopupMenu( this ); | 66 | QPopupMenu* go = new QPopupMenu( this ); |
67 | backwardId = go->insertItem( icon_back, tr("&Backward"), browser, SLOT( backward() ), ALT | Key_Left ); | 67 | backwardId = go->insertItem( icon_back, tr("&Backward"), browser, SLOT( backward() ), ALT | Key_Left ); |
68 | forwardId = go->insertItem( icon_forward, tr("&Forward"), browser, SLOT( forward() ), ALT | Key_Right ); | 68 | forwardId = go->insertItem( icon_forward, tr("&Forward"), browser, SLOT( forward() ), ALT | Key_Right ); |
69 | go->insertItem( icon_home, tr("&Home"), browser, SLOT( home() ) ); | 69 | go->insertItem( icon_home, tr("&Home"), browser, SLOT( home() ) ); |
70 | 70 | ||
71 | 71 | ||
72 | hist = new QPopupMenu( this ); | 72 | hist = new QPopupMenu( this ); |
73 | QStringList::Iterator it = history.begin(); | 73 | QStringList::Iterator it = history.begin(); |
74 | for ( ; it != history.end(); ++it ) | 74 | for ( ; it != history.end(); ++it ) |
75 | mHistory[ hist->insertItem( *it ) ] = *it; | 75 | mHistory[ hist->insertItem( *it ) ] = *it; |
76 | connect( hist, SIGNAL( activated( int ) ), this, SLOT( histChosen( int ) ) ); | 76 | connect( hist, SIGNAL( activated(int) ), this, SLOT( histChosen(int) ) ); |
77 | 77 | ||
78 | bookm = new QPopupMenu( this ); | 78 | bookm = new QPopupMenu( this ); |
79 | bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); | 79 | bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); |
80 | bookm->insertSeparator(); | 80 | bookm->insertSeparator(); |
81 | 81 | ||
82 | QStringList::Iterator it2 = bookmarks.begin(); | 82 | QStringList::Iterator it2 = bookmarks.begin(); |
83 | for ( ; it2 != bookmarks.end(); ++it2 ) | 83 | for ( ; it2 != bookmarks.end(); ++it2 ) |
84 | mBookmarks[ bookm->insertItem( *it2 ) ] = *it2; | 84 | mBookmarks[ bookm->insertItem( *it2 ) ] = *it2; |
85 | connect( bookm, SIGNAL( activated( int ) ), | 85 | connect( bookm, SIGNAL( activated(int) ), |
86 | this, SLOT( bookmChosen( int ) ) ); | 86 | this, SLOT( bookmChosen(int) ) ); |
87 | 87 | ||
88 | menuBar()->insertItem( tr("&File"), file ); | 88 | menuBar()->insertItem( tr("&File"), file ); |
89 | menuBar()->insertItem( tr("&Go"), go ); | 89 | menuBar()->insertItem( tr("&Go"), go ); |
90 | menuBar()->insertItem( tr( "History" ), hist ); | 90 | menuBar()->insertItem( tr( "History" ), hist ); |
91 | menuBar()->insertItem( tr( "Bookmarks" ), bookm ); | 91 | menuBar()->insertItem( tr( "Bookmarks" ), bookm ); |
92 | // menuBar()->insertSeparator(); | 92 | // menuBar()->insertSeparator(); |
93 | // menuBar()->insertItem( tr("&Help"), help ); | 93 | // menuBar()->insertItem( tr("&Help"), help ); |
94 | 94 | ||
95 | menuBar()->setItemEnabled( forwardId, FALSE); | 95 | menuBar()->setItemEnabled( forwardId, FALSE); |
96 | menuBar()->setItemEnabled( backwardId, FALSE); | 96 | menuBar()->setItemEnabled( backwardId, FALSE); |
97 | connect( browser, SIGNAL( backwardAvailable( bool ) ), this, SLOT( setBackwardAvailable( bool ) ) ); | 97 | connect( browser, SIGNAL( backwardAvailable(bool) ), this, SLOT( setBackwardAvailable(bool) ) ); |
98 | connect( browser, SIGNAL( forwardAvailable( bool ) ), this, SLOT( setForwardAvailable( bool ) ) ); | 98 | connect( browser, SIGNAL( forwardAvailable(bool) ), this, SLOT( setForwardAvailable(bool) ) ); |
99 | 99 | ||
100 | 100 | ||
101 | QToolBar* toolbar = new QToolBar( this ); | 101 | QToolBar* toolbar = new QToolBar( this ); |
102 | addToolBar( toolbar, "Toolbar"); | 102 | addToolBar( toolbar, "Toolbar"); |
103 | QToolButton* button; | 103 | QToolButton* button; |
104 | 104 | ||
105 | button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar ); | 105 | button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar ); |
106 | connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); | 106 | connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); |
107 | button->setEnabled( FALSE ); | 107 | button->setEnabled( FALSE ); |
108 | button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar ); | 108 | button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar ); |
109 | connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); | 109 | connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) ); |
110 | button->setEnabled( FALSE ); | 110 | button->setEnabled( FALSE ); |
111 | button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar ); | 111 | button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar ); |
112 | 112 | ||
113 | toolbar->addSeparator(); | 113 | toolbar->addSeparator(); |
114 | 114 | ||
115 | pathCombo = new QComboBox( TRUE, toolbar ); | 115 | pathCombo = new QComboBox( TRUE, toolbar ); |
116 | connect( pathCombo, SIGNAL( activated( const QString & ) ), this, SLOT( pathSelected( const QString & ) ) ); | 116 | connect( pathCombo, SIGNAL( activated(const QString&) ), this, SLOT( pathSelected(const QString&) ) ); |
117 | toolbar->setStretchableWidget( pathCombo ); | 117 | toolbar->setStretchableWidget( pathCombo ); |
118 | 118 | ||
119 | // pathCombo->setMaximumWidth(190); | 119 | // pathCombo->setMaximumWidth(190); |
120 | // setRightJustification( TRUE ); | 120 | // setRightJustification( TRUE ); |
121 | // setDockEnabled( Left, FALSE ); | 121 | // setDockEnabled( Left, FALSE ); |
122 | // setDockEnabled( Right, FALSE ); | 122 | // setDockEnabled( Right, FALSE ); |
123 | 123 | ||
124 | pathCombo->insertItem( home_ ); | 124 | pathCombo->insertItem( home_ ); |
125 | 125 | ||
126 | browser->setFocus(); | 126 | browser->setFocus(); |
127 | 127 | ||
128 | 128 | ||
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
132 | void HelpWindow::setBackwardAvailable( bool b) | 132 | void HelpWindow::setBackwardAvailable( bool b) |
133 | { | 133 | { |
134 | menuBar()->setItemEnabled( backwardId, b); | 134 | menuBar()->setItemEnabled( backwardId, b); |
135 | } | 135 | } |
136 | 136 | ||
137 | void HelpWindow::setForwardAvailable( bool b) | 137 | void HelpWindow::setForwardAvailable( bool b) |
138 | { | 138 | { |
139 | menuBar()->setItemEnabled( forwardId, b); | 139 | menuBar()->setItemEnabled( forwardId, b); |
140 | } | 140 | } |
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp index 73f8bb3..64798f4 100644 --- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp +++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp | |||
@@ -42,48 +42,48 @@ InputDialog::InputDialog( ) | |||
42 | 42 | ||
43 | connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(doLookup())); | 43 | connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(doLookup())); |
44 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); | 44 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding ); |
45 | layout->addItem( spacer, 8, 0 ); | 45 | layout->addItem( spacer, 8, 0 ); |
46 | 46 | ||
47 | } | 47 | } |
48 | 48 | ||
49 | InputDialog::~InputDialog() { | 49 | InputDialog::~InputDialog() { |
50 | } | 50 | } |
51 | 51 | ||
52 | void InputDialog::doLookup() { | 52 | void InputDialog::doLookup() { |
53 | // http://finance.yahoo.com/l?m=&s=siemens&t= | 53 | // http://finance.yahoo.com/l?m=&s=siemens&t= |
54 | 54 | ||
55 | QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; | 55 | QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\""; |
56 | QString tempHtml = "/tmp/stockticker.html"; | 56 | QString tempHtml = "/tmp/stockticker.html"; |
57 | QString cmd = "wget -O "+tempHtml+" "+url; | 57 | QString cmd = "wget -O "+tempHtml+" "+url; |
58 | qDebug(cmd); | 58 | qDebug(cmd); |
59 | 59 | ||
60 | 60 | ||
61 | /* | 61 | /* |
62 | OProcess proc; | 62 | OProcess proc; |
63 | proc << "/usr/bin/wget"; | 63 | proc << "/usr/bin/wget"; |
64 | proc<<"-O"<< tempHtml<< url; | 64 | proc<<"-O"<< tempHtml<< url; |
65 | 65 | ||
66 | connect( &proc, SIGNAL( processExited( OProcess *)),this, SLOT( showBrowser(OProcess *))); | 66 | connect( &proc, SIGNAL( processExited(OProcess*)),this, SLOT( showBrowser(OProcess*))); |
67 | proc.start( OProcess::NotifyOnExit); | 67 | proc.start( OProcess::NotifyOnExit); |
68 | */ | 68 | */ |
69 | system(cmd.latin1()); | 69 | system(cmd.latin1()); |
70 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); | 70 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); |
71 | StockLookup->setCaption("Symbol"); | 71 | StockLookup->setCaption("Symbol"); |
72 | StockLookup->showMaximized(); | 72 | StockLookup->showMaximized(); |
73 | StockLookup->show(); | 73 | StockLookup->show(); |
74 | LineEdit1->text(); | 74 | LineEdit1->text(); |
75 | 75 | ||
76 | 76 | ||
77 | } | 77 | } |
78 | 78 | ||
79 | void InputDialog::showBrowser(OProcess*) { | 79 | void InputDialog::showBrowser(OProcess*) { |
80 | qDebug("BLAH"); | 80 | qDebug("BLAH"); |
81 | QString tempHtml = "/tmp/stockticker.html"; | 81 | QString tempHtml = "/tmp/stockticker.html"; |
82 | 82 | ||
83 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); | 83 | HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup"); |
84 | StockLookup->setCaption("Symbol"); | 84 | StockLookup->setCaption("Symbol"); |
85 | StockLookup->showMaximized(); | 85 | StockLookup->showMaximized(); |
86 | StockLookup->show(); | 86 | StockLookup->show(); |
87 | LineEdit1->text(); | 87 | LineEdit1->text(); |
88 | 88 | ||
89 | } | 89 | } |
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp index 4491b91..15d1c6e 100644 --- a/noncore/todayplugins/weather/weatherpluginwidget.cpp +++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp | |||
@@ -84,49 +84,49 @@ void WeatherPluginWidget::retreiveData() | |||
84 | 84 | ||
85 | location = config.readEntry( "Location", "" ); | 85 | location = config.readEntry( "Location", "" ); |
86 | useMetric = config.readBoolEntry( "Metric", TRUE ); | 86 | useMetric = config.readBoolEntry( "Metric", TRUE ); |
87 | frequency = config.readNumEntry( "Frequency", 5 ); | 87 | frequency = config.readNumEntry( "Frequency", 5 ); |
88 | 88 | ||
89 | startTimer( frequency * 60000 ); | 89 | startTimer( frequency * 60000 ); |
90 | 90 | ||
91 | localFile = "/tmp/"; | 91 | localFile = "/tmp/"; |
92 | localFile.append( location ); | 92 | localFile.append( location ); |
93 | localFile.append( ".TXT" ); | 93 | localFile.append( ".TXT" ); |
94 | 94 | ||
95 | remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/"; | 95 | remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/"; |
96 | remoteFile.append( location ); | 96 | remoteFile.append( location ); |
97 | remoteFile.append( ".TXT" ); | 97 | remoteFile.append( ".TXT" ); |
98 | 98 | ||
99 | QFile file( localFile ); | 99 | QFile file( localFile ); |
100 | if ( file.exists() ) | 100 | if ( file.exists() ) |
101 | { | 101 | { |
102 | file.remove(); | 102 | file.remove(); |
103 | } | 103 | } |
104 | 104 | ||
105 | OProcess *proc = new OProcess; | 105 | OProcess *proc = new OProcess; |
106 | 106 | ||
107 | *proc << "wget" << "-q" << remoteFile << "-O" << localFile; | 107 | *proc << "wget" << "-q" << remoteFile << "-O" << localFile; |
108 | connect( proc, SIGNAL( processExited( OProcess * ) ), this, SLOT( dataRetrieved( OProcess * ) ) ); | 108 | connect( proc, SIGNAL( processExited(OProcess*) ), this, SLOT( dataRetrieved(OProcess*) ) ); |
109 | proc->start(); | 109 | proc->start(); |
110 | } | 110 | } |
111 | 111 | ||
112 | void WeatherPluginWidget::displayWeather() | 112 | void WeatherPluginWidget::displayWeather() |
113 | { | 113 | { |
114 | weatherData = QString::null; | 114 | weatherData = QString::null; |
115 | 115 | ||
116 | QFile file( localFile ); | 116 | QFile file( localFile ); |
117 | 117 | ||
118 | if ( file.size() > 0 && file.open( IO_ReadOnly ) ) | 118 | if ( file.size() > 0 && file.open( IO_ReadOnly ) ) |
119 | { | 119 | { |
120 | QTextStream data( &file ); | 120 | QTextStream data( &file ); |
121 | while ( !data.eof() ) | 121 | while ( !data.eof() ) |
122 | { | 122 | { |
123 | weatherData.append( data.readLine() ); | 123 | weatherData.append( data.readLine() ); |
124 | } | 124 | } |
125 | file.close(); | 125 | file.close(); |
126 | weatherData = weatherData.simplifyWhiteSpace(); | 126 | weatherData = weatherData.simplifyWhiteSpace(); |
127 | 127 | ||
128 | QString tmpstr; | 128 | QString tmpstr; |
129 | 129 | ||
130 | tmpstr.append( tr( "Temp: " ) ); | 130 | tmpstr.append( tr( "Temp: " ) ); |
131 | getTemp( weatherData ); | 131 | getTemp( weatherData ); |
132 | tmpstr.append( dataStr ); | 132 | tmpstr.append( dataStr ); |