I have made the following changes intended for : CE:MW:Shared / mlite 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/6942 Thank You, Marko Saukko [This message was auto-generated] --- Request # 6942: Messages from BOSS: State: review at 2012-10-05T09:07:10 by bossbot Reviews: 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: Project:MTF:MW / mlite -> CE:MW:Shared / mlite changes files: -------------- --- mlite.changes +++ mlite.changes @@ -0,0 +1,4 @@ +* Thu Oct 4 2012 Robin Burchell <[email protected]> - 0.0.5 +- Update to 0.0.5, superscedes all existing patches +- Drop some problematic API from MGConfItem which will preclude drop-in dconf replacement (via a patch, so we can back it out easily if need be) + old: ---- 0001-Fix-BMC-20892.patch 0002-Fix-BMC-21338.patch 0003-Fix-BMC-21561.patch Makefile mlite-0.0.4.tar.bz2 new: ---- 0001-remove-API-which-will-block-use-of-dconf.patch mlite-0.0.5.tar.bz2 spec files: ----------- --- mlite.spec +++ mlite.spec @@ -1,22 +1,22 @@ # # Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.23 +# Generated by: spectacle version 0.25 # + +Name: mlite + # >> macros # << macros -Name: mlite Summary: Useful classes originating from MeeGo Touch -Version: 0.0.4 +Version: 0.0.5 Release: 1 Group: System/Libraries License: LGPL v2.1 URL: http://www.meego.com Source0: %{name}-%{version}.tar.bz2 Source100: mlite.yaml -Patch0: 0001-Fix-BMC-20892.patch -Patch1: 0002-Fix-BMC-21338.patch -Patch2: 0003-Fix-BMC-21561.patch +Patch0: 0001-remove-API-which-will-block-use-of-dconf.patch Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig BuildRequires: pkgconfig(QtDBus) @@ -24,13 +24,11 @@ BuildRequires: pkgconfig(QtGui) BuildRequires: pkgconfig(gconf-2.0) - %description Select set of useful classes from meegotouch that do not require taking in all of meegotouch. - %package devel Summary: mlite development package Group: System/Libraries @@ -42,14 +40,10 @@ %prep -%setup -q -n %{name}-%{version} +%setup -q -n %{name} -# 0001-Fix-BMC-20892.patch +# 0001-remove-API-which-will-block-use-of-dconf.patch %patch0 -p1 -# 0002-Fix-BMC-21338.patch -%patch1 -p1 -# 0003-Fix-BMC-21561.patch -%patch2 -p1 # >> setup # << setup @@ -63,6 +57,7 @@ # >> build post # << build post + %install rm -rf %{buildroot} # >> install pre @@ -73,22 +68,16 @@ # << install post - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig - - - - %files %defattr(-,root,root,-) %{_libdir}/libmlite.so.* # >> files # << files - %files devel %defattr(-,root,root,-) %{_includedir}/mlite @@ -96,4 +85,3 @@ %{_libdir}/libmlite.so # >> files devel # << files devel - other changes: -------------- ++++++ 0001-remove-API-which-will-block-use-of-dconf.patch (new) --- 0001-remove-API-which-will-block-use-of-dconf.patch +++ 0001-remove-API-which-will-block-use-of-dconf.patch @@ -0,0 +1,101 @@ +From d72b5fe2e1cb8d40838b51b7b5bd8fd946648c2d Mon Sep 17 00:00:00 2001 +From: Robin Burchell <[email protected]> +Date: Thu, 4 Oct 2012 19:53:09 +0000 +Subject: [PATCH] remove API which will block use of dconf. + +let's find out if any applications use this, hey? +--- + mgconfitem.cpp | 48 ------------------------------------------------ + mgconfitem.h | 17 ----------------- + 2 files changed, 65 deletions(-) + +diff --git a/mgconfitem.cpp b/mgconfitem.cpp +index ae5ef6f..d9a1e43 100644 +--- a/mgconfitem.cpp ++++ b/mgconfitem.cpp +@@ -311,54 +311,6 @@ void MGConfItem::unset() + set(QVariant()); + } + +-QList<QString> MGConfItem::listDirs() const +-{ +- QList<QString> children; +- +- withClient(client) { +- QByteArray k = convertKey(priv->key); +- GError *error = NULL; +- GSList *dirs = gconf_client_all_dirs(client, k.data(), &error); +- if(error) { +- qDebug() << error->message; +- g_error_free(error); +- return children; +- } +- +- for (GSList *d = dirs; d; d = d->next) { +- children.append(convertKey((char *)d->data)); +- g_free(d->data); +- } +- g_slist_free(dirs); +- } +- +- return children; +-} +- +-QList<QString> MGConfItem::listEntries() const +-{ +- QList<QString> children; +- +- withClient(client) { +- QByteArray k = convertKey(priv->key); +- GError *error = NULL; +- GSList *entries = gconf_client_all_entries(client, k.data(), &error); +- if(error) { +- qDebug() << error->message; +- g_error_free(error); +- return children; +- } +- +- for (GSList *e = entries; e; e = e->next) { +- children.append(convertKey(((GConfEntry *)e->data)->key)); +- gconf_entry_free((GConfEntry *)e->data); +- } +- g_slist_free(entries); +- } +- +- return children; +-} +- + MGConfItem::MGConfItem(const QString &key, QObject *parent) + : QObject(parent) + { +diff --git a/mgconfitem.h b/mgconfitem.h +index 915f30f..efdeb34 100644 +--- a/mgconfitem.h ++++ b/mgconfitem.h +@@ -113,23 +113,6 @@ public: + */ + void unset(); + +- /*! Return a list of the directories below this item. The +- returned strings are absolute key names like +- "/myapp/settings". +- +- A directory is a key that has children. The same key might +- also have a value, but that is confusing and best avoided. +- */ +- QList<QString> listDirs() const; +- +- /*! Return a list of entries below this item. The returned +- strings are absolute key names like "/myapp/settings/first". +- +- A entry is a key that has a value. The same key might also +- have children, but that is confusing and is best avoided. +- */ +- QList<QString> listEntries() const; +- + Q_SIGNALS: + /*! Emitted when the value of this item has changed. + */ +-- +1.7.10.3 + ++++++ mlite-0.0.4.tar.bz2 -> mlite-0.0.5.tar.bz2 --- MDesktopEntry +++ MDesktopEntry @@ -0,0 +1 @@ +#include "mdesktopentry.h" --- mdesktopentry.cpp +++ mdesktopentry.cpp @@ -21,11 +21,11 @@ #include <QStringList> #include <QLocale> #include <QTextStream> +#include <QTextCodec> #include <QDebug> #include "mdesktopentry.h" #include "mdesktopentry_p.h" -#include "mgconfitem.h" const QString TypeKey("Desktop Entry/Type"); const QString VersionKey("Desktop Entry/Version"); @@ -135,6 +135,7 @@ QString currentGroup; QStringList groupNames; QTextStream stream(&device); + stream.setCodec(QTextCodec::codecForName("UTF-8")); while (!stream.atEnd()) { QString line = stream.readLine().trimmed(); if (!line.isEmpty() && !line.startsWith('#')) { @@ -308,11 +309,7 @@ QString name = value(NameKey); QString lang, script, country, postfixKey; - MGConfItem item("/meego/ux/locale"); - if (item.value() == QVariant::Invalid) - parsePosixLang(getenv("LANG"), &lang, &country, &script); - else - parsePosixLang(item.value().toString(), &lang, &country, &script); + parsePosixLang(getenv("LANG"), &lang, &country, &script); if (contains(postfixKey = NameKey + '[' + lang + '_' + country + '@' + script + ']') || contains(postfixKey = NameKey + '[' + lang + '_' + country + ']') || --- mlite.pro +++ mlite.pro @@ -1,66 +1,83 @@ -QT = gui core dbus +QT = core dbus TARGET = $$qtLibraryTarget(mlite) TEMPLATE = lib +DEFINES += MLITE_LIBRARY + CONFIG += link_pkgconfig -PKGCONFIG += gconf-2.0 +packagesExist(gconf-2.0) { + PKGCONFIG += gconf-2.0 + DEFINES += HAVE_GCONF + HEADERS += mgconfitem.h \ + MGConfItem + SOURCES += mgconfitem.cpp + + INSTALL_HEADERS += mgconfitem.h \ + MGConfItem + +} else { + warning("gconf-2.0 not found; MGConfItem will not be built") +} + +equals(QT_MAJOR_VERSION, 4) { + QT += gui + SOURCES += maction.cpp \ + mremoteaction.cpp \ + mnotification.cpp \ + mnotificationgroup.cpp \ + mnotificationmanager.cpp \ + mnotificationmanagerproxy.cpp -DEFINES += MLITE_LIBRARY + HEADERS += maction.h \ + maction_p.h \ + MAction \ + mremoteaction.h \ + mremoteaction_p.h \ + mnotification.h \ + mnotification_p.h \ + mnotificationgroup.h \ + mnotificationgroup_p.h \ + mnotificationmanager.h \ + mnotificationmanagerproxy.h \ + MNotification \ + MNotificationGroup \ + + INSTALL_HEADERS += mremoteaction.h \ + MAction \ + mnotification.h \ + mnotificationgroup.h \ + MNotification \ + MNotificationGroup \ + maction.h + +} OBJECTS_DIR = .obj MOC_DIR = .moc SOURCES += \ - mgconfitem.cpp \ mdesktopentry.cpp \ - mremoteaction.cpp \ - maction.cpp \ - mfiledatastore.cpp \ - mnotification.cpp \ - mnotificationgroup.cpp \ - mnotificationmanager.cpp \ - mnotificationmanagerproxy.cpp + mfiledatastore.cpp HEADERS += \ mdesktopentry_p.h \ mdesktopentry.h \ - mgconfitem.h \ mlite-global.h \ - mremoteaction.h \ - mremoteaction_p.h \ - maction.h \ - maction_p.h \ - MAction \ mfiledatastore.h \ mfiledatastore_p.h \ mdataaccess.h \ mdatastore.h \ - mnotification.h \ - mnotification_p.h \ - mnotificationgroup.h \ - mnotificationgroup_p.h \ - mnotificationmanager.h \ - mnotificationmanagerproxy.h \ - MNotification \ - MGConfItem \ - MNotificationGroup + MDesktopEntry +# TODO: sanitize based on conditional builds INSTALL_HEADERS += \ - mgconfitem.h \ mdesktopentry.h \ - mremoteaction.h \ - maction.h \ mlite-global.h \ - MAction \ mfiledatastore.h \ - mnotification.h \ - mnotificationgroup.h \ - MNotification \ - MGConfItem \ - MNotificationGroup + MDesktopEntry pcfiles.files += mlite.pc -pcfiles.path += $$INSTALL_ROOT/usr/lib/pkgconfig +pcfiles.path += $$INSTALL_ROOT/$$[QT_INSTALL_LIBS]/pkgconfig headers.files += $$INSTALL_HEADERS headers.path += $$INSTALL_ROOT/usr/include/mlite @@ -70,7 +87,7 @@ INSTALLS += target headers pcfiles TRANSLATIONS += $${SOURCES} $${HEADERS} $${OTHER_FILES} -VERSION = 0.0.4 +VERSION = 0.0.5 PROJECT_NAME = mlite dist.commands += rm -fR $${PROJECT_NAME}-$${VERSION} && --- mremoteaction.cpp +++ mremoteaction.cpp @@ -129,5 +129,8 @@ Q_D(MRemoteAction); QDBusInterface interface(d->serviceName, d->objectPath, d->interface.toAscii()); - interface.asyncCallWithArgumentList(d->methodName, d->arguments); + if (interface.isValid()) + { + interface.asyncCallWithArgumentList(d->methodName, d->arguments); + } } ++++++ mlite.yaml --- mlite.yaml +++ mlite.yaml @@ -1,6 +1,6 @@ Name: mlite Summary: Useful classes originating from MeeGo Touch -Version: 0.0.4 +Version: 0.0.5 Release: 1 Group: System/Libraries License: LGPL v2.1 @@ -8,9 +8,7 @@ Sources: - "%{name}-%{version}.tar.bz2" Patches: - - 0001-Fix-BMC-20892.patch - - 0002-Fix-BMC-21338.patch - - 0003-Fix-BMC-21561.patch + - 0001-remove-API-which-will-block-use-of-dconf.patch Description: | Select set of useful classes from meegotouch that do not require taking in all of meegotouch. ++++++ deleted files: --- 0001-Fix-BMC-20892.patch --- 0002-Fix-BMC-21338.patch --- 0003-Fix-BMC-21561.patch --- Makefile
