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:
@@ -3,6 +3,7 @@
|
|||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QTextDocument>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QVariant>
|
#include <QVariant>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
@@ -853,5 +854,5 @@ NM_ACTION_(cmd_output) {
|
|||||||
|
|
||||||
return quiet
|
return quiet
|
||||||
? nm_action_result_silent()
|
? 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
|
// ConfirmationDialogFactory::showOKDialog shows an dialog box with an OK
|
||||||
// button, and should only be called from the main thread (or a signal handler).
|
// 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);
|
static void (*ConfirmationDialogFactory_showOKDialog)(QString const& title, QString const& body);
|
||||||
|
|
||||||
MainWindowController *(*MainWindowController_sharedInstance)();
|
MainWindowController *(*MainWindowController_sharedInstance)();
|
||||||
|
|||||||
Reference in New Issue
Block a user