summaryrefslogtreecommitdiff
path: root/client/test/testmultilist.cc
blob: 65c14d73729d9e4781c61168b4bef5d6c082c4d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
#include <QtTest/QtTest>
#include "util.h"
#include "widgets/multilist.h"
#include <QPixmap>
#include <QIcon>

static QString xml =
	  "<multilist name=\"foo\" value=\"bar\"/>";
static QString xml2 =
	  "<multilist name=\"foo\" value=\"bar\" innerwidget=\"bar\">"
	  "  <lineedit name=\"bar\" value=\"bleh\"/>"
	  "</multilist>";

class TestMultiList: public QObject
{
Q_OBJECT
private slots:
  void memleak() {
    QDomDocument doc; doc.setContent(xml2);
    QDomElement e = doc.documentElement();
    MacroWindow *w = createMacroWindow();

    // FIXME: this is used to make sure all resources (icons and pixmaps) 
    // are loaded.
    MultiList ml(e, w);

    TEST_MEMLEAK(MultiList ml(e, w));

    delete w;
  }
};

QTEST_MAIN(TestMultiList)
#include "testmultilist.moc"