mirror of
https://github.com/pgaskin/NickelMenu
synced 2024-09-28 15:20:35 +02:00
ConfirmationDialog uses Qt::RichText for the body text, which causes line breaks to be collapsed since the text is rendered as HTML. This can be fixed by using Qt::convertFromPlainText with Qt::WhiteSpacePre.
This commit is contained in:
parent
437e248c47
commit
a25a821e75
2 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <QScreen>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QTextDocument>
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
|
@ -853,5 +854,5 @@ NM_ACTION_(cmd_output) {
|
|||
|
||||
return quiet
|
||||
? nm_action_result_silent()
|
||||
: nm_action_result_msg("%s", qPrintable(out));
|
||||
: nm_action_result_msg("%s", qPrintable(Qt::convertFromPlainText(out, Qt::WhiteSpacePre)));
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ static QAction* (*AbstractNickelMenuController_createAction)(void*, QMenu* menu,
|
|||
|
||||
// ConfirmationDialogFactory::showOKDialog shows an dialog box with an OK
|
||||
// button, and should only be called from the main thread (or a signal handler).
|
||||
// Note that ConfirmationDialog uses Qt::RichText for the body.
|
||||
static void (*ConfirmationDialogFactory_showOKDialog)(QString const& title, QString const& body);
|
||||
|
||||
MainWindowController *(*MainWindowController_sharedInstance)();
|
||||
|
|
Loading…
Reference in a new issue