Skip to content

Commit

Permalink
Remove unnecessary MainWindow class
Browse files Browse the repository at this point in the history
  • Loading branch information
pvuorela committed May 4, 2016
1 parent 2dbcaed commit 0a1bb5d
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 101 deletions.
6 changes: 2 additions & 4 deletions fingerterm.pro
Expand Up @@ -30,17 +30,15 @@ HEADERS += \
textrender.h \
version.h \
util.h \
keyloader.h \
mainwindow.h
keyloader.h

SOURCES += \
main.cpp \
terminal.cpp \
textrender.cpp \
ptyiface.cpp \
util.cpp \
keyloader.cpp \
mainwindow.cpp
keyloader.cpp

OTHER_FILES += \
qml/Main.qml \
Expand Down
4 changes: 2 additions & 2 deletions main.cpp
Expand Up @@ -21,6 +21,7 @@

#include <QtGui>
#include <QtQml>
#include <QQuickView>

extern "C" {
#include <pty.h>
Expand All @@ -30,7 +31,6 @@ extern "C" {
#include <sys/types.h>
}

#include "mainwindow.h"
#include "ptyiface.h"
#include "terminal.h"
#include "textrender.h"
Expand Down Expand Up @@ -102,7 +102,7 @@ int main(int argc, char *argv[])
}

qmlRegisterType<TextRender>("TextRender",1,0,"TextRender");
MainWindow view;
QQuickView view;

Terminal term;
Util util(settings);
Expand Down
47 changes: 0 additions & 47 deletions mainwindow.cpp

This file was deleted.

43 changes: 0 additions & 43 deletions mainwindow.h

This file was deleted.

2 changes: 1 addition & 1 deletion qml/Main.qml
Expand Up @@ -162,7 +162,7 @@ Item {
property bool visibleSetting: true
x: 0
y: parent.height-vkb.height
visible: windowHasFocus && visibleSetting
visible: page.activeFocus && visibleSetting
}

// area that handles gestures/select/scroll modes and vkb-keypresses
Expand Down
3 changes: 1 addition & 2 deletions util.cpp
Expand Up @@ -25,7 +25,6 @@
#include <QQuickView>
#include <QDebug>

#include "mainwindow.h"
#include "terminal.h"
#include "util.h"
#include "textrender.h"
Expand All @@ -52,7 +51,7 @@ Util::~Util()

void Util::setWindow(QQuickView* win)
{
iWindow = dynamic_cast<MainWindow*>(win);
iWindow = win;
if(!iWindow)
qFatal("invalid main window");
}
Expand Down
3 changes: 1 addition & 2 deletions util.h
Expand Up @@ -23,7 +23,6 @@
#include <QtCore>

class Terminal;
class MainWindow;
class TextRender;
class QQuickView;

Expand Down Expand Up @@ -101,7 +100,7 @@ public slots:
QString iCurrentWinTitle;

QSettings* iSettings;
MainWindow* iWindow;
QQuickView* iWindow;
Terminal* iTerm;
TextRender* iRenderer;
};
Expand Down

0 comments on commit 0a1bb5d

Please sign in to comment.