# HG changeset patch # User Markus Bröker # Date 1230942508 -3600 # Node ID fdf04a93faeba393ddb0de5c20645ff1329db239 # Parent 724e07a9f155aa82422adad3f339bc1d385a48f1 Codebase indented by me and gnu-indent diff --git a/PacketWriter.cpp b/PacketWriter.cpp --- a/PacketWriter.cpp +++ b/PacketWriter.cpp @@ -11,7 +11,9 @@ #include #include #include -} PacketWriter::PacketWriter (char *hostname, int port) +}; + +PacketWriter::PacketWriter (char *hostname, int port) { unsigned int size; unsigned int fd; diff --git a/build b/build --- a/build +++ b/build @@ -4,7 +4,7 @@ # rm -rf .moc .obj Makefile -find -name *~ -exec rm -f {} \; +find -name '*~' -exec rm -f {} \; rm -f *.o qmake-qt4 -project .ui diff --git a/include/PacketParser.h b/include/PacketParser.h --- a/include/PacketParser.h +++ b/include/PacketParser.h @@ -17,7 +17,9 @@ #include #include #include -} class PacketParser:public PacketReader { +}; + +class PacketParser:public PacketReader { public: PacketParser (int tm = 500); PacketParser (std::string); diff --git a/include/PacketReader.h b/include/PacketReader.h --- a/include/PacketReader.h +++ b/include/PacketReader.h @@ -33,5 +33,4 @@ bool ready (); bool dataAvailable (); }; - #endif diff --git a/include/PacketWriter.h b/include/PacketWriter.h --- a/include/PacketWriter.h +++ b/include/PacketWriter.h @@ -4,7 +4,8 @@ */ #ifndef PACKETWRITER_H -#define PACKETWRITER_H 0x20053008 +#define PACKETWRITER_H + #include #include diff --git a/include/monitor.h b/include/monitor.h --- a/include/monitor.h +++ b/include/monitor.h @@ -28,7 +28,6 @@ public slots:virtual void startCapture (); virtual void stopCapture (); - }; #endif diff --git a/include/readerthread.h b/include/readerthread.h --- a/include/readerthread.h +++ b/include/readerthread.h @@ -18,15 +18,15 @@ class DataChangeEvent:public QEvent { public: DataChangeEvent (QString msg_) - :QEvent ((QEvent::Type) MSG_EVENT) { + : QEvent ((QEvent::Type) MSG_EVENT) { msg = msg_; - } + }; QString Text () const { return msg; - } + }; private: - QString msg; + QString msg; }; class readerThread:public QThread { @@ -36,5 +36,4 @@ private: Monitor * handle; }; - #endif diff --git a/include/tools.h b/include/tools.h --- a/include/tools.h +++ b/include/tools.h @@ -9,5 +9,4 @@ #include std::string itoa (const int &i); - #endif diff --git a/main.cpp b/main.cpp --- a/main.cpp +++ b/main.cpp @@ -4,6 +4,7 @@ */ #include +#include #include "include/monitor.h" #include diff --git a/monitor.cpp b/monitor.cpp --- a/monitor.cpp +++ b/monitor.cpp @@ -49,8 +49,7 @@ try { reader = new readerThread (this); - } - catch (std::exception const &e) { + } catch (std::exception const &e) { textEdit->append (e.what ()); reader = NULL; } diff --git a/readerthread.cpp b/readerthread.cpp --- a/readerthread.cpp +++ b/readerthread.cpp @@ -32,8 +32,7 @@ } } } - } - catch (std::exception const &e) { + } catch (std::exception const &e) { dce = new DataChangeEvent (e.what ()); QApplication::postEvent ((QObject *) handle, (QEvent *) dce); std::cerr << e.what () << std::endl;