build should work now

This commit is contained in:
Marc Wäckerlin
2015-05-10 16:30:03 +00:00
parent e4e2595654
commit 51b258cb7a
21 changed files with 846 additions and 164 deletions

17
examples/filewatch.cxx Normal file
View File

@@ -0,0 +1,17 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <filewatch.hxx>
#include <QtCore/QCoreApplication>
int main(int argc, char** argv) {
qbrowserlib::Log::DEBUG = true;
QCoreApplication app(argc, argv);
TestFileWatch test("testfile");
return app.exec();
}

24
examples/filewatch.hxx Normal file
View File

@@ -0,0 +1,24 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <qbrowserlib/filestorage.hxx>
#include<QtCore/QDebug>
class TestFileWatch: public QObject {
Q_OBJECT;
public:
TestFileWatch(QString file): _storage(file) {
assert(connect(&_storage, SIGNAL(changed()), SLOT(changed())));
}
private Q_SLOTS:
void changed() {
qDebug()<<"File has changed: "<<_storage.read().join("; ");
}
private:
FileStorage _storage;
};

View File

@@ -1,9 +1,17 @@
## @id $Id$
#
# This file has been added by bootstrap.sh on Fri, 13 Mar 2015 14:04:43 +0100
# This file has been added by bootstrap.sh on Sat, 09 May 2015 08:50:06 +0200
# Feel free to change it or even remove and rebuild it, up to your needs
#
## 1 2 3 4 5 6 7 8
## 45678901234567890123456789012345678901234567890123456789012345678901234567890
noinst_PROGRAM = filewatch
filewatch_SOURCES = filewatch.cxx filewatch.hxx
AM_CPPFLAGS = -I@top_srcdir@/src -I_srcdir@/src/qbrowserlib
AM_LDFLAGS = -L@top_builddir@/src/.libs
LDADD = -lswisssurfer
MAINTAINERCLEANFILES = makefile.in