1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ 2 3 /* 4 Rosegarden 5 A MIDI and audio sequencer and musical notation editor. 6 Copyright 2000-2021 the Rosegarden development team. 7 8 Other copyrights also apply to some parts of this work. Please 9 see the AUTHORS file and individual file headers for details. 10 11 This program is free software; you can redistribute it and/or 12 modify it under the terms of the GNU General Public License as 13 published by the Free Software Foundation; either version 2 of the 14 License, or (at your option) any later version. See the file 15 COPYING included with this distribution for more information. 16 */ 17 18 #define RG_MODULE_STRING "[DecoyAction]" 19 20 #include "DecoyAction.h" 21 22 #include "misc/Debug.h" 23 24 namespace Rosegarden { 25 26 27 DecoyAction * 28 DecoyAction::m_instance = nullptr; 29 30 DecoyAction * getInstance()31DecoyAction::getInstance() 32 { 33 if (!m_instance) m_instance = new DecoyAction(); 34 RG_WARNING << "getInstance(): WARNING: Using decoy action"; 35 return m_instance; 36 } 37 ~DecoyAction()38DecoyAction::~DecoyAction() 39 { 40 RG_WARNING << "dtor: ERROR: Deleting the global DecoyAction -- some class has looked up an action that did not exist, and deleted it -- a crash is highly likely now"; 41 } 42 DecoyAction()43DecoyAction::DecoyAction() : QAction("Decoy Action", nullptr) { } 44 45 46 } 47