We now have a current svn snapshot of libqxt in our contrib dir, and
[quassel.git] / src / contrib / libqxt-2007-10-24 / tests / web / invoketest / main.cpp
diff --git a/src/contrib/libqxt-2007-10-24/tests/web/invoketest/main.cpp b/src/contrib/libqxt-2007-10-24/tests/web/invoketest/main.cpp
new file mode 100644 (file)
index 0000000..cd1dd30
--- /dev/null
@@ -0,0 +1,69 @@
+#include <QCoreApplication>
+#include <QxtWebCore>
+#include <QxtWebController>
+#include <QxtScgiConnector>
+class test : public QxtWebController
+        {
+        Q_OBJECT
+        public:
+                test():QxtWebController("root")
+                       {
+                       }
+
+       public slots:
+
+                int index()
+                        {
+                       echo()<<"foo";
+                        return 0;
+                        }
+                int index(QString a, QString b=QString("default"), QString c=QString("default2"))
+                        {
+                       echo()<<"a: "<<a<<"<br/> b: "<<b<<"<br/> c: "<<c;
+                        return 0;
+                        }
+
+        };
+
+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<br/>"
+                       "error "<<a<<"<br/>"
+                       <<b<<"<br/>"
+                       <<c<<"<br/>"
+                       <<d<<"<br/>"
+                       <<e<<"<br/>"
+                       <<f<<"<br/>"
+                       <<g<<"<br/>";
+                        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"