summaryrefslogtreecommitdiff
path: root/src/tests/mainview_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/mainview_test.cpp')
-rw-r--r--src/tests/mainview_test.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/tests/mainview_test.cpp b/src/tests/mainview_test.cpp
index 41ded862..30d4e7dd 100644
--- a/src/tests/mainview_test.cpp
+++ b/src/tests/mainview_test.cpp
@@ -27,27 +27,14 @@
#include <qtest_kde.h>
-#include <QtTest>
#include <QtCore>
#include <QtGui>
+#include <QtTest>
#include "mainview.h"
#include "webview.h"
-// Subclass that exposes the protected functions.
-class SubMainView : public MainView
-{
-public:
- SubMainView(MainWindow *parent) : MainView(parent) {};
-
- void call_resizeEvent(QResizeEvent *event)
- { return SubMainView::resizeEvent(event); }
-};
-
-// -----------------------------------------------------------
-
-
class MainViewTest : public QObject
{
Q_OBJECT
@@ -88,8 +75,8 @@ private slots:
void currentChanged();
private:
- MainWindow *mainWindow;
- SubMainView *mainView;
+ MainWindow *window;
+ MainView *view;
};
@@ -100,16 +87,15 @@ private:
// It is only called once.
void MainViewTest::initTestCase()
{
-// mainWindow = new MainWindow;
-// mainView = new SubMainView(mainWindow);
+ window = new MainWindow;
+ view = window->mainView();
}
// This will be called after the last test function is executed.
// It is only called once.
void MainViewTest::cleanupTestCase()
{
-// delete mainView;
-// delete mainWindow;
+ delete window;
}
// -------------------------------------------