diff options
Diffstat (limited to 'client/test/util.cc')
-rw-r--r-- | client/test/util.cc | 17 |
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; } |