1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Description: keep a set QtMessageHandler across Plugin Creator runs
Author: mirabilos <tg@debian.org>
Forwarded: no
--- a/libmscore/mscore.cpp
+++ b/libmscore/mscore.cpp
@@ -58,6 +58,8 @@
namespace Ms {
+QtMessageHandler MScore::msgHandler = 0;
+
bool MScore::debugMode;
bool MScore::testMode = false;
bool MScore::saveTemplateMode = false;
--- a/libmscore/mscore.h
+++ b/libmscore/mscore.h
@@ -466,6 +466,8 @@ class MScore : public QObject {
static qreal horizontalPageGapEven;
static qreal horizontalPageGapOdd;
+ static QtMessageHandler msgHandler;
+
#ifdef SCRIPT_INTERFACE
static QQmlEngine* qml();
#endif
--- a/mscore/musescore.cpp
+++ b/mscore/musescore.cpp
@@ -5768,6 +5768,7 @@ int main(int argc, char* av[])
{
QApplication::setDesktopSettingsAware(true);
#if defined(QT_DEBUG) && defined(Q_OS_WIN)
+ MScore::msgHandler = mscoreMessageHandler;
qInstallMessageHandler(mscoreMessageHandler);
#endif
--- a/mscore/pluginCreator.cpp
+++ b/mscore/pluginCreator.cpp
@@ -382,7 +382,7 @@ void PluginCreator::closePlugin()
view->close();
if (dock)
dock->close();
- qInstallMessageHandler(0);
+ qInstallMessageHandler(MScore::msgHandler);
raise();
}
|