summaryrefslogtreecommitdiff
path: root/examples
authormickeyl <mickeyl>2005-06-02 21:44:41 (UTC)
committer mickeyl <mickeyl>2005-06-02 21:44:41 (UTC)
commitd0f6a0721d7ab67a115d08990143944ee71d54ba (patch) (side-by-side diff)
treeba22ad18027419a6417f3d6439a2faf67917ab74 /examples
parentf55a56f54de1d3fa9084160159a379079a317d96 (diff)
downloadopie-d0f6a0721d7ab67a115d08990143944ee71d54ba.zip
opie-d0f6a0721d7ab67a115d08990143944ee71d54ba.tar.gz
opie-d0f6a0721d7ab67a115d08990143944ee71d54ba.tar.bz2
- move addLanguage.sh and mkipks to scripts/ directory
- finish recursive directory locks and mention in ChangeLog beginning with `CVS:' are removed automatically CVS: CVS: Committing in . CVS: CVS: Modified Files: CVS: ChangeLog libopie2/opiecore/linux/ofilenotify.cpp CVS: libopie2/opiecore/linux/ofilenotify.h CVS: examples/opiecore/onotifytest/main.cpp CVS: examples/opiecore/onotifytest/main.h CVS: Added Files: CVS: scripts/addLanguage.sh scripts/mkipks CVS: ----------------------------------------------------------------------
Diffstat (limited to 'examples') (more/less context) (show whitespace changes)
-rw-r--r--examples/opiecore/onotifytest/main.cpp14
-rw-r--r--examples/opiecore/onotifytest/main.h6
2 files changed, 18 insertions, 2 deletions
diff --git a/examples/opiecore/onotifytest/main.cpp b/examples/opiecore/onotifytest/main.cpp
index b773da9..7b7b0bc 100644
--- a/examples/opiecore/onotifytest/main.cpp
+++ b/examples/opiecore/onotifytest/main.cpp
@@ -33,5 +33,8 @@ App::App( int argc, char** argv ) : QApplication( argc, argv )
- ODirNotification* tmpfoo = new ODirNotification( 0, 0 );
+ tmpfoo = new ODirNotification( 0, 0 );
int result = tmpfoo->watch( "/tmp/foo", false, CreateFile, 2 );
+
+ if ( result != -1 )
+ {
QObject::connect( tmpfoo, SIGNAL(triggered(const QString&,unsigned int,const QString&)),
@@ -39,2 +42,7 @@ App::App( int argc, char** argv ) : QApplication( argc, argv )
}
+ else
+ {
+ QMessageBox::warning( qApp->desktop(), "info", "Couldn't watch /tmp/foo\nDoes it exist?" );
+ }
+}
@@ -43,2 +51,3 @@ App::~App()
odebug << "~App()" << oendl;
+ delete tmpfoo;
}
@@ -47,3 +56,4 @@ void App::triggered( const QString& str1, unsigned int id, const QString& str2 )
{
- QMessageBox::information( qApp->desktop(), "info", QString( "%1\n%2\n%3" ).arg( str1 ).arg( id ).arg( str2 ) );
+ QMessageBox::information( qApp->desktop(), "info", QString().sprintf( "%s\n0x%08x\n%s",
+ (const char*) str1, id, (const char*) str2 ) );
}
diff --git a/examples/opiecore/onotifytest/main.h b/examples/opiecore/onotifytest/main.h
index afad947..7ce4b9f 100644
--- a/examples/opiecore/onotifytest/main.h
+++ b/examples/opiecore/onotifytest/main.h
@@ -6,2 +6,5 @@
+/* OPIE */
+#include <opie2/ofilenotify.h>
+
/* QT */
@@ -20,2 +23,5 @@ public slots:
void triggered( const QString&, unsigned int, const QString& );
+
+ private:
+ Opie::Core::ODirNotification* tmpfoo;
};