NOISSUE Add Konami Code
Fun little thing for hiding extra debug options in the future.
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
#include <FolderInstanceProvider.h>
|
||||
#include <InstanceImportTask.h>
|
||||
#include "UpdateController.h"
|
||||
#include "KonamiCode.h"
|
||||
|
||||
// WHY: to hold the pre-translation strings together with the T pointer, so it can be retranslated without a lot of ugly code
|
||||
template <typename T>
|
||||
@@ -631,6 +632,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow
|
||||
connect(q, SIGNAL(activated()), qApp, SLOT(quit()));
|
||||
}
|
||||
|
||||
// Konami Code
|
||||
{
|
||||
secretEventFilter = new KonamiCode(this);
|
||||
connect(secretEventFilter, &KonamiCode::triggered, this, &MainWindow::konamiTriggered);
|
||||
}
|
||||
|
||||
// Add the news label to the news toolbar.
|
||||
{
|
||||
m_newsChecker.reset(new NewsChecker(BuildConfig.NEWS_RSS_URL));
|
||||
@@ -806,6 +813,11 @@ MainWindow::~MainWindow()
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::konamiTriggered()
|
||||
{
|
||||
qDebug() << "Super Secret Mode ACTIVATED!";
|
||||
}
|
||||
|
||||
void MainWindow::skinJobFinished()
|
||||
{
|
||||
activeAccountChanged();
|
||||
@@ -1064,6 +1076,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *ev)
|
||||
{
|
||||
if (ev->type() == QEvent::KeyPress)
|
||||
{
|
||||
secretEventFilter->input(ev);
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(ev);
|
||||
switch (keyEvent->key())
|
||||
{
|
||||
|
Reference in New Issue
Block a user