diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /qtjava/javalib/test/DirTest.java | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'qtjava/javalib/test/DirTest.java')
-rw-r--r-- | qtjava/javalib/test/DirTest.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/qtjava/javalib/test/DirTest.java b/qtjava/javalib/test/DirTest.java new file mode 100644 index 00000000..1a694ed0 --- /dev/null +++ b/qtjava/javalib/test/DirTest.java @@ -0,0 +1,30 @@ +//import org.kde.qt.QApplication; +//import org.kde.qt.QDir; +import org.kde.qt.*; + +public class DirTest { + public static void main(String[] args) + { + QApplication myapp = new QApplication(args); + + QDir mydir = new QDir("/tmp"); + if ( mydir.match(new String [] {"*.bmp", "*.h"}, "foobar.bmp") ) { + System.out.println("foobar matches"); + } + + if ( ! mydir.match(new String[] {"*.bmp", "*.h"}, "baz.cpp") ) { + System.out.println("baz doesn't match"); + } + + QFile myobj = new QFile(); + Object mytest; + System.out.println("myobj: " + myobj.toString()); + mytest = (QDir) Qt.dynamicCast("QDir", myobj); + System.out.println("mytest: " + mytest.toString()); + return; + } + + static { + qtjava.initialize(); + } +} |