Hello community,

here is the log from the commit of package okular for openSUSE:Factory checked 
in at 2014-05-22 06:50:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/okular (Old)
 and      /work/SRC/openSUSE:Factory/.okular.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "okular"

Changes:
--------
--- /work/SRC/openSUSE:Factory/okular/okular.changes    2014-05-02 
14:01:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.okular.new/okular.changes       2014-05-22 
06:51:06.000000000 +0200
@@ -1,0 +2,7 @@
+Fri May  9 16:49:07 UTC 2014 - [email protected]
+
+- Update to 4.13.1
+   * KDE 4.13.1  bug fix release
+   * See http://www.kde.org/announcements/announce-4.13.1.php
+
+-------------------------------------------------------------------

Old:
----
  okular-4.13.0.tar.xz

New:
----
  okular-4.13.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ okular.spec ++++++
--- /var/tmp/diff_new_pack.AlydfR/_old  2014-05-22 06:51:07.000000000 +0200
+++ /var/tmp/diff_new_pack.AlydfR/_new  2014-05-22 06:51:07.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           okular
-Version:        4.13.0
+Version:        4.13.1
 Release:        0
 Summary:        Document Viewer
 License:        GPL-2.0+

++++++ okular-4.13.0.tar.xz -> okular-4.13.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/VERSION new/okular-4.13.1/VERSION
--- old/okular-4.13.0/VERSION   2014-04-10 00:01:39.000000000 +0200
+++ new/okular-4.13.1/VERSION   2014-05-04 19:43:44.000000000 +0200
@@ -1 +1 @@
-okular v0.19.0
+okular v0.19.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/core/utils.cpp 
new/okular-4.13.1/core/utils.cpp
--- old/okular-4.13.0/core/utils.cpp    2014-04-10 00:01:39.000000000 +0200
+++ new/okular-4.13.1/core/utils.cpp    2014-05-04 19:43:44.000000000 +0200
@@ -16,11 +16,13 @@
 #include <QDesktopWidget>
 #include <QImage>
 #include <QIODevice>
+#include <cmath>
 
 #ifdef Q_WS_X11
   #include "config-okular.h"
   #if HAVE_LIBKSCREEN
    #include <kscreen/config.h>
+   #include <kscreen/edid.h>
   #endif
   #include <QX11Info>
 #endif
@@ -100,40 +102,55 @@
         // Firstly try to retrieve DPI via LibKScreen
 #if HAVE_LIBKSCREEN
         KScreen::Config* config = KScreen::Config::current();
-        KScreen::OutputList outputs = config->outputs();
-        QPoint globalPos = widgetOnScreen->parentWidget() ?
-                    widgetOnScreen->mapToGlobal(widgetOnScreen->pos()):
-                    widgetOnScreen->pos();
-        QRect widgetRect(globalPos, widgetOnScreen->size());
-
-        KScreen::Output* selectedOutput = 0;
-        int maxArea = 0;
-        Q_FOREACH(KScreen::Output *output, outputs)
-        {
-            if (output->currentMode())
+        if (config) {
+            KScreen::OutputList outputs = config->outputs();
+            QPoint globalPos = widgetOnScreen->parentWidget() ?
+                        widgetOnScreen->mapToGlobal(widgetOnScreen->pos()):
+                        widgetOnScreen->pos();
+            QRect widgetRect(globalPos, widgetOnScreen->size());
+
+            KScreen::Output* selectedOutput = 0;
+            int maxArea = 0;
+            Q_FOREACH(KScreen::Output *output, outputs)
             {
-                QRect outputRect(output->pos(),output->currentMode()->size());
-                QRect intersection = outputRect.intersected(widgetRect);
-                int area = intersection.width()*intersection.height();
-                if (area > maxArea)
+                if (output->currentMode())
                 {
-                    maxArea = area;
-                    selectedOutput = output;
+                    QRect 
outputRect(output->pos(),output->currentMode()->size());
+                    QRect intersection = outputRect.intersected(widgetRect);
+                    int area = intersection.width()*intersection.height();
+                    if (area > maxArea)
+                    {
+                        maxArea = area;
+                        selectedOutput = output;
+                    }
                 }
             }
-        }
 
-        if (selectedOutput)
-        {
-            kDebug() << "Found widget at output #" << selectedOutput->id();
-            QRect 
outputRect(selectedOutput->pos(),selectedOutput->currentMode()->size());
-            QSize szMM = selectedOutput->sizeMm();
-            kDebug() << "Output size is " << szMM;
-            if (szMM.width() > 0 && szMM.height() > 0 && outputRect.width() > 
0 && outputRect.height() > 0) {
-                QSizeF 
res(static_cast<qreal>(outputRect.width())*25.4/szMM.width(),
-                           
static_cast<qreal>(outputRect.height())*25.4/szMM.height());
-                kDebug() << "Output DPI is " << res;
-                return res;
+            if (selectedOutput)
+            {
+                kDebug() << "Found widget at output #" << selectedOutput->id();
+                QRect 
outputRect(selectedOutput->pos(),selectedOutput->currentMode()->size());
+                QSize szMM = selectedOutput->sizeMm();
+                kDebug() << "Output size is " << szMM;
+                if (selectedOutput->edid()) {
+                    kDebug() << "EDID WxH: " << 
selectedOutput->edid()->width()  << 'x' << selectedOutput->edid()->height();
+                }
+                if (szMM.width() > 0 && szMM.height() > 0 && 
outputRect.width() > 0 && outputRect.height() > 0
+                    && selectedOutput->edid()
+                    && 
std::abs(static_cast<int>(selectedOutput->edid()->width()*10) - szMM.width()) < 
10
+                    && 
std::abs(static_cast<int>(selectedOutput->edid()->height()*10) - szMM.height()) 
< 10)
+                {
+                    // sizes in EDID seem to be consistent
+                    QSizeF 
res(static_cast<qreal>(outputRect.width())*25.4/szMM.width(),
+                              
static_cast<qreal>(outputRect.height())*25.4/szMM.height());
+                    if (!selectedOutput->isHorizontal())
+                    {
+                        kDebug() << "Output is vertical, transposing DPI rect";
+                        res.transpose();
+                    }
+                    kDebug() << "Output DPI is " << res;
+                    return res;
+                }
             }
         }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/core/version.h 
new/okular-4.13.1/core/version.h
--- old/okular-4.13.0/core/version.h    2014-04-10 00:01:39.000000000 +0200
+++ new/okular-4.13.1/core/version.h    2014-05-04 19:43:44.000000000 +0200
@@ -10,10 +10,10 @@
 #ifndef _OKULAR_VERSION_H_
 #define _OKULAR_VERSION_H_
 
-#define OKULAR_VERSION_STRING "0.19.0"
+#define OKULAR_VERSION_STRING "0.19.1"
 #define OKULAR_VERSION_MAJOR 0
 #define OKULAR_VERSION_MINOR 19
-#define OKULAR_VERSION_RELEASE 0
+#define OKULAR_VERSION_RELEASE 1
 #define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
 
 #define OKULAR_VERSION \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/part.cpp new/okular-4.13.1/part.cpp
--- old/okular-4.13.0/part.cpp  2014-04-10 00:01:39.000000000 +0200
+++ new/okular-4.13.1/part.cpp  2014-05-04 19:43:44.000000000 +0200
@@ -446,12 +446,10 @@
     m_pageSizeLabel = new PageSizeLabel( m_bottomBar, m_document );
     bottomBarLayout->setMargin( 0 );
     bottomBarLayout->setSpacing( 0 );
-    bottomBarLayout->addWidget( m_pageSizeLabel->antiWidget() );
     bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, 
QSizePolicy::Minimum ) );
     m_miniBarLogic = new MiniBarLogic( this, m_document );
     m_miniBar = new MiniBar( m_bottomBar, m_miniBarLogic );
     bottomBarLayout->addWidget( m_miniBar );
-    bottomBarLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Expanding, 
QSizePolicy::Minimum ) );
     bottomBarLayout->addWidget( m_pageSizeLabel );
     rightLayout->addWidget( m_bottomBar );
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/ui/pagesizelabel.cpp 
new/okular-4.13.1/ui/pagesizelabel.cpp
--- old/okular-4.13.0/ui/pagesizelabel.cpp      2014-04-10 00:01:39.000000000 
+0200
+++ new/okular-4.13.1/ui/pagesizelabel.cpp      2014-05-04 19:43:44.000000000 
+0200
@@ -12,9 +12,9 @@
 #include "core/document.h"
 
 PageSizeLabel::PageSizeLabel( QWidget * parent, Okular::Document * document )
-    : QLabel( parent ), m_document( document ),
-    m_antiWidget( NULL )
+    : KSqueezedTextLabel( parent ), m_document( document )
 {
+    setAlignment( Qt::AlignRight );
 }
 
 PageSizeLabel::~PageSizeLabel()
@@ -22,52 +22,15 @@
     m_document->removeObserver( this );
 }
 
-QWidget *PageSizeLabel::antiWidget()
-{
-    if (!m_antiWidget)
-    {
-        m_antiWidget = new QWidget(qobject_cast<QWidget*>(parent()));
-        m_antiWidget->resize(0, 0);
-    }
-    return m_antiWidget;
-}
-
-void PageSizeLabel::notifySetup( const QVector< Okular::Page * > & pageVector, 
int setupFlags )
-{
-    // only process data when document changes
-    if ( !( setupFlags & Okular::DocumentObserver::DocumentChanged ) )
-        return;
-
-    // if document is closed or all pages have size hide widget
-    int pages = pageVector.count();
-    if ( pages < 1 || m_document->allPagesSize().isValid() )
-    {
-        hide();
-        if ( m_antiWidget )
-            m_antiWidget->hide();
-        return;
-    }
-    else
-    {
-        show();
-        if ( m_antiWidget )
-            m_antiWidget->show();
-    }
-}
-
 void PageSizeLabel::notifyCurrentPageChanged( int previousPage, int 
currentPage )
 {
     Q_UNUSED( previousPage )
 
-    if (isVisible())
+    // if the document is opened
+    if ( m_document->pages() > 0 && !m_document->allPagesSize().isValid() )
     {
-        // if the document is opened
-        if ( m_document->pages() > 0 )
-        {
-            setText( m_document->pageSizeString( currentPage ) );
-            m_antiWidget->setFixedSize( sizeHint() );
-        }
-   }
+        setText( m_document->pageSizeString( currentPage ) );
+    }
 }
 
 #include "pagesizelabel.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/okular-4.13.0/ui/pagesizelabel.h 
new/okular-4.13.1/ui/pagesizelabel.h
--- old/okular-4.13.0/ui/pagesizelabel.h        2014-04-10 00:01:39.000000000 
+0200
+++ new/okular-4.13.1/ui/pagesizelabel.h        2014-05-04 19:43:44.000000000 
+0200
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_PAGESIZELABEL_H_
 #define _OKULAR_PAGESIZELABEL_H_
 
-#include <qlabel.h>
+#include <ksqueezedtextlabel.h>
 
 #include "core/observer.h"
 
@@ -21,7 +21,7 @@
 /**
  * @short A widget to display page size.
  */
-class PageSizeLabel : public QLabel, public Okular::DocumentObserver
+class PageSizeLabel : public KSqueezedTextLabel, public 
Okular::DocumentObserver
 {
     Q_OBJECT
 
@@ -29,15 +29,11 @@
         PageSizeLabel( QWidget *parent, Okular::Document * document );
         ~PageSizeLabel();
 
-        QWidget *antiWidget();
-
         // [INHERITED] from DocumentObserver
-        void notifySetup( const QVector< Okular::Page * > & pages, int 
setupFlags );
         void notifyCurrentPageChanged( int previous, int current );
 
     private:
         Okular::Document * m_document;
-        QWidget *m_antiWidget;
 };
 
 #endif

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to