remove global QApplication *application

.. it is available from the macro qApp anyway.
This commit is contained in:
Mark Liversedge
2014-08-07 22:25:03 +01:00
parent 512eab3aea
commit c9bc417635
3 changed files with 3 additions and 4 deletions

View File

@@ -155,11 +155,12 @@ HomeWindow::HomeWindow(Context *context, QString name, QString /* windowtitle */
connect(titleEdit, SIGNAL(textChanged(const QString&)), SLOT(titleChanged()));
installEventFilter(this);
application->installEventFilter(this);
qApp->installEventFilter(this);
}
HomeWindow::~HomeWindow()
{
qApp->removeEventFilter(this);
}
void

View File

@@ -40,7 +40,6 @@
#include "QtMacSegmentedButton.h"
#endif
extern QApplication *application;
class ChartBar;
class HomeWindow : public GcWindow

View File

@@ -58,7 +58,6 @@ void nostderr(QString dir)
#include <QStandardPaths>
#endif
QApplication *application;
bool restarting = false;
// root directory shared by all
@@ -142,7 +141,7 @@ main(int argc, char *argv[])
#endif
// create the application -- only ever ONE regardless of restarts
application = new QApplication(argc, argv);
QApplication *application = new QApplication(argc, argv);
#ifdef Q_OS_MAC
// get an autorelease pool setup