summaryrefslogtreecommitdiff
path: root/client/test/util.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-12 10:57:04 +0000
committerdeva <deva>2010-08-12 10:57:04 +0000
commitd9338083192084613e5530b02710b796252d342b (patch)
treee0ec2b36e0de62328e5fd5d3b597f6ee71d1b18f /client/test/util.cc
parentdbab8458dcce186e7eb7a114a83f759d7db5445a (diff)
New scripting system part2.
Diffstat (limited to 'client/test/util.cc')
-rw-r--r--client/test/util.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/client/test/util.cc b/client/test/util.cc
index 257b561..1fd09d4 100644
--- a/client/test/util.cc
+++ b/client/test/util.cc
@@ -1,10 +1,25 @@
#include "util.h"
#include <QDomDocument>
+#include <QSettings>
+#include <QDomNode>
+
+#include "netcom.h"
+
+#define CONFIG_DEFAULT "pracro.ini"
MacroWindow *createMacroWindow()
{
MacroWindow *m;
- m = NULL;
+
+ QSettings settings("pracro.ini", QSettings::IniFormat);
+ settings.beginGroup("server");
+ QString host = settings.value("host").toString();
+ int port = settings.value("port").toInt();
+ settings.endGroup();
+
+ NetCom netcom(host, port);
+ QDomNode node;
+ m = new MacroWindow(netcom, node, "test");
return m;
}