Skip to content

Commit 92f9149

Browse files
committed
Show configuration warnings unconditionally in the doxywizard
Show the configuration warnings in the doxywizard unconditionally so there is no need to use the `--debug` option
1 parent 736557c commit 92f9149

File tree

1 file changed

+11
-38
lines changed

1 file changed

+11
-38
lines changed

addon/doxywizard/config_msg.cpp

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,9 @@ void config_err(const char *fmt, ...)
1212
msg.append(QString::fromLatin1(fmt));
1313
va_list args;
1414
va_start(args, fmt);
15-
if (DoxygenWizard::debugFlag)
16-
{
17-
char debugOut[1000]; // this size should be sufficient
18-
vsnprintf(debugOut, 1000,qPrintable(msg), args);
19-
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
20-
}
21-
else
22-
{
23-
vfprintf(stderr, qPrintable(msg), args);
24-
}
15+
char debugOut[1000]; // this size should be sufficient
16+
vsnprintf(debugOut, 1000,qPrintable(msg), args);
17+
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
2518
va_end(args);
2619
}
2720

@@ -32,16 +25,9 @@ void config_term(const char *fmt, ...)
3225
msg.append(QString::fromLatin1(fmt));
3326
va_list args;
3427
va_start(args, fmt);
35-
if (DoxygenWizard::debugFlag)
36-
{
37-
char debugOut[1000]; // this size should be sufficient
38-
vsnprintf(debugOut, 1000,qPrintable(msg), args);
39-
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
40-
}
41-
else
42-
{
43-
vfprintf(stderr, qPrintable(msg), args);
44-
}
28+
char debugOut[1000]; // this size should be sufficient
29+
vsnprintf(debugOut, 1000,qPrintable(msg), args);
30+
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
4531
va_end(args);
4632
exit(1);
4733
}
@@ -53,31 +39,18 @@ void config_warn(const char *fmt, ...)
5339
msg.append(QString::fromLatin1(fmt));
5440
va_list args;
5541
va_start(args, fmt);
56-
if (DoxygenWizard::debugFlag)
57-
{
58-
char debugOut[1000];
59-
vsnprintf(debugOut, 1000,qPrintable(msg), args);
60-
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
61-
}
62-
else
63-
{
64-
vfprintf(stderr, qPrintable(msg), args);
65-
}
42+
char debugOut[1000];
43+
vsnprintf(debugOut, 1000,qPrintable(msg), args);
44+
MainWindow::instance().outputLogText(QString::fromLatin1(debugOut));
6645
va_end(args);
6746
}
6847

6948
void config_open()
7049
{
71-
if (DoxygenWizard::debugFlag)
72-
{
73-
MainWindow::instance().outputLogStart();
74-
}
50+
MainWindow::instance().outputLogStart();
7551
}
7652

7753
void config_finish()
7854
{
79-
if (DoxygenWizard::debugFlag)
80-
{
81-
MainWindow::instance().outputLogFinish();
82-
}
55+
MainWindow::instance().outputLogFinish();
8356
}

0 commit comments

Comments
 (0)