Meego-app-browser failed in T:T. From build log, it seems to be with this update. Please take a look
Peter > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Rusty Lynch > Sent: Friday, April 01, 2011 10:20 AM > To: [email protected] > Subject: [meego-commits] 15563: Changes to > Trunk:Testing/meego-qml-launcher > > Hi, > I have made the following changes to meego-qml-launcher in project > Trunk:Testing. Please review and accept ASAP. > > Thank You, > Rusty Lynch > > [This message was auto-generated] > > --- > > Request #15563: > > submit: devel:meego-ux/meego-qml-launcher(r3) -> > Trunk:Testing/meego-qml-launcher > > > Message: > update > > State: new 2011-03-31T19:19:29 rusty > Comment: None > > > > changes files: > -------------- > --- meego-qml-launcher.changes > +++ meego-qml-launcher.changes > @@ -0,0 +1,9 @@ > +* Thu Mar 31 2011 Rusty Lynch <[email protected]> - 0.2.2 > +- Cleanup orientation handling > +- Add dbus interface for hiding an application > +- Add support for automatically disabling the orientation sensor > + when the application is in the background > + > +* Thu Mar 31 2011 Marko Saukko <[email protected]> - 0.2.1 > +- Cleanup the packaging a bit. > + > > old: > ---- > meego-qml-launcher-0.2.1.tar.bz2 > > new: > ---- > meego-qml-launcher-0.2.2.tar.bz2 > > spec files: > ----------- > --- meego-qml-launcher.spec > +++ meego-qml-launcher.spec > @@ -1,13 +1,13 @@ > # > # Do NOT Edit the Auto-generated Part! > -# Generated by: spectacle version 0.21 > +# Generated by: spectacle version 0.22 > # > # >> macros > # << macros > > Name: meego-qml-launcher > Summary: MeeGo UX QML Application Launcher > -Version: 0.2.1 > +Version: 0.2.2 > Release: 1 > Group: Applications/System > License: Apache 2.0 > @@ -16,17 +16,14 @@ > Source100: meego-qml-launcher.yaml > Requires(post): /sbin/ldconfig > Requires(postun): /sbin/ldconfig > -BuildRequires: pkgconfig(dbus-1) > -BuildRequires: pkgconfig(xdamage) > -BuildRequires: pkgconfig(icu-uc) > -BuildRequires: pkgconfig(x11) > -BuildRequires: pkgconfig(xcomposite) > +BuildRequires: pkgconfig(QtSensors) > +BuildRequires: pkgconfig(QtCore) > +BuildRequires: pkgconfig(QtOpenGL) > +BuildRequires: pkgconfig(QtDBus) > BuildRequires: pkgconfig(mlite) > +BuildRequires: pkgconfig(x11) > BuildRequires: pkgconfig(xi) > BuildRequires: pkgconfig(xext) > -BuildRequires: libqt-devel > -BuildRequires: libqtopengl-devel > -BuildRequires: qt-mobility-devel > > > %description > > other changes: > -------------- > > ++++++ meego-qml-launcher-0.2.1.tar.bz2 -> > meego-qml-launcher-0.2.2.tar.bz2 > --- config.pri > +++ config.pri > @@ -1,5 +1,5 @@ > > -LAUNCHER_VERSION = 0.2.1 > +LAUNCHER_VERSION = 0.2.2 > LAUNCHER_VERSION_MAJOR = 0.2 > > LAUNCHER_PREFIX = /usr > --- launcher/main.cpp > +++ launcher/main.cpp > @@ -7,10 +7,7 @@ > */ > > #include <QPluginLoader> > -#include <QInputContext> > -#include <QOrientationReading> > -#include <QOrientationSensor> > -#include <QOrientationFilter> > +#include <QObject> > #include <cstdlib> > > #include "launcherapp.h" > @@ -20,49 +17,6 @@ > > QTM_USE_NAMESPACE > > -// Copied from libmeegotouch, which we don't link against. We need it > -// defined so we can connect a signal to the MInputContext object > -// (loaded from a plugin) that uses this type. > -namespace M { > - enum OrientationAngle { Angle0=0, Angle90=90, Angle180=180, > Angle270=270 }; > -} > - > -class OrientationSensorFilter : public QOrientationFilter > -{ > - bool filter(QOrientationReading *reading) > - { > - int qmlOrient; > - M::OrientationAngle mtfOrient; > - switch (reading->orientation()) > - { > - case QOrientationReading::LeftUp: > - mtfOrient = M::Angle270; > - qmlOrient = 2; > - break; > - case QOrientationReading::TopDown: > - mtfOrient = M::Angle180; > - qmlOrient = 3; > - break; > - case QOrientationReading::RightUp: > - mtfOrient = M::Angle90; > - qmlOrient = 0; > - break; > - default: // assume QOrientationReading::TopUp > - mtfOrient = M::Angle0; > - qmlOrient = 1; > - break; > - } > - > - ((LauncherApp*)qApp)->setOrientation(qmlOrient); > - > - // Need to tell the MInputContext plugin to rotate the VKB too > - QMetaObject::invokeMethod(qApp->inputContext(), > - "notifyOrientationChanged", > - Q_ARG(M::OrientationAngle, > mtfOrient)); > - return false; > - } > -}; > - > int main(int argc, char *argv[]) > { > if (argc == 1) > @@ -79,6 +33,7 @@ > QString cmd; > QString cdata; > QString app; > + > for (int i=1; i<argc; i++) > { > QString s(argv[i]); > @@ -114,14 +69,25 @@ > } > } > > - QString identifier = QString(app); > - LauncherApp a(argc, argv, identifier, noRaise); > + // Set up application > + LauncherApp a(argc, argv); > + a.setApplicationName(app); > + a.dbusInit(argc, argv); > > - initAtoms (); > + // Set up X stuff > + initAtoms(); > > - LauncherWindow *window = new LauncherWindow(fullscreen, width, > height, opengl, noRaise); > + // Create window > + LauncherWindow *window = new LauncherWindow(fullscreen, width, > height, opengl); > if (!noRaise) > + { > + qDebug("Raising window"); > window->show(); > + } > + else > + { > + qDebug("Not raising window"); > + } > > if (!cmd.isEmpty() || !cdata.isEmpty()) > { > @@ -132,11 +98,6 @@ > new ForwardingDelegate(list, window, &a); > } > > - QOrientationSensor sensor; > - OrientationSensorFilter filter; > - sensor.addFilter(&filter); > - sensor.start(); > - > foreach (QString path, QCoreApplication::libraryPaths()) > { > QPluginLoader loader(path + "/libmultipointtouchplugin.so"); > --- src/appadaptor.cpp > +++ src/appadaptor.cpp > @@ -33,6 +33,12 @@ > // destructor > } > > +void MeeGoAppAdaptor::hide() > +{ > + // handle method call com.meego.launcher.hide > + QMetaObject::invokeMethod(parent(), "hide"); > +} > + > void MeeGoAppAdaptor::raise(const QStringList &cmdline) > { > // handle method call com.meego.launcher.raise > --- src/appadaptor.h > +++ src/appadaptor.h > @@ -9,8 +9,8 @@ > * before re-generating it. > */ > > -#ifndef APPADAPTOR_H_1297288327 > -#define APPADAPTOR_H_1297288327 > +#ifndef APPADAPTOR_H_1301356598 > +#define APPADAPTOR_H_1301356598 > > #include <QtCore/QObject> > #include <QtDBus/QtDBus> > @@ -33,6 +33,7 @@ > " <method name=\"raise\">\n" > " <arg type=\"as\" name=\"cmdline\"/>\n" > " </method>\n" > +" <method name=\"hide\"/>\n" > " </interface>\n" > "") > public: > @@ -41,6 +42,7 @@ > > public: // PROPERTIES > public Q_SLOTS: // METHODS > + void hide(); > void raise(const QStringList &cmdline); > Q_SIGNALS: // SIGNALS > }; > --- src/com.meego.launcher.xml > +++ src/com.meego.launcher.xml > @@ -3,5 +3,6 @@ > <method name="raise"> > <arg name="cmdline" type="as"/> > </method> > + <method name="hide"/> > </interface> > </node> > --- src/launcherapp.cpp > +++ src/launcherapp.cpp > @@ -12,9 +12,14 @@ > #include <stdio.h> > #include <QX11Info> > #include <X11/Xatom.h> > +#include <QInputContext> > #include <QInputContextFactory> > #include <cstdlib> > > +// Mobility > +#include <QOrientationReading> > +#include <QOrientationSensor> > + > #include "launcherapp.h" > #include "launcheratoms.h" > #include "launcherwindow.h" > @@ -48,15 +53,13 @@ > } > } > > -LauncherApp::LauncherApp(int &argc, char **argv, const QString > &appIdentifier, bool noRaise) : > +LauncherApp::LauncherApp(int &argc, char **argv) : > QApplication(argc, argv), > orientation(1), > - noRaise(noRaise), > foregroundWindow(0) > { > - setApplicationName(appIdentifier); > - > - dbusInit(argc, argv); > + orientationSensor.start(); > + connect(&orientationSensor, SIGNAL(readingChanged()), > SLOT(onOrientationChanged())); > > QString theme = MGConfItem("/meego/ux/theme").value().toString(); > QString themeFile = QString("/usr/share/themes/") + theme + > "/theme.ini"; > @@ -72,7 +75,7 @@ > QInputContext *ic = QInputContextFactory::create("MInputContext", 0); > if(ic) { > setInputContext(ic); > - connect((QObject*)ic, SIGNAL(keyboardActive()), this, > SLOT(keyboardActive())); > + connect(ic, SIGNAL(keyboardActive()), this, SLOT(keyboardActive())); > } > > qInstallMsgHandler(messageHandler); > @@ -139,6 +142,14 @@ > } > } > > +void LauncherApp::hide() > +{ > + foreach (QWidget *widget, QApplication::topLevelWidgets()) > + { > + widget->hide(); > + } > +} > + > void LauncherApp::appPageLoaded() > { > qint64 time = QDateTime::currentDateTime().toMSecsSinceEpoch(); > @@ -237,3 +248,59 @@ > return QApplication::x11EventFilter(event); > } > > +void LauncherApp::setOrientationLocked(bool locked) > +{ > + orientationLocked = locked; > + if (locked) > + { > + orientationSensor.stop(); > + emit stopOrientationSensor(); > + } > + else > + { > + orientationSensor.start(); > + emit startOrientationSensor(); > + } > +} > + > +// Copied from libmeegotouch, which we don't link against. We need it > +// defined so we can connect a signal to the MInputContext object > +// (loaded from a plugin) that uses this type. > +namespace M { > + enum OrientationAngle { Angle0=0, Angle90=90, Angle180=180, > Angle270=270 }; > +} > + > +void LauncherApp::onOrientationChanged() > +{ > + int orientation = orientationSensor.reading()->orientation(); > + > + qDebug("Handling orientation %d", orientation); > + int qmlOrient; > + M::OrientationAngle mtfOrient; > + switch (orientation) > + { > + case QOrientationReading::LeftUp: > + mtfOrient = M::Angle270; > + qmlOrient = 2; > + break; > + case QOrientationReading::TopDown: > + mtfOrient = M::Angle180; > + qmlOrient = 3; > + break; > + case QOrientationReading::RightUp: > + mtfOrient = M::Angle90; > + qmlOrient = 0; > + break; > + default: // assume QOrientationReading::TopUp > + mtfOrient = M::Angle0; > + qmlOrient = 1; > + break; > + } > + > + ((LauncherApp*)qApp)->setOrientation(qmlOrient); > + > + // Need to tell the MInputContext plugin to rotate the VKB too > + QMetaObject::invokeMethod(inputContext(), > + "notifyOrientationChanged", > + Q_ARG(M::OrientationAngle, > mtfOrient)); > +} > --- src/launcherapp.h > +++ src/launcherapp.h > @@ -11,17 +11,22 @@ > > #include <QApplication> > #include <QTimer> > +#include <QOrientationSensor> > + > +QTM_USE_NAMESPACE > > class QSettings; > > class LauncherApp : public QApplication > { > Q_OBJECT > - Q_PROPERTY(int orientation READ getOrientation NOTIFY > orientationChanged) > + Q_PROPERTY(int orientation READ getOrientation NOTIFY > orientationChanged); > + Q_PROPERTY(bool orientationLocked READ getOrientationLocked WRITE > setOrientationLocked); > Q_PROPERTY(int foregroundWindow READ getForegroundWindow > NOTIFY foregroundWindowChanged); > > public: > - explicit LauncherApp(int &argc, char **argv, const QString > &appIdentifier, > bool noRaise); > + explicit LauncherApp(int &argc, char **argv); > + void dbusInit(int argc, char** argv); > > int getOrientation() { > return orientation; > @@ -31,6 +36,11 @@ > emit orientationChanged(); > } > > + bool getOrientationLocked() { > + return orientationLocked; > + } > + void setOrientationLocked(bool locked); > + > int getForegroundWindow() { > return foregroundWindow; > } > @@ -40,6 +50,7 @@ > public slots: > void appPageLoaded(); > void raise(const QStringList& args); > + void hide(); > void keyboardActive(); > void keyboardTimeout(); > > @@ -47,14 +58,19 @@ > void orientationChanged(); > void foregroundWindowChanged(); > void dismissKeyboard(); > + void stopOrientationSensor(); > + void startOrientationSensor(); > > protected: > virtual bool x11EventFilter(XEvent *event); > > +private slots: > + void onOrientationChanged(); > + > private: > - void dbusInit(int argc, char** argv); > > int orientation; > + bool orientationLocked; > bool noRaise; > int foregroundWindow; > > @@ -65,6 +81,7 @@ > int lastButtonY; > QTimer keyboardTimer; > bool keyboardIsActive; > + QOrientationSensor orientationSensor; > }; > > #endif // LAUNCHER_APP_H > --- src/launcherwindow.cpp > +++ src/launcherwindow.cpp > @@ -68,9 +68,8 @@ > return nam; > } > > -LauncherWindow::LauncherWindow(bool fullscreen, int width, int height, bool > opengl, bool noRaise, bool setSource, QWidget *parent) : > - QWidget(parent), > - m_actualOrientation(0) > +LauncherWindow::LauncherWindow(bool fullscreen, int width, int height, bool > opengl, bool setSource, QWidget *parent) : > + QWidget(parent) > { > LauncherApp *app = static_cast<LauncherApp *>(qApp); > > @@ -154,9 +153,6 @@ > } > > setGeometry(QRect(0, 0, screenWidth, screenHeight)); > - > - if (!noRaise) > - view->show(); > } > > LauncherWindow::~LauncherWindow() > --- src/launcherwindow.h > +++ src/launcherwindow.h > @@ -19,10 +19,10 @@ > { > Q_OBJECT > Q_PROPERTY(int winId READ winId NOTIFY winIdChanged) > - Q_PROPERTY(int actualOrientation READ actualOrientation WRITE > setActualOrientation) > + Q_PROPERTY(int actualOrientation READ actualOrientation WRITE > setActualOrientation) > > public: > - LauncherWindow(bool fullscreen, int width, int height, bool opengl, bool > noRaise, bool setSource = true, QWidget *parent = NULL); > + LauncherWindow(bool fullscreen, int width, int height, bool opengl, bool > setSource = true, QWidget *parent = NULL); > ~LauncherWindow(); > > void forwardCall(const QStringList& parameters); > > ++++++ meego-qml-launcher.yaml > --- meego-qml-launcher.yaml > +++ meego-qml-launcher.yaml > @@ -1,6 +1,6 @@ > Name: meego-qml-launcher > Summary: MeeGo UX QML Application Launcher > -Version: 0.2.1 > +Version: 0.2.2 > Release: 1 > Group: Applications/System > License: Apache 2.0 > @@ -10,17 +10,13 @@ > Description: | > Utility used for launching QML based UX apps > > -PkgBR: > - - libqt-devel > - - libqtopengl-devel > - - qt-mobility-devel > PkgConfigBR: > - - dbus-1 > - - xdamage > - - icu-uc > - - x11 > - - xcomposite > + - QtSensors > + - QtCore > + - QtOpenGL > + - QtDBus > - mlite > + - x11 > - xi > - xext > Configure: none > > _______________________________________________ > MeeGo-commits mailing list > [email protected] > http://lists.meego.com/listinfo/meego-commits _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
