Commit c2f1d6e5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify

parent 56981229
Pipeline #31693 passed with stage
in 42 minutes and 3 seconds
......@@ -25,12 +25,7 @@ using namespace Akonadi;
class Q_DECL_HIDDEN StandardContactFormatter::Private
{
public:
Private()
: displayQRcode(true)
{
}
bool displayQRcode;
bool displayQRcode = true;
};
StandardContactFormatter::StandardContactFormatter()
......
......@@ -89,12 +89,12 @@ void TextBrowser::contextMenuEvent(QContextMenuEvent *event)
if (text.startsWith(QChar(0xFFFC))) {
QTextCharFormat charFormat = curs.charFormat();
if (charFormat.isImageFormat()) {
QTextImageFormat imageFormat = charFormat.toImageFormat();
QString imageName = imageFormat.name();
QVariant imageResource = document()->resource(QTextDocument::ImageResource,
const QTextImageFormat imageFormat = charFormat.toImageFormat();
const QString imageName = imageFormat.name();
const QVariant imageResource = document()->resource(QTextDocument::ImageResource,
QUrl(imageName));
QPixmap pix = imageResource.value<QPixmap>();
const QPixmap pix = imageResource.value<QPixmap>();
if (!pix.isNull()) {
// There may be other images (e.g. contact type icons) that
// there is no point in copying.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment