diff options
author | Niklas | 2011-09-01 18:04:05 +0200 |
---|---|---|
committer | Niklas | 2011-09-01 18:04:05 +0200 |
commit | c0d112499ba2805e4e75f2ba3574d412c5db8be1 (patch) | |
tree | bb55bdfa68fff6c1f510fb975c5e3ca8cc1f97b6 | |
parent | we tried some fixes for the messge loss problem, but we failed. Sebastian wil... (diff) | |
download | fbgui-c0d112499ba2805e4e75f2ba3574d412c5db8be1.tar.gz fbgui-c0d112499ba2805e4e75f2ba3574d412c5db8be1.tar.xz fbgui-c0d112499ba2805e4e75f2ba3574d412c5db8be1.zip |
some comments to the LogReceiver methods
-rw-r--r-- | LogReceiver/logreceiver.cpp | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/LogReceiver/logreceiver.cpp b/LogReceiver/logreceiver.cpp index 1256bfe..f618e90 100644 --- a/LogReceiver/logreceiver.cpp +++ b/LogReceiver/logreceiver.cpp @@ -450,6 +450,34 @@ void LogReceiver::handleNewInputLine(QLocalSocket * client, QString data) { } } +/** + * This Method is called when a process is finished. + * + * This Method is called when a process is finished. This slot is connected + * with the signal finished() of the QProcess class. + * If the process finishes, it will be checked if the process exited normal + * or if an unexpected error occurred. For this, we determine the sender (which is a + * QProcess), get the corresponding interface (which is stored in a map), and check + * the exitCode. Further actions are taken according to the exitCode check. + * Normal exit: + * emit changeProgressBar() to 100% + * emit updateStatusLabel() to check connection + * checkConnectivity() @see LogReceiver::checkConnectivity() + * Unexpected exit: + * emit updateStatusLabel() to process exited unexpected + * TODO:: the reason for the unexpected exit should be presented in the logfile. + * + * @param exitCode + * + * @param exitStatus + * + * @return bool + * returns true: if the interface name i starts with a letter in the blacklist. + * + * returns false: else + * + * @see LogReceiver::getListOfNetworkInterfaces() + */ void LogReceiver::handleProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) { QProcess* p = qobject_cast<QProcess *> (QObject::sender()); @@ -466,7 +494,7 @@ void LogReceiver::handleProcessFinished(int exitCode, emit updateStatusLabel(ifName, "process exited unexpected"); } else { qDebug() << "process normal exit"; - qDebug() << "check internet connction"; + qDebug() << "check internet connection"; emit changeProgressBarValue(ifName, 100); emit @@ -485,13 +513,36 @@ void LogReceiver::handleProcessFinished(int exitCode, emit allProcessesFinished(); } } - +/** + * This Method is called when a process is started. + * + * This Method is called when a process is started. + * It prints the message: "process started for interface: <interfaceName>". + */ void LogReceiver::handleProcessStarted() { QProcess* p = qobject_cast<QProcess *> (QObject::sender()); QString ifName = clientProcessToIfNameMap.value(p, "ifName"); qDebug() << "process started for interface:" << ifName; } +/** + * This Method implements a blacklist. + * + * This Method implements a blacklist. We check the fist character + * of the interface name. if this letter is in the list, we return true. + * True means, that this interface won't be put into the result list of + * getListOfNetworkInterfaces(). + * + * @param i + * is a interface name. + * + * @return bool + * returns true: if the interface name i starts with a letter in the blacklist. + * + * returns false: else + * + * @see LogReceiver::getListOfNetworkInterfaces() + */ bool LogReceiver::checkBlackList(QString i) { if (i.startsWith("v", Qt::CaseInsensitive)) { return true; |