From: Jussi Laitinen Date: Wed, 3 Nov 2010 13:02:47 +0000 (+0200) Subject: Added new List stubs, modified MeetPeoplePanel unit test. X-Git-Url: https://vcs.maemo.org/git/?p=situare;a=commitdiff_plain;h=6f0008567262626d0041a666e8f50ca13e29128a Added new List stubs, modified MeetPeoplePanel unit test. --- diff --git a/src/coordinates/geocoordinate.cpp b/src/coordinates/geocoordinate.cpp index bbac688..65ebc13 100644 --- a/src/coordinates/geocoordinate.cpp +++ b/src/coordinates/geocoordinate.cpp @@ -24,7 +24,7 @@ #include -#include "map/osm.h" +#include "../map/osm.h" #include "scenecoordinate.h" #include "geocoordinate.h" diff --git a/src/coordinates/scenecoordinate.cpp b/src/coordinates/scenecoordinate.cpp index 9b423cb..22d4483 100644 --- a/src/coordinates/scenecoordinate.cpp +++ b/src/coordinates/scenecoordinate.cpp @@ -27,7 +27,7 @@ #include #include "geocoordinate.h" -#include "map/osm.h" +#include "../map/osm.h" #include "scenecoordinate.h" diff --git a/src/ui/meetpeoplepanel.cpp b/src/ui/meetpeoplepanel.cpp index b30e767..5c0ada4 100644 --- a/src/ui/meetpeoplepanel.cpp +++ b/src/ui/meetpeoplepanel.cpp @@ -7,7 +7,7 @@ #include "personlistview.h" #include "imagebutton.h" #include "panelcommon.h" -#include "user/user.h" +#include "../user/user.h" #include "meetpeoplepanel.h" diff --git a/src/ui/messagepanel.cpp b/src/ui/messagepanel.cpp index d05cba8..0f77666 100644 --- a/src/ui/messagepanel.cpp +++ b/src/ui/messagepanel.cpp @@ -83,9 +83,8 @@ void MessagePanel::removeMessage() MessageListItem *item = dynamic_cast(m_messageListView->selectedItem()); - if (item) { + if (item) emit requestRemoveMessage(item->id()); - } } void MessagePanel::hideEvent(QHideEvent *event) diff --git a/src/ui/panelcommon.h b/src/ui/panelcommon.h index c3fcd64..c6b138a 100644 --- a/src/ui/panelcommon.h +++ b/src/ui/panelcommon.h @@ -26,7 +26,7 @@ #include -#include "common.h" +#include "../common.h" // Dragging settings const int DRAG_INIT_TIME = 1000; ///< How long buttons must be pressed to start drag mode diff --git a/src/ui/personlistitem.h b/src/ui/personlistitem.h index b5e4ae0..95213b8 100644 --- a/src/ui/personlistitem.h +++ b/src/ui/personlistitem.h @@ -22,7 +22,7 @@ #ifndef PERSONLISTITEM_H #define PERSONLISTITEM_H -#include "coordinates/geocoordinate.h" +#include "../coordinates/geocoordinate.h" #include "extendedlistitem.h" class User; diff --git a/src/user/user.h b/src/user/user.h index cfb45f1..3b2773c 100644 --- a/src/user/user.h +++ b/src/user/user.h @@ -26,7 +26,7 @@ #include #include -#include "coordinates/geocoordinate.h" +#include "../coordinates/geocoordinate.h" /** * @brief Class to store user information (applies to friends also) diff --git a/tests/stubs/extendedlistitem.h b/tests/stubs/extendedlistitem.h new file mode 100644 index 0000000..88c6044 --- /dev/null +++ b/tests/stubs/extendedlistitem.h @@ -0,0 +1,116 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Jussi Laitinen - jussi.laitinen@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef EXTENDEDLISTITEMSTUB_H +#define EXTENDEDLISTITEMSTUB_H + +#include "../../src/ui/personlistitem.h" +#include "listitem.h" +#include "../../src/coordinates/geocoordinate.h" +#include "stubbase.h" + +class ExtendedListItemStub : public StubBase +{ +public: + virtual void ExtendedListItemConstructor(QListWidget *parent, int type); + virtual void addSubItem(const QString &text, const QPixmap &icon = QPixmap()); + virtual void clearSubItems(); + virtual void setSelected(bool selected); + virtual void setSubitemTextWidth(int width); + virtual bool toggleSelection(); + +}; + +void ExtendedListItemStub::ExtendedListItemConstructor(QListWidget *parent, int type) +{ + Q_UNUSED(parent) + Q_UNUSED(type) +} + +void ExtendedListItemStub::addSubItem(const QString &text, const QPixmap &icon) +{ + QList params; + params.append(new Parameter(text)); + params.append(new Parameter(icon)); + stubMethodEntered("addSubItem", params); +} + +void ExtendedListItemStub::clearSubItems() +{ + stubMethodEntered("clearSubItems"); +} + +void ExtendedListItemStub::setSelected(bool selected) +{ + QList params; + params.append(new Parameter(selected)); + stubMethodEntered("setSelected", params); +} + +void ExtendedListItemStub::setSubitemTextWidth(int width) +{ + QList params; + params.append(new Parameter(width)); + stubMethodEntered("setSubitemTextWidth", params); +} + +QString ExtendedListItemStub::toggleSelection() +{ + stubMethodEntered("toggleSelection"); +} + +//Create a stub instance +ExtendedListItemStub defaultExtendedListItemStub; +ExtendedListItemStub *extendedListItemStub = &defaultExtendedListItemStub; + +ExtendedListItem::ExtendedListItem(QListWidget *parent, int type) + : ListItem(parent, type) +{ + extendedListItemStub->ExtendedListItemConstructor(parent, type); +} + +void ExtendedListItemStub::addSubItem(const QString &text, const QPixmap &icon) +{ + extendedListItemStub->addSubItem(text, icon); +} + +void ExtendedListItemStub::clearSubItems() +{ + extendedListItemStub->clearSubItems(); +} + +void ExtendedListItemStub::setSelected(bool selected) +{ + extendedListItemStub->setSelected(selected); +} + +void ExtendedListItemStub::setSubitemTextWidth(int width) +{ + extendedListItemStub->setSubitemTextWidth(width); +} + +void ExtendedListItemStub::toggleSelection() +{ + extendedListItemStub->toggleSelection(); +} + +#endif // EXTENDEDLISTITEMSTUB_H + diff --git a/tests/stubs/imagefetcherstub.h b/tests/stubs/imagefetcherstub.h index fdef03a..2c09c62 100644 --- a/tests/stubs/imagefetcherstub.h +++ b/tests/stubs/imagefetcherstub.h @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + #ifndef IMAGEFETCHERSTUB_H #define IMAGEFETCHERSTUB_H diff --git a/tests/stubs/listitem.h b/tests/stubs/listitem.h new file mode 100644 index 0000000..08fd6e9 --- /dev/null +++ b/tests/stubs/listitem.h @@ -0,0 +1,122 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Jussi Laitinen - jussi.laitinen@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef LISTITEMSTUB_H +#define LISTITEMSTUB_H + +#include "../../src/ui/personlistitem.h" +#include "../../src/coordinates/geocoordinate.h" +#include "stubbase.h" + +class ListViewStub : public StubBase +{ +public: + virtual void ListItemConstructor(QListWidget *parent = 0, int type = Type); + enum TextSize{TEXT_SIZE_NORMAL, TEXT_SIZE_SMALL}; + virtual void setImage(const QPixmap &image); + virtual void setTitle(const QString &name); + virtual void setSelected(bool selected) = 0; + virtual void setSize(const QSize &size); + virtual QString shortenText(const QString &text, int textWidth, TextSize textSize); + virtual QString title() const; + virtual bool toggleSelection() = 0; +}; + +void ListViewStub::ListItemConstructor(QListWidget *parent, int type) +{ + Q_UNUSED(parent) + Q_UNUSED(type) +} + +void ListViewStub::setImage(const QPixmap &image) +{ + QList params; + params.append(new Parameter(image)); + stubMethodEntered("setImage", params); +} + +void ListViewStub::setTitle(const QString &name) +{ + QList params; + params.append(new Parameter(name)); + stubMethodEntered("setTitle", params); +} + +void ListViewStub::setSize(const QSize &size) +{ + QList params; + params.append(new Parameter(size)); + stubMethodEntered("setSize", params); +} + +QString ListViewStub::shortenText(const QString &text, int textWidth, TextSize textSize) +{ + QList params; + params.append(new Parameter(text)); + params.append(new Parameter(textWidth)); + params.append(new Parameter(textSize)); + stubMethodEntered("shortenText", params); + + return stubReturnValue("shortenText"); +} + +QString ListViewStub::title() const +{ + return stubReturnValue("title"); +} + +//Create a stub instance +ListViewStub defaultListItemStub; +ListViewStub *listItemStub = &defaultListItemStub; + +ListItem::ListItem(QListWidget *parent, int type) + : QListWidgetItem(parent, type) +{ + listItemStub->ListItemConstructor(parent, type); +} + +void ListViewStub::setImage(const QPixmap &image) +{ + listItemStub->setImage(image); +} + +void ListViewStub::setTitle(const QString &name) +{ + listItemStub->setTitle(name); +} + +void ListViewStub::setSize(const QSize &size) +{ + listItemStub->setSize(size); +} + +QString ListViewStub::shortenText(const QString &text, int textWidth, TextSize textSize) +{ + return listItemStub->shortenText(text, textWidth, textSize); +} + +QString ListViewStub::title() +{ + return listItemStub->title(); +} + +#endif // LISTITEMSTUB_H + diff --git a/tests/stubs/listview.h b/tests/stubs/listview.h new file mode 100644 index 0000000..cf44964 --- /dev/null +++ b/tests/stubs/listview.h @@ -0,0 +1,274 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Jussi Laitinen - jussi.laitinen@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef LISTVIEWSTUB_H +#define LISTVIEWSTUB_H + +#include "../../src/ui/personlistview.h" +#include "listitem.h" +#include "stubbase.h" + +class ListViewStub : public StubBase +{ +public: + virtual void ListViewConstructor(QWidget *parent = 0); + virtual void addListItem(const QString &key, ListItem *item); + virtual void addListItemToView(ListItem *item); + virtual void clearUnused(const QStringList &itemIDs); + virtual void clearFilter(); + virtual void clearItemSelection(); + virtual void clearList(); + virtual bool contains(const QString &userID); + virtual void filter(const QList &itemIDs); + virtual void filter(const QString &pattern); + virtual ListItem *takeListItemFromView(const QString &itemID); + virtual ListItem *listItem(const QString &itemID); + virtual ListItem *listItemAt(int index); + virtual void prependListItem(const QString &key, ListItem *item); + virtual void removeLastItem(); + virtual ListItem *selectedItem(); + virtual void setSelectedItem(ListItem *item); + +protected: + virtual bool listItemClicked(ListItem *clickedItem); +}; + +ListViewStub::ListViewConstructor(QWidget *parent) +{ + Q_UNUSED(parent) +} + +void ListViewStub::addListItem(const QString &key, ListItem *item) +{ + QList params; + params.append(new Parameter(key)); + params.append(new Parameter(item)); + stubMethodEntered("addListItem", params); +} + +void ListViewStub::addListItemToView(ListItem *item) +{ + QList params; + params.append(new Parameter(item)); + stubMethodEntered("addListItemToView", params); +} + +void ListViewStub::clearUnused(const QStringList &itemIDs) +{ + QList params; + params.append(new Parameter(itemIDs)); + stubMethodEntered("clearUnused", params); +} + +void ListViewStub::clearFilter() +{ + stubMethodEntered("clearFilter"); +} + +void ListViewStub::clearItemSelection() +{ + stubMethodEntered("clearItemSelection"); +} + +void ListViewStub::clearList() +{ + stubMethodEntered("clearList"); +} + +bool ListViewStub::contains(const QString &userID) +{ + QList params; + params.append(new Parameter(userID)); + stubMethodEntered("contains", params); + + return stubReturnValue("contains"); +} + +void ListViewStub::filter(const QList &itemIDs) +{ + QList params; + params.append(new Parameter &>(itemIDs)); + stubMethodEntered("filter", params); +} + +void ListViewStub::filter(const QString &pattern) +{ + QList params; + params.append(new Parameter(pattern)); + stubMethodEntered("filter", params); +} + +ListItem *ListViewStub::takeListItemFromView(const QString &itemID) +{ + QList params; + params.append(new Parameter(itemID)); + stubMethodEntered("takeListItemFromView", params); + + return stubReturnValue("takeListItemFromView"); +} + +ListItem *ListViewStub::listItem(const QString &itemID) +{ + QList params; + params.append(new Parameter(itemID)); + stubMethodEntered("listItem", params); + + return stubReturnValue("listItem"); +} + +ListItem *ListViewStub::listItemAt(int index) +{ + QList params; + params.append(new Parameter(index)); + stubMethodEntered("listItemAt", params); + + return stubReturnValue("listItemAt"); +} + +void ListViewStub::prependListItem(const QString &key, ListItem *item) +{ + QList params; + params.append(new Parameter(key)); + params.append(new Parameter(item)); + stubMethodEntered("prependListItem", params); +} + +void ListViewStub::removeLastItem() +{ + stubMethodEntered("removeLastItem"); +} + +ListItem *ListViewStub::selectedItem() +{ + return stubReturnValue("selectedItem"); +} + +void ListViewStub::setSelectedItem(ListItem *item) +{ + QList params; + params.append(new Parameter(item)); + stubMethodEntered("setSelectedItem", params); +} + +bool ListViewStub::listItemClicked(ListItem *clickedItem) +{ + QList params; + params.append(new Parameter(clickedItem)); + stubMethodEntered("listItemClicked", params); + + return stubReturnValue("listItemClicked"); +} + +ListViewStub defaultListViewStub; +ListViewStub *listViewStub = &defaultListViewStub; + +ListView::ListView(QWidget *parent) + : QListWidget(parent) +{ + listViewStub->ListViewConstructor(parent); +} + +void ListView::addListItem(const QString &key, ListItem *item) +{ + listViewStub->addListItem(key, item); +} + +void ListView::addListItemToView(ListItem *item) +{ + listViewStub->addListItemToView(item); +} + +void ListView::clearUnused(const QStringList &itemIDs) +{ + listViewStub->clearUnused(itemIDs); +} + +void ListView::clearFilter() +{ + listViewStub->clearFilter(); +} + +void ListView::clearItemSelection() +{ + listViewStub->clearItemSelection(); +} + +void ListView::clearList() +{ + listViewStub->clearList(); +} + +void ListView::contains(const QString &userID) +{ + listViewStub->contains(userID); +} + +void ListView::filter(const QList &itemIDs) +{ + listViewStub->filter(itemIDs); +} + +void ListView::filter(const QString &pattern) +{ + listViewStub->filter(pattern); +} + +ListItem *ListView::takeListItemFromView(const QString &itemID) +{ + return listViewStub->takeListItemFromView(itemID); +} + +ListItem *ListView::listItem(const QString &itemID) +{ + return listViewStub->listItem(itemID); +} + +ListItem *ListView::listItemAt(int index) +{ + return listViewStub->listItemAt(index); +} + +void ListView::prependListItem(const QString &key, ListItem *item) +{ + listViewStub->prependListItem(key, item); +} + +void ListView::removeLastItem() +{ + listViewStub->removeLastItem(); +} + +ListItem *ListView::selectedItem() +{ + return listViewStub->selectedItem(); +} + +void ListView::setSelectedItem(ListItem *item) +{ + listViewStub->setSelectedItem(item); +} + +bool ListView::listItemClicked(ListItem *clickedItem) +{ + listViewStub->listItemClicked(clickedItem); +} + +#endif // LISTVIEWSTUB_H diff --git a/tests/stubs/personlistitem.h b/tests/stubs/personlistitem.h new file mode 100644 index 0000000..1070b1f --- /dev/null +++ b/tests/stubs/personlistitem.h @@ -0,0 +1,111 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Jussi Laitinen - jussi.laitinen@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef PERSONLISTITEMSTUB_H +#define PERSONLISTITEMSTUB_H + +#include "../../src/ui/personlistitem.h" +#include "../../src/coordinates/geocoordinate.h" +#include "stubbase.h" + +class PersonListItemStub : public StubBase +{ +public: + virtual void PersonListItemConstructor(); + virtual GeoCoordinate coordinates() const; + virtual QString facebookId() const; + virtual void setAvatarImage(const QPixmap &image); + virtual void setCoordinates(const GeoCoordinate &coordinates); + virtual void setPersonData(const User &user); +}; + +void PersonListItemStub::PersonListItemConstructor() +{ + +} + +GeoCoordinate PersonListItemStub::coordinates() const +{ + return stubReturnValue("coordinates"); +} + +QString PersonListItemStub::facebookId() const +{ + return stubReturnValue("facebookId"); +} + +void PersonListItemStub::setAvatarImage(const QPixmap &image) +{ + QList params; + params.append(new Parameter(image)); + stubMethodEntered("setAvatarImage", params); +} + +void PersonListItemStub::setCoordinates(const GeoCoordinate &coordinates) +{ + QList params; + params.append(new Parameter(coordinates)); + stubMethodEntered("setCoordinates", params); +} + +void PersonListItemStub::setPersonData(const User &user) +{ + QList params; + params.append(new Parameter(user)); + stubMethodEntered("setUserData", params); +} + +//Create a stub instance +PersonListItemStub defaultPersonListItemStub; +PersonListItemStub *personListItemStub = &defaultPersonListItemStub; + +PersonListItem::PersonListItem() + : ExtendedListItem() +{ + personListItemStub->PersonListItemConstructor(); +} + +GeoCoordinate PersonListItem::coordinates() const +{ + return personListItemStub->coordinates(); +} + +GeoCoordinate PersonListItem::facebookId() const +{ + return personListItemStub->facebookId(); +} + +void PersonListItem::setAvatarImage(const QPixmap &image) +{ + personListItemStub->setAvatarImage(image); +} + +void PersonListItem::setCoordinates(const GeoCoordinate &coordinates) +{ + personListItemStub->setCoordinates(coordinates); +} + +void PersonListItem::setPersonData(const User &user) +{ + personListItemStub->setPersonData(user); +} + +#endif // PERSONLISTITEMSTUB_H diff --git a/tests/stubs/personlistview.h b/tests/stubs/personlistview.h new file mode 100644 index 0000000..627d47e --- /dev/null +++ b/tests/stubs/personlistview.h @@ -0,0 +1,65 @@ +/* + Situare - A location system for Facebook + Copyright (C) 2010 Ixonos Plc. Authors: + + Jussi Laitinen - jussi.laitinen@ixonos.com + + Situare is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Situare is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Situare; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef PERSONLISTVIEWSTUB_H +#define PERSONLISTVIEWSTUB_H + +#include "../../src/ui/personlistview.h" +#include "listview.h" +#include "stubbase.h" + +class PersonListViewStub : public StubBase +{ +public: + virtual void PersonListViewConstructor(QWidget *parent = 0); + virtual bool listItemClicked(ListItem *item); +}; + +void PersonListViewStub::PersonListViewConstructor(QWidget *parent) +{ + Q_UNUSED(parent) +} + +bool PersonListViewStub::listItemClicked(ListItem *item) +{ + QList params; + params.append(new Parameter(item)); + stubMethodEntered("listItemClicked", params); + + return stubReturnValue("listItemClicked"); +} + +//Create a stub instance +PersonListViewStub defaultPersonListViewStub; +PersonListViewStub *personListViewStub = &defaultPersonListViewStub; + +PersonListView::PersonListView(QWidget *parent) + : ListView(parent) +{ + personListViewStub->PersonListViewConstructor(parent); +} + +bool PersonListView::listItemClicked(ListItem *item) +{ + personListViewStub->listItemClicked(item); +} + +#endif // PERSONLISTVIEWSTUB_H diff --git a/tests/stubs/stubs.pro b/tests/stubs/stubs.pro index 9095d1f..f88357c 100644 --- a/tests/stubs/stubs.pro +++ b/tests/stubs/stubs.pro @@ -3,7 +3,12 @@ HEADERS += \ methodcall.h \ parameter.h \ networkaccessmanagerstub.h \ - imagefetcherstub.h + imagefetcherstub.h \ + personlistitem.h \ + personlistview.h \ + listview.h \ + listitem.h \ + extendedlistitem.h SOURCES += \ stubbase.cpp diff --git a/tests/ui/meetpeoplepanel/meetpeoplepanel.pro b/tests/ui/meetpeoplepanel/meetpeoplepanel.pro index b195c37..9cb7d4c 100644 --- a/tests/ui/meetpeoplepanel/meetpeoplepanel.pro +++ b/tests/ui/meetpeoplepanel/meetpeoplepanel.pro @@ -1,10 +1,36 @@ CONFIG += qtestlib DEFINES += QT_NO_DEBUG_OUTPUT -INCLUDEPATH += . \ - ../../../src/ -HEADERS += ../../../src/ui/meetpeoplepanel.h \ - ../../../src/ui/panelbase.h -SOURCES += ../../../src/ui/meetpeoplepanel.cpp \ - ../../../src/ui/panelbase.cpp \ - testmeetpeoplepanel.cpp -RESOURCES += ../../../images.qrc + +INCLUDEPATH += ../../stubs/ + +HEADERS += \ + ../../stubs/personlistview.h \ + ../../stubs/personlistitem.h \ + ../../stubs/listview.h \ + ../../stubs/listitem.h \ + ../../stubs/extendedlistitem.h \ + ../../../src/ui/extendedlistitemdelegate.h \ + ../../../src/ui/listitemdelegate.h \ + ../../../src/ui/meetpeoplepanel.h \ + ../../../src/coordinates/geocoordinate.h \ + ../../../src/coordinates/scenecoordinate.h \ + ../../../src/ui/imagebutton.h \ + ../../../src/ui/panelbase.h \ + ../../../src/ui/panelcommon.h \ + ../../../src/ui/listcommon.h \ + ../../../src/ui/extendedlistitemstore.h \ + ../../../src/common.h \ + ../../../src/map/osm.h \ + ../../../src/user/user.h + +SOURCES += \ + ../../../src/ui/meetpeoplepanel.cpp \ + ../../../src/user/user.cpp \ + ../../../src/ui/extendedlistitemdelegate.cpp \ + ../../../src/ui/listitemdelegate.cpp \ + ../../../src/ui/imagebutton.cpp \ + ../../../src/ui/panelbase.cpp \ + ../../../src/coordinates/geocoordinate.cpp \ + ../../../src/coordinates/scenecoordinate.cpp \ + ../../../src/ui/extendedlistitemstore.cpp \ + testmeetpeoplepanel.cpp diff --git a/tests/ui/meetpeoplepanel/testmeetpeoplepanel.cpp b/tests/ui/meetpeoplepanel/testmeetpeoplepanel.cpp index 58203dd..3f8cf08 100644 --- a/tests/ui/meetpeoplepanel/testmeetpeoplepanel.cpp +++ b/tests/ui/meetpeoplepanel/testmeetpeoplepanel.cpp @@ -22,29 +22,29 @@ #include #include -#include "ui/meetpeoplepanel.h" +#include "../../../src/ui/meetpeoplepanel.h" class TestMeetPeoplePanel: public QObject { Q_OBJECT private slots: - void cleanupTestCase(); - void initTestCase(); + void cleanup(); + void init(); private: MeetPeoplePanel *m_meetPeoplePanel; }; -void TestMeetPeoplePanel::cleanupTestCase() +void TestMeetPeoplePanel::cleanup() { delete m_meetPeoplePanel; } -void TestMeetPeoplePanel::initTestCase() +void TestMeetPeoplePanel::init() { m_meetPeoplePanel = new MeetPeoplePanel(); - QVERIFY(m_meetPeoplePanel != 0); + QVERIFY(m_meetPeoplePanel); } QTEST_MAIN(TestMeetPeoplePanel) diff --git a/tests/ui/messagedialog/testmessagedialog.cpp b/tests/ui/messagedialog/testmessagedialog.cpp index 25d51a0..a3afcef 100644 --- a/tests/ui/messagedialog/testmessagedialog.cpp +++ b/tests/ui/messagedialog/testmessagedialog.cpp @@ -32,7 +32,6 @@ private slots: void cleanup(); void init(); void input(); - void sendButtonPressed(); private: QHash m_tags;