# # # patch "NEWS" # from [671665fe83d61b4f97ab810b8b0319c95ccea2cf] # to [5a12512531fe334ad01463e797953fa5aa3bccb4] # # patch "guitone/src/model/Attributes.cpp" # from [4bcbc98a79265af7bdc6a1f857ea91153b266640] # to [d69e3790b504fa7768e226e4c7c31d87bbf3e21f] # # patch "guitone/src/model/Attributes.h" # from [e4148f7f748901dbbd91b362a28702fd2b9445a1] # to [23c850e0e6567d7db363511c3fd913bb7fb02f08] # # patch "guitone/src/model/AutomateCommand.cpp" # from [a3d50b79cf34f9d655b66775fc61cc5c4d3c7d42] # to [c2e5e9404ba36c10e42fbd2d4702e2d782a91601] # # patch "guitone/src/model/AutomateCommand.h" # from [d2da7fedc8d1805b46dabc0892ac3fd44570d7bd] # to [f7ded2d43c8532e573a48f191945c3adff08bcee] # # patch "guitone/src/model/Branches.cpp" # from [ba29043812cfd0e448f777899e773679a8d06c5a] # to [9554a8636435f960db1f79c4145f65f9dee64166] # # patch "guitone/src/model/Branches.h" # from [5a1c01a92003383ab83eeb385727cb6863872640] # to [77bb770356ae44702b9f47308c1f202588e09a40] # # patch "guitone/src/model/Certs.cpp" # from [4c6380b270451b9f80304786cd6556edb62823df] # to [bf27bc8e9f27fd718600311d6a56b1dd771efe56] # # patch "guitone/src/model/Certs.h" # from [d530b1b1fd84f50d3180d08034d1b2eeb72b2bf9] # to [abc55b8f873021da1055e0bbe94120451b2324b7] # # patch "guitone/src/model/ContentDiff.cpp" # from [5f08445d5e84ee540df36c4da94a6ab0014d017e] # to [1daf3b2d129556b3ed6f978713915dfa14f8ef92] # # patch "guitone/src/model/ContentDiff.h" # from [db6aed4aa7fa672a4dcfb29f160d45cea1f5228f] # to [76f5f369923be30371154dedc3a5ec7fefd4f157] # # patch "guitone/src/model/GetFile.cpp" # from [7f707ffe9f9d30f1797811db16b30abeaf9ffd80] # to [8debe7d014363712d8ced53352fd4fcb0558f1a0] # # patch "guitone/src/model/GetFile.h" # from [fd041026b83b707590139a231e8caf1843fd38ff] # to [62ffae7481e42c0affce2dc0fc5778d69f2c085e] # # patch "guitone/src/model/Inventory.cpp" # from [98f38105d1538b1c7ffea47433b6ce8092e4a079] # to [6485e0bee393c3e1a906ea0dc8766245efe3de4f] # # patch "guitone/src/model/Inventory.h" # from [7ad6edb283f782e6c8d273445bf5f1b35c831ad5] # to [0c72dcfb0e3865a6435d4d41a4d6b08fd7f14ece] # # patch "guitone/src/model/Keys.cpp" # from [93915e679c2d1d4e82a84eb9b3683b1b06afea4b] # to [32c89b1d250ee188af32318f8f9b370aab193ef6] # # patch "guitone/src/model/Keys.h" # from [918e8c53b8994f8634f4ae56caa83c408b855532] # to [9af37da85afd85f60c6fc473a304d660c9d495dd] # # patch "guitone/src/model/Select.cpp" # from [74f7981f51476845e3295b89d48dbb07d79dee08] # to [4b288fe9504e2bccbf1f6ca6fd3966a7b15c7ebc] # # patch "guitone/src/model/Select.h" # from [c41074d1be0f96815391e9d2eeee0b4db373c51c] # to [6332af0b8e4017c7eb844747786a194ea4af312a] # # patch "guitone/src/model/Tags.cpp" # from [1bacbc08485f85d4b0d324681a1072057e377979] # to [9af2920ea62b9948dd9f16fcd598930a0a61d9fc] # # patch "guitone/src/model/Tags.h" # from [9ce672b41d2b578bcc499fb4ecfe26ce7b09fceb] # to [3ef5cd0e3bf86c4bb667ab8c74060e9be47a0279] # # patch "guitone/src/monotone/Monotone.cpp" # from [afecf71941708a36cd6d60a07dc442c15616b898] # to [927f1043571b5ae979f5d8b08c61710a0e6a75e3] # # patch "guitone/src/monotone/Monotone.h" # from [f7c585fb41db9739d79b6cd907419f39954c0df3] # to [7dc8870e084b0cd4a5bf8b8c14fec5c7540fdfff] # ============================================================ --- NEWS 671665fe83d61b4f97ab810b8b0319c95ccea2cf +++ NEWS 5a12512531fe334ad01463e797953fa5aa3bccb4 @@ -30,10 +30,13 @@ libraries, libqanava should have been the first giving guitone a fancy graphical revision view, but this didn't work because the software is still incomplete and thus was removed - - other: guitone now comes with a script which creates on demand a monolithic OSX - application package after build (it copies and relinks all needed Qt libraries) + - internal: removed dependency of AutomateCommand from the Monotone wrapper, now this + should be easier to use in other projects as well... + - other: added experimental support for a new, python-based buildsystem. this currently + builds guitone on OSX and Linux fine (no Win32 support yet, sorry) and additionally + provides the possibility to create a monolithic application bundle on OSX as well + as a disk image for distribution. see ./waf --help for details - 2006-10-03 (0.4) - Interims release, mainly to show we're still alive =) - support for different monotone binaries, configurable via preferences dialog ============================================================ --- guitone/src/model/Attributes.cpp 4bcbc98a79265af7bdc6a1f857ea91153b266640 +++ guitone/src/model/Attributes.cpp d69e3790b504fa7768e226e4c7c31d87bbf3e21f @@ -65,16 +65,11 @@ bool Attributes::readAttributes(const QM cmd.append("attributes"); cmd.append(item->getPath()); - Monotone *mtn = Monotone::singleton(); - - return mtn->triggerCommand(this, cmd); + return AutomateCommand::triggerCommand(cmd); } -void Attributes::parseOutput(AutomateCommand *caller) +void Attributes::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - StanzaParser* parser = new StanzaParser(AutomateCommand::data); StanzaList list = parser->getStanzas(); ============================================================ --- guitone/src/model/Attributes.h e4148f7f748901dbbd91b362a28702fd2b9445a1 +++ guitone/src/model/Attributes.h 23c850e0e6567d7db363511c3fd913bb7fb02f08 @@ -55,7 +55,7 @@ private: void attributesRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); AttributeList *attributes; }; ============================================================ --- guitone/src/model/AutomateCommand.cpp a3d50b79cf34f9d655b66775fc61cc5c4d3c7d42 +++ guitone/src/model/AutomateCommand.cpp c2e5e9404ba36c10e42fbd2d4702e2d782a91601 @@ -19,6 +19,7 @@ ***************************************************************************/ #include "AutomateCommand.h" +#include AutomateCommand::AutomateCommand(QObject* parent) : QAbstractItemModel(parent) @@ -29,6 +30,51 @@ AutomateCommand::~AutomateCommand() { } +bool AutomateCommand::triggerCommand(const QStringList & cmd) +{ + return triggerCommand(cmd, QStringList()); +} + +bool AutomateCommand::triggerCommand(const QStringList & cmd, const QStringList & opts) +{ + Monotone *mtn = Monotone::singleton(); + + connect( + mtn, SIGNAL(commandFinished(int)), + this, SLOT(commandFinished(int)) + ); + + qApp->setOverrideCursor(Qt::WaitCursor); + + return mtn->triggerCommand(cmd, opts); +} + +void AutomateCommand::commandFinished(int retCode) +{ + Monotone *mtn = Monotone::singleton(); + + disconnect( + mtn, SIGNAL(commandFinished(int)), + this, SLOT(commandFinished(int)) + ); + + data = mtn->getDataAndReset(); + + if (retCode == 0) + { + parseOutput(); + } + else + { + if (!handleError(retCode)) + { + qDebug("AutomateCommand::commandFinished: couldn't handle error %s", qPrintable(data)); + } + } + + qApp->restoreOverrideCursor(); +} + bool AutomateCommand::handleError(int retCode) { // Error handling has to happen in the derived classes @@ -36,8 +82,8 @@ bool AutomateCommand::handleError(int re // to continue program execution (i.e. the error is recoverable) // or not. // In this base class we do no error handling at all, so if - // no reimplementation happens any error leads to immediate - // exit of the main program (see Monotone.cpp for details) + // no reimplementation happens any error is just printed as debug + // output and ignored return false; } ============================================================ --- guitone/src/model/AutomateCommand.h d2da7fedc8d1805b46dabc0892ac3fd44570d7bd +++ guitone/src/model/AutomateCommand.h f7ded2d43c8532e573a48f191945c3adff08bcee @@ -21,6 +21,7 @@ #ifndef AUTOMATE_COMMAND_H #define AUTOMATE_COMMAND_H +#include "../monotone/Monotone.h" #include /* @@ -34,21 +35,21 @@ public: Q_OBJECT public: - inline void setData(QString output) { data = output; }; virtual void clearData(); - virtual bool handleError(int); -signals: - void parseError(QString); - protected: // its not allowed to create objects of this type directly AutomateCommand(QObject*); virtual ~AutomateCommand(); - QString data; + bool triggerCommand(const QStringList &); + bool triggerCommand(const QStringList &, const QStringList &); + virtual bool handleError(int); + QString data; + protected slots: - virtual void parseOutput(AutomateCommand*) = 0; + void commandFinished(int); + virtual void parseOutput() = 0; }; #endif ============================================================ --- guitone/src/model/Branches.cpp ba29043812cfd0e448f777899e773679a8d06c5a +++ guitone/src/model/Branches.cpp 9554a8636435f960db1f79c4145f65f9dee64166 @@ -40,17 +40,12 @@ bool Branches::readBranches() QStringList cmd; cmd << "branches"; - - Monotone *mtn = Monotone::singleton(); - - return mtn->triggerCommand(this, cmd); + + return AutomateCommand::triggerCommand(cmd); } -void Branches::parseOutput(AutomateCommand *caller) +void Branches::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - branches = new QStringList(AutomateCommand::data.split(QChar('\n'))); reset(); ============================================================ --- guitone/src/model/Branches.h 5a1c01a92003383ab83eeb385727cb6863872640 +++ guitone/src/model/Branches.h 77bb770356ae44702b9f47308c1f202588e09a40 @@ -47,7 +47,7 @@ private: void branchesRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); QStringList * branches; }; ============================================================ --- guitone/src/model/Certs.cpp 4c6380b270451b9f80304786cd6556edb62823df +++ guitone/src/model/Certs.cpp bf27bc8e9f27fd718600311d6a56b1dd771efe56 @@ -49,17 +49,12 @@ bool Certs::readCerts(const QModelIndex QStringList cmd; cmd.append("certs"); cmd.append(rev); - - Monotone *mtn = Monotone::singleton(); - - return mtn->triggerCommand(this, cmd); + + return AutomateCommand::triggerCommand(cmd); } -void Certs::parseOutput(AutomateCommand *caller) +void Certs::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - StanzaParser* parser = new StanzaParser(AutomateCommand::data); StanzaList list = parser->getStanzas(); ============================================================ --- guitone/src/model/Certs.h d530b1b1fd84f50d3180d08034d1b2eeb72b2bf9 +++ guitone/src/model/Certs.h abc55b8f873021da1055e0bbe94120451b2324b7 @@ -58,7 +58,7 @@ private: void certsRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); CertList *certs; }; ============================================================ --- guitone/src/model/ContentDiff.cpp 5f08445d5e84ee540df36c4da94a6ab0014d017e +++ guitone/src/model/ContentDiff.cpp 1daf3b2d129556b3ed6f978713915dfa14f8ef92 @@ -69,7 +69,7 @@ bool ContentDiff::readDiff( return false; } - leftRevision = mtn->getOutput(); + leftRevision = mtn->getDataAndReset(); leftRevision.chop(1); } @@ -80,14 +80,11 @@ bool ContentDiff::readDiff( opts << "r" << rightRevision; } - return mtn->triggerCommand(this, cmd, opts); + return AutomateCommand::triggerCommand(cmd, opts); } -void ContentDiff::parseOutput(AutomateCommand *caller) +void ContentDiff::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - diffParser = new DiffParser(AutomateCommand::data); // flatten the data for the current view ============================================================ --- guitone/src/model/ContentDiff.h db6aed4aa7fa672a4dcfb29f160d45cea1f5228f +++ guitone/src/model/ContentDiff.h 76f5f369923be30371154dedc3a5ec7fefd4f157 @@ -76,7 +76,7 @@ private: void diffRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); DiffParser * diffParser; ListLines lines; }; ============================================================ --- guitone/src/model/GetFile.cpp 7f707ffe9f9d30f1797811db16b30abeaf9ffd80 +++ guitone/src/model/GetFile.cpp 8debe7d014363712d8ced53352fd4fcb0558f1a0 @@ -44,7 +44,7 @@ bool GetFile::readFileByName(QString fil return false; } - QString baseRevision = mtn->getOutput(); + QString baseRevision = mtn->getDataAndReset(); baseRevision.chop(1); return readFileByName(fileName, baseRevision); @@ -74,20 +74,16 @@ bool GetFile::readFile(QStringList cmd, // reset attached views reset(); - Monotone *mtn = Monotone::singleton(); - - return mtn->triggerCommand(this, cmd, opts); + return AutomateCommand::triggerCommand(cmd, opts); } -void GetFile::parseOutput(AutomateCommand *caller) +void GetFile::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - QRegExp rx("\\0x00"); if (rx.indexIn(AutomateCommand::data) != -1) { - emit parseError(tr("File is binary.")); + // FIXME: signal this anywhere... + qDebug("GetFile::parseOutput: File is binary"); return; } ============================================================ --- guitone/src/model/GetFile.h fd041026b83b707590139a231e8caf1843fd38ff +++ guitone/src/model/GetFile.h 62ffae7481e42c0affce2dc0fc5778d69f2c085e @@ -62,7 +62,7 @@ private: private: bool readFile(QStringList, QStringList); - void parseOutput(AutomateCommand*); + void parseOutput(); Content fileContents; }; ============================================================ --- guitone/src/model/Inventory.cpp 98f38105d1538b1c7ffea47433b6ce8092e4a079 +++ guitone/src/model/Inventory.cpp 6485e0bee393c3e1a906ea0dc8766245efe3de4f @@ -79,6 +79,10 @@ bool Inventory::readInventory() bool Inventory::readInventory() { + // FIXME: this should probaby be moved out here... + Monotone * mtn = Monotone::singleton(); + mtn->setup(workspaceDir); + if (modelPresent) { deleteModel(); @@ -87,23 +91,11 @@ bool Inventory::readInventory() QStringList cmd; cmd.append("inventory"); - // enable the wait cursor - qApp->setOverrideCursor(Qt::WaitCursor); - - // grab the Monotone wrapper instance - Monotone *monotone = Monotone::singleton(); - - // setup a new process instance with a new working directory - monotone->setup(workspaceDir); - - return monotone->triggerCommand(this, cmd); + return AutomateCommand::triggerCommand(cmd); } -void Inventory::parseOutput(AutomateCommand* caller) +void Inventory::parseOutput() { - // if not we are the caller, skip the processing - if (caller != this) return; - if (modelPresent) { qWarning("Inventory::parseOutput: A model was already created!"); ============================================================ --- guitone/src/model/Inventory.h 7ad6edb283f782e6c8d273445bf5f1b35c831ad5 +++ guitone/src/model/Inventory.h 0c72dcfb0e3865a6435d4d41a4d6b08fd7f14ece @@ -50,7 +50,7 @@ class Inventory : public AutomateCommand int columnCount(const QModelIndex&) const; private: - void parseOutput(AutomateCommand*); + void parseOutput(); bool parseInventoryLine(const QString &, int &, int &, int &, QString &, bool &); QList buildTreeRecursive(QList &, InventoryItem*); void deleteModel(void); ============================================================ --- guitone/src/model/Keys.cpp 93915e679c2d1d4e82a84eb9b3683b1b06afea4b +++ guitone/src/model/Keys.cpp 32c89b1d250ee188af32318f8f9b370aab193ef6 @@ -43,16 +43,11 @@ bool Keys::readKeys() QStringList cmd; cmd << "keys"; - Monotone *mtn = Monotone::singleton(); - - return mtn->triggerCommand(this, cmd); + return AutomateCommand::triggerCommand(cmd); } -void Keys::parseOutput(AutomateCommand *caller) +void Keys::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - StanzaParser* parser = new StanzaParser(AutomateCommand::data); StanzaList list = parser->getStanzas(); Key * key; ============================================================ --- guitone/src/model/Keys.h 918e8c53b8994f8634f4ae56caa83c408b855532 +++ guitone/src/model/Keys.h 9af37da85afd85f60c6fc473a304d660c9d495dd @@ -58,7 +58,7 @@ private: void keysRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); QString getLocationString(int) const; KeyList keys; }; ============================================================ --- guitone/src/model/Select.cpp 74f7981f51476845e3295b89d48dbb07d79dee08 +++ guitone/src/model/Select.cpp 4b288fe9504e2bccbf1f6ca6fd3966a7b15c7ebc @@ -21,7 +21,6 @@ #include "Select.h" #include "../monotone/Monotone.h" -#include #include Select::Select(QObject *parent) @@ -47,12 +46,7 @@ bool Select::readSelection(const QString cmd.append("select"); cmd.append(selector); - Monotone *mtn = Monotone::singleton(); - - // enable the wait cursor - qApp->setOverrideCursor(Qt::WaitCursor); - - return mtn->triggerCommand(this, cmd); + return AutomateCommand::triggerCommand(cmd); } bool Select::handleError(int errCode) @@ -63,18 +57,12 @@ bool Select::handleError(int errCode) // since there is no other indication we assume that errCode 2 // is always fired if a invalid selector syntax has been given emit invalidSelection(AutomateCommand::data); - - // restore the normal cursor - qApp->restoreOverrideCursor(); - + return true; } -void Select::parseOutput(AutomateCommand *caller) +void Select::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; - if (selRevisions > 0) { selRevisions->clear(); @@ -86,9 +74,6 @@ void Select::parseOutput(AutomateCommand // reset the view reset(); - // restore the normal cursor - qApp->restoreOverrideCursor(); - // signal that we've finished (whoever listens to that) emit selectionRead(); } ============================================================ --- guitone/src/model/Select.h c41074d1be0f96815391e9d2eeee0b4db373c51c +++ guitone/src/model/Select.h 6332af0b8e4017c7eb844747786a194ea4af312a @@ -49,7 +49,7 @@ private: void invalidSelection(QString); private: - void parseOutput(AutomateCommand*); + void parseOutput(); bool handleError(int); RevisionList *selRevisions; }; ============================================================ --- guitone/src/model/Tags.cpp 1bacbc08485f85d4b0d324681a1072057e377979 +++ guitone/src/model/Tags.cpp 9af2920ea62b9948dd9f16fcd598930a0a61d9fc @@ -36,9 +36,6 @@ bool Tags::readTags(const QString & bran bool Tags::readTags(const QString & branch) { - tags->clear(); - reset(); - QStringList cmd; cmd << "tags"; if (branch.length() > 0) @@ -46,14 +43,12 @@ bool Tags::readTags(const QString & bran cmd << branch; } - Monotone *mtn = Monotone::singleton(); - return mtn->triggerCommand(this, cmd); + return AutomateCommand::triggerCommand(cmd); } -void Tags::parseOutput(AutomateCommand *caller) +void Tags::parseOutput() { - // if not we are the caller, omit the parsing - if (caller != this) return; + tags->clear(); StanzaParser* parser = new StanzaParser(AutomateCommand::data); StanzaList list = parser->getStanzas(); ============================================================ --- guitone/src/model/Tags.h 9ce672b41d2b578bcc499fb4ecfe26ce7b09fceb +++ guitone/src/model/Tags.h 3ef5cd0e3bf86c4bb667ab8c74060e9be47a0279 @@ -55,7 +55,7 @@ private: void tagsRead(); private: - void parseOutput(AutomateCommand*); + void parseOutput(); TagList * tags; }; ============================================================ --- guitone/src/monotone/Monotone.cpp afecf71941708a36cd6d60a07dc442c15616b898 +++ guitone/src/monotone/Monotone.cpp 927f1043571b5ae979f5d8b08c61710a0e6a75e3 @@ -73,7 +73,8 @@ // it at the right time. // // After parsing the output is made available to the calling process by -// getOutput(). +// getDataAndReset() - this function also resets the "processing" flag which +// blocks further attempts to use the stdio communication.. // #include "Monotone.h" @@ -151,7 +152,6 @@ void Monotone::setup(QDir *workingDirect QString mtn = Settings::getMtnExePath(); qDebug("Starting mtn '%s' ...", qPrintable(mtn)); process->start(mtn, args); - qDebug("Start returned."); } Monotone::~Monotone() @@ -251,41 +251,31 @@ bool Monotone::executeCommand(const QStr } // parsing successful - isProcessingData = false; return true; } qWarning("Monotone::executeCommand: Timed out waiting for output."); - isProcessingData = false; return false; } -bool Monotone::triggerCommand(AutomateCommand * caller, const QStringList & command) +bool Monotone::triggerCommand(const QStringList & command) { - return triggerCommand(caller, command, QStringList()); + return triggerCommand(command, QStringList()); } -bool Monotone::triggerCommand(AutomateCommand * caller, const QStringList & command, const QStringList & options) +bool Monotone::triggerCommand(const QStringList & command, const QStringList & options) { if (!newCommandSetup()) { return false; } - lastCaller = caller; - // read & parse mtn's output as soon as it gets available connect( process, SIGNAL(readyReadStandardOutput()), this, SLOT(readAndProcessCommand()) ); - // connect the caller with us so he knows when the command is finished - connect( - this, SIGNAL(commandFinished(AutomateCommand*)), - caller, SLOT(parseOutput(AutomateCommand*)) - ); - writeStdin(command, options); return true; @@ -339,53 +329,13 @@ void Monotone::readAndProcessCommand() qWarning("Monotone::readAndProcessInput: Contents incomplete/invalid."); return; } - - // apparently everything has been parsed properly - isProcessingData = false; - - // transfer the data to the command for parsing - lastCaller->setData(output); - // check if there was an error during execution - if (retCode > 0 && !lastCaller->handleError(retCode)) - { - // the error could not be handled by the caller - // so we have no other choice but try a clean exit here + emit commandFinished(retCode); - // FIXME: further actions needed here? - isCleanExit = true; - process->close(); - - disconnect( - process, SIGNAL(readyReadStandardOutput()), - this, SLOT(readAndProcessCommand()) - ); - - disconnect( - this, SIGNAL(commandFinished(AutomateCommand*)), - lastCaller, SLOT(parseOutput(AutomateCommand*)) - ); - - // emit a critical error which closes the app later - emit criticalError( - tr("Unable to process command '%1': %2") - .arg(commandLine.left(commandLine.size() - 1)) - .arg(output) - ); - return; - } - - emit commandFinished(lastCaller); - disconnect( process, SIGNAL(readyReadStandardOutput()), this, SLOT(readAndProcessCommand()) ); - - disconnect( - this, SIGNAL(commandFinished(AutomateCommand*)), - lastCaller, SLOT(parseOutput(AutomateCommand*)) - ); } bool Monotone::readAndParseStdout(int & retCode) @@ -453,6 +403,13 @@ bool Monotone::readAndParseStdout(int & return false; } +QString Monotone::getDataAndReset() +{ + QString data(output); + isProcessingData = false; + return data; +} + bool Monotone::runCommand(const QString & path, const QStringList & params, QString & output) { QProcess proc; ============================================================ --- guitone/src/monotone/Monotone.h f7c585fb41db9739d79b6cd907419f39954c0df3 +++ guitone/src/monotone/Monotone.h 7dc8870e084b0cd4a5bf8b8c14fec5c7540fdfff @@ -21,7 +21,6 @@ #ifndef MONOTONE_H #define MONOTONE_H -#include "../model/AutomateCommand.h" #include #include #include @@ -44,13 +43,13 @@ class Monotone : public QObject virtual ~Monotone(); QString getWorkspaceDir() const; - bool triggerCommand(AutomateCommand*, const QStringList &); - bool triggerCommand(AutomateCommand*, const QStringList &, const QStringList &); + bool triggerCommand(const QStringList &); + bool triggerCommand(const QStringList &, const QStringList &); bool executeCommand(const QStringList &, int &); bool executeCommand(const QStringList &, const QStringList &, int &); - inline QString getOutput() { return output; } + QString getDataAndReset(); private: Monotone(QObject *); @@ -64,8 +63,7 @@ class Monotone : public QObject QString input; QString output; QString commandLine; - AutomateCommand* lastCaller; - bool isProcessingData; + bool isProcessingData; bool isCleanExit; static Monotone* instance; QProcess * process; @@ -78,7 +76,7 @@ class Monotone : public QObject void timedOut(); signals: - void commandFinished(AutomateCommand*); + void commandFinished(int); void criticalError(const QString &); };