summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio D'Urso <fabiodurso@hotmail.it>2014-08-23 15:57:25 (GMT)
committerFabio D'Urso <fabiodurso@hotmail.it>2014-08-23 19:40:01 (GMT)
commit12810d361dfb8701463a851da266e376b4de6302 (patch)
tree156bd23d1a176137c4598c1fd762fa8e6872cf77
parent4298b6ebd5a23712d4c282c7f45ae4df2487a1a7 (diff)
Re-enable busyPixmap, so that tests don't crash
The dummy pixmap was being created before the QGuiApplication
-rw-r--r--ui/pagepainter.cpp8
1 files changed, 3 insertions, 5 deletions
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
{