X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fasync%2Fmain.cpp;fp=src%2Fcontrib%2Flibqxt-2007-10-24%2Ftests%2Fweb%2Fasync%2Fmain.cpp;h=95a27afd93d9ae8bc412af778e4593ece5b1cd7c;hb=a634acadbcf6017474f68a3eaf7cb632660e9e49;hp=0000000000000000000000000000000000000000;hpb=cd122ca8e0d2c0ffc5397e0a813c75d791a7e6e3;p=quassel.git diff --git a/src/contrib/libqxt-2007-10-24/tests/web/async/main.cpp b/src/contrib/libqxt-2007-10-24/tests/web/async/main.cpp new file mode 100644 index 00000000..95a27afd --- /dev/null +++ b/src/contrib/libqxt-2007-10-24/tests/web/async/main.cpp @@ -0,0 +1,73 @@ +#include +#include +#include +#include +#include +class test : public QxtWebController + { + Q_OBJECT + public: + test():QxtWebController("root") + { + } + + public slots: + + int index() + { + QTimer::singleShot(20,this,SLOT(async())); + echo()<<"foo"; + return 2; + } + private slots: + + void async() + { + QxtWebCore::send("bar"); + QxtWebCore::close(); + } + + }; + +class err : public QxtWebController + { + Q_OBJECT + public: + err():QxtWebController("error") + { + } + + public slots: + + int index(QString a=QString("500"),QString b=QString(),QString c=QString(),QString d=QString(), + QString e=QString(),QString f=QString(),QString g=QString()) + { + echo()<<"shits
" + "error "<" + <" + <" + <" + <" + <" + <"; + return 0; + } + + }; + + + + + +int main(int argc, char *argv[]) + { + QCoreApplication app(argc, argv); + QxtWebCore core(new QxtScgiConnector()); + core.start(4000); + test t; + err e; + return app.exec(); + } + + +#include "main.moc"