Changeset a2330fc for src/testing/webserverprocess.h
- Timestamp:
- Sep 20, 2015, 2:30:36 PM (11 years ago)
- Branches:
- master
- Children:
- 1ebaa4f
- Parents:
- 915dc18
- File:
-
- 1 edited
-
src/testing/webserverprocess.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/testing/webserverprocess.h
r915dc18 ra2330fc 21 21 #define WEBSERVERPROCESS_H 22 22 23 #include <Q Thread>23 #include <QObject> 24 24 #include <sitestingglobal.h> 25 26 class WebserverRunner;27 25 28 26 #include <QPointer> … … 32 30 * @brief Starts the php build in webserver to allow testing against the webservice 33 31 */ 34 class SI_TESTING_EXPORT WebserverProcess : public QThread { 35 friend WebserverRunner; 36 32 class SI_TESTING_EXPORT WebserverProcess : public QObject { 37 33 Q_OBJECT 38 34 public: … … 44 40 45 41 bool isRunning() const; 46 47 void stopThread(); 48 void run(); 49 bool isStarted(); 50 bool waitForStart(); 42 bool start(); 43 /** 44 * @brief Stops the webservice with QProcess::terminate(). The destructor ~WebserverProcess() calls QProcess::kill() to stop the webserver process. 45 */ 46 bool stop(); 47 /** 48 * @brief Calls the setup page of the webservice. Returns true, if the call was successfully. This does not means, the setup was successfully. 49 */ 50 bool setup(); 51 /** 52 * @brief Removes the webservice data directory to cleanup test case. It is called by ~WebserverProcess(). 53 */ 54 bool cleanupDataDirectory(); 51 55 52 56 private slots: 53 void setStarted(); 57 void processError(QProcess::ProcessError error); 58 void processFinished(int exitCode, QProcess::ExitStatus exitStatus); 59 void processReadyRead(); 54 60 55 61 private: 56 62 static QString appendSlashToUrl(QString url); 57 63 58 // QPointer<QProcess> _webserverProcess; 59 // int _timeout; 60 WebserverRunner *_runner; 61 bool _finishedStartup; 64 QPointer<QProcess> _process; 65 int _timeout; 62 66 }; 63 67
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)