Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU3] Backend log fix #11175

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4097,35 +4097,11 @@ static bool processNonGui(const QStringList& argv)
// Message handler
//---------------------------------------------------------

#if defined(QT_DEBUG) && defined(Q_OS_WIN)
static void mscoreMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString& msg)
static void mscoreMessageHandler(QtMsgType, const QMessageLogContext&, const QString&)
{
QTextStream err(stderr);
QByteArray localMsg = msg.toLocal8Bit();

switch (type) {
case QtInfoMsg:
err << "Info: " << localMsg.constData() << " (" << context.file << ":" << context.line << ", " << context.function << ")" << endl;
break;
case QtDebugMsg:
err << "Debug: " << localMsg.constData() << " (" << context.file << ":" << context.line << ", " << context.function << ")" << endl;
break;
case QtWarningMsg:
err << "Warning: " << localMsg.constData() << " (" << context.file << ":" << context.line << ", " << context.function << ")" <<
endl;
break;
case QtCriticalMsg: // same as QtSystemMsg
err << "Critical: " << localMsg.constData() << " (" << context.file << ":" << context.line << ", " << context.function << ")" <<
endl;
break;
case QtFatalMsg: // set your breakpoint here, if you want to catch the abort
err << "Fatal: " << localMsg.constData() << " (" << context.file << ":" << context.line << ", " << context.function << ")" << endl;
abort();
}
//! NOTE: disabled for backend
}

#endif

//---------------------------------------------------------
// synthesizerFactory
// create and initialize the master synthesizer
Expand Down Expand Up @@ -8201,9 +8177,8 @@ int runApplication(int& argc, char** av)
#endif
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#if defined(QT_DEBUG) && defined(Q_OS_WIN)

qInstallMessageHandler(mscoreMessageHandler);
#endif

#ifdef Q_OS_WIN
if (!qEnvironmentVariableIsSet("QT_OPENGL_BUGLIST")) {
Expand Down