build should work now
This commit is contained in:
17
examples/filewatch.cxx
Normal file
17
examples/filewatch.cxx
Normal 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
24
examples/filewatch.hxx
Normal 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;
|
||||
};
|
@@ -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
|
||||
|
Reference in New Issue
Block a user