I have made the following changes intended for :
  CE:MW:Shared / qt-components

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7275

Thank You,
vesuri

[This message was auto-generated]

---

Request # 7275:

Messages from BOSS:

State: review at 2012-11-02T19:44:00 by bossbot

Reviews:
       new for home:vesuri:branches:CE:MW:Shared : 
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:vesuri:branches:CE:MW:Shared / qt-components -> CE:MW:Shared / 
qt-components
  
changes files:
--------------
--- qt-components.changes
+++ qt-components.changes
@@ -0,0 +1,3 @@
+* Fri Nov 02 2012 Vesa Halttunen <[email protected]> - 1.4.5
+- Hide the status bar if there is no valid pixmap to be drawn (from Vesa)
+

old:
----
  qt-components-1.4.4.tar.bz2

new:
----
  qt-components-1.4.5.tar.bz2

spec files:
-----------
--- qt-components.spec
+++ qt-components.spec
@@ -9,7 +9,7 @@
 # << macros
 
 Summary:    Qt Quick UX Components
-Version:    1.4.4
+Version:    1.4.5
 Release:    1
 Group:      System/Libraries
 License:    BSD

other changes:
--------------

++++++ qt-components-1.4.4.tar.bz2 -> qt-components-1.4.5.tar.bz2
--- .gitignore
+++ .gitignore
@@ -1,136 +0,0 @@
-Makefile
-Makefile.*
-.make.cache
-.qmake.cache
-moc_*.cpp
-qrc_*.cpp
-*.o
-*.moc
-*.so
-*.user*
-*.bak
-*.exe
-*.dll
-*.lib
-*.pdb
-*.ilk
-*.exp
-*.obj
-*.a
-*.intermediate.manifest
-*.Debug
-*.Release
-*.xcodeproj
-*.sln
-*.suo
-*.vcproj
-*.vcxproj
-*.vcxproj.filters
-*.opensdf
-*.sdf
-*.mmp
-*.pkg
-*.mk
-*.loc
-*.rss
-*.app
-.DS_Store
-*~
-bld.inf
-bld.inf.*
-qmakepluginstubs/
-debug/
-release/
-/bin/
-/lib/
-/doc/html
-/imports/
-/features/*config.prf
-/demos/flickr/flickr
-/demos/musicplayer/musicplayer
-/examples/native/focus/focus
-/examples/meego/QmlComponentGallery/QmlComponentGallery
-/examples/meego/QmlComponentExtrasGallery/QmlComponentExtrasGallery
-/examples/meego/TutorialApplication/TutorialApplication
-/examples/symbian/extrasgallery/qmlextrasgallery
-/examples/symbian/gallery/qmlgallery
-/examples/symbian/scalefm/scalefm
-/tests/apicheck/tst_apicheck
-/tests/auto/maketestselftest/checktest/checktest
-/tests/auto/maketestselftest/dummy_output
-/tests/auto/maketestselftest/test/tst_maketestselftest
-/tests/auto/maketestselftest/test/tst_maketestselftest.app
-/tests/auto/common/busyindicator/tst_quickcomponentsbusyindicator
-/tests/auto/common/button/tst_quickcomponentsbutton
-/tests/auto/common/checkbox/tst_quickcomponentscheckbox
-/tests/auto/common/progressbar/tst_quickcomponentsprogressbar
-/tests/auto/common/slider/tst_quickcomponentsslider
-/tests/auto/components/qrangemodel/qrangemodel
-/tests/auto/meego/api_applicationwindow/tst_quickcomponentsapplicationwindow
-/tests/auto/meego/api_busyindicator/tst_quickcomponentsbusyindicator
-/tests/auto/meego/api_button/tst_quickcomponentsbutton
-/tests/auto/meego/api_buttoncolumn/tst_quickcomponentsbuttoncolumn
-/tests/auto/meego/api_buttonrow/tst_quickcomponentsbuttonrow
-/tests/auto/meego/api_checkbox/tst_quickcomponentscheckbox
-/tests/auto/meego/api_dialog/tst_quickcomponentsdialog
-/tests/auto/meego/api_multiselectiondialog/tst_quickcomponentsmultiselectiondialog
-/tests/auto/meego/api_pagestack/tst_quickcomponentspagestack
-/tests/auto/meego/api_progressbar/tst_quickcomponentsprogressbar
-/tests/auto/meego/api_querydialog/tst_quickcomponentsquerydialog
-/tests/auto/meego/api_radiobutton/tst_quickcomponentsradiobutton
-/tests/auto/meego/api_screen/tst_quickcomponentsscreen
-/tests/auto/meego/api_scrolldecorator/tst_quickcomponentsscrolldecorator
-/tests/auto/meego/api_selectiondialog/tst_quickcomponentsselectiondialog
-/tests/auto/meego/api_slider/tst_quickcomponentsslider
-/tests/auto/meego/api_tabgroup/tst_quickcomponentstabgroup
-/tests/auto/meego/api_textarea/tst_quickcomponentstextarea
-/tests/auto/meego/api_textfield/tst_quickcomponentstextfield
-/tests/auto/meego/api_toolbar/tst_quickcomponentstoolbar
-/tests/auto/meego/api_window/tst_quickcomponentswindow
-/tests/auto/meego/mlocalthemedaemonclient/mlocalthemedaemonclient
-/tests/auto/meego/mremotethemedaemonclient/mremotethemedaemonclient
-/tests/auto/meego/multipleviews/tst_multipleviews
-/tests/auto/meego/mwindowstate/mwindowstate
-/tests/auto/symbian/applicationwindow/tst_applicationwindow
-/tests/auto/symbian/button/tst_symbian_button
-/tests/auto/symbian/checkbox/tst_symbian_checkbox
-/tests/auto/symbian/declarativeicon/tst_symbian_declarativeicon
-/tests/auto/symbian/declarativeimplicitsizeitem/tst_symbian_declarativeimplicitsizeitem
-/tests/auto/symbian/declarativescreen/tst_declarativescreen
-/tests/auto/symbian/declarativestyle/tst_declarativestyle
-/tests/auto/symbian/extras/datepickerdialog/tst_symbian_datepickerdialog
-/tests/auto/symbian/extras/infobanner/tst_symbian_infobanner
-/tests/auto/symbian/extras/ratingindicator/tst_symbian_ratingindicator
-/tests/auto/symbian/extras/sectionscroller/tst_symbian_sectionscroller
-/tests/auto/symbian/extras/timepickerdialog/tst_symbian_timepickerdialog
-/tests/auto/symbian/extras/tumbler/tst_symbian_tumbler
-/tests/auto/symbian/extras/tumblerdialog/tst_symbian_tumblerdialog
-/tests/auto/symbian/iconpool/tst_symbian_iconpool
-/tests/auto/symbian/imageprovider/tst_symbian_imageprovider
-/tests/auto/symbian/indicatorcontainer/tst_symbian_indicatorcontainer
-/tests/auto/symbian/listheading/tst_symbian_listheading
-/tests/auto/symbian/listitem/tst_symbian_listitem
-/tests/auto/symbian/listitemtext/tst_symbian_listitemtext
-/tests/auto/symbian/networkindicator/tst_symbian_networkindicator
-/tests/auto/symbian/page/tst_symbian_page
-/tests/auto/symbian/pagestack/tst_symbian_pagestack
-/tests/auto/symbian/popupmanager/tst_popupmanager
-/tests/auto/symbian/progressbar/tst_symbian_progressbar
-/tests/auto/symbian/querydialog/tst_symbian_querydialog
-/tests/auto/symbian/radiobutton/tst_symbian_radiobutton
-/tests/auto/symbian/scrollbar/tst_symbian_scrollbar
-/tests/auto/symbian/selectionlistitem/tst_symbian_selectionlistitem
-/tests/auto/symbian/statusbar/tst_symbian_statusbar
-/tests/auto/symbian/switch/tst_symbian_switch
-/tests/auto/symbian/tabbar/tst_symbian_tabbar
-/tests/auto/symbian/tabbarlayout/tst_symbian_tabbarlayout
-/tests/auto/symbian/tabbutton/tst_symbian_tabbutton
-/tests/auto/symbian/tabgroup/tst_symbian_tabgroup
-/tests/auto/symbian/textarea/tst_symbian_textarea
-/tests/auto/symbian/textfield/tst_symbian_textfield
-/tests/auto/symbian/toolbar/tst_symbian_toolbar
-/tests/auto/symbian/toolbutton/tst_symbian_toolbutton
-/tests/auto/symbian/tooltip/tst_symbian_tooltip
-/tests/auto/symbian/window/tst_window
-/tests/manual/componenttest/componenttest
-/tests/manual/performancetest/performancetest
--- src/meego/StatusBar.qml
+++ src/meego/StatusBar.qml
@@ -50,7 +50,7 @@
     property bool __completed: false
 
     states: State {
-        name: "hide"; when: showStatusBar==false
+        name: "hide"; when: showStatusBar==false || statusBar.hasPixmap==false
         PropertyChanges { target: statusBar; anchors.topMargin: 
-statusBar.height; visible: false}
     }
 
--- src/meego/mdeclarativestatusbar.cpp
+++ src/meego/mdeclarativestatusbar.cpp
@@ -181,12 +181,6 @@
 void MDeclarativeStatusBar::paint(QPainter *painter, const 
QStyleOptionGraphicsItem *, QWidget *)
 {
     QT_TRY {
-
-        if (sharedPixmap.isNull()) {
-            MDeclarativeStatusBar *view = const_cast<MDeclarativeStatusBar 
*>(this);
-            view->querySharedPixmapFromProvider();
-        }
-
         if (sharedPixmap.isNull()) {
             painter->fillRect(boundingRect(), Qt::black);
             return;
@@ -291,16 +285,17 @@
 void MDeclarativeStatusBar::sharedPixmapHandleReceived(QDBusPendingCallWatcher 
* call)
 {
 #ifdef HAVE_DBUS
+    bool pixmapWasNull = sharedPixmap.isNull();
     QDBusPendingReply<quint32> reply = *call;
     if (reply.isError()) {
         qWarning() << "MDeclarativeStatusBar" << reply.error().message();
-        return;
-    }
-
+        sharedPixmap = QPixmap();
+    } else {
 #ifdef Q_WS_X11
-    quint32 tmp = reply;
-    sharedPixmap = QPixmap::fromX11Pixmap(tmp, QPixmap::ExplicitlyShared);
+        quint32 tmp = reply;
+        sharedPixmap = QPixmap::fromX11Pixmap(tmp, QPixmap::ExplicitlyShared);
 #endif
+    }
 
     setImplicitWidth(sharedPixmap.size().width());
     updateSharedPixmap();
@@ -312,11 +307,20 @@
     } else {
       qWarning() << "MDeclarativeStatusBar::sharedPixmapHandleReceived: scene 
is NULL!";
     }
+
+    if (sharedPixmap.isNull() != pixmapWasNull) {
+        emit hasPixmapChanged();
+    }
 #else
     Q_UNUSED(call)
 #endif
 }
 
+bool MDeclarativeStatusBar::hasPixmap() const
+{
+    return !sharedPixmap.isNull();
+}
+
 void MDeclarativeStatusBar::handlePixmapProviderOnline()
 {
     querySharedPixmapFromProvider();
--- src/meego/mdeclarativestatusbar.h
+++ src/meego/mdeclarativestatusbar.h
@@ -63,6 +63,7 @@
 {
     Q_OBJECT
     Q_PROPERTY(MDeclarativeScreen::Orientation orientation READ orientation 
WRITE setOrientation NOTIFY orientationChanged)
+    Q_PROPERTY(bool hasPixmap READ hasPixmap NOTIFY hasPixmapChanged)
 
 public:
     MDeclarativeStatusBar(QDeclarativeItem *parent = 0);
@@ -73,6 +74,8 @@
 
     virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget 
*);
 
+    bool hasPixmap() const;
+
 public Q_SLOTS:
     void updateXdamageEventSubscription();
 
@@ -113,6 +116,7 @@
 
 Q_SIGNALS:
     void orientationChanged();
+    void hasPixmapChanged();
 
 private Q_SLOTS:
     void disablePressedFeedback();
--- src/meego/themedaemon/mlocalthemedaemonclient.cpp
+++ src/meego/themedaemon/mlocalthemedaemonclient.cpp
@@ -44,7 +44,7 @@
 #include <QDebug>
 #include <QDir>
 
-MLocalThemeDaemonClient::MLocalThemeDaemonClient(QObject *parent) :
+MLocalThemeDaemonClient::MLocalThemeDaemonClient(const QString &testPath, 
QObject *parent) :
     MAbstractThemeDaemonClient(parent),
     m_pixmapCache(),
     m_imageDirNodes()
@@ -53,9 +53,14 @@
 #endif
 {
     QStringList themeRoots;
-    QString themeRoot;
+    QString themeRoot = testPath;
+    bool testMode = false;
+
+    if (themeRoot.isEmpty())
+        themeRoot = qgetenv("M_THEME_DIR");
+    else
+        testMode = true;
 
-    themeRoot = qgetenv("M_THEME_DIR");
     if (themeRoot.isEmpty()) {
 #if defined(THEME_DIR)
         themeRoot = THEME_DIR;
@@ -68,16 +73,21 @@
 #endif
     }
 
-    // we must always fallback to blanco for assets we don't provide in the 
custom theme
-    themeRoots += themeRoot + QDir::separator() + QLatin1String("blanco") + 
QDir::separator() + QLatin1String("meegotouch");
+    if (testMode == false) {
+        // we must always fallback to blanco for assets we don't provide in 
the custom theme
+        themeRoots += themeRoot + QDir::separator() + QLatin1String("blanco") 
+ QDir::separator() + QLatin1String("meegotouch");
 
 #ifdef HAVE_MLITE
-    // custom theme will be searched after blanco, meaning it will override 
assets from there
-    qDebug() << Q_FUNC_INFO << "Theme: " << 
themeItem.value("blanco").toString();
-    themeRoots += themeRoot + QDir::separator() + 
themeItem.value("blanco").toString() + QDir::separator() + 
QLatin1String("meegotouch");
+        // custom theme will be searched after blanco, meaning it will 
override assets from there
+        qDebug() << Q_FUNC_INFO << "Theme: " << 
themeItem.value("blanco").toString();
+        themeRoots += themeRoot + QDir::separator() + 
themeItem.value("blanco").toString() + QDir::separator() + 
QLatin1String("meegotouch");
 #else
-    qDebug() << Q_FUNC_INFO << "Theme: blanco (hardcoded)";
+        qDebug() << Q_FUNC_INFO << "Theme: blanco (hardcoded)";
 #endif
+    } else {
+        qDebug() << Q_FUNC_INFO << "Theme: test mode: " << themeRoot;
+        themeRoots += themeRoot;
+    }
 
     for (int i = 0; i < themeRoots.size(); ++i) {
         if (themeRoots.at(i).endsWith(QDir::separator()))
--- src/meego/themedaemon/mlocalthemedaemonclient.h
+++ src/meego/themedaemon/mlocalthemedaemonclient.h
@@ -69,7 +69,7 @@
      *               by the define THEME_DIR is used.
      * \param parent Parent object.
      */
-    MLocalThemeDaemonClient(QObject *parent = 0);
+    MLocalThemeDaemonClient(const QString &testPath = QString(), QObject 
*parent = 0);
     virtual ~MLocalThemeDaemonClient();
 
     /**

++++++ qt-components.yaml
--- qt-components.yaml
+++ qt-components.yaml
@@ -1,6 +1,6 @@
 Name: qt-components
 Summary: Qt Quick UX Components
-Version: 1.4.4
+Version: 1.4.5
 Release: 1
 Group: System/Libraries
 License: BSD



Reply via email to