diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-06 21:23:48 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-12-06 21:34:48 +0900 |
commit | 84498d97e27f79e7e919b42bbe54208a02856aaf (patch) | |
tree | 8a66f6e1a88bc2304b453796663ae75f20425490 /arts/kde/kiotest.cpp | |
parent | 8bc0bc7fc67437fbf757283604104e998ad2fda7 (diff) | |
download | tdelibs-84498d97e27f79e7e919b42bbe54208a02856aaf.tar.gz tdelibs-84498d97e27f79e7e919b42bbe54208a02856aaf.zip |
Renaming of files in preparation for code style tools.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 4f99f868f09bbffa2e15733b8b7c78eba07a199e)
Diffstat (limited to 'arts/kde/kiotest.cpp')
-rw-r--r-- | arts/kde/kiotest.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/arts/kde/kiotest.cpp b/arts/kde/kiotest.cpp new file mode 100644 index 000000000..ed9a3fadf --- /dev/null +++ b/arts/kde/kiotest.cpp @@ -0,0 +1,54 @@ +#include <stdio.h> +#include <kmedia2.h> +#include <tdecmdlineargs.h> +#include <connect.h> +#include <tdelocale.h> +#include <tdeapplication.h> +#include <tdeaboutdata.h> +#include "qiomanager.h" +#include "artskde.h" + +using namespace std; +using namespace Arts; + + +static TDECmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP("URL to open"), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData aboutData( "kiotest", I18N_NOOP("KIOTest"), I18N_NOOP("0.1"), "", TDEAboutData::License_GPL, ""); + + TDECmdLineArgs::init(argc,argv,&aboutData); + TDECmdLineArgs::addCmdLineOptions(options); + TDEApplication app; + QIOManager qiomanager; + Dispatcher dispatcher(&qiomanager); + TDEIOInputStream stream; + StdoutWriter writer; + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if(args->count()) + { + if(!stream.openURL(args->arg(0))) + { + printf("can't open url"); + exit(1); + } + } + else + exit(1); + + args->clear(); + + connect(stream, writer); + + writer.start(); + stream.start(); + + app.exec(); +} |