Changeset 93ea008
- Timestamp:
- Sep 22, 2015, 10:01:17 PM (11 years ago)
- Branches:
- master
- Children:
- 17ef75d
- Parents:
- fb602c6
- Location:
- src
- Files:
-
- 4 added
- 5 edited
-
clientcommandline/CMakeLists.txt (modified) (1 diff)
-
clientcommandline/inputoutputhandler.cpp (added)
-
clientcommandline/inputoutputhandler.h (added)
-
clientcommandline/main.cpp (modified) (4 diffs)
-
clientcommandline/stationsregister.cpp (added)
-
clientcommandline/stationsregister.h (added)
-
lib/siweatherstation.cpp (modified) (1 diff)
-
lib/siweatherstation.h (modified) (1 diff)
-
tests/siwebserviceclienttest.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/clientcommandline/CMakeLists.txt
rfb602c6 r93ea008 36 36 SET(src_CPP 37 37 main.cpp 38 inputoutputhandler.cpp 39 stationsregister.cpp 38 40 ) 39 41 -
src/clientcommandline/main.cpp
rfb602c6 r93ea008 18 18 */ 19 19 20 // #include "testexecuter.h" 21 // #include <settings.h> 20 #include "siweatherclientconfig.h" 22 21 23 #include "s iweatherclientconfig.h"22 #include "stationsregister.h" 24 23 25 24 #include <ecmdlineargs.h> … … 29 28 #include <QCoreApplication> 30 29 #include <QTimer> 30 #include <QTextStream> 31 32 #include <iostream> 31 33 32 34 int main ( int argc, char** argv ) … … 44 46 return 1; 45 47 46 47 48 QCoreApplication app(argc, argv); 48 49 QString error; … … 50 51 51 52 if(args->isSet("register")){ 52 // StationsRegister *stationsRegister = new StationsRegister(); 53 StationsRegister *stationsRegister = new StationsRegister(); 54 QTimer::singleShot(1, stationsRegister, SLOT(registerStation())); 53 55 } 54 56 // else if(){ 55 57 // 56 58 // } 59 else{ 60 QTextStream stream(stdout); 61 stream << "Please specify an option" << endl; 62 return -2; 63 } 57 64 58 // TestExecuter test;59 65 // allow to start the event loop before executing our code 60 // QTimer::singleShot(1, &test, SLOT(load()));61 66 return app.exec(); 62 67 } -
src/lib/siweatherstation.cpp
rfb602c6 r93ea008 114 114 } 115 115 116 117 bool SiWeatherStation::isValidForRegister() const 118 { 119 if(_name.isEmpty()) 120 return false; 121 if(_city.isEmpty()) 122 return false; 123 if(_eMail.isEmpty()) 124 return false; 125 if(_type.isEmpty()) 126 return false; 127 return true; 128 } 129 116 130 void SiWeatherStation::init() 117 131 { -
src/lib/siweatherstation.h
rfb602c6 r93ea008 51 51 void setEMail(const QString &address); 52 52 QString eMail() const; 53 54 bool isValidForRegister() const; 53 55 54 56 private: -
src/tests/siwebserviceclienttest.cpp
rfb602c6 r93ea008 85 85 station.setType("Test Type"); 86 86 87 QCOMPARE(station.isValidForRegister(), true); 87 88 QCOMPARE(client->stationsRegister(station, errorMessage), SiWebserviceClient::StationsRegister); 88 89 QTest::qWarn(errorMessage.toUtf8());
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/siweather/chrome/site/your_project_logo.png)