[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [okular/frameworks] ui: Re-enable busyPixmap, so that tests don't crash
From: Fabio D'Urso <fabiodurso () hotmail ! it>
Date: 2014-08-23 20:04:37
Message-ID: E1XLHYD-0002Il-L9 () scm ! kde ! org
[Download RAW message or body]
Git commit 12810d361dfb8701463a851da266e376b4de6302 by Fabio D'Urso.
Committed on 23/08/2014 at 15:57.
Pushed by fabiod into branch 'frameworks'.
Re-enable busyPixmap, so that tests don't crash
The dummy pixmap was being created before the QGuiApplication
M +3 -5 ui/pagepainter.cpp
http://commits.kde.org/okular/12810d361dfb8701463a851da266e376b4de6302
diff --git a/ui/pagepainter.cpp b/ui/pagepainter.cpp
index 9273420..b325f58 100644
--- a/ui/pagepainter.cpp
+++ b/ui/pagepainter.cpp
@@ -36,9 +36,7 @@
#include "settings_core.h"
#include "core/document_p.h"
-#pragma message("KF5: enable busyPixmap again")
-QPixmap *busyPixmap = new QPixmap();
-//K_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon("okular", \
KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) ) \
+Q_GLOBAL_STATIC_WITH_ARGS( QPixmap, busyPixmap, ( KIconLoader::global()->loadIcon("okular", \
KIconLoader::NoGroup, 32, KIconLoader::DefaultState, QStringList(), 0, true) ) )
#define TEXTANNOTATION_ICONSIZE 24
@@ -106,9 +104,9 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
(scaledWidth != pixmap->width() && pixmapPixels > 6000000L) )
{
// draw something on the blank page: the okular icon or a cross (as a fallback)
- if ( !busyPixmap->isNull() )
+ if ( !busyPixmap()->isNull() )
{
- destPainter->drawPixmap( QPoint( 10, 10 ), *busyPixmap );
+ destPainter->drawPixmap( QPoint( 10, 10 ), *busyPixmap() );
}
else
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic