From 4f99f868f09bbffa2e15733b8b7c78eba07a199e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 6 Dec 2020 21:23:48 +0900 Subject: Renaming of files in preparation for code style tools. Signed-off-by: Michele Calgaro --- arts/kde/kiotest.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 arts/kde/kiotest.cpp (limited to 'arts/kde/kiotest.cpp') 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 +#include +#include +#include +#include +#include +#include +#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(); +} -- cgit v1.2.1